/* Landing page only (loaded after app.css). Colours come from app.css tokens:
   no hex here. Motion: var(--ease), entrances under 500ms, all of it off under
   prefers-reduced-motion. Content is visible without JS. */

/* ---- Layout: full-bleed bands, content held to a centred column ---- */
.landing-main { max-width: none; padding: 0; overflow-x: clip; }
/* One column edge for nav, every band and the footer (the hero is no longer boxed in). */
.landing { --col: 1120px; }
.landing .landing-nav { padding-inline: max(1.5rem, calc((100% - var(--col)) / 2)); }
/* Auto-hiding sticky nav (owner pick): hides on scroll-down, slides in from
   top on scroll-up; translucent blurred canvas so bands read beneath it. */
.landing .landing-nav { position: sticky; top: 0; z-index: 30; background: var(--nav-bg);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  transition: transform .25s var(--ease); will-change: transform; }
.landing .landing-nav.nav-hidden { transform: translateY(-105%); }
/* Anchor links fill the bar; animated teal underline + active-section state. */
.landing .nav-links a:not(.button) { position: relative; }
.landing .nav-links a:not(.button)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--brand); border-radius: 2px; transform: scaleX(0); transform-origin: left center;
  transition: transform .25s var(--ease); }
.landing .nav-links a:not(.button):hover::after, .landing .nav-links a.is-active::after { transform: scaleX(1); }
/* Breathing room: the bar felt congested at the shared 16px gap. */
.landing .nav-links { gap: var(--s5); }
.landing .nav-links a[href="/login"] { margin-left: var(--s4); }
.landing .nav-links .button { margin-left: var(--s3); }
.landing .nav-links .theme-toggle { margin-left: var(--s4); }
.landing-main > section { border-bottom: 0; padding: var(--s8) max(1.5rem, calc((100% - var(--col)) / 2)); }
.landing .lf-grid, .landing .lf-fine { max-width: var(--col); }
.landing-main h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -.02em; line-height: 1.2; }
.section-sub { margin: -.5rem 0 var(--s5); color: var(--ink-soft); font-size: 1.05rem; max-width: 60ch; }

/* ---- Hero: wide band, copy column + product column ---- */
.landing-main > .hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  column-gap: var(--s7); align-items: center; padding-top: var(--s7); padding-bottom: var(--s8);
  background: radial-gradient(ellipse 70% 90% at 85% 40%, var(--brand-tint), transparent 70%), var(--canvas);
  border-bottom: 1px solid var(--line); }
