@layer reset, base, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
  img, svg { display: block; max-width: 100%; }
  button, input, textarea { font: inherit; }
  a { color: inherit; }
}

@layer base {
  :root {
    --ink: #18171b;
    --ink-soft: #56535d;
    --paper: #fbfaf6;
    --paper-blue: #f1f3f6;
    --navy: #1b183e;
    --navy-2: #25214f;
    --lavender: #dcd7f1;
    --yellow: #f4ed72;
    --yellow-deep: #d5cc35;
    --coral: #ef8c6a;
    --line: #dcd9d1;
    --white: #fff;
    --danger: #b33a3a;
    --measure: 72rem;
    --narrow: 46rem;
    --pad: clamp(1.25rem, 3.2vw, 3.5rem);
    --section: clamp(5rem, 8vw, 8rem);
    --radius: 12px;
    --pill: 999px;
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  body {
    min-width: 320px;
    background: var(--paper);
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.55;
    letter-spacing: -0.012em;
  }

  h1, h2, h3 {
    font-weight: 650;
    line-height: 1.03;
    letter-spacing: -0.045em;
    text-wrap: balance;
  }

  h1 { font-size: clamp(3.35rem, 8.3vw, 7.4rem); }
  h2 { font-size: clamp(2.5rem, 5.4vw, 5rem); }
  h3 { font-size: clamp(1.35rem, 2.2vw, 2rem); }

  p { text-wrap: pretty; }
  a { text-underline-offset: 0.2em; }

  :focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 4px;
  }

  ::selection {
    background: var(--yellow);
    color: var(--navy);
  }
}

