/* Landing page layout. All color comes from tokens.css (--bl-*), which
   already handles light/dark via prefers-color-scheme. */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bl-background);
  color: var(--bl-text-primary);
  line-height: 1.6;
}

main { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }

/* WEBSITE.md §download_banner: mobile-only sticky store banner. Tokens
   only, so light/dark come from tokens.css. Ships hidden; site.js reveals it on
   a detected phone (never desktop, never iOS Safari). The [hidden] rule must
   out-specify .app-banner's display:flex so the hidden attribute wins on
   desktop and no-JS. No reveal transition, so no reduced-motion block is
   needed (the reveal is an instant hidden-attribute toggle, no motion). */
.app-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.85rem;
  background: var(--bl-surface);
  border-bottom: 1px solid var(--bl-outline);
}
.app-banner[hidden] { display: none; }
.app-banner-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 22%; }
.app-banner-text { display: flex; flex-direction: column; min-width: 0; overflow: hidden; line-height: 1.25; }
.app-banner-text strong { font-size: 0.95rem; font-weight: 700; color: var(--bl-text-primary); }
.app-banner-text span {
  font-size: 0.8rem;
  color: var(--bl-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Reuses the .store-button look (tokens, focus ring); slimmed for the banner row
   and pinned right. Scoped to .app-banner so it out-specifies .store-button
   regardless of source order. Keeps a 44px min tap target. */
.app-banner .app-banner-store {
  flex-shrink: 0;
  margin-left: auto;
  min-height: 44px;
  padding: 0 0.9rem;
  font-size: 0.9rem;
}
.app-banner-dismiss {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bl-text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.app-banner-dismiss:focus-visible {
  outline: 2px solid var(--bl-primary);
  outline-offset: -2px;
  border-radius: 8px;
}
/* WEBSITE.md §download_banner: keep "Get the app" (not the "Get"
   fallback) legible on a 320px row by tightening the button, not the tap
   target. The text block clips before it can overlap the button. */
@media (max-width: 360px) {
  .app-banner { gap: 0.45rem; padding: 0.5rem 0.6rem; }
  .app-banner .app-banner-store { padding: 0 0.6rem; font-size: 0.85rem; }
}

/* Hero */
.hero { padding: 4.5rem 0 3rem; text-align: center; }
/* WEBSITE-PUBLIC-JOIN J3: square app-icon tile (rounded ~22%) + wordmark. */
.hero-app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.hero-wordmark {
  margin-top: 0.85rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--bl-primary);
}
/* ™ next to the wordmark (owner trademark hygiene, USPTO §1(b) filed 2026-07-29). */
.hero-wordmark .tm {
  font-size: 0.5em;
  font-weight: 600;
  line-height: 0;
}
.hero-brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--bl-primary);
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 800;
  margin: 0.75rem auto 1rem;
  max-width: 22ch;
}
.hero-sub {
  max-width: 54ch;
  margin: 0 auto 2rem;
  color: var(--bl-text-secondary);
}

/* Screen-reader-only utility (kept generic; the join control that introduced
   it is gone — owner 2026-08-10: no hero store CTA, the banner is the CTA). */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
}
.feature {
  background: var(--bl-surface);
  border-radius: 12px;
  padding: 1.5rem;
}
.feature h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature p { color: var(--bl-text-secondary); font-size: 0.95rem; }

/* Screenshots */
.screenshots { padding: 2rem 0 3rem; text-align: center; }
.screenshots h2 { margin-bottom: 1.25rem; }
.screenshot-row {
  display: flex;
  /* LC-38: four frames now — 0.75rem keeps all four on one 960px row
     (4×220 + 3×12 = 916 ≤ the 920px content width); mobile wraps as before. */
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.screenshot-frame {
  width: 220px;
  aspect-ratio: 9 / 19.5;
  border: 2px dashed var(--bl-outline);
  border-radius: 24px;
  background: var(--bl-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.screenshot-frame span {
  color: var(--bl-text-secondary);
  font-size: 0.85rem;
  padding: 0 1rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--bl-surface-alt);
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--bl-text-secondary);
}
footer p { max-width: 70ch; margin: 0 auto 0.5rem; }

/* Legal pages (privacy.html) */
.legal { max-width: 680px; padding: 3rem 1.25rem 4rem; }
.legal .hero-brand a { color: var(--bl-primary); text-decoration: none; }
.legal h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; margin: 0.5rem 0 0.25rem; }
.legal-updated { color: var(--bl-text-secondary); font-size: 0.9rem; margin-bottom: 1.75rem; }
.legal h2 { font-size: 1.15rem; font-weight: 700; margin: 1.75rem 0 0.5rem; }
.legal p + p { margin-top: 0.75rem; }