.landing-main .hero h1 { max-width: none; margin: var(--s3) 0 var(--s4); font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; }
.nowrap { white-space: nowrap; }
.hero-sub { max-width: 54ch; margin: 0; font-size: 1.15rem; line-height: 1.6; color: var(--ink-soft); }
.hero .cta-row { margin-top: var(--s5); }
.cta-helper { margin: var(--s3) 0 0; font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.proof-chips, .risk-list { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; margin: var(--s4) 0 0; }
.proof-chips li, .risk-list li { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px;
  border: 1px solid var(--line); border-radius: var(--chip-radius); background: var(--card);
  font-size: 13px; font-weight: 600; color: var(--ink); }
.proof-chips li::before, .risk-list li::before { content: ""; width: 4px; height: 8px; margin: 0 2px 2px 0;
  border: solid var(--success); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---- Phone mock (CSS only, decorative: aria-hidden in the markup) ---- */
.hero-visual { position: relative; display: flex; justify-content: flex-end; align-items: center;
  min-height: 600px; padding: var(--s4) 0; }
.phone { position: relative; z-index: 1; width: 304px; height: 584px; padding: 12px; border-radius: 42px;
  background: var(--band-canvas); border: 1px solid var(--band-line);
  box-shadow: var(--shadow-md), 0 30px 60px var(--band-glow); }
.phone-notch { position: absolute; top: 12px; left: 50%; width: 104px; height: 22px; transform: translateX(-50%);
  border-radius: 0 0 14px 14px; background: var(--band-canvas); z-index: 2; }
.phone-screen { height: 100%; overflow: hidden; display: flex; flex-direction: column; gap: 10px;
  padding: 38px 14px 14px; border-radius: 32px; background: var(--canvas); }
.mock-head { display: flex; flex-direction: column; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.mock-head strong { color: var(--ink); font-size: 15px; }
.mock-head span { color: var(--muted); font-size: 12px; }
.mock-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.mock-row--open { border-color: var(--brand-border); box-shadow: var(--shadow-sm); }
.mock-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mock-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.mock-score { min-width: 40px; padding: 2px 10px; border: 1px solid; border-radius: var(--chip-radius);
  font-size: 13px; font-weight: 700; text-align: center; }
.mock-score--strong { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.mock-score--mid { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-border); }
.mock-score--low { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }
.mock-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mock-tags span { padding: 1px 8px; border-radius: 6px; background: var(--hover); color: var(--ink-soft); font-size: 11px; }
.mock-evidence { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0;
  background: var(--brand-tint); color: var(--ink); font-size: 12px; line-height: 1.45; }
.mock-evidence small { display: block; margin-bottom: 2px; color: var(--brand-dark); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; }
.mock-evidence q { font-style: italic; quotes: none; }
.mock-evidence b { color: var(--success); white-space: nowrap; }
.mock-actions { display: flex; gap: 8px; margin-top: auto; }
.mock-btn { flex: 1; padding: 7px 0; border: 1px solid var(--brand); border-radius: var(--chip-radius);
  color: var(--brand-dark); font-size: 12px; font-weight: 600; text-align: center; }
.mock-btn--go { background: var(--brand); color: var(--on-brand); }
.mock-foot { margin: 0; color: var(--muted); font-size: 11px; text-align: center; }

/* Float chips sit in the gutter left of the phone, never over its text
   (the overlap was v4's blocker); hidden where the gutter is too narrow. */
.float-chip { position: absolute; z-index: 2; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); box-shadow: var(--shadow-md); color: var(--ink); font-size: 12px; font-weight: 700;
  max-width: calc(100% - 304px - var(--s4)); }
.float-chip::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%;
  background: var(--brand); vertical-align: 1px; }
.float-chip--one { top: 18%; left: 4%; }
.float-chip--two { top: 46%; left: 0; }
.float-chip--three { top: 72%; left: 6%; }

/* ---- Problem tiles and how-it-works steps ---- */
.landing-main > .problem { background: var(--card); border-bottom: 1px solid var(--line); }
.tile { padding: var(--s5); }
.how .how-steps { list-style: none; padding: 0; counter-reset: step;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.how li { counter-increment: step; padding: var(--s5) var(--s4); }
.how li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: var(--s3);
  border: 1px solid var(--brand-border); border-radius: 50%; background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; }
.how li strong { display: block; margin-bottom: var(--s1); color: var(--ink); }

/* ---- Pricing: wide cards on a real grid, badges seated inside ---- */
.landing-main > .pricing { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.landing .price-grid { gap: var(--s5); }
.landing .price-card { padding: var(--s6); border-radius: 16px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.landing .price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.landing .price-card .badge-text { align-self: flex-start; margin: 0 0 var(--s3); font-weight: 600; }
.landing .price-card h3 { margin: 0; font-size: 1.1rem; color: var(--ink-soft); }
.landing .price { margin: var(--s2) 0 0; font-size: clamp(2.4rem, 4vw, 3rem); letter-spacing: -.03em; line-height: 1.05; }
.landing .price-card .button { align-self: stretch; justify-content: center; min-height: 44px; display: inline-flex;
  align-items: center; border-radius: var(--chip-radius); font-weight: 600; }
.byok-note { margin: var(--s5) 0 var(--s1); color: var(--ink-soft); }

/* ---- Dark band: the one full-bleed dark section, same in either theme ---- */
.landing-main > .band-dark { background: radial-gradient(ellipse 60% 80% at 15% 0%, var(--band-glow), transparent 70%), var(--band-canvas);
  color: var(--band-ink-soft); border-top: 1px solid var(--band-line); border-bottom: 1px solid var(--band-line); }
.band-dark h2 { color: var(--band-ink); }
.band-dark .trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); padding: 0; list-style: none; }
.band-dark .trust-grid li { margin: 0; padding: var(--s5); border: 1px solid var(--band-line); border-radius: var(--radius);
  background: var(--band-card); line-height: 1.55; transition: transform .2s var(--ease), border-color .2s var(--ease); }
.band-dark .trust-grid li:hover { transform: translateY(-2px); border-color: var(--band-brand); }
.band-dark .trust-grid strong { display: block; margin-bottom: var(--s1); color: var(--band-ink); }
.band-dark .trust-grid strong::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px;
  border-radius: 50%; background: var(--band-brand); vertical-align: 1px; }