@layer components {
  .skip-link {
    position: fixed;
    z-index: 1000;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.7rem 1rem;
    transform: translateY(-160%);
    border-radius: var(--pill);
    background: var(--yellow);
    color: var(--navy);
    font-weight: 700;
  }

  .skip-link:focus { transform: translateY(0); }

  .site-nav {
    position: fixed;
    z-index: 100;
    inset: 0 0 auto;
    height: 64px;
    border-bottom: 1px solid rgb(255 255 255 / 0.12);
    background: rgb(27 24 62 / 0.88);
    color: var(--white);
    backdrop-filter: saturate(145%) blur(18px);
  }

  .nav-inner {
    display: flex;
    width: min(100%, calc(var(--measure) + (2 * var(--pad))));
    height: 100%;
    margin-inline: auto;
    padding-inline: var(--pad);
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }

  .brand { flex: 0 0 auto; }
  .brand img { width: 154px; height: auto; }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
    font-size: 0.86rem;
    font-weight: 550;
  }

  .desktop-nav > a:not(.nav-cta) {
    color: rgb(255 255 255 / 0.78);
    text-decoration: none;
  }

  .desktop-nav > a:not(.nav-cta):hover { color: var(--white); }

  .nav-cta,
  .button {
    display: inline-flex;
    min-height: 46px;
    padding: 0.75rem 1.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border: 1px solid transparent;
    border-radius: var(--pill);
    background: var(--yellow);
    color: var(--navy);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  }

  .nav-cta { min-height: 40px; padding: 0.55rem 1rem; }
  .button:hover, .nav-cta:hover { background: var(--white); transform: translateY(-1px); }
  .button:active, .nav-cta:active { transform: translateY(0); }
  .button .arrow, .nav-cta .arrow { font-size: 1.25em; line-height: 0; }

  .button-secondary {
    border-color: rgb(255 255 255 / 0.36);
    background: transparent;
    color: var(--white);
  }

  .button-secondary:hover { border-color: var(--white); background: var(--white); color: var(--navy); }

  .mobile-menu { display: none; }
  .mobile-menu summary { list-style: none; cursor: pointer; }
  .mobile-menu summary::-webkit-details-marker { display: none; }

  .menu-button {
    display: grid;
    width: 44px;
    height: 44px;
    border: 1px solid rgb(255 255 255 / 0.28);
    border-radius: 50%;
    place-content: center;
    gap: 5px;
  }

  .menu-button span {
    width: 18px;
    height: 1px;
    background: var(--white);
    transition: transform 160ms ease;
  }

  .mobile-menu[open] .menu-button span:first-child { transform: translateY(3px) rotate(45deg); }
  .mobile-menu[open] .menu-button span:last-child { transform: translateY(-3px) rotate(-45deg); }

  .mobile-menu-panel {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    display: grid;
    padding: 1rem var(--pad) 1.5rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.16);
    background: var(--navy);
    gap: 0.25rem;
  }

  .mobile-menu-panel a {
    min-height: 48px;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgb(255 255 255 / 0.12);
    text-decoration: none;
  }

  .hero {
    position: relative;
    min-height: max(760px, 96svh);
    overflow: hidden;
    background: var(--navy);
    color: var(--white);
  }

  .hero::before {
    position: absolute;
    top: 8%;
    right: -9rem;
    width: min(34vw, 31rem);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--yellow);
    content: "";
  }

  .hero::after {
    position: absolute;
    right: 10%;
    bottom: -18rem;
    width: min(39vw, 35rem);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--coral);
    content: "";
    opacity: 0.86;
  }

  .hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, calc(var(--measure) + (2 * var(--pad))));
    min-height: max(760px, 96svh);
    margin-inline: auto;
    padding: clamp(9rem, 15vh, 12rem) var(--pad) clamp(5rem, 10vh, 8rem);
    align-items: center;
    grid-template-columns: minmax(0, 1.35fr) minmax(19rem, 0.65fr);
    gap: clamp(3rem, 7vw, 7rem);
  }

  .eyebrow {
    display: flex;
    margin-bottom: 1.4rem;
    align-items: center;
    gap: 0.7rem;
    color: var(--navy);
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
  }

  .eyebrow::before { width: 34px; height: 2px; background: currentColor; content: ""; }

  .hero .eyebrow,
  .signal-section .eyebrow { color: var(--yellow); }

  .hero h1 { max-width: 9ch; }

  .hero-lede {
    max-width: 35rem;
    margin-top: 1.7rem;
    color: rgb(255 255 255 / 0.76);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.48;
    letter-spacing: -0.025em;
  }

  .hero-actions { display: flex; margin-top: 2rem; flex-wrap: wrap; gap: 0.8rem; }

  .eligibility {
    max-width: 43rem;
    margin-top: 1.35rem;
    color: rgb(255 255 255 / 0.72);
    font-size: 0.8rem;
  }

  .plan-receipt {
    position: relative;
    z-index: 2;
    width: min(100%, 23rem);
    margin-inline: auto;
    padding: 1.1rem;
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 2rem 5rem rgb(0 0 0 / 0.25);
    transform: rotate(2deg);
  }

  .receipt-top {
    display: flex;
    padding: 0.55rem 0.45rem 1rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed #aaa7a0;
    color: var(--ink-soft);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .receipt-logo { color: var(--navy); font-family: Georgia, serif; font-size: 1.2rem; font-weight: 700; text-transform: none; }
  .receipt-title { padding: 1.6rem 0.45rem 0.9rem; font-size: 1.7rem; font-weight: 680; letter-spacing: -0.045em; }

  .receipt-list { list-style: none; padding: 0; }
  .receipt-list li {
    display: flex;
    padding: 0.9rem 0.45rem;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
  }

  .receipt-list strong { color: var(--navy); }
  .receipt-note { padding: 1rem 0.45rem 0.45rem; border-top: 1px dashed #aaa7a0; color: var(--ink-soft); font-size: 0.72rem; }

  .section {
    padding: var(--section) var(--pad);
    scroll-margin-top: 64px;
  }

  .section-inner { width: min(100%, var(--measure)); margin-inline: auto; }
  .section-heading { max-width: 12ch; }
  .section-lede { max-width: 39rem; margin-top: 1.3rem; color: var(--ink-soft); font-size: clamp(1.05rem, 1.8vw, 1.3rem); }

  .steps {
    background: var(--paper);
  }

  .step-list {
    margin-top: clamp(3.5rem, 8vw, 7rem);
    border-top: 1px solid var(--ink);
  }

  .step {
    display: grid;
    padding: clamp(1.8rem, 4vw, 3.4rem) 0;
    grid-template-columns: 5rem minmax(12rem, 0.65fr) minmax(16rem, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    border-bottom: 1px solid var(--line);
    align-items: start;
  }

  .step-number { color: var(--ink-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }
  .step h3 { font-size: clamp(1.7rem, 3vw, 2.7rem); }
  .step p { max-width: 35rem; color: var(--ink-soft); font-size: 1.05rem; }

  .plans {
    overflow: hidden;
    background: var(--paper-blue);
  }

  .plans-head {
    display: grid;
    align-items: end;
    grid-template-columns: 1fr 0.7fr;
    gap: 3rem;
  }

  .price-context { justify-self: end; max-width: 28rem; color: var(--ink-soft); font-size: 0.9rem; }
  .price-context a { color: var(--navy); font-weight: 700; }

  .stripe-frame {
    position: relative;
    margin-top: clamp(2.5rem, 5vw, 4rem);
    padding: clamp(0.35rem, 1vw, 0.8rem);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 2px);
    background: var(--white);
    box-shadow: 0 1.5rem 4rem rgb(27 24 62 / 0.08);
    overflow: hidden;
  }

  .preview-lock {
    position: absolute;
    z-index: 3;
    top: 1rem;
    right: 1rem;
    left: 1rem;
    display: flex;
    padding: 0.85rem 1rem;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: 1px solid rgb(27 24 62 / 0.2);
    border-radius: 0.75rem;
    background: rgb(255 255 255 / 0.96);
    color: var(--navy);
    text-align: center;
    box-shadow: var(--shadow-soft);
  }

  .preview-lock span { color: var(--ink-soft); font-size: 0.82rem; }
  [data-checkout-mode="preview"] stripe-pricing-table { pointer-events: none; opacity: 0.58; filter: saturate(0.7); }

  stripe-pricing-table { display: block; min-height: 465px; }

  .checkout-note {
    display: flex;
    margin-top: 1.2rem;
    align-items: flex-start;
    gap: 0.7rem;
    color: var(--ink-soft);
    font-size: 0.8rem;
  }

  .checkout-note::before { color: var(--navy); content: "↗"; font-size: 1rem; }

  .signal-section {
    position: relative;
    overflow: hidden;
    background: var(--navy);
    color: var(--white);
  }

  .signal-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: clamp(3rem, 8vw, 8rem);
    align-items: center;
  }

  .signal-copy h2 { max-width: 10ch; }
  .signal-copy p { max-width: 34rem; margin-top: 1.5rem; color: rgb(255 255 255 / 0.67); font-size: 1.14rem; }

  .signal-visual { position: relative; min-height: 33rem; }
  .signal-orbit { position: absolute; inset: 50% auto auto 50%; border: 1px solid rgb(255 255 255 / 0.18); border-radius: 50%; transform: translate(-50%, -50%); }
  .signal-orbit:nth-child(1) { width: 10rem; height: 10rem; }
  .signal-orbit:nth-child(2) { width: 19rem; height: 19rem; }
  .signal-orbit:nth-child(3) { width: 29rem; height: 29rem; }
  .signal-core { position: absolute; inset: 50% auto auto 50%; width: 5.8rem; height: 5.8rem; border-radius: 50%; background: var(--yellow); transform: translate(-50%, -50%); }
  .signal-label { position: absolute; padding: 0.55rem 0.85rem; border: 1px solid rgb(255 255 255 / 0.24); border-radius: var(--pill); background: var(--navy-2); color: var(--white); font-size: 0.78rem; }
  .signal-label:nth-of-type(5) { top: 15%; left: 7%; }
  .signal-label:nth-of-type(6) { top: 24%; right: 2%; }
  .signal-label:nth-of-type(7) { bottom: 17%; left: 2%; }
  .signal-label:nth-of-type(8) { right: 8%; bottom: 12%; }

  .feature-ledger { border-top: 1px solid var(--ink); }
  .feature-row {
    display: grid;
    padding: clamp(2rem, 4vw, 3.7rem) 0;
    grid-template-columns: minmax(12rem, 0.72fr) minmax(16rem, 1fr);
    gap: 3rem;
    border-bottom: 1px solid var(--line);
  }

  .feature-row h3 { font-size: clamp(1.7rem, 3vw, 2.8rem); }
  .feature-row p { max-width: 39rem; color: var(--ink-soft); font-size: 1.06rem; }
  .feature-row small { display: block; margin-top: 0.8rem; color: #6a6670; font-size: 0.78rem; }

  .faq { background: var(--paper-blue); }
  .faq-layout { display: grid; grid-template-columns: 0.58fr 1fr; gap: clamp(3rem, 8vw, 8rem); }
  .faq-intro { position: sticky; top: 104px; align-self: start; }
  .faq-intro p { max-width: 23rem; margin-top: 1.3rem; color: var(--ink-soft); }
  .faq-list { border-top: 1px solid var(--ink); }

  .faq-list details { border-bottom: 1px solid #ccc9c1; }
  .faq-list summary {
    display: flex;
    min-height: 72px;
    padding: 1.15rem 0;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    cursor: pointer;
    font-size: clamp(1rem, 1.5vw, 1.22rem);
    font-weight: 650;
    list-style: none;
  }

  .faq-list summary::-webkit-details-marker { display: none; }
  .faq-list summary::after { color: var(--navy); content: "+"; font-size: 1.8rem; font-weight: 400; transition: transform 160ms ease; }
  .faq-list details[open] summary::after { transform: rotate(45deg); }
  .faq-answer { max-width: 40rem; padding: 0 3rem 1.6rem 0; color: var(--ink-soft); }
  .faq-answer a { color: var(--navy); font-weight: 650; }

  .contact { background: var(--yellow); color: var(--navy); }
  .contact-layout { display: grid; grid-template-columns: 0.78fr 1fr; gap: clamp(3rem, 8vw, 8rem); }
  .contact-copy h2 { max-width: 8ch; }
  .contact-copy > p { max-width: 28rem; margin-top: 1.5rem; color: rgb(27 24 62 / 0.72); font-size: 1.08rem; }
  .contact-methods {
    display: grid;
    gap: 1rem;
  }
  .contact-method {
    display: grid;
    min-height: 10rem;
    padding: clamp(1.4rem, 3vw, 2rem);
    border: 1px solid rgb(27 24 62 / 0.22);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--navy);
    gap: 0.45rem;
    transition: border-color 160ms ease, transform 160ms ease;
  }
  .contact-method:hover { border-color: var(--navy); transform: translateY(-2px); }
  .contact-method-label { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
  .contact-method strong { font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -0.03em; }
  .contact-method > span:last-child { margin-top: auto; color: var(--ink-soft); font-size: 0.84rem; }

  .site-footer {
    padding: clamp(3.5rem, 7vw, 6rem) var(--pad) 2rem;
    background: var(--navy);
    color: var(--white);
  }

  .footer-inner { width: min(100%, var(--measure)); margin-inline: auto; }
  .footer-top { display: flex; padding-bottom: clamp(3rem, 7vw, 6rem); align-items: end; justify-content: space-between; gap: 3rem; }
  .footer-top img { width: min(48vw, 330px); }
  .footer-tagline { max-width: 19rem; color: rgb(255 255 255 / 0.6); text-align: right; }
  .footer-bottom { display: flex; padding-top: 1.3rem; align-items: center; justify-content: space-between; gap: 2rem; border-top: 1px solid rgb(255 255 255 / 0.15); color: rgb(255 255 255 / 0.55); font-size: 0.75rem; }
  .footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
  .footer-links a:hover { color: var(--white); }

  .legal-main { padding: calc(64px + var(--section)) var(--pad) var(--section); }
  .legal-inner { width: min(100%, var(--narrow)); margin-inline: auto; }
  .legal-main .eyebrow { color: var(--navy); }
  .legal-main h1 { max-width: 12ch; font-size: clamp(3rem, 7vw, 5.6rem); }
  .legal-effective { margin-top: 1.4rem; color: var(--ink-soft); }
  .legal-note { margin-top: 2rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-blue); color: var(--ink-soft); font-size: 0.86rem; }
  .legal-content { margin-top: 4rem; }
  .legal-content h2 { margin-top: 3rem; font-size: clamp(1.45rem, 2.5vw, 2rem); letter-spacing: -0.03em; }
  .legal-content h3 { margin-top: 1.5rem; font-size: 1.08rem; letter-spacing: -0.02em; }
  .legal-content p, .legal-content ul { margin-top: 0.85rem; color: #3e3b43; }
  .legal-content ul { padding-left: 1.35rem; }
  .legal-content li + li { margin-top: 0.35rem; }

  .not-found { display: grid; min-height: 100svh; padding: 7rem var(--pad); background: var(--navy); color: var(--white); place-items: center; text-align: center; }
  .not-found-inner { max-width: 45rem; }
  .not-found .code { color: var(--yellow); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; letter-spacing: 0.12em; }
  .not-found h1 { margin-top: 1rem; font-size: clamp(3.5rem, 10vw, 7rem); }
  .not-found p { max-width: 30rem; margin: 1.4rem auto 2rem; color: rgb(255 255 255 / 0.68); font-size: 1.1rem; }
}

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

@media (max-width: 860px) {
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .hero-inner { grid-template-columns: 1fr; align-content: center; }
  .hero::before { top: 5.5rem; right: -7rem; width: 18rem; opacity: 0.82; }
  .hero::after { right: -7rem; bottom: -10rem; width: 25rem; }
  .hero-copy { padding-top: 2.5rem; }
  .hero h1 { max-width: 8ch; }
  .plan-receipt { display: none; }
  .plans-head, .signal-grid, .faq-layout, .contact-layout { grid-template-columns: 1fr; }
  .price-context { justify-self: start; }
  .signal-copy { position: relative; z-index: 2; }
  .signal-visual { min-height: 26rem; }
  .faq-intro { position: static; }
}

@media (max-width: 680px) {
  .site-nav { height: 58px; }
  .brand img { width: 132px; }
  .mobile-menu-panel { top: 58px; }
  .hero { min-height: 720px; }
  .hero-inner { min-height: 720px; padding-top: 7.5rem; }
  .hero::before { top: 5.25rem; right: -8rem; width: 15rem; }
  .hero::after { right: -10rem; bottom: -15rem; width: 22rem; opacity: 0.55; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .step { grid-template-columns: 3rem 1fr; gap: 1rem; }
  .step p { grid-column: 2; }
  .feature-row { grid-template-columns: 1fr; gap: 1rem; }

  .footer-top { align-items: start; flex-direction: column; }
  .footer-tagline { text-align: left; }
  .footer-bottom { align-items: flex-start; flex-direction: column-reverse; }
  .signal-orbit:nth-child(3) { width: 23rem; height: 23rem; }
  .signal-label { font-size: 0.68rem; }
}

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