/* Landing page layout. Primitives (glass, buttons, menu, type roles) live in base.css. */

.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nudge-ico { transition: transform .25s var(--ease); }
button:hover .nudge-ico { transform: translateX(2px); }

.skip-link {
  position: fixed; left: 16px; top: -64px; z-index: 200;
  padding: 10px 16px; border-radius: 11px;
  background: var(--light); color: var(--on-light); font-weight: 600;
  --rond: var(--rond-button);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }
#main:focus, .success:focus { outline: none; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 18px var(--gutter);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 18px 0 8px; border-radius: 16px;
}
.wordmark { --rond: var(--rond-heading); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 16px; }
.nav-item {
  --rond: var(--rond-button);
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 11px; font-size: 14.5px; white-space: nowrap;
  transition: background-color .15s var(--ease);
}
.nav-item:hover { background: rgba(255, 255, 255, .08); }
.nav-item.is-active { background: rgba(255, 255, 255, .10); padding-left: 24px; }
.nav-item.is-active::before {
  content: ""; position: absolute; left: 12px; top: 50%;
  width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--accent);
}
.nav-spark { color: var(--accent); }

.top-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.menu-wrap { position: relative; }
.hamburger { color: var(--light); }
.hamburger[aria-expanded="true"] { background: rgb(var(--light-rgb) / .14); }
.site-menu { right: 0; top: calc(100% + 8px); }
.site-menu .menu-item { display: flex; }
.menu-sm-only { display: none !important; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; isolation: isolate;
  min-height: max(100svh, 760px);
  display: flex; flex-direction: column; justify-content: flex-end;
  /* Room for the card stack above the bottom-pinned copy, so they never overlap on short screens.
     --stack-h is the stack's measured height (set by landing.js); 400px is the two-card fallback. */
  padding: calc(max(13svh, 96px) + var(--stack-h, 400px) + 24px) var(--gutter) 30px;
  overflow: hidden;
}
.backdrop {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  /* CSS fallback when WebGL2 is missing: the canvas covers it otherwise. */
  background:
    radial-gradient(60% 55% at 78% 34%, rgb(var(--accent-rgb) / .55), transparent 70%),
    radial-gradient(45% 40% at 58% 18%, rgb(var(--light-rgb) / .32), transparent 70%),
    radial-gradient(55% 60% at 18% 30%, rgb(var(--light-base-rgb) / .9), transparent 70%),
    radial-gradient(70% 60% at 40% 95%, rgb(var(--mid-base-rgb) / 1), transparent 70%),
    var(--base);
}
.backdrop-mesh { position: absolute; inset: 0; }
.backdrop-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgb(var(--deep-rgb) / .82) 0%, rgb(var(--deep-rgb) / .5) 30%, rgb(var(--deep-rgb) / 0) 62%),
    linear-gradient(90deg, rgb(var(--deep-rgb) / .38) 0%, rgb(var(--deep-rgb) / 0) 55%);
}

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 48px;
  grid-template-areas: "title title" "lede cta";
}
.hero-copy { display: contents; }
.hero-title { grid-area: title; }
.lede { grid-area: lede; }
.hero-cta { grid-area: cta; margin-top: 22px; }
.hero-title { font-size: clamp(2.5rem, 6.1vw, 6.1rem); text-shadow: 0 2px 30px rgb(var(--deep-rgb) / .35); }
.lede {
  max-width: 54ch; margin-top: 22px;
  font-size: 18px; line-height: 1.5; color: rgb(var(--light-rgb) / .9);
}

