/* css/shared.css
   Design tokens + resets.
   Typography: Inter Variable
   ─────────────────────────────
   A restrained, premium type system inspired by modern
   Apple-style interface typography.
   Hierarchy comes from:
   • size
   • weight
   • tracking
   • line-height
   • color
   Not from unnecessary font switching.
*/
:root {
  color-scheme: light dark;
  /* ── Color — Light ── */
  --bg-base:       #f7f7f5;
  --bg-subtle:     #f1f1ee;
  --bg-elevated:   #ffffff;
  --bg-overlay:    rgba(23, 23, 23, 0.32);
  --text-1:        #171717;
  --text-2:        #6f6f6a;
  --text-3:        #8c8c86;
  --text-4:        #b4b4ae;
  --border:        rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --accent:        #a8471f;
  --accent-hover:  #8f3a19;
  --accent-subtle: #f5e6da;
  --accent-2:      #cf7b4a;
  --success:       #3f6b5b;
  --warning:       #a06a1f;
  --danger:        #b3423a;
  --danger-subtle: #f7ece9;
  /* ══════════════════════════════════════════════════════════════
     Typography
     ══════════════════════════════════════════════════════════════ */
  /*
    Inter is used as the primary web typeface.
    The fallback stack intentionally follows the platform:
    Apple → SF Pro / system font
    Windows → Segoe UI
    Linux → system sans-serif
    This means Apple devices naturally retain their native
    system rendering if Inter fails to load.
  */
  --font:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;
  /*
    Display typeface used for editorial headings on marketing surfaces
    (hero, section titles). Deliberately a distinct serif so headline
    type carries the brand's editorial personality — body copy and UI
    stay on Inter for legibility and neutrality. Loaded only on pages
    that need it (see marketing.css / home.css).
  */
  --font-display:
    "Fraunces",
    "Iowan Old Style",
    "Georgia",
    serif;
  /* Optional monospace stack for technical content. */
  --font-mono:
    "SFMono-Regular",
    "SF Mono",
    "Roboto Mono",
    "Cascadia Code",
    Consolas,
    monospace;
  /*
    Inter supports optical sizing through its variable font.
    Let the browser automatically optimize glyph shapes for size.
  */
  --font-optical-sizing: auto;
  /* ── Type Scale ── */
  --text-xs:    0.75rem;      /* 12px */
  --text-sm:    0.875rem;     /* 14px */
  --text-base:  1rem;         /* 16px */
  --text-lg:    1.0625rem;    /* 17px */
  --text-xl:    1.2rem;       /* 19.2px */
  --text-2xl:   1.5rem;       /* 24px */
  --text-3xl:   1.875rem;     /* 30px */
  --text-4xl:   2.375rem;     /* 38px */
  /*
    Display sizes are deliberately larger than the original
    scale. They are intended for marketing/page-level headings,
    not ordinary UI.
  */
  --text-display-sm: 2.75rem;   /* 44px */
  --text-display:    3.5rem;    /* 56px */
  --text-display-lg: 4.5rem;    /* 72px */
  /* ── Type Weights ── */
  --weight-regular:   400;
  --weight-medium:    500;
  --weight-semibold:  600;
  --weight-bold:      700;
  /* ── Type Leading ── */
  --leading-tight:    1.08;
  --leading-snug:     1.18;
  --leading-heading:  1.2;
  --leading-body:     1.55;
  --leading-relaxed:  1.65;
  /* ── Spacing ── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  /* ── Radius ── */
  --radius-sm:   8px;
  --radius-md:   13px;
  --radius-lg:   20px;
  --radius-full: 999px;
  /* ── Shadow ── */
  --shadow-sm: 0 1px 2px rgba(23, 23, 23, 0.04);
  --shadow-md: 0 8px 24px rgba(23, 23, 23, 0.07);
  --shadow-lg: 0 20px 56px rgba(23, 23, 23, 0.12);
  --shadow-accent: 0 8px 24px rgba(63, 107, 91, 0.16);
  /* ── Motion ── */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;
}
@media (prefers-color-scheme: dark) {
  :root {
    /* ── Color — Dark ── */
    --bg-base:       #0d0e0e;
    --bg-subtle:     #151716;
    --bg-elevated:   #1b1d1c;
    --bg-overlay:    rgba(0, 0, 0, 0.6);
    --text-1:        #f3f3ef;
    --text-2:        #a4a7a2;
    --text-3:        #83867f;
    --text-4:        #5b5e57;
    --border:        rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --accent:        #e08a52;
    --accent-hover:  #eb9c68;
    --accent-subtle: #2a2119;
    --accent-2:      #c76a35;
    --success:       #8db7a5;
    --warning:       #d0a260;
    --danger:        #d78d85;
    --danger-subtle: #241a19;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 56px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 8px 24px rgba(224, 138, 82, 0.18);
  }
}
/* ══════════════════════════════════════════════════════════════
   Reset
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}
body {
  margin: 0;
  font-family: var(--font);
  font-optical-sizing: var(--font-optical-sizing);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--text-1);
  background: var(--bg-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* ══════════════════════════════════════════════════════════════
   Media
   ══════════════════════════════════════════════════════════════ */
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
}
/* ══════════════════════════════════════════════════════════════
   Base Typography
   ══════════════════════════════════════════════════════════════ */
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
/* ──────────────────────────────────────────────────────────────
   H1 — Page / Hero Heading
   ────────────────────────────────────────────────────────────── */
h1 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: -0.035em;
  color: var(--text-1);
}
/* ──────────────────────────────────────────────────────────────
   H2 — Section Heading
   ────────────────────────────────────────────────────────────── */
h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: -0.028em;
  color: var(--text-1);
}
/* ──────────────────────────────────────────────────────────────
   H3 — Component / Card Heading
   ────────────────────────────────────────────────────────────── */
h3 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-heading);
  letter-spacing: -0.022em;
  color: var(--text-1);
}
/* ──────────────────────────────────────────────────────────────
   H4 — Small Heading
   ────────────────────────────────────────────────────────────── */
h4 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--text-1);
}
/* ──────────────────────────────────────────────────────────────
   Paragraph / Body
   ────────────────────────────────────────────────────────────── */
p {
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  letter-spacing: -0.005em;
  color: var(--text-1);
}
/* ──────────────────────────────────────────────────────────────
   Large Body / Lead Copy
   ────────────────────────────────────────────────────────────── */
.lead {
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  line-height: 1.55;
  letter-spacing: -0.008em;
}
/* ══════════════════════════════════════════════════════════════
   Display Typography
   ══════════════════════════════════════════════════════════════ */
/*
  Use these for marketing hero sections and major landing-page
  statements. They intentionally have tighter tracking and
  tighter line-height.
*/
.display {
  font-size: var(--text-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: -0.045em;
  color: var(--text-1);
}
.display-sm {
  font-size: var(--text-display-sm);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: -0.04em;
  color: var(--text-1);
}
.display-lg {
  font-size: var(--text-display-lg);
  font-weight: var(--weight-semibold);
  line-height: 1.02;
  letter-spacing: -0.055em;
  color: var(--text-1);
}
/* ══════════════════════════════════════════════════════════════
   Text Hierarchy
   ══════════════════════════════════════════════════════════════ */
/*
  Secondary/sub content should NOT become tiny by default.
  Apple's typography philosophy relies heavily on hierarchy,
  weight and color rather than making supporting content
  excessively small.
*/
.sub {
  font-weight: var(--weight-regular);
  color: var(--text-3);
}
.muted {
  color: var(--text-2);
}
.dim {
  color: var(--text-3);
}
.faint {
  color: var(--text-4);
}
/* ──────────────────────────────────────────────────────────────
   UI Text
   ────────────────────────────────────────────────────────────── */
.label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.caption {
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--text-3);
}
.eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--text-2);
}
/* ══════════════════════════════════════════════════════════════
   Strong / Emphasis
   ══════════════════════════════════════════════════════════════ */
strong,
b {
  font-weight: var(--weight-semibold);
}
em,
i {
  font-style: italic;
}
/* ══════════════════════════════════════════════════════════════
   Skip link — visible on keyboard focus only
   ══════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-4);
  z-index: 1000;
  background: var(--text-1);
  color: var(--bg-base);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: top var(--duration-fast) var(--ease);
}
.skip-link:focus {
  top: var(--space-4);
}
/* ══════════════════════════════════════════════════════════════
   Code / Technical Content
   ══════════════════════════════════════════════════════════════ */