.screenshot-frame.filled { border: 2px solid var(--bl-outline); background: none; overflow: hidden; }
.screenshot-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.screenshot-frame picture { display: block; width: 100%; height: 100%; }

/* Premium / early-adopter section (WEBSITE-PUBLIC-JOIN P1-P7). Tokens-only,
   theme-aware, responsive; --bl-primary reserved for the CTA + focus ring. */
.premium { padding: 2rem 0; }
.premium-head { max-width: 54ch; margin: 0 auto 1.75rem; text-align: center; }
.premium-head h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; margin-bottom: 0.6rem; }
.premium-sub { color: var(--bl-text-secondary); }
/* Owner 2026-08-10: wrapping flex with centered rows, not grid — grid pins a
   short last row into its left columns; flex centers the orphans. Full rows
   still fill the width (grow, capped) so the two looks stay close. */
.premium-grid { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.premium-item { flex: 1 1 240px; max-width: 320px; background: var(--bl-surface); border-radius: 12px; padding: 1.5rem; }
.premium-item h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.premium-item p { color: var(--bl-text-secondary); font-size: 0.95rem; }
.premium-status { display: inline-block; margin-bottom: 0.6rem; padding: 0.15rem 0.55rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--bl-text-secondary); border: 1px solid var(--bl-outline); border-radius: 999px; }
.premium-lock { background: var(--bl-primary-container); color: var(--bl-on-primary-container); border-radius: 16px; padding: 2rem 1.5rem; text-align: center; }
.premium-lock-chip { display: inline-block; margin-bottom: 1rem; padding: 0.3rem 0.75rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; background: var(--bl-highlight); color: var(--bl-text-primary); border: 1px solid var(--bl-outline); border-radius: 999px; }
.premium-lock-title { font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 800; color: var(--bl-on-primary-container); margin-bottom: 0.6rem; }
.premium-lock-line { max-width: 40ch; margin: 0 auto 0.6rem; font-size: 1.05rem; font-weight: 600; color: var(--bl-on-primary-container); }
.premium-lock-detail { max-width: 52ch; margin: 0 auto 1.5rem; font-size: 0.9rem; color: var(--bl-on-primary-container); }
.premium-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.75rem; font-size: 1rem; font-weight: 600; border-radius: 10px; background: var(--bl-primary); color: var(--bl-on-primary); text-decoration: none; transition: opacity 0.15s ease; }
.premium-cta:hover { opacity: 0.92; }
.premium-cta:focus-visible { outline: 2px solid var(--bl-on-primary-container); outline-offset: 2px; }
.premium-free-note { max-width: 60ch; margin: 1.5rem auto 0; text-align: center; font-size: 0.85rem; color: var(--bl-text-secondary); }
@media (prefers-color-scheme: dark) {
  .premium-lock-chip { background: transparent; color: var(--bl-on-primary-container); border-color: var(--bl-on-primary-container); }
}
@media (prefers-reduced-motion: reduce) { .premium-cta { transition: none; } }

/* Set landing page (set.html, DEEPLINK-6/7). Tokens only, so light and dark
   both come from tokens.css. Narrow single column: this page is reached from a
   shared link, almost always on a phone. */
.set-page { max-width: 560px; padding: 3rem 1.25rem 4rem; text-align: center; }
.set-page .hero-brand a { color: var(--bl-primary); text-decoration: none; }
.set-image {
  width: min(280px, 70vw);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 1.5rem auto 0.5rem;
  display: block;
  border-radius: 12px;
  background: var(--bl-surface);
}
.set-page h1 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 800;
  margin: 1rem 0 0.25rem;
}
.set-number-line { color: var(--bl-text-secondary); font-size: 0.95rem; }
/* The live region keeps its box whether or not it has text, so the CTA below
   does not jump when a lookup resolves. */
