/* FlexCal site — shared styles. Tokens mirror the extension's design system. */
:root {
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --ink: #111827;
  --body: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --green: #16a34a;
  --red: #dc2626;
  --radius: 12px;
  --max: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  font-family: 'Karla', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── Nav ─────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 700; font-size: 1.15rem; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 22px; height: 22px; border-radius: 6px; background: var(--accent);
  display: inline-grid; place-items: center; color: #fff; font-size: 0.7rem; font-weight: 700;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 640px) { .nav-links a:not(.btn) { display: none; } }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff !important; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-2); color: var(--ink) !important; border: 1px solid var(--line); }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }

/* ── Hero ────────────────────────────────────────────── */
.hero { padding: 96px 0 64px; text-align: center; }
.hero .kicker { margin-bottom: 14px; }
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.12; max-width: 720px; margin: 0 auto 20px;
}
.hero h1 em, h2 em { color: var(--accent); font-style: italic; }
.hero .sub { font-size: 1.2rem; color: var(--muted); max-width: 560px; margin: 0 auto 32px; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.hero-note { font-size: 0.85rem; color: var(--faint); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
  .hero > .wrap > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) backwards; }
  .hero > .wrap > *:nth-child(2) { animation-delay: 0.08s; }
  .hero > .wrap > *:nth-child(3) { animation-delay: 0.16s; }
  .hero > .wrap > *:nth-child(4) { animation-delay: 0.24s; }
  .hero > .wrap > *:nth-child(5) { animation-delay: 0.32s; }
}

/* ── Calendar mock ───────────────────────────────────── */
.cal {
  margin: 52px auto 0; max-width: 600px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  box-shadow: 0 24px 60px -30px rgba(17, 24, 39, 0.25); overflow: hidden; text-align: left;
}
.cal-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  font-size: 0.8rem; color: var(--muted); font-weight: 600;
}
.cal-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.cal-body { display: grid; grid-template-columns: 48px 1fr; padding: 14px 16px 20px; gap: 2px 10px; }
.cal-hour { font-size: 0.7rem; color: var(--faint); text-align: right; padding-top: 2px; }
.cal-row { border-top: 1px dashed var(--line); min-height: 34px; position: relative; }
.ev {
  position: absolute; left: 4px; right: 4px; top: 3px; bottom: 3px;
  border-radius: 7px; padding: 3px 10px; font-size: 0.75rem; font-weight: 600; color: #fff;
  display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden;
}
.ev small { font-weight: 400; opacity: 0.85; }
.ev-meeting { background: #94a3b8; }
.ev-task { background: var(--accent); }
.ev-task2 { background: var(--accent); opacity: 0.88; }
.ev-habit { background: var(--green); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes settle {
    0% { opacity: 0; translate: 0 -14px; scale: 0.97; }
    70% { opacity: 1; translate: 0 2px; }
    100% { opacity: 1; translate: 0 0; scale: 1; }
  }
  .ev-task, .ev-task2, .ev-habit { animation: settle 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) backwards; }
  .ev-habit { animation-delay: 0.9s; }
  .ev-task  { animation-delay: 1.25s; }
  .ev-task2 { animation-delay: 1.6s; }
}

/* ── Sections ────────────────────────────────────────── */
section { padding: 80px 0; }
section.alt { background: var(--surface-2); }
.kicker { color: var(--accent); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -0.01em; margin-bottom: 14px; }
.section-sub { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin-bottom: 44px; }
.center { text-align: center; }
.center .section-sub { margin-inline: auto; }

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
    .reveal { animation: reveal 1ms linear backwards; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  }
}

/* ── Steps ───────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step-n { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; margin-bottom: 16px; }
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.95rem; }
.step code, .faq code, .docs-body code, .prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
}
.step code { background: var(--accent-soft); border-color: transparent; color: #3730a3; }

/* ── Feature list ────────────────────────────────────── */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 40px; }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }
.feature { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; padding: 6px 0; }
.feature .ico { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.feature .ico svg { width: 16px; height: 16px; }
.feature h3 { font-size: 1rem; margin-bottom: 2px; }
.feature p { color: var(--muted); font-size: 0.92rem; }

/* ── FAQ ─────────────────────────────────────────────── */
.faq { max-width: 640px; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--faint); font-weight: 400; }
.faq details[open] summary::after { content: '–'; }
.faq p { color: var(--body); margin-top: 8px; font-size: 0.95rem; }

/* ── Docs / prose pages ──────────────────────────────── */
.page { padding: 56px 0 80px; }
.page h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); letter-spacing: -0.01em; margin-bottom: 8px; }
.page .lede { color: var(--muted); font-size: 1.1rem; margin-bottom: 40px; }
.docs-layout { display: grid; grid-template-columns: 200px 1fr; gap: 48px; align-items: start; }
@media (max-width: 760px) { .docs-layout { grid-template-columns: 1fr; } }
.docs-nav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
@media (max-width: 760px) { .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 12px; } }
.docs-nav a { color: var(--muted); padding: 3px 0; }
.docs-nav a:hover { color: var(--accent); text-decoration: none; }
.docs-body, .prose { max-width: 640px; }
.docs-body article { margin-bottom: 52px; }
.docs-body h2, .prose h2 { font-size: 1.3rem; margin: 0 0 12px; padding-top: 8px; }
.prose h2 { margin-top: 36px; }
.docs-body p, .prose p { color: var(--body); margin-bottom: 12px; }
.docs-body ul, .docs-body ol, .prose ul, .prose ol { margin: 0 0 12px 22px; color: var(--body); }
.docs-body li, .prose li { margin-bottom: 6px; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 12px; }
.docs-table th, .docs-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.docs-table td:first-child { font-weight: 600; }
.docs-table td { min-width: 7rem; }
.tag { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.tag-scheduled { background: #dbeafe; color: #1d4ed8; }
.tag-pending { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag-risk { background: #fee2e2; color: var(--red); }
.tag-overdue { background: #ffedd5; color: #c2410c; }
.tag-done { background: #dcfce7; color: var(--green); }
.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; padding: 12px 16px; font-size: 0.92rem; color: #3730a3; margin-bottom: 12px; }

/* ── CTA + footer ────────────────────────────────────── */
.cta { text-align: center; }
footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 0.85rem; color: var(--muted); }
.foot-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; }
.foot-links a { color: var(--muted); }
.docs-table.fixed { table-layout: fixed; }
.docs-table.fixed td, .docs-table.fixed th { min-width: 0; }
.docs-table.fixed th:nth-child(1) { width: 36%; }
.docs-table.fixed th:nth-child(3) { width: 20%; }
/* SEO page: numbered feature icons */
.feature .ico { font-weight: 700; font-size: 0.85rem; }
