/* ============================================================
   Proso Landing Page — Design System
   Dark-first, typography-forward, WCAG 2.1 AA
   Fraunces (headings) + Inter (body)
   ============================================================ */

/* --- Layer Order --- */
@layer reset, tokens, base, layout, components, utilities, responsive, themes, motion;

/* --- Self-hosted Fonts (eliminates render-blocking CDN requests) --- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600 700;
  font-display: optional;
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600 700;
  font-display: optional;
  src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Reset --- */
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  img, svg {
    display: block;
    max-width: 100%;
    height: auto;
  }

  button {
    cursor: pointer;
    font: inherit;
    border: none;
    background: none;
    color: inherit;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  ul, ol {
    list-style: none;
  }

  table {
    border-collapse: collapse;
    width: 100%;
  }

  details summary {
    cursor: pointer;
  }

  details summary::-webkit-details-marker {
    display: none;
  }
}

/* --- Design Tokens --- */
@layer tokens {
  :root {
    /* Colors — Dark (default) */
    --bg-primary: #0f0f1a;
    --bg-surface: #1a1a2e;
    --bg-elevated: #252540;
    --bg-card: #1e1e34;
    --text-primary: #e8e8ec;
    --text-secondary: #a0a0b4;
    --text-muted: #8b8ba0;
    --accent-warm: #f59e0b;
    --accent-warm-hover: #d97706;
    --accent-highlight: #06b6d4;
    --accent-highlight-dim: rgba(6, 182, 212, 0.15);
    --accent-success: #22c55e;
    --accent-error: #ef4444;
    --border: #2a2a42;
    --border-subtle: #1f1f36;

    /* Typography */
    --font-heading: 'Fraunces', 'Georgia', 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Type Scale (fluid) */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
    --text-sm: clamp(0.8125rem, 0.775rem + 0.25vw, 0.875rem);
    --text-base: clamp(0.9375rem, 0.875rem + 0.3vw, 1.0625rem);
    --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.75rem);
    --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem);

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Layout */
    --max-width: 72rem;
    --max-width-narrow: 56rem;
    --header-height: 4rem;
    --border-radius-sm: 0.375rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 250ms ease;
    --transition-slow: 400ms ease;
  }
}

/* --- Base --- */
@layer base {
  body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-primary);
    background-color: var(--bg-primary);
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    text-wrap: balance;
  }

  h1 { font-size: var(--text-4xl); font-weight: 700; }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl); }
  h4 { font-size: var(--text-lg); }

  p {
    max-width: 65ch;
    text-wrap: pretty;
  }

  a:not(.btn) {
    color: var(--accent-highlight);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 0.15em;
    transition: text-decoration-color var(--transition-fast);
  }

  a:not(.btn):hover {
    text-decoration-color: currentColor;
  }

  strong {
    font-weight: 600;
    color: var(--text-primary);
  }

  ::selection {
    background: rgba(6, 182, 212, 0.3);
    color: var(--text-primary);
  }

  :focus-visible {
    outline: 2px solid var(--accent-highlight);
    outline-offset: 2px;
  }
}

/* --- Layout --- */
@layer layout {
  .container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--space-6);
  }

  .container--narrow {
    max-width: var(--max-width-narrow);
  }

  /* Skip Link */
  .skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: 100;
    padding: var(--space-3) var(--space-6);
    background: var(--accent-warm);
    color: var(--bg-primary);
    font-weight: 600;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    transition: top var(--transition-fast);
  }

  .skip-link:focus {
    top: 0;
  }

  /* Header */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 15, 26, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
  }

  .site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
  }

  .site-logo {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
  }

  .site-logo span {
    color: var(--accent-warm);
  }

  .site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
  }

  .site-nav__links {
    display: flex;
    align-items: center;
    gap: var(--space-6);
  }

  .site-nav__link {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
  }

  .site-nav__link:hover {
    color: var(--text-primary);
  }

  .nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    padding: var(--space-2);
    background: none;
    border: none;
  }

  .nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
  }

  /* Footer */
  .site-footer {
    border-top: 1px solid var(--border);
    padding-block: var(--space-12);
    margin-top: var(--space-24);
    color: var(--text-secondary);
    font-size: var(--text-sm);
  }

  .site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
    text-align: center;
  }

  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4) var(--space-6);
  }

  .footer-nav a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
  }

  .footer-nav a:hover {
    color: var(--text-primary);
  }

  .footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-muted);
    font-size: var(--text-xs);
  }

  /* Section Spacing */
  section {
    padding-block: var(--space-20);
  }

  section + section {
    padding-top: 0;
  }

  .section-header {
    text-align: center;
    margin-bottom: var(--space-12);
  }

  .section-header h2 {
    margin-bottom: var(--space-4);
  }

  .section-header p {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    margin-inline: auto;
  }
}