.set-status { min-height: 1.6em; margin-top: 0.75rem; color: var(--bl-text-secondary); font-size: 0.95rem; }
.set-details {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0 0;
}
.set-details li {
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bl-text-secondary);
  border: 1px solid var(--bl-outline);
  border-radius: 999px;
}

/* DEEPLINK-7: the store CTA is the primary action on this page. */
.set-cta {
  margin-top: 2.5rem;
  padding: 1.75rem 1.25rem;
  background: var(--bl-surface);
  border-radius: 16px;
}
.set-cta h2 { font-size: clamp(1.2rem, 3.5vw, 1.5rem); font-weight: 800; margin-bottom: 0.6rem; }
.set-cta-sub { max-width: 44ch; margin: 0 auto 1.25rem; font-size: 0.95rem; color: var(--bl-text-secondary); }
.store-buttons { display: flex; flex-direction: column; gap: 0.6rem; max-width: 320px; margin: 0 auto; }
.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  background: var(--bl-primary);
  color: var(--bl-on-primary);
  text-decoration: none;
}
.store-button:focus-visible { outline: 2px solid var(--bl-primary); outline-offset: 2px; }
.set-cta-note { margin-top: 1rem; font-size: 0.8rem; color: var(--bl-text-secondary); }

/* QR router page (get.html, BSL-16). Reuses .hero-app-icon, .hero-wordmark,
   .store-buttons and .store-button; only the page's own frame is new. Tokens
   only, so light and dark both come from tokens.css. Narrow single column:
   almost everyone who reaches this page scanned a code with a phone. */
.get-page { max-width: 560px; padding: 3rem 1.25rem 4rem; text-align: center; }
.get-page .hero-wordmark a { color: inherit; text-decoration: none; }
.get-page h1 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 800;
  margin: 1.25rem 0 0.75rem;
}
.get-lead { max-width: 46ch; margin: 0 auto; color: var(--bl-text-secondary); }
.get-cta {
  margin-top: 2.5rem;
  padding: 1.75rem 1.25rem;
  background: var(--bl-surface);
  border-radius: 16px;
}
.get-cta h2 { font-size: clamp(1.2rem, 3.5vw, 1.5rem); font-weight: 800; margin-bottom: 1.25rem; }
.get-cta-note { margin-top: 1rem; font-size: 0.8rem; color: var(--bl-text-secondary); }
/* WEBSITE.md §beta_removal: .get-offer* removed — the free-for-life
   offer block was deleted from get.html in commit 4abfa53, so these rules were
   dead. */
.get-home { margin-top: 2rem; font-size: 0.9rem; }
.get-home a { color: var(--bl-primary); }

/* SITE-COLLAGE (owner 2026-08-12): the app's Home collage as a decorative brand
   band on every page. The band is ALWAYS its fixed height (no CLS): before the
   pool loads, on fetch failure, or with JS off it reads as a calm dark brand
   strip; site.js appends the tiles (twice, for the seamless loop) and adds
   .is-live. aria-hidden in markup — this is wallpaper, never content. */
.site-collage {
  position: relative;
  height: 88px;
  overflow: hidden;
  background: #17171B;
}
@media (min-width: 720px) {
  .site-collage { height: 112px; }
}
.site-collage-track {
  display: flex;
  height: 100%;
  width: max-content;
  /* NO-FLASH: invisible until every tile is decoded and .is-live lands, so
     the first painted frame already has its final geometry. */
  opacity: 0;
  transition: opacity 0.6s ease;
}
.site-collage.is-live .site-collage-track {
  opacity: 1;
  animation: collage-scroll 70s linear infinite;
}
.site-collage-tile {
  height: 100%;
  width: auto;
  object-fit: cover;
  /* margin, not flex gap: every tile contributes (width + margin) to the
     track, so with the tile run appended twice, translateX(-50%) lands exactly
     on the seam and the loop never jumps. */
  margin-right: 10px;
  border-radius: 0;
  opacity: 0.9;
}
/* Edge fade + a light scrim so the band sits behind the brand, not in front
   of it. pointer-events: none — wallpaper is never a hit target. */
.site-collage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, #17171B 0, transparent 6%, transparent 94%, #17171B 100%),
    linear-gradient(0deg, rgba(23, 23, 27, 0.25), rgba(23, 23, 27, 0.25));
}
@keyframes collage-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .site-collage.is-live .site-collage-track {
    animation: none;
  }
}
