@layer reset, tokens, base, layout, components, utilities, animations;
@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
  }

  body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }

  input, button, textarea, select {
    font: inherit;
    color: inherit;
  }

  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }

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

  ul, ol {
    list-style: none;
  }
}

@layer tokens {
  @font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/fonts/InterVariable.woff2") format("woff2");
  }

  :root {
    --font-sans: "Inter", system-ui, sans-serif;

    --color-surface-50: oklch(98.42% 0.0034 247.86);
    --color-surface-100: oklch(96.70% 0.003 264.54);
    --color-surface-200: oklch(92.88% 0.0126 255.51);
    --color-surface-300: oklch(87.20% 0.01 258.34);
    --color-surface-400: oklch(70.70% 0.015 256.80);
    --color-surface-500: oklch(55.10% 0.014 264.36);
    --color-surface-600: oklch(44.60% 0.014 257.28);
    --color-surface-700: oklch(37.30% 0.013 256.80);
    --color-surface-900: oklch(21.00% 0.006 264.53);

    --color-safe-50: oklch(96.83% 0.0232 155.99);
    --color-safe-500: oklch(72.27% 0.1920 149.58);
    --color-safe-600: oklch(62.71% 0.1699 149.21);

    --color-error-50: oklch(97.05% 0.0132 17.38);
    --color-error-500: oklch(63.72% 0.2541 25.33);
    --color-error-600: oklch(57.71% 0.2154 27.32);

    --color-warning-50: oklch(96.80% 0.0388 84.56);
    --color-warning-500: oklch(76.92% 0.1695 62.80);
  }
}

@layer base {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
  }

  body {
    font-family: var(--font-sans);
    color: var(--color-brand-950);
    background-color: white;
  }

  h1, h2, h3, h4 {
    line-height: 1.2;
    letter-spacing: -0.025em;
    font-weight: 700;
  }

  ::selection {
    background-color: var(--color-brand-100);
    color: var(--color-brand-900);
  }
}

@layer layout {
  .section-container {
    margin-inline: auto;
    width: 100%;
    max-width: 72rem;
    padding-inline: 1.5rem;
  }

  .section {
    padding-block: 5rem;
  }

  .max-w-3xl {
    max-width: 48rem;
    margin-inline: auto;
  }
}