/* --- Components --- */
@layer components {
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    min-height: 44px;
    min-width: 44px;
  }

  .btn--primary {
    background: var(--accent-warm);
    color: var(--bg-primary);
    box-shadow: var(--shadow-glow);
  }

  .btn--primary:hover {
    background: var(--accent-warm-hover);
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.25);
  }

  .btn--secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
  }

  .btn--secondary:hover {
    border-color: var(--text-secondary);
    background: var(--bg-elevated);
  }

  .btn--disabled {
    cursor: not-allowed;
    color: var(--text-muted);
    border-color: var(--border);
    pointer-events: none;
    pointer-events: none;
  }

  .btn--lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
  }

  .btn--sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
    min-height: 36px;
  }

  /* Hero Section */
  .hero {
    padding-top: var(--space-16);
    padding-bottom: var(--space-20);
    text-align: center;
  }

  .hero h1 {
    margin-bottom: var(--space-6);
    letter-spacing: -0.03em;
  }

  .hero__subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 48ch;
    margin-inline: auto;
    margin-bottom: var(--space-8);
  }

  .hero__ctas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
    flex-wrap: wrap;
  }

  /* Hero Browser Mockup */
  .hero-visual {
    max-width: 640px;
    margin-inline: auto;
    perspective: 1000px;
  }

  .browser-mockup {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
  }

  .browser-mockup__chrome {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
  }

  .browser-mockup__dots {
    display: flex;
    gap: 6px;
  }

  .browser-mockup__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
  }

  .browser-mockup__dot:nth-child(1) { background: #ff5f57; }
  .browser-mockup__dot:nth-child(2) { background: #ffbd2e; }
  .browser-mockup__dot:nth-child(3) { background: #28c840; }

  .browser-mockup__url {
    flex: 1;
    padding: var(--space-1) var(--space-3);
    background: var(--bg-surface);
    border-radius: var(--border-radius-sm);
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-family: var(--font-mono);
  }

  .browser-mockup__content {
    padding: var(--space-6);
    min-height: 200px;
    position: relative;
  }

  .browser-mockup__content h3,
  .browser-mockup__title {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
  }

  .browser-mockup__content p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 100%;
  }

  .browser-mockup__content .word {
    display: inline;
    padding: 2px 0;
    border-radius: 2px;
    transition: background-color 0.1s ease;
  }

  .browser-mockup__content .word.highlighted {
    background-color: var(--accent-highlight-dim);
    color: var(--accent-highlight);
  }

  /* Waveform */
  .waveform {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    padding: var(--space-3) var(--space-6);
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    height: 48px;
  }

  .waveform__bar {
    width: 3px;
    background: var(--accent-warm);
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite;
  }

  .waveform__bar:nth-child(1) { height: 40%; animation-delay: 0s; }
  .waveform__bar:nth-child(2) { height: 70%; animation-delay: 0.1s; }
  .waveform__bar:nth-child(3) { height: 50%; animation-delay: 0.2s; }
  .waveform__bar:nth-child(4) { height: 90%; animation-delay: 0.3s; }
  .waveform__bar:nth-child(5) { height: 60%; animation-delay: 0.15s; }
  .waveform__bar:nth-child(6) { height: 80%; animation-delay: 0.25s; }
  .waveform__bar:nth-child(7) { height: 45%; animation-delay: 0.35s; }

  @keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
  }

  /* Word highlight animation */
  @keyframes highlight-word {
    0%, 100% {
      background-color: transparent;
      color: var(--text-secondary);
    }
    10%, 90% {
      background-color: var(--accent-highlight-dim);
      color: var(--accent-highlight);
    }
  }

  /* Trust Bar */
  .trust-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    padding-block: var(--space-10);
  }

  .trust-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-full);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    white-space: nowrap;
  }

  .trust-badge__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  /* Feature Blocks */
  .features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .feature-card {
    padding: var(--space-8);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    transition: border-color var(--transition), transform var(--transition);
  }

  .feature-card:hover {
    border-color: var(--accent-highlight);
    transform: translateY(-2px);
  }

  .feature-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-highlight-dim);
    border-radius: var(--border-radius);
    color: var(--accent-highlight);
  }

  .feature-card h3 {
    margin-bottom: var(--space-3);
  }

  .feature-card p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
  }

  /* How It Works */
  .steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    counter-reset: step;
  }

  .step {
    display: flex;
    gap: var(--space-6);
    align-items: flex-start;
  }

  .step__number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-warm);
    color: var(--bg-primary);
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    border-radius: var(--border-radius);
  }

  .step__content h3 {
    margin-bottom: var(--space-2);
  }

  .step__content p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
  }

  /* Pricing */
  .pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-10);
  }

  .pricing-toggle__label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
  }

  .pricing-toggle__label--active {
    color: var(--text-primary);
    font-weight: 600;
  }

  .pricing-toggle__btn {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-full);
    transition: background var(--transition-fast);
  }

  .pricing-toggle__btn[aria-pressed="true"] {
    background: var(--accent-warm);
    border-color: var(--accent-warm);
  }

  .pricing-toggle__btn::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: transform var(--transition-fast);
  }

  .pricing-toggle__btn[aria-pressed="true"]::after {
    transform: translateX(22px);
    background: var(--bg-primary);
  }

  .pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .pricing-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-8);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    transition: border-color var(--transition);
  }

  .pricing-card--highlighted {
    border-color: var(--accent-warm);
    box-shadow: var(--shadow-glow);
    position: relative;
  }

  .pricing-card--highlighted::before {
    content: 'Most Popular';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: var(--space-1) var(--space-4);
    background: var(--accent-warm);
    color: var(--bg-primary);
    font-size: var(--text-xs);
    font-weight: 700;
    border-radius: var(--border-radius-full);
    white-space: nowrap;
  }

  .pricing-card__name {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
  }

  .pricing-card__price {
    margin-bottom: var(--space-6);
  }

  .pricing-card__amount {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
  }

  .pricing-card__period {
    font-size: var(--text-sm);
    color: var(--text-muted);
  }

  .pricing-card__annual {
    display: none;
  }

  [data-billing="annual"] .pricing-card__monthly {
    display: none;
  }

  [data-billing="annual"] .pricing-card__annual {
    display: inline;
  }

  .pricing-card__features {
    flex: 1;
    margin-bottom: var(--space-6);
  }

  .pricing-card__features li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-block: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
  }

  .pricing-card__features li:last-child {
    border-bottom: none;
  }

  .pricing-card__check {
    color: var(--accent-success);
    flex-shrink: 0;
  }

  .pricing-card__dash {
    color: var(--text-muted);
    flex-shrink: 0;
  }

  /* BYOK Callout */
  .callout {
    padding: var(--space-6);
    background: var(--bg-surface);
    border: 1px solid var(--accent-highlight);
    border-radius: var(--border-radius-lg);
    margin-top: var(--space-10);
  }

  .callout h3, .callout h2 {
    margin-bottom: var(--space-3);
    color: var(--accent-highlight);
  }

  .callout p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
  }

  /* Comparison Table */
  .comparison-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .comparison-table {
    min-width: 600px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--border);
  }

  .comparison-table thead th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-elevated);
    position: sticky;
    top: 0;
  }

  .comparison-table thead th:first-child {
    border-radius: var(--border-radius) 0 0 0;
  }

  .comparison-table thead th:last-child {
    border-radius: 0 var(--border-radius) 0 0;
  }

  .comparison-table tbody td {
    color: var(--text-secondary);
  }

  .comparison-table tbody th {
    font-weight: 500;
    color: var(--text-primary);
  }

  .comparison-table .check {
    color: var(--accent-success);
  }

  .comparison-table .cross {
    color: var(--accent-error);
  }

  .comparison-table .proso-col {
    background: rgba(6, 182, 212, 0.05);
    color: var(--accent-highlight);
    font-weight: 500;
  }

  /* FAQ */
  .faq-list {
    max-width: var(--max-width-narrow);
    margin-inline: auto;
  }

  .faq-item {
    border-bottom: 1px solid var(--border);
  }

  .faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) 0;
    font-weight: 500;
    font-size: var(--text-base);
    color: var(--text-primary);
    transition: color var(--transition-fast);
  }

  .faq-item summary:hover {
    color: var(--accent-highlight);
  }

  .faq-item summary::after {
    content: '+';
    font-size: var(--text-xl);
    color: var(--text-muted);
    transition: transform var(--transition-fast);
  }

  .faq-item[open] summary::after {
    content: '\2212';
  }

  .faq-item__answer {
    padding-bottom: var(--space-5);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.7;
  }

  /* Open Source Section */
  .open-source {
    text-align: center;
  }

  .tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin-block: var(--space-6);
  }

  .tech-badge {
    padding: var(--space-2) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: var(--text-sm);
    color: var(--text-secondary);
  }

  /* Legal Pages */
  .legal-page {
    padding-top: var(--space-12);
  }

  .legal-page h1 {
    margin-bottom: var(--space-4);
  }

  .legal-page__meta {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-10);
  }

  .legal-page section {
    padding-block: var(--space-6);
  }

  .legal-page section + section {
    padding-top: var(--space-6);
  }

  .legal-page h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
  }

  .legal-page h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
  }

  .legal-page p {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    max-width: 100%;
  }

  .legal-page ul, .legal-page ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
    color: var(--text-secondary);
  }

  .legal-page ul { list-style: disc; }
  .legal-page ol { list-style: decimal; }

  .legal-page li {
    margin-bottom: var(--space-2);
    line-height: 1.6;
  }

  /* Enterprise Callout */
  .enterprise-callout {
    padding: var(--space-8);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    text-align: center;
    margin-top: var(--space-10);
  }

  .enterprise-callout h2,
  .enterprise-callout h3 {
    margin-bottom: var(--space-3);
    font-size: var(--text-xl);
  }

  .enterprise-callout p {
    color: var(--text-secondary);
    margin-inline: auto;
    margin-bottom: var(--space-4);
  }

  /* Pricing Page Hero */
  .pricing-hero {
    text-align: center;
    padding-top: var(--space-16);
    padding-bottom: var(--space-10);
  }

  .pricing-hero h1 {
    margin-bottom: var(--space-4);
  }

  .pricing-hero p {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    margin-inline: auto;
  }
}