code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
}
/* ══════════════════════════════════════════════════════════════
   Selection
   ══════════════════════════════════════════════════════════════ */
::selection {
  background: var(--accent-subtle);
  color: var(--text-1);
}
/* ══════════════════════════════════════════════════════════════
   Focus
   ══════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* ══════════════════════════════════════════════════════════════
   Reduced Motion
   ══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
/* ══════════════════════════════════════════════════════════════
   Shared Primitives
   ══════════════════════════════════════════════════════════════ */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.btn-spinner--dark {
  border-color: rgba(23, 23, 23, 0.14);
  border-top-color: var(--text-2);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ══════════════════════════════════════════════════════════════
   Toast
   ══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-1);
  color: var(--bg-base);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  animation: fadeInUp var(--duration-base) var(--ease);
  max-width: min(90vw, 420px);
  text-align: center;
}
/* ══════════════════════════════════════════════════════════════
   Visually Hidden
   ══════════════════════════════════════════════════════════════ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* ══════════════════════════════════════════════════════════════
   Skeleton
   ══════════════════════════════════════════════════════════════ */
.skeleton {
  position: relative;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  color: transparent !important;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  transform: translateX(-100%);
  animation: skeleton-sweep 1.3s ease infinite;
}
@media (prefers-color-scheme: dark) {
  .skeleton::after {
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.05),
      transparent
    );
  }
}
@keyframes skeleton-sweep {
  100% {
    transform: translateX(100%);
  }
}
/* ══════════════════════════════════════════════════════════════
   Responsive Display Typography
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .display-lg {
    font-size: 3.25rem;
    letter-spacing: -0.045em;
  }
  .display {
    font-size: 2.75rem;
    letter-spacing: -0.04em;
  }
  .display-sm {
    font-size: 2.25rem;
    letter-spacing: -0.035em;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.625rem;
  }
}
@media (max-width: 480px) {
  .display-lg {
    font-size: 2.75rem;
  }
  .display {
    font-size: 2.375rem;
  }
  .display-sm {
    font-size: 2rem;
  }
}

/* ══════════════════════════════════════════════════════════════
   FAQ Accordion
   Shared by the homepage and pricing page. Height is animated
   with the CSS grid 0fr → 1fr technique: no JS scrollHeight
   measurement, no layout thrash, and it keeps working correctly
   even if an answer's content changes length. Fully keyboard-
   operable (real <button>, ARIA state) and disabled under
   prefers-reduced-motion.
   ══════════════════════════════════════════════════════════════ */
.faq-list {
  max-width: 680px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child {
  border-top: 1px solid var(--border);
}
.faq-question-heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-1);
  background: none;
  border: none;
  margin: 0;
  text-align: left;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-1);
  cursor: pointer;
  transition: color var(--duration-base) var(--ease);
}
.faq-question:hover {
  color: var(--accent);
}
.faq-question:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.faq-icon {
  flex-shrink: 0;
  font-size: 15px;
  color: var(--text-3);
  transition: transform var(--duration-slow) var(--ease), color var(--duration-base) var(--ease);
}
.faq-item.is-open .faq-question {
  color: var(--text-1);
}
.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
  color: var(--accent);
}
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows var(--duration-slow) var(--ease);
}
.faq-item.is-open .faq-panel {
  grid-template-rows: 1fr;
}
.faq-panel-inner {
  min-height: 0;
  overflow: hidden;
}
.faq-panel-inner p {
  margin: 0;
  padding: 0 var(--space-1) var(--space-5);
  max-width: 560px;
  font-size: var(--text-sm);
  color: var(--text-3);
  line-height: 1.65;
}
@media (prefers-reduced-motion: reduce) {
  .faq-panel {
    transition: none;
  }
  .faq-icon {
    transition: none;
  }
}
.faq-contact {
  margin-top: var(--space-6);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-3);
}
.faq-contact a {
  color: var(--text-1);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 2px;
  transition: color var(--duration-base) var(--ease), text-decoration-color var(--duration-base) var(--ease);
}
.faq-contact a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