.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; justify-content: flex-end; }
.cta-swap { display: flex; }
.cta-swap .pill-cta[hidden] { display: none; }
.area-field, .join-field {
  display: flex; align-items: center; gap: 10px;
  height: 62px; padding: 6px 6px 6px 20px; border-radius: 999px;
  width: min(100%, 420px);
  background: rgb(var(--deep-rgb) / .72); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(26px) saturate(150%); backdrop-filter: blur(26px) saturate(150%);
  box-shadow: var(--glass-shadow);
  transition: border-color .2s var(--ease);
}
.area-field:focus-within, .join-field:focus-within { border-color: var(--accent); }
.area-field[hidden], .join-field[hidden] { display: none; }
.area-pin { color: var(--accent); }
.area-select {
  flex: 1; min-width: 0; height: 100%;
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 0; outline: 0;
  font-size: 16px; font-weight: 560; color: var(--light); cursor: pointer;
}
.area-select option { background: var(--base); color: var(--light); }
.area-field:has(.area-select:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.go-btn {
  --rond: var(--rond-button);
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 50px; padding: 0 18px 0 22px; border-radius: 999px;
  background: var(--accent); color: var(--on-light); font-size: 15px; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 24px -10px rgb(var(--accent-rgb) / .6);
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.go-btn:hover { background: var(--accent-hi); }
.go-btn:active { transform: scale(.97); }
.go-btn:disabled { opacity: .7; cursor: progress; }

/* ---------------------------------------------------------------- card stack */
.stack {
  position: absolute; right: var(--gutter); top: max(13svh, 96px);
  width: min(100%, 360px);
  padding: 10px 12px 12px; border-radius: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.stack-grabber { width: 44px; height: 3px; margin: 0 auto 2px; border-radius: 3px; background: rgb(var(--light-rgb) / .3); }
.stack-loc { --rond: var(--rond-label); display: flex; align-items: center; gap: 6px; padding: 0 4px; font-size: 12.5px; color: var(--muted); }
.stack-pin { color: var(--accent); }
.stack-area { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack-live { color: var(--muted); }
.stack-cards { position: relative; display: flex; flex-direction: column; gap: 8px; }

.dc {
  display: block; padding: 12px 14px 14px; border-radius: 16px;
  background: linear-gradient(180deg, rgb(var(--light-rgb) / .10), rgb(var(--light-rgb) / .04));
  border: 1px solid rgb(var(--light-rgb) / .10);
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
a.dc:hover { border-color: rgb(var(--light-rgb) / .26); }
.dc.is-entering { animation: row-in .5s var(--ease) both; }
.dc.is-leaving { position: absolute; left: 0; right: 0; animation: fade .35s var(--ease) reverse both; pointer-events: none; }
.dc-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.dc-name { --rond: var(--rond-heading); flex: 1; min-width: 0; font-size: 15px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-meta { --rond: var(--rond-label); flex: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.dc-times { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; margin-top: 12px; align-items: end; }
.dc-times > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dc-times > div:nth-child(2) { align-items: center; text-align: center; }
.dc-times > div:nth-child(3) { align-items: flex-end; text-align: right; }
.dc-label { --rond: var(--rond-label); font-size: 12px; color: var(--muted); white-space: nowrap; }
.dc-val { font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc-times .is-soon { color: var(--accent); }
.dc-sub { --rond: var(--rond-label); margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.dc-ruler {
  position: relative; height: 12px; margin-top: 12px;
  background: repeating-linear-gradient(90deg, rgb(var(--light-rgb) / .26) 0 1px, transparent 1px calc(100% / 24));
}
.dc-span { position: absolute; bottom: 0; height: 4px; border-radius: 2px; background: rgb(var(--light-rgb) / .7); }
.dc-empty .dc-name { white-space: normal; }

/* ---------------------------------------------------------------- feature strip */
.features {
  position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 24px;
  margin-top: 48px; padding-top: 18px;
  border-top: 1px solid rgb(var(--light-rgb) / .34);
}
.features::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 20%; height: 1px; background: var(--accent);
}
.feature { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; opacity: .86; }
.feature > span:last-child { max-width: 24ch; color: rgb(var(--light-rgb) / .82); }
.feature strong { display: block; font-weight: 560; color: var(--light); }
.feature .ico { margin-top: 1px; }
.feature.is-lead { opacity: 1; }
.feature.is-lead .ico { color: var(--accent); }

/* ---------------------------------------------------------------- how it works */
.how, .sources {
  max-width: 1480px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; align-items: start;
  padding: clamp(80px, 10vw, 140px) var(--gutter) 0;
}
.how-title, .sources-title { font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1.05; }
.how-title { position: sticky; top: 110px; }
.steps { display: flex; flex-direction: column; gap: 12px; }
.step {
  display: flex; flex-direction: column; gap: 10px;
  padding: 30px 32px; border-radius: 24px;
  border: 1px solid rgb(var(--light-rgb) / .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 24px 48px -28px rgba(0,0,0,.7);
}
.step-1 { background: var(--base-dark); }
.step-2 { background: var(--deep); }
.step.is-light {
  border-color: transparent; color: var(--on-light);
  background: linear-gradient(160deg, var(--light-hi), var(--light-lo));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 24px 48px -28px rgba(0,0,0,.7);
}
.step-num { --rond: var(--rond-label); font-size: 13px; color: var(--muted); }
.step.is-light .step-num, .step.is-light .step-text { color: var(--on-light-muted); }
.step-title { font-size: clamp(1.3rem, 1.9vw, 1.65rem); line-height: 1.2; font-weight: 600; }
.step-text { max-width: 56ch; color: rgb(var(--light-rgb) / .78); }

/* ---------------------------------------------------------------- sources */
.sources-intro { display: flex; flex-direction: column; gap: 14px; }
.sources-text { max-width: 44ch; color: rgb(var(--light-rgb) / .78); }
.source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.source-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 14px 2px; border-bottom: 1px solid rgb(var(--light-rgb) / .16);
}
.source-name { font-size: 16px; }
.source-row .status { font-variant-numeric: tabular-nums; white-space: nowrap; }
.source-row .status.is-found { color: var(--light); }

/* ---------------------------------------------------------------- closing CTA */
.closing { max-width: 1480px; margin: clamp(80px, 10vw, 140px) auto 0; padding: 0 var(--gutter); }
.closing-inner {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(36px, 6vw, 88px); border-radius: 32px;
  background: var(--base-dark);
  border: 1px solid rgb(var(--light-rgb) / .12);
}
.closing-inner::before, .closing-inner::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.closing-inner::before {
  width: 640px; height: 640px; right: -220px; top: -320px;
  background: radial-gradient(closest-side, rgb(var(--accent-rgb) / .30), transparent);
}
.closing-inner::after {
  width: 520px; height: 520px; right: 80px; top: -300px;
  background: radial-gradient(closest-side, rgb(var(--light-rgb) / .22), transparent);
}
.closing-title { font-size: clamp(2.1rem, 4.4vw, 3.8rem); line-height: 1.02; max-width: 16ch; }
.closing-text { max-width: 52ch; margin-top: 18px; font-size: 18px; color: rgb(var(--light-rgb) / .82); }
.join-slot { margin-top: 32px; }
.join-field { width: min(100%, 460px); }
.join-field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px;
}
.join-field input::placeholder { color: rgb(var(--light-rgb) / .55); }
.join-msg { margin-top: 10px; min-height: 1.4em; padding-left: 20px; }

.success {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 24px 10px 10px; border-radius: 999px;
  background: rgb(var(--deep-rgb) / .6); border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  animation: open .45s var(--ease) both;
}
.success-check {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--accent); color: var(--on-light);
  animation: pop .5s var(--ease) .1s both;
}
.success-title { --rond: var(--rond-heading); display: block; font-size: 16px; font-weight: 600; }
.success-sub { --rond: var(--rond-label); display: block; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- footer */
.footer {
  max-width: 1480px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 40px var(--gutter) 36px; font-size: 14.5px; color: var(--muted);
}

/* ---------------------------------------------------------------- entrance motion */
@media (prefers-reduced-motion: no-preference) {
  .topbar { animation: fade .9s var(--ease) both; }
  .hero-title { animation: rise .9s var(--ease) both; }
  .lede { animation: rise .9s var(--ease) .1s both; }
  .stack { animation: rise .9s var(--ease) .18s both; }
  .hero-cta { animation: rise .9s var(--ease) .34s both; }
  .feature { animation: rise .9s var(--ease) calc(.40s + var(--i, 0) * 60ms) both; }
  .feature:nth-child(1) { --i: 0; }
  .feature:nth-child(2) { --i: 1; }
  .feature:nth-child(3) { --i: 2; }
  .feature:nth-child(4) { --i: 3; }
  .feature:nth-child(5) { --i: 4; }
  .area-field:not([hidden]) { animation: open .45s var(--ease) both; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "lede" "cta"; }
  .hero-cta { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .backdrop-shade {
    background:
      linear-gradient(to top, rgb(var(--deep-rgb) / .9) 0%, rgb(var(--deep-rgb) / .62) 40%, rgb(var(--deep-rgb) / .3) 100%),
      linear-gradient(90deg, rgb(var(--deep-rgb) / .3), rgb(var(--deep-rgb) / .1));
  }
}
@media (max-width: 800px) {
  .topbar { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .menu-sm-only { display: flex !important; }

  .hero { min-height: 100svh; justify-content: flex-start; padding-top: 104px; gap: 0; }
  .hero-grid { display: contents; }
  /* Mobile order: headline, lede, CTA, card stack, features. (.hero-copy is display: contents,
     so the h1 and lede are the flex items and keep order 0.) */
  .hero-cta { order: 1; margin-top: 24px; }
  .stack { order: 2; position: static; width: 100%; margin-top: 28px; }
  .features { order: 3; }
  .hero-title { font-size: clamp(2.3rem, 10.4vw, 3.6rem); }
  .lede { font-size: 17px; }
  .hero-cta, .cta-swap { width: 100%; }
  .hero-cta .pill-cta, .area-field { width: 100%; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 36px; }

  .how, .sources { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .how-title { position: static; }
  .step { padding: 24px; }
  .source-list { grid-template-columns: minmax(0, 1fr); }
  .closing-inner { padding: 32px 22px; border-radius: 24px; }
}
@media (max-width: 420px) {
  .wordmark { font-size: 18px; }
  .brand { padding-right: 14px; }
  .area-field, .join-field { padding-left: 16px; }
  .go-btn { padding: 0 14px 0 16px; }
}

/* ---------------------------------------------------------------- account control (account-orb.js) */
.acct-slot { display: flex; align-items: center; flex: none; min-width: 44px; min-height: 44px; }
.acct-signin {
  --rond: var(--rond-button);
  display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 16px;
  font-size: 14.5px; font-weight: 560; white-space: nowrap; color: var(--light);
  transition: transform .25s var(--ease), background-color .2s var(--ease);
}
.acct-signin:hover { transform: translateY(-2px); }
.acct-signin:active { transform: scale(.97); }
.acct-orb { overflow: hidden; --rond: var(--rond-button); font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.acct-orb[aria-expanded="true"] { background: rgb(var(--light-rgb) / .14); }
.acct-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.acct .acct-menu { left: auto; right: 0; top: calc(100% + 8px); min-width: 220px; max-width: min(300px, calc(100vw - 32px)); }
.acct-head { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px 6px; min-width: 0; }
.acct-name, .acct-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-name { --rond: var(--rond-heading); font-size: 14.5px; font-weight: 560; }
.acct-email { --rond: var(--rond-label); font-size: 12.5px; color: var(--muted); }
.acct-sep { height: 1px; margin: 5px 8px; background: var(--glass-line); }
.acct-signin.glass { border-radius: 14px; }
@media (max-width: 420px) { .acct-signin { padding: 0 12px; font-size: 14px; } }