/* --- Utilities --- */
@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }

  .text-center {
    text-align: center;
  }

  .text-gradient {
    background: linear-gradient(135deg, var(--accent-warm), var(--accent-highlight));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

/* --- Responsive --- */
@layer responsive {
  /* Tablet */
  @media (min-width: 640px) {
    .features-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .steps {
      grid-template-columns: repeat(3, 1fr);
    }

    .step {
      flex-direction: column;
      text-align: center;
    }

    .step__number {
      align-self: center;
    }
  }

  /* Desktop */
  @media (min-width: 1024px) {
    .pricing-grid {
      grid-template-columns: repeat(4, 1fr);
    }

    .features-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* Mobile */
  @media (max-width: 767px) {
    .site-nav__links {
      display: none;
      position: absolute;
      top: var(--header-height);
      left: 0;
      right: 0;
      flex-direction: column;
      padding: var(--space-6);
      background: var(--bg-surface);
      border-bottom: 1px solid var(--border);
      gap: var(--space-4);
    }

    .site-nav__links.is-open {
      display: flex;
    }

    .nav-toggle {
      display: flex;
    }

    .hero h1 {
      font-size: var(--text-3xl);
    }

    .hero-visual {
      margin-inline: calc(-1 * var(--space-4));
    }

    section {
      padding-block: var(--space-12);
    }
  }
}

/* --- Light Theme --- */
@layer themes {
  @media (prefers-color-scheme: light) {
    :root {
      --bg-primary: #fafafa;
      --bg-surface: #ffffff;
      --bg-elevated: #f5f5f5;
      --bg-card: #ffffff;
      --text-primary: #1a1a2e;
      --text-secondary: #4a4a5e;
      --text-muted: #6b6b80;
      --accent-warm: #d97706;
      --accent-warm-hover: #b45309;
      --accent-highlight: #0891b2;
      --accent-highlight-dim: rgba(8, 145, 178, 0.1);
      --border: #e2e2e8;
      --border-subtle: #ededf2;
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
      --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
      --shadow-glow: 0 0 20px rgba(217, 119, 6, 0.15);
    }

    .site-header {
      background: rgba(250, 250, 250, 0.92);
    }

    .browser-mockup__dot:nth-child(1) { background: #ff5f57; }
    .browser-mockup__dot:nth-child(2) { background: #ffbd2e; }
    .browser-mockup__dot:nth-child(3) { background: #28c840; }
  }
}

/* --- Reduced Motion --- */
@layer motion {
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }

    .waveform__bar {
      animation: none;
      transform: scaleY(0.7);
    }

    .browser-mockup__content .word.highlighted {
      background-color: var(--accent-highlight-dim);
      color: var(--accent-highlight);
    }
  }
}