@layer components {
  .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    background-color: var(--color-brand-600);
    font-weight: 600;
    color: white;
    box-shadow: 0 10px 15px -3px oklch(from var(--color-brand-600) l c h / 0.25);
    transition: background-color 200ms, box-shadow 200ms, transform 200ms;

    &:hover {
      background-color: oklch(from var(--color-brand-600) calc(l - 0.05) c h);
      box-shadow: 0 20px 25px -5px oklch(from var(--color-brand-600) l c h / 0.15);
    }
    &:active { transform: scale(0.98); }
    &:focus-visible { outline: 2px solid var(--color-brand-500); outline-offset: 2px; }
  }

  .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    border: 2px solid var(--color-surface-200);
    font-weight: 600;
    transition: border-color 200ms, color 200ms;

    &:hover {
      border-color: oklch(from var(--color-brand-600) l c h / 0.4);
      color: var(--color-brand-600);
    }
    &:focus-visible { outline: 2px solid var(--color-brand-500); outline-offset: 2px; }
  }

  .btn-inverted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    background-color: white;
    font-weight: 600;
    color: var(--color-brand-900);
    box-shadow: 0 10px 15px -3px oklch(from black l c h / 0.1);
    transition: background-color 200ms, box-shadow 200ms, transform 200ms;

    &:hover {
      background-color: var(--color-brand-50);
      box-shadow: 0 20px 25px -5px oklch(from black l c h / 0.1);
    }
    &:active { transform: scale(0.98); }
    &:focus-visible { outline: 2px solid var(--color-brand-500); outline-offset: 2px; }
  }

  .card-surface {
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid var(--color-surface-200);
    background-color: white;
    box-shadow: 0 1px 2px oklch(from black l c h / 0.05);
  }

  .feature-card {
    border-radius: 1rem;
    border: 1px solid var(--color-surface-200);
    background-color: white;
    padding: 2rem;
    box-shadow: 0 1px 2px oklch(from black l c h / 0.05);
    transition: border-color 200ms, box-shadow 200ms;

    &:hover {
      border-color: oklch(from var(--color-brand-600) l c h / 0.3);
      box-shadow: 0 4px 6px -1px oklch(from black l c h / 0.1);
    }
  }

  .feature-card-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
  .feature-card-description { font-size: 0.875rem; line-height: 1.5; color: var(--color-surface-600); }

  .section-eyebrow {
    font-size: 0.875rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--color-brand-600);
  }

  .section-title {
    font-size: 1.875rem; margin-top: 0.5rem; margin-bottom: 3rem;
    @media (width >= 40rem) { font-size: 2.25rem; }
  }

  .page-title {
    font-size: 1.875rem; letter-spacing: -0.025em; color: var(--color-brand-950);
    @media (width >= 40rem) { font-size: 2.25rem; }
  }

  .navbar {
    position: sticky; top: 0; z-index: 50;
    background-color: oklch(from white l c h / 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-surface-200);
  }
  .navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
  .navbar-logo { display: flex; gap: 0.25rem; font-size: 1.25rem; }
  .navbar-links { display: none; gap: 2rem; @media (width >= 40rem) { display: flex; } }
  .navbar-link {
    font-size: 0.875rem; font-weight: 500; color: var(--color-surface-600); transition: color 200ms;
    &:hover { color: var(--color-brand-600); }
  }
  .navbar-mobile { @media (width >= 40rem) { display: none; } }
  .navbar-hamburger { list-style: none; cursor: pointer; color: var(--color-surface-600); &::-webkit-details-marker { display: none; } }
  .navbar-mobile-menu {
    position: absolute; top: 4rem; left: 0; right: 0;
    background-color: white; border-bottom: 1px solid var(--color-surface-200);
    padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem;
  }
  .navbar-mobile-link { font-size: 0.875rem; font-weight: 500; color: var(--color-surface-600); padding: 0.5rem 0; }

  .footer { background-color: var(--color-surface-900); color: var(--color-surface-300); padding-block: 4rem; }
  .footer-grid { display: grid; gap: 2rem; @media (width >= 40rem) { grid-template-columns: 2fr 1fr 1fr 1fr; } }
  .footer-brand { display: flex; gap: 0.25rem; font-size: 1.25rem; }
  .footer-heading { font-size: 0.875rem; font-weight: 600; color: white; margin-bottom: 0.75rem; }
  .footer-links { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem; & a:hover { color: white; } }
  .footer-bottom { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-surface-700); font-size: 0.75rem; color: var(--color-surface-400); }

  .hero { padding-block: 5rem 4rem; background: linear-gradient(to bottom, var(--color-brand-50), white); }
  .hero-container { text-align: center; max-width: 48rem; }
  .hero-badge {
    display: inline-block; border-radius: 9999px; padding: 0.25rem 0.75rem;
    font-size: 0.875rem; font-weight: 500; background-color: var(--color-safe-50);
    color: var(--color-safe-600); margin-bottom: 1.5rem;
  }
  .hero-title { font-size: 2.25rem; line-height: 1.1; margin-bottom: 1.5rem; @media (width >= 40rem) { font-size: 3.5rem; } }
  .hero-highlight { color: var(--color-brand-600); }
  .hero-description { font-size: 1.125rem; line-height: 1.7; color: var(--color-surface-600); margin-bottom: 2rem; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 2rem; }
  .hero-trust { font-size: 0.875rem; color: var(--color-surface-500); }

  .steps-grid { display: grid; gap: 2rem; @media (width >= 40rem) { grid-template-columns: repeat(3, 1fr); } }
  .step-card { padding: 2rem; }
  .step-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; border-radius: 9999px;
    background-color: var(--color-brand-600); color: white; font-weight: 700; margin-bottom: 1rem;
  }
  .step-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
  .step-description { font-size: 0.875rem; line-height: 1.5; color: var(--color-surface-600); }

  .features-grid { display: grid; gap: 1.5rem; @media (width >= 40rem) { grid-template-columns: repeat(3, 1fr); } }

  .trust-grid { display: grid; gap: 1.5rem; @media (width >= 40rem) { grid-template-columns: repeat(3, 1fr); } }
  .trust-card { border-radius: 1rem; border: 1px solid var(--color-surface-200); background-color: white; padding: 2rem; }
  .trust-card-accent { border-color: var(--color-brand-200); background-color: var(--color-brand-50); }
  .trust-card-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
  .trust-card-description { font-size: 0.875rem; line-height: 1.5; color: var(--color-surface-600); }

  .faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
  .faq-item { border: 1px solid var(--color-surface-200); border-radius: 0.75rem; overflow: hidden; }
  .faq-question {
    padding: 1.25rem 1.5rem; font-weight: 600; cursor: pointer; list-style: none;
    &::-webkit-details-marker { display: none; }
    &::after { content: "+"; float: right; font-size: 1.25rem; color: var(--color-surface-400); transition: transform 200ms; }
  }
  details[open] .faq-question::after { transform: rotate(45deg); }
  .faq-answer { padding: 0 1.5rem 1.25rem; font-size: 0.875rem; line-height: 1.7; color: var(--color-surface-600); }

  .cta-section { padding-block: 5rem; background: linear-gradient(135deg, var(--color-brand-600), var(--color-brand-700)); color: white; }
  .cta-title { font-size: 2.25rem; margin-bottom: 1rem; }
  .cta-description { font-size: 1.125rem; opacity: 0.9; margin-bottom: 2rem; }
  .cta-subtext { margin-top: 1rem; font-size: 0.875rem; opacity: 0.7; }
}

@layer utilities {
  .text-center { text-align: center; }
  .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .font-bold { font-weight: 700; }
  .font-medium { font-weight: 500; }

  .text-brand-400 { color: var(--color-brand-400); }
  .text-brand-600 { color: var(--color-brand-600); }
  .text-brand-950 { color: var(--color-brand-950); }
  .text-surface-400 { color: var(--color-surface-400); }
  .text-surface-600 { color: var(--color-surface-600); }
  .text-white { color: white; }

  .bg-surface-50 { background-color: var(--color-surface-50); }

  .mt-2 { margin-top: 0.5rem; }
  .mb-2 { margin-bottom: 0.5rem; }
  .mb-8 { margin-bottom: 2rem; }

  .px-6 { padding-inline: 1.5rem; }
  .px-8 { padding-inline: 2rem; }
  .py-3 { padding-block: 0.75rem; }
  .py-4 { padding-block: 1rem; }
  .py-16 { padding-block: 4rem; }
  .p-8 { padding: 2rem; }}

@layer animations {
  details::details-content {
    opacity: 0;
    transition: opacity 200ms ease-out, content-visibility 200ms allow-discrete;
  }

  details[open]::details-content {
    opacity: 1;
  }
}