/* ---- FAQ and closing ---- */
.faq details { max-width: 820px; }
.faq summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); cursor: pointer; }
.faq summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); transition: transform .25s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details a { color: var(--brand-dark); font-weight: 600; }
.landing-main > .closing { background: var(--brand-tint); border-top: 1px solid var(--brand-border); }
.closing p { max-width: 56ch; margin-inline: auto; }
.risk-list { justify-content: center; margin-top: var(--s5); }
.landing .landing-footer { margin-top: 0; }  /* the closing band runs straight into the footer */

/* ---- Motion (calm, once): hero enters on load, chips drift slowly ---- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-copy > * { animation: hero-in .4s var(--ease) backwards; }
  .hero-copy > :nth-child(2) { animation-delay: 60ms; }
  .hero-copy > :nth-child(3) { animation-delay: 120ms; }
  .hero-copy > :nth-child(4) { animation-delay: 180ms; }
  .hero-copy > :nth-child(n+5) { animation-delay: 240ms; }
  .hero-visual .phone { animation: hero-in .45s var(--ease) 120ms backwards; }
  .float-chip { animation: chip-in .4s var(--ease) 300ms backwards, float-y 7s ease-in-out 700ms infinite; }
  .float-chip--two { animation-duration: .4s, 8.5s; }
  .float-chip--three { animation-duration: .4s, 6.5s; }
  /* Sibling stagger for scroll reveals (~75ms apart). */
  .stagger > .reveal:nth-child(2) { animation-delay: 75ms; }
  .stagger > .reveal:nth-child(3) { animation-delay: 150ms; }
  .stagger > .reveal:nth-child(4) { animation-delay: 225ms; }
  .stagger > .reveal:nth-child(5) { animation-delay: 300ms; }
  .stagger > .reveal:nth-child(n+6) { animation-delay: 375ms; }
}
@keyframes hero-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes chip-in { from { opacity: 0; } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-visual .phone, .float-chip, .reveal { animation: none !important; }
  .landing .price-card, .band-dark .trust-grid li, .landing .landing-nav, .landing .nav-links a:not(.button)::after { transition: none; }
  .landing .price-card:hover, .band-dark .trust-grid li:hover { transform: none; }
}

/* ---- Responsive ---- */
@media (max-width: 1100px) { .float-chip { display: none; } .hero-visual { justify-content: center; } }
@media (max-width: 960px) { .how .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-dark .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .landing-main > .hero { display: block; padding-top: var(--s6); }
  .hero-visual { min-height: 0; margin-top: var(--s6); }
}
@media (max-width: 620px) {
  .landing-main > section { padding-top: var(--s7); padding-bottom: var(--s7); }
  .how .how-steps, .band-dark .trust-grid { grid-template-columns: 1fr; }
  .landing .price-card { padding: var(--s5); }
  .phone { width: 280px; height: 560px; }
  .hero .cta-row .button { flex: 1 1 100%; justify-content: center; }
}

/* ---- Display face (ui-ux-pro-max B2B-SaaS pick): self-hosted, latin subset,
   swap so text is never invisible; body copy stays on the fast system stack. ---- */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("fonts/plus-jakarta-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("fonts/plus-jakarta-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800;
  font-display: swap; src: url("fonts/plus-jakarta-sans-800.woff2") format("woff2"); }
.landing-main .hero h1, .landing-main h2, .landing .price-card .price {
  font-family: "Plus Jakarta Sans", var(--font); letter-spacing: -0.02em; }

/* ---- Touch comfort: 44px targets for the collapsible landing nav ---- */
@media (max-width: 719.98px) {
  .landing .nav-links a:not(.button), .landing .nav-toggle { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ---- Keyboard users: skip the nav-heavy header (ui-ux-pro-max a11y rule) ---- */
.skip-link { position: absolute; left: var(--s4); top: -100px; z-index: 60; padding: .5rem 1rem;
  background: var(--brand); color: var(--canvas); border-radius: var(--radius); }
.skip-link:focus { top: var(--s4); }
