/* ==========================================================================
   Altai Ventures — Subpage system (homes / products / systems / about / contact)
   Self-contained stylesheet. Matches the v10 landing brand language —
   ink #0d1421 / paper #f6f3ec / gold #c9a257, Fraunces display + Inter body,
   glass header, feathered hero imagery, film grain — but built for calm,
   non-pinned, non-scrubbed subpages (IntersectionObserver reveals only).
   Does not read from styles.css / landing-v10.css / main.js.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..500;1,9..144,300..500&family=Inter:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --sp-ink: #0d1421;
  --sp-ink-90: rgba(13, 20, 33, 0.9);
  --sp-ink-80: rgba(13, 20, 33, 0.8);
  --sp-ink-70: rgba(13, 20, 33, 0.7);
  --sp-ink-60: rgba(13, 20, 33, 0.6);
  --sp-ink-40: rgba(13, 20, 33, 0.4);
  --sp-ink-14: rgba(13, 20, 33, 0.14);
  --sp-ink-08: rgba(13, 20, 33, 0.08);
  --sp-night: #071020;
  --sp-paper: #f6f3ec;
  --sp-paper-90: rgba(246, 243, 236, 0.9);
  --sp-paper-70: rgba(246, 243, 236, 0.7);
  --sp-paper-40: rgba(246, 243, 236, 0.4);
  --sp-paper-16: rgba(246, 243, 236, 0.16);
  --sp-gold: #c9a257;
  --sp-gold-deep: #93783f;
  --sp-teal: #7fa8b8;
  --sp-ivory: #f6f3ec;
  --sp-ivory-92: rgba(246, 243, 236, 0.92);
  --sp-ivory-70: rgba(246, 243, 236, 0.7);
  --sp-ivory-55: rgba(246, 243, 236, 0.55);
  --sp-ivory-20: rgba(246, 243, 236, 0.2);
  --sp-ivory-12: rgba(246, 243, 236, 0.12);
  --sp-shell: min(1220px, calc(100vw - 40px));
  --sp-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sp-ease-in: cubic-bezier(0.6, 0, 0.84, 0.14);
  --sp-r-outer: 24px;
  --sp-r-inner: 16px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--sp-paper);
  scroll-behavior: smooth;
}

body.sp-page {
  margin: 0;
  background: var(--sp-paper);
  color: var(--sp-ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.sp-page.sp-theme-dark {
  background: var(--sp-night);
  color: var(--sp-ivory-92);
}

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

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

button {
  font: inherit;
  background: none;
  border: 0;
}

.sp-page ::selection {
  background: var(--sp-gold);
  color: var(--sp-ink);
}

.sp-page h1,
.sp-page h2,
.sp-page h3 {
  /* v12: margin-block only (not the shorthand) — see landing-v10.css's
     matching comment. Zeroing all four margin sides here (a two-part
     selector) has more specificity than single-class rules further down
     this file that set "margin: ... auto" to center a heading/paragraph
     (e.g. .sp-hero-intro, .sp-system-block p), so it was silently
     clobbering their auto inline margins and leaving those boxes flush
     left instead of centered. */
  margin-block: 0;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.sp-page p {
  /* v12: see margin-block note above. */
  margin-block: 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

.sp-tnum {
  font-variant-numeric: tabular-nums;
}

/* ---------- Grain (global texture, matches landing) ---------- */
.sp-grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-repeat: repeat;
  background-size: 180px 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch' result='t'/%3E%3CfeColorMatrix in='t' type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: sp-grain-shift 0.9s steps(8) infinite;
}

@keyframes sp-grain-shift {
  0% { background-position: 0 0; }
  12.5% { background-position: -42px 18px; }
  25% { background-position: 28px -32px; }
  37.5% { background-position: -18px 42px; }
  50% { background-position: 46px 8px; }
  62.5% { background-position: -30px -26px; }
  75% { background-position: 22px 36px; }
  87.5% { background-position: -14px -44px; }
  100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce), (prefers-reduced-data: reduce) {
  .sp-grain {
    display: none;
  }
}

/* ---------- Glass utility (header pill, cards, buttons) ---------- */
[data-glass] {
  --mx: 50%;
  --my: 50%;
  position: relative;
  isolation: isolate;
}

[data-glass] > * {
  position: relative;
  z-index: 1;
}

[data-glass]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.55), transparent 40%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 42%);
  transition: opacity 220ms var(--sp-ease-out);
}

[data-glass]:hover::before,
[data-glass].is-gliding::before {
  opacity: 1;
}

.sp-theme-dark [data-glass]::before {
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(246, 243, 236, 0.28), transparent 40%),
    linear-gradient(135deg, rgba(246, 243, 236, 0.1), transparent 42%);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  /* v24 mobile-QA fix: keep clear of a Dynamic Island / notch / rounded
     corner on devices that report a safe-area inset (requires
     viewport-fit=cover on the viewport meta tag, added site-wide). */
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 100;
  width: var(--sp-shell);
  min-height: 58px;
  padding: 0 8px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transform: translateX(-50%);
  color: var(--sp-ink);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2)),
    rgba(233, 237, 242, 0.5);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(13, 20, 33, 0.07),
    0 20px 46px rgba(13, 20, 33, 0.1);
  transition:
    color 220ms var(--sp-ease-out),
    background-color 220ms var(--sp-ease-out),
    border-color 220ms var(--sp-ease-out),
    box-shadow 220ms var(--sp-ease-out);
}

.site-header.is-scrolled {
  border-color: rgba(13, 20, 33, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38)),
    rgba(246, 243, 236, 0.72);
}

.site-header.is-dark {
  color: var(--sp-ivory-92);
  border-color: rgba(246, 243, 236, 0.16);
  background:
    linear-gradient(135deg, rgba(246, 243, 236, 0.14), rgba(246, 243, 236, 0.03)),
    rgba(7, 16, 32, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.site-header.is-dark.is-scrolled {
  background:
    linear-gradient(135deg, rgba(246, 243, 236, 0.18), rgba(246, 243, 236, 0.05)),
    rgba(7, 16, 32, 0.74);
}

.brand,
.nav-links,
.nav-cta {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 196px;
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  transition: transform 180ms var(--sp-ease-out);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-mark {
  width: 26px;
  height: 30px;
  object-fit: contain;
}

/* v23: dark-theme headers already hard-code the ivory small-cut asset in the
   img src, so no filter is needed here. The old invert(1) was inverting an
   already-white/ivory svg back toward black, rendering the header mark
   invisible against the dark header background — fixed as part of the
   small-cut rollout. */
.site-header.is-dark .brand-mark {
  filter: none;
}

.brand-wordmark {
  display: grid;
  gap: 4px;
  line-height: 1;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

.brand-wordmark span:first-child {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-wordmark span:last-child {
  color: rgba(13, 20, 33, 0.55);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.site-header.is-dark .brand-wordmark span:last-child {
  color: rgba(246, 243, 236, 0.6);
}

.nav-links {
  gap: 30px;
  font-size: 13px;
  font-weight: 600;
}

.nav-links a {
  opacity: 0.78;
  transition: opacity 160ms var(--sp-ease-out);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  opacity: 1;
}

.nav-cta {
  min-height: 44px;
  justify-content: center;
  padding: 0 20px;
  border-radius: 999px;
  color: var(--sp-paper);
  font-size: 13px;
  font-weight: 600;
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.18), transparent 36%),
    var(--sp-ink);
  transition: transform 200ms var(--sp-ease-out);
}

.nav-cta:hover {
  transform: translateY(-2px);
}

.site-header.is-dark .nav-cta {
  color: var(--sp-ink);
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.4), transparent 40%),
    var(--sp-gold);
}

.nav-menu-toggle {
  width: 46px;
  height: 46px;
  display: none;
  place-items: center;
  align-content: center;
  justify-content: center;
  gap: 5px;
  border-radius: 15px;
  color: var(--sp-paper);
  background:
    radial-gradient(circle at 24% 0%, rgba(255, 255, 255, 0.22), transparent 40%),
    var(--sp-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 14px 28px rgba(13, 20, 33, 0.24);
  cursor: pointer;
}

.nav-menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 180ms var(--sp-ease-out),
    opacity 180ms var(--sp-ease-out);
}

.site-header.is-menu-open .nav-menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.is-menu-open .nav-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.is-menu-open .nav-menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 28px));
  padding: 10px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.56)),
    rgba(233, 237, 242, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 24px 62px rgba(13, 20, 33, 0.2);
  backdrop-filter: blur(24px) saturate(1.32);
  -webkit-backdrop-filter: blur(24px) saturate(1.32);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 180ms var(--sp-ease-out),
    transform 180ms var(--sp-ease-out);
}

.site-header.is-dark .mobile-menu {
  border-color: rgba(246, 243, 236, 0.2);
  background:
    linear-gradient(145deg, rgba(246, 243, 236, 0.18), rgba(246, 243, 236, 0.05)),
    rgba(7, 16, 32, 0.82);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.mobile-menu a {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-radius: 13px;
  color: rgba(13, 20, 33, 0.88);
  font-size: 14px;
  font-weight: 600;
}

.site-header.is-dark .mobile-menu a {
  color: var(--sp-ivory-92);
}

.mobile-menu a:hover,
.mobile-menu a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.5);
}

.site-header.is-dark .mobile-menu a:hover,
.site-header.is-dark .mobile-menu a[aria-current="page"] {
  background: rgba(246, 243, 236, 0.12);
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .nav-menu-toggle {
    display: grid;
  }
}

/* v24 mobile-QA fix: the "East Bay / California" sub-wordmark rendered at
   7px on every subpage header at mobile widths (illegible, below the 12px
   font floor). The homepage (src/styles.css) already hides this line below
   620px — reuse that exact pattern here instead of inventing a new one. */
@media (max-width: 620px) {
  .brand-wordmark span:last-child {
    display: none;
  }
}

/* Phones in LANDSCAPE (e.g. 844x390) are wider than 620px so the rule
   above doesn't catch them, but the subtitle is still illegible at 7px.
   Target short-height viewports directly instead of widening the width
   breakpoint, so desktop/tablet layouts stay untouched. */
@media (max-height: 430px) {
  .brand-wordmark span:last-child {
    display: none;
  }
}

/* ============================================================
   Buttons + magnetic CTAs
   ============================================================ */
.sp-btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  border-radius: 999px;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition:
    transform 220ms var(--sp-ease-out),
    box-shadow 220ms var(--sp-ease-out);
}

.sp-btn:hover {
  transform: translateY(-3px);
}

.sp-btn:active {
  transform: scale(0.98);
}

.sp-btn-dark {
  color: var(--sp-paper);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.16), transparent 42%),
    var(--sp-ink);
  box-shadow: 0 16px 34px rgba(13, 20, 33, 0.22);
}

.sp-btn-gold {
  color: var(--sp-ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.4), transparent 42%),
    var(--sp-gold);
  box-shadow: 0 16px 34px rgba(201, 162, 87, 0.28);
}

.sp-btn-glass {
  --mx: 50%;
  --my: 50%;
  --sp-glow-a: 0;
  color: var(--sp-ink);
  border-color: rgba(13, 20, 33, 0.14);
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, var(--sp-glow-a)), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2));
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

.sp-theme-dark .sp-btn-glass {
  color: var(--sp-ivory-92);
  border-color: rgba(246, 243, 236, 0.22);
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(246, 243, 236, var(--sp-glow-a)), transparent 40%),
    linear-gradient(145deg, rgba(246, 243, 236, 0.16), rgba(246, 243, 236, 0.04));
}

@media (hover: hover) and (pointer: fine) {
  .sp-btn-glass:hover,
  .sp-btn-glass.is-gliding {
    --sp-glow-a: 0.85;
  }
}

/* ---------- v18: hero download action (TestFlight pill) ----------
   No app has a public App Store URL yet (see SITE-CONSTITUTION asset
   policy — never invent a booking/download path that isn't real).
   The pill opens a plain mailto TestFlight request instead; swapping to
   a real App Store badge later is a one-line href + label change (see
   data-tf-cta / data-tf-label hooks in each app hero markup). Ink pill
   on light-theme pages reuses .sp-btn-dark's exact treatment; the
   ivory/gold gradient below is theme-scoped so the same markup and
   class list work unchanged on NeuRest / Handly Poker Coach. */
.sp-btn-tf {
  gap: 10px;
  color: var(--sp-paper);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.16), transparent 42%),
    var(--sp-ink);
  box-shadow: 0 16px 34px rgba(13, 20, 33, 0.22);
}

.sp-theme-dark .sp-btn-tf {
  color: var(--sp-ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.6), transparent 45%),
    linear-gradient(135deg, var(--sp-ivory) 0%, var(--sp-gold) 100%);
  box-shadow: 0 16px 34px rgba(201, 162, 87, 0.3);
}

.sp-apple-glyph {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ---------- v26: App Store badge CTA (public apps only) ----------
   LandlordHours, Bee Buddy, and Handly Poker Coach are live on the App Store, so
   their .sp-btn-tf pill (still the same base class — theme variants above
   are reused unchanged) gets this additive .sp-btn-store modifier: a bigger
   Apple glyph and a two-line "Download on the / App Store" label stack in
   place of the single-line "Join the TestFlight" text. LensWords/NeuRest
   stay on the plain .sp-btn-tf pill with no modifier, unaffected by this. */
.sp-btn-store .sp-apple-glyph {
  width: 20px;
  height: 20px;
}

.sp-tf-label-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.sp-tf-label-small {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.sp-tf-label-large {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sp-app-hero-actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.sp-tf-caption {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--sp-ink-60);
}

.sp-theme-dark .sp-tf-caption {
  color: var(--sp-ivory-55);
}

/* ============================================================
   Hero plate
   ============================================================ */
.sp-hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--sp-ink);
}

.sp-hero-media-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  mask-image: linear-gradient(to bottom, black 0%, black 68%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 68%, transparent 100%);
}

.sp-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Hero video: resilience pattern (autoplay + poster + IO pause +
   rescue + static fallback), ported from landing-v10's hero video ---------- */
.sp-hero-fallback {
  display: none;
}

[data-sp-hero-media].is-static .sp-hero-video {
  display: none;
}

[data-sp-hero-media].is-static .sp-hero-fallback {
  display: block;
}

@media (prefers-reduced-motion: reduce), (prefers-reduced-data: reduce) {
  [data-sp-hero-media] .sp-hero-video {
    display: none;
  }

  [data-sp-hero-media] .sp-hero-fallback {
    display: block;
  }
}

.sp-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 68% 62% at 50% 60%, rgba(5, 10, 20, 0.58), transparent 72%),
    linear-gradient(180deg, rgba(13, 20, 33, 0.42) 0%, rgba(13, 20, 33, 0.24) 30%, rgba(13, 20, 33, 0.24) 55%, rgba(13, 20, 33, 0.58) 100%);
}

.sp-hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(150px, 24vh, 260px) max(20px, calc((100vw - 1220px) / 2)) clamp(72px, 12vh, 140px);
  text-align: center;
  color: var(--sp-ivory);
}

.sp-hairline {
  display: block;
  width: 64px;
  height: 1px;
  margin: 0 auto 16px;
  background: linear-gradient(90deg, transparent, var(--sp-gold), transparent);
  opacity: 0.9;
}

.sp-eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sp-gold);
}

.sp-h1 {
  /* v12: guard against text-wrap:balance narrowing this box without
     recentering it (matches the .v7-hero-title fix on the landing page). */
  margin-inline: auto;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.02;
  color: var(--sp-ivory);
  text-shadow: 0 2px 6px rgba(5, 10, 20, 0.55), 0 8px 40px rgba(5, 10, 20, 0.45);
}

.sp-hero-intro {
  max-width: 52ch;
  margin: 22px auto 0;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.65;
  color: var(--sp-ivory-92);
  text-shadow: 0 1px 4px rgba(5, 10, 20, 0.6), 0 6px 28px rgba(5, 10, 20, 0.4);
}

.sp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* ============================================================
   Section shell + reveals
   ============================================================ */
main {
  position: relative;
  z-index: 1;
  background: var(--sp-paper);
}

.sp-theme-dark main {
  background: var(--sp-night);
}

.sp-section {
  padding: clamp(76px, 11vw, 128px) 0;
}

.sp-section-inner {
  width: var(--sp-shell);
  margin: 0 auto;
}

.sp-section-head {
  max-width: 720px;
  margin: 0 0 clamp(40px, 5vw, 64px);
}

.sp-kicker {
  display: block;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sp-gold-deep);
}

.sp-theme-dark .sp-kicker {
  color: var(--sp-gold);
}

.sp-section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.sp-section--tint {
  background: rgba(13, 20, 33, 0.03);
}

.sp-theme-dark .sp-section--tint {
  background: rgba(246, 243, 236, 0.03);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 640ms var(--sp-ease-out),
    transform 640ms var(--sp-ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-group] [data-reveal-child] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 560ms var(--sp-ease-out),
    transform 560ms var(--sp-ease-out);
}

[data-reveal-group].is-visible [data-reveal-child] {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-group].is-visible [data-reveal-child]:nth-child(1) { transition-delay: 0ms; }
[data-reveal-group].is-visible [data-reveal-child]:nth-child(2) { transition-delay: 90ms; }
[data-reveal-group].is-visible [data-reveal-child]:nth-child(3) { transition-delay: 180ms; }
[data-reveal-group].is-visible [data-reveal-child]:nth-child(4) { transition-delay: 270ms; }
[data-reveal-group].is-visible [data-reveal-child]:nth-child(5) { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-group] [data-reveal-child] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   Card primitive (glass, used across pages)
   ============================================================ */
/* v19: this primitive was labelled "glass" but carried no backdrop-filter,
   so products-hub / homes-hub / systems-capability / contact-invitation
   cards (all built on .sp-card) read flatter than the confirmed liquid-
   glass language elsewhere (.sp-btn-glass / .site-header / .mobile-menu).
   Reused those exact techniques rather than inventing a new one — the
   same blur+saturate backdrop-filter recipe, plus a gold-tinted edge and
   a hover lift matching .v7-lane's own hover recipe (translateY + deeper
   shadow + brightened border) — per Constitution §4 "reuse before
   invention." All four target card families, and the legal-page article
   cards that already share this same class, pick up the change for free.
   See docs/v19-fit-finish-spec.md. */
.sp-card {
  border-radius: var(--sp-r-outer);
  border: 1px solid rgba(201, 162, 87, 0.16);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.32));
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 22px 50px rgba(13, 20, 33, 0.08);
  transition:
    transform 260ms var(--sp-ease-out),
    box-shadow 260ms var(--sp-ease-out),
    border-color 260ms var(--sp-ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .sp-card:hover,
  .sp-card.is-gliding {
    transform: translateY(-6px);
    border-color: rgba(201, 162, 87, 0.42);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      0 30px 64px rgba(13, 20, 33, 0.14);
  }
}

.sp-theme-dark .sp-card {
  border-color: rgba(246, 243, 236, 0.14);
  background: linear-gradient(160deg, rgba(246, 243, 236, 0.1), rgba(246, 243, 236, 0.03));
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.3);
}

@media (hover: hover) and (pointer: fine) {
  .sp-theme-dark .sp-card:hover,
  .sp-theme-dark .sp-card.is-gliding {
    transform: translateY(-6px);
    border-color: rgba(201, 162, 87, 0.45);
    box-shadow: 0 30px 64px rgba(0, 0, 0, 0.4);
  }
}

/* ============================================================
   Homes — two-home cards + host principles
   ============================================================ */
.sp-homes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* v16: a fourth (placeholder) home card. Four cards in a 3-up grid strands
   the last card alone on its own row (3 + 1) with an empty slot beside it —
   reads like an error, not a placeholder. Two full, balanced rows instead. */
.sp-homes-grid--four {
  grid-template-columns: repeat(2, 1fr);
}

.sp-home-card {
  padding: 28px;
  display: grid;
  gap: 20px;
}

.sp-home-card-media {
  position: relative;
  border-radius: var(--sp-r-inner);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.sp-home-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) sepia(0.06) brightness(1.02);
}

.sp-home-card-media--split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
}

.sp-home-card-media--split img:first-child {
  grid-row: 1 / 3;
}

/* v16: engraved-emblem media (the fourth-home blueprint plate) — same box,
   an ivory backing instead of a photo fill so the asset's own ivory field
   joins the card invisibly, and `contain` instead of `cover` so the drawing
   is never cropped or distorted. */
.sp-home-card-media--emblem {
  display: grid;
  place-items: center;
  background: var(--sp-paper);
}

.sp-home-card-media--emblem img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  filter: none;
}

/* v16: .sp-chip is reused here as a leading status label (its usual spot is
   trailing, after a product card's support list) — override its default
   top margin so it reads as a label above the title, not a floating tag. */
.sp-home-card .sp-chip {
  margin-top: 0;
  margin-bottom: 10px;
}

.sp-home-card-name {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
}

.sp-home-card-character {
  margin-top: 8px;
  color: var(--sp-ink-70);
  font-size: 0.98rem;
  line-height: 1.5;
}

.sp-home-card-details {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.sp-home-card-details li {
  position: relative;
  padding-left: 20px;
  color: var(--sp-ink-80);
  font-size: 0.94rem;
  line-height: 1.55;
}

.sp-home-card-details li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 1px;
  background: var(--sp-gold-deep);
}

.sp-host-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sp-host-item {
  padding: 26px 22px;
  border-top: 1px solid var(--sp-ink-14);
}

.sp-host-item h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.sp-host-item p {
  color: var(--sp-ink-70);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================================
   Products — app cards
   ============================================================ */
.sp-apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.sp-app-card {
  padding: 26px 24px 30px;
  display: grid;
  gap: 18px;
}

.sp-app-device {
  position: relative;
  justify-self: center;
  width: 128px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.5) inset,
    0 24px 40px rgba(13, 20, 33, 0.22),
    0 4px 12px rgba(13, 20, 33, 0.16);
  border: 3px solid var(--sp-ink);
  aspect-ratio: 704 / 1529;
  --sp-tilt-x: 0deg;
  --sp-tilt-y: 0deg;
  transform: perspective(800px) rotateX(var(--sp-tilt-x)) rotateY(var(--sp-tilt-y));
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---------- Idle float: very slow alternating drift, staggered per card ---------- */
@keyframes sp-app-float-a {
  0%, 100% { transform: perspective(800px) rotateX(var(--sp-tilt-x)) rotateY(var(--sp-tilt-y)) translateY(0); }
  50% { transform: perspective(800px) rotateX(var(--sp-tilt-x)) rotateY(var(--sp-tilt-y)) translateY(-6px); }
}

@keyframes sp-app-float-b {
  0%, 100% { transform: perspective(800px) rotateX(var(--sp-tilt-x)) rotateY(var(--sp-tilt-y)) translateY(0); }
  50% { transform: perspective(800px) rotateX(var(--sp-tilt-x)) rotateY(var(--sp-tilt-y)) translateY(6px); }
}

.sp-app-card:nth-child(odd) .sp-app-device {
  animation: sp-app-float-a 8s ease-in-out infinite;
}

.sp-app-card:nth-child(even) .sp-app-device {
  animation: sp-app-float-b 8s ease-in-out infinite;
}

.sp-app-card:nth-child(1) .sp-app-device { animation-duration: 7.4s; animation-delay: -1.1s; }
.sp-app-card:nth-child(2) .sp-app-device { animation-duration: 8.2s; animation-delay: -3.4s; }
.sp-app-card:nth-child(3) .sp-app-device { animation-duration: 7.8s; animation-delay: -0.6s; }
.sp-app-card:nth-child(4) .sp-app-device { animation-duration: 8.6s; animation-delay: -2.2s; }
.sp-app-card:nth-child(5) .sp-app-device { animation-duration: 7.6s; animation-delay: -4.0s; }

@media (prefers-reduced-motion: reduce) {
  .sp-app-device {
    animation: none !important;
  }
}

.sp-app-device img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-app-copy h3 {
  font-size: 1.3rem;
}

.sp-app-essence {
  margin-top: 8px;
  color: var(--sp-ink-90);
  font-size: 0.98rem;
  line-height: 1.5;
}

.sp-app-support {
  margin-top: 10px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.sp-app-support li {
  color: var(--sp-ink-60);
  font-size: 0.86rem;
  line-height: 1.5;
}

.sp-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--sp-ink-14);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sp-gold-deep);
}

.sp-app-visit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--sp-ink);
  opacity: 0.82;
  transition:
    opacity 160ms var(--sp-ease-out),
    transform 160ms var(--sp-ease-out);
}

/* v24 mobile-QA fix: text-link tap target was ~16px tall (below the 44px
   floor). An invisible hit-slop expands the clickable area without
   changing the visual size or surrounding layout. */
.sp-app-visit::after {
  content: "";
  position: absolute;
  inset: -14px -6px;
}

.sp-app-visit:hover {
  opacity: 1;
  transform: translateX(2px);
}

.sp-home-card-visit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sp-ink);
  opacity: 0.82;
  transition:
    opacity 160ms var(--sp-ease-out),
    transform 160ms var(--sp-ease-out);
}

.sp-home-card-visit::after {
  content: "";
  position: absolute;
  inset: -14px -6px;
}

.sp-home-card-visit:hover {
  opacity: 1;
  transform: translateX(2px);
}

.sp-system-block {
  margin-top: 24px;
  text-align: center;
}

.sp-system-block p {
  max-width: 62ch;
  margin: 0 auto;
  color: var(--sp-ink-70);
  font-size: 1.02rem;
  line-height: 1.65;
}

/* ============================================================
   Systems — living night sky (canvas stars + aurora), spans hero + capabilities
   ============================================================ */
.sp-night-sky-zone {
  position: relative;
}

.sp-night-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sp-night-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse 60% 40% at 28% 18%, rgba(127, 168, 184, 0.4), transparent 62%),
    radial-gradient(ellipse 50% 35% at 74% 12%, rgba(127, 168, 184, 0.28), transparent 66%);
  background-size: 180% 180%;
  animation: sp-aurora-drift 42s ease-in-out infinite alternate;
}

@keyframes sp-aurora-drift {
  0% { background-position: 0% 50%, 100% 30%; transform: translateX(-2%); }
  100% { background-position: 40% 60%, 60% 10%; transform: translateX(2%); }
}

.sp-night-sky-zone .sp-section-inner {
  position: relative;
}

@media (prefers-reduced-motion: reduce) {
  .sp-night-aurora {
    animation: none;
  }
}

/* ============================================================
   Systems — capability blocks (glass-on-dark)
   ============================================================ */
.sp-capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.sp-capability-card {
  padding: 30px 26px;
}

.sp-capability-card h3 {
  font-size: 1.3rem;
  color: var(--sp-ivory);
}

.sp-capability-card p {
  margin-top: 12px;
  color: var(--sp-ivory-70);
  font-size: 0.94rem;
  line-height: 1.6;
}

.sp-capability-card p + p {
  margin-top: 6px;
}

.sp-capability-card .sp-capability-num {
  display: block;
  margin-bottom: 16px;
  font-family: "Fraunces", serif;
  font-size: 1.1rem;
  color: var(--sp-teal);
}

.sp-ceremony {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid rgba(246, 243, 236, 0.14);
  text-align: center;
}

.sp-ceremony p {
  max-width: 68ch;
  margin: 0 auto;
  color: var(--sp-ivory-70);
  font-size: 1.05rem;
  line-height: 1.7;
  font-style: italic;
  font-family: "Fraunces", serif;
}

/* ============================================================
   About — company statement + facts row
   ============================================================ */
.sp-about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.sp-about-statement {
  padding: clamp(36px, 4vw, 56px);
  background: var(--sp-paper);
  border: 1px solid var(--sp-ink-14);
  border-radius: var(--sp-r-outer);
  box-shadow: 0 30px 70px rgba(13, 20, 33, 0.08);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 38px,
    rgba(13, 20, 33, 0.05) 39px
  );
}

.sp-about-statement p {
  font-family: "Fraunces", serif;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.68;
  color: var(--sp-ink-90);
}

.sp-about-statement p + p {
  margin-top: 22px;
}

.sp-facts-row {
  display: grid;
  gap: 24px;
  align-content: start;
}

.sp-fact {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--sp-ink-14);
}

.sp-fact-num {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  color: var(--sp-gold);
  font-variant-numeric: tabular-nums;
}

.sp-fact p {
  color: var(--sp-ink-80);
  font-size: 1rem;
  line-height: 1.4;
}

/* ============================================================
   Contact — single invitation card
   ============================================================ */
.sp-contact-wrap {
  display: flex;
  justify-content: center;
}

.sp-contact-card {
  width: min(680px, 100%);
  padding: clamp(40px, 5vw, 64px);
  text-align: center;
  display: grid;
  gap: 26px;
}

.sp-contact-card h2 {
  font-size: clamp(1.6rem, 2.6vw, 2rem);
}

.sp-contact-card > p {
  color: var(--sp-ink-70);
  font-size: 1rem;
  line-height: 1.68;
  max-width: 56ch;
  margin: 0 auto;
}

.sp-contact-topics {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  text-align: left;
  border-top: 1px solid var(--sp-ink-14);
  border-bottom: 1px solid var(--sp-ink-14);
  padding: 20px 4px;
}

.sp-contact-topics li {
  color: var(--sp-ink-80);
  font-size: 0.95rem;
  line-height: 1.55;
}

.sp-contact-topics strong {
  color: var(--sp-ink);
  font-weight: 600;
}

.sp-contact-card .sp-btn {
  justify-self: center;
}

/* ============================================================
   Legal pages (privacy / terms) — minimal system-styled shell
   ============================================================ */
.sp-legal-hero {
  padding: clamp(150px, 22vh, 220px) 0 clamp(56px, 7vw, 88px);
}

.sp-legal-hero .sp-section-inner {
  max-width: 760px;
}

.sp-legal-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--sp-ink);
}

.sp-legal-intro {
  margin-top: 20px;
  max-width: 62ch;
  color: var(--sp-ink-70);
  font-size: 1.02rem;
  line-height: 1.65;
}

/* v24 mobile-QA fix: the mailto link inline in this sentence measured ~20px
   tall (below the 44px floor). It sits inside running prose, so real
   padding would disturb the paragraph's line-wrap; an invisible hit-slop
   on a relatively-positioned inline anchor expands the tap area without
   touching visual layout. */
.sp-legal-intro a {
  position: relative;
}

.sp-legal-intro a::after {
  content: "";
  position: absolute;
  inset: -12px -4px;
}

/* Same fix for the inline "/terms/" cross-reference inside the Privacy
   page's Governing Law paragraph. */
.sp-legal-stack article p a {
  position: relative;
}

.sp-legal-stack article p a::after {
  content: "";
  position: absolute;
  inset: -12px -4px;
}

.sp-legal-stack {
  margin-top: clamp(40px, 5vw, 56px);
  max-width: 760px;
  display: grid;
  gap: 24px;
}

.sp-legal-stack article {
  padding: clamp(24px, 3vw, 32px);
}

.sp-legal-stack h2 {
  font-size: 1.2rem;
}

.sp-legal-stack h3 {
  margin-top: 22px;
  font-family: var(--sp-font-body, inherit);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--sp-ink);
}

.sp-legal-stack p {
  margin-top: 12px;
  color: var(--sp-ink-70);
  font-size: 0.98rem;
  line-height: 1.6;
}

.sp-legal-stack ul {
  margin-top: 12px;
  padding-left: 1.1em;
  display: grid;
  gap: 8px;
}

.sp-legal-stack li {
  color: var(--sp-ink-70);
  font-size: 0.98rem;
  line-height: 1.6;
}

.sp-legal-stack .sp-legal-footnote {
  margin-top: 8px;
  max-width: 760px;
  color: var(--sp-ink-70);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ============================================================
   CTA section (shared by homes / products / systems / about)
   ============================================================ */
.sp-cta {
  text-align: center;
  padding: clamp(90px, 12vw, 150px) 0;
}

.sp-cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 32px;
}

/* v16: a supporting line between the H2 and the button — every other
   .sp-cta on the site is H2-then-button only, none needed one before this. */
.sp-cta-lede {
  max-width: 52ch;
  margin: -14px auto 32px;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.65;
  color: var(--sp-ink-70);
}

.sp-theme-dark .sp-cta-lede {
  color: var(--sp-ivory-70);
}

.sp-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.sp-cta-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--sp-ink-70);
}

.sp-theme-dark .sp-cta-note {
  color: var(--sp-ivory-60, var(--sp-ink-70));
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: clamp(64px, 8vw, 110px) 0;
  color: var(--sp-ivory);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.12), transparent 34%),
    var(--sp-ink);
}

.footer-inner {
  width: var(--sp-shell);
  margin: 0 auto;
  display: grid;
  gap: 38px;
}

.footer-brand {
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 12px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
}

.footer-brand img {
  width: 40px;
  height: auto;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 18px;
  color: rgba(246, 243, 236, 0.58);
  font-size: 12px;
  font-weight: 600;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 4px 8px;
}

.site-footer nav a:hover {
  color: var(--sp-ivory);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(246, 243, 236, 0.34);
  font-size: 11px;
  font-weight: 500;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .sp-homes-grid,
  .sp-apps-grid,
  .sp-capabilities-grid,
  .sp-host-list,
  .sp-about-layout {
    grid-template-columns: 1fr;
  }

  .sp-about-layout {
    gap: 40px;
  }

  .sp-facts-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .sp-hero {
    min-height: 74vh;
  }

  .sp-hero-copy {
    padding: clamp(120px, 22vh, 200px) 20px 56px;
  }

  .sp-facts-row {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }

  .sp-app-device {
    width: 108px;
  }
}

/* ============================================================
   Detail pages — app hero (five-scene atmosphere wash + giant
   wordmark + tilted device), feature beats, and cross-link strip.
   NeuRest / Handly Poker Coach opt into the existing body.sp-theme-dark
   system (see systems/index.html) for ivory text + dark cards.
   ============================================================ */
/* v18: these five scene classes now sit on .sp-app-hero-wash, a thin
   layer ABOVE the .sp-app-hero-aurora video and BELOW the giant
   wordmark/copy (see the stacking note by .sp-app-hero-aurora below).
   Each gradient's alpha was lowered from its v16 values and the old
   static plate (mist-veil.jpg / night-passage.jpg) was dropped — the
   tinted aurora loop is the atmosphere plate now, so the wash only
   needs to carry the app's color mood, not hide the motion under it. */
.sp-scene-slate {
  /* Retinted lavender/violet — LandlordHours' real screens run on a
     violet accent (progress pill, "PRO" badge) over a lavender field,
     not the neutral slate-gray this wash started as. */
  background: linear-gradient(160deg, rgba(219, 210, 238, 0.55), rgba(242, 238, 249, 0.72));
}

.sp-scene-teal {
  background: linear-gradient(150deg, rgba(127, 168, 184, 0.32), rgba(233, 237, 242, 0.62) 55%, rgba(246, 243, 236, 0.78));
}

.sp-scene-honey {
  /* Warmed for Bee Buddy's real screens: a brighter honey-amber top
     (matches the "Hear it first" tan chip) easing through a soft pink
     at ~70% so the wash bridges into the pink "attempt" screen instead
     of jumping straight to plain cream. */
  background: linear-gradient(150deg, rgba(214, 168, 74, 0.36), rgba(250, 233, 205, 0.62) 42%, rgba(252, 227, 220, 0.66) 72%, rgba(248, 238, 232, 0.78));
}

.sp-scene-night {
  /* NeuRest's real screens are near-black navy with a teal accent
     line/sliders — keep the whisper of teal glow low in the frame to
     echo the app's accent color; the aurora video (darkened via
     brightness(0.5) filter) supplies the moving night-passage mood
     the old static plate used to. */
  background:
    radial-gradient(ellipse 70% 45% at 18% 82%, rgba(45, 138, 150, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(7, 16, 32, 0.62), rgba(7, 16, 32, 0.78));
}

.sp-scene-felt {
  background: radial-gradient(ellipse 80% 70% at 50% 28%, rgba(28, 56, 44, 0.6), rgba(7, 12, 11, 0.75));
}

.sp-app-hero-wash {
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* ---------- v18: cinematic aurora backdrop (all five app heroes) ----------
   assets/v9/aurora-loop.mp4 sits at the very bottom of .sp-app-hero's
   isolated stacking context (z-index -2), the tinted .sp-scene-* wash
   layers above it (z-index -1), and the giant wordmark (z-index 0) /
   copy+device (z-index 1) read on top of both — same resilience
   pattern (poster + IO pause/rescue + static fallback) as the house
   hero videos, reused via the shared [data-sp-hero-media] / .sp-hero-video
   / .sp-hero-fallback hooks in subpages.js so reduced-motion / save-data
   swap to the (equally tinted) poster with zero extra JS. */
.sp-app-hero-aurora {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.sp-app-hero-aurora-video {
  opacity: 0.4;
}

.sp-app-hero-aurora-video--slate {
  filter: hue-rotate(200deg);
}

.sp-app-hero-aurora-video--teal {
  filter: hue-rotate(140deg);
}

.sp-app-hero-aurora-video--honey {
  filter: saturate(1.2);
}

.sp-app-hero-aurora-video--night {
  filter: hue-rotate(190deg) brightness(0.5);
  opacity: 0.38;
}

.sp-app-hero-aurora-video--felt {
  filter: hue-rotate(100deg) brightness(0.45);
}

/* v16: every .sp-scene-* above is tinted to match one app's real screenshot
   colors — none of those tints is honest on a page with no product to
   color-match. Parchment is a plain warm-paper wash built from the existing
   paper/gold tokens, for the fourth-home placeholder hero only. */
.sp-scene-parchment {
  background:
    radial-gradient(ellipse 60% 50% at 82% 12%, rgba(201, 162, 87, 0.14), transparent 60%),
    linear-gradient(165deg, rgba(233, 237, 242, 0.55), rgba(246, 243, 236, 0.98) 55%);
}

/* ---------- v16: blueprint hero art (fourth-home placeholder) ----------
   Deliberately not `.sp-app-device` — that's a phone-bezel mockup for real
   app screenshots, wrong semantics for an engraved architectural drawing.
   Ivory backing + thin gold hairline + soft shadow, matching the engraved-
   emblem treatment used everywhere else this asset style appears. */
.sp-blueprint-hero-art {
  position: relative;
  width: min(440px, 86vw);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--sp-r-outer);
  border: 1px solid rgba(201, 162, 87, 0.4);
  background: var(--sp-paper);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 30px 60px rgba(13, 20, 33, 0.14);
  animation: sp-blueprint-breathe 9s ease-in-out infinite;
}

.sp-blueprint-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes sp-blueprint-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

@media (prefers-reduced-motion: reduce) {
  .sp-blueprint-hero-art {
    animation: none;
  }
}

.sp-app-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

/* v16: .sp-app-hero's 92vh floor was tuned around the tall phone-mockup
   art it usually frames; a landscape emblem plate is much shorter, so the
   same floor centers it with a lot of dead air above/below. `--calm` gives
   pages using a flat art plate instead of a phone device a lower floor so
   the section hugs its real content instead of stretching to fill 92vh. */
.sp-app-hero--calm {
  min-height: 64vh;
}

.sp-app-hero-giant {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-left: -3%;
  overflow: hidden;
  pointer-events: none;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 300;
  font-size: clamp(5rem, 13vw, 13vw);
  line-height: 0.9;
  white-space: nowrap;
  color: var(--sp-ink);
  opacity: 0.07;
}

.sp-app-hero-giant--right {
  justify-content: flex-end;
  margin-left: 0;
  margin-right: -3%;
  text-align: right;
}

.sp-theme-dark .sp-app-hero-giant {
  color: var(--sp-ivory);
  opacity: 0.12;
}

.sp-app-hero-inner {
  position: relative;
  z-index: 1;
  width: var(--sp-shell);
  margin: 0 auto;
  padding: clamp(140px, 22vh, 220px) 0 clamp(64px, 8vw, 100px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.sp-app-hero--flip .sp-app-hero-inner {
  grid-template-columns: 0.95fr 1.05fr;
}

.sp-app-hero--flip .sp-app-hero-copy {
  order: 2;
}

.sp-app-hero--flip .sp-app-hero-device {
  order: 1;
}

/* App detail heroes are left-aligned by design (split/editorial pattern).
   .sp-hairline's shared `margin: 0 auto` centers it for the centered .sp-hero
   pattern elsewhere; here it must sit flush left with the eyebrow/H1/intro
   it introduces, or the hero breaks the "every child on the same axis" rule. */
.sp-app-hero-copy .sp-hairline {
  margin: 0 0 16px;
}

.sp-app-eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sp-gold-deep);
}

.sp-theme-dark .sp-app-eyebrow {
  color: var(--sp-gold);
}

.sp-app-h1 {
  font-size: clamp(2.3rem, 5vw, 3.9rem);
  line-height: 1.04;
  color: var(--sp-ink);
}

.sp-theme-dark .sp-app-h1 {
  color: var(--sp-ivory);
}

.sp-app-intro {
  margin-top: 20px;
  max-width: 46ch;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.65;
  color: var(--sp-ink-70);
}

.sp-theme-dark .sp-app-intro {
  color: var(--sp-ivory-70);
}

.sp-app-hero-device {
  position: relative;
  display: flex;
  justify-content: center;
}

.sp-app-device--hero {
  width: min(280px, 58vw);
  animation: sp-app-float-a 7.6s ease-in-out infinite;
}

/* ---------- v26: real app-identity icon, canon position ----------
   Retired the old .sp-app-mascot pattern (a rotated badge floating on the
   hero device, built for Bee Buddy's placeholder generated-icon render).
   Four apps now have real App Store icon art, so the icon moved to one
   canon position used identically by all of them: inline with the eyebrow,
   at the top of the hero copy column, via .sp-app-icon-row wrapping the
   icon + the existing .sp-app-eyebrow. Same treatment on light and dark
   hero pages — the icon art carries its own color, no theme override
   needed. NeuRest has no icon (Constitution §2: never invent one an app
   lacks) — its hero simply keeps the bare hairline+eyebrow, no wrapper. */
.sp-app-icon-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}

.sp-app-icon-row .sp-app-eyebrow {
  margin: 0;
}

.sp-app-icon {
  flex: none;
  width: clamp(64px, 7vw, 80px);
  height: clamp(64px, 7vw, 80px);
  border-radius: 22%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 4px 10px rgba(13, 20, 33, 0.16),
    0 16px 28px rgba(13, 20, 33, 0.2);
}

/* Small (~40px) variant: products hub cards + homepage instrument-stage
   panel footer. Same squircle radius/border/shadow language, half the size. */
.sp-app-icon--sm {
  width: 40px;
  height: 40px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 6px rgba(13, 20, 33, 0.16),
    0 8px 16px rgba(13, 20, 33, 0.18);
}

.sp-app-copy-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-app-copy-head h3 {
  margin: 0;
}

.sp-app-device--feature {
  width: min(220px, 52vw);
  animation: sp-app-float-a 7.8s ease-in-out infinite;
}

.sp-app-device--feature-alt {
  width: min(220px, 52vw);
  animation: sp-app-float-b 8.2s ease-in-out infinite;
}

/* ---------- Feature beats: alternating two-column rows ---------- */
.sp-beat-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.sp-beat-row--reverse {
  grid-template-columns: 1.1fr 0.9fr;
}

.sp-beat-row--reverse .sp-beat-device-wrap {
  order: 2;
}

.sp-beat-row--reverse .sp-beat-copy {
  order: 1;
}

.sp-beat-device-wrap {
  display: flex;
  justify-content: center;
}

.sp-beat-copy h2 {
  margin-top: 10px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.sp-beat-copy p {
  margin-top: 16px;
  max-width: 46ch;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--sp-ink-70);
}

.sp-theme-dark .sp-beat-copy p {
  color: var(--sp-ivory-70);
}

.sp-beat-copy p + p {
  margin-top: 10px;
}

/* ---------- Cross-link strip ("one of five Altai instruments") ---------- */
.sp-crosslink {
  text-align: center;
}

.sp-crosslink .sp-chip {
  margin-top: 0;
}

.sp-crosslink .sp-kicker {
  margin-top: 22px;
}

.sp-crosslink-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 22px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.sp-crosslink-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 4px 6px;
  border-bottom: 1px solid transparent;
  opacity: 0.72;
  transition:
    opacity 160ms var(--sp-ease-out),
    border-color 160ms var(--sp-ease-out);
}

.sp-crosslink-list a:hover {
  opacity: 1;
  border-color: var(--sp-gold-deep);
}

.sp-theme-dark .sp-crosslink-list a:hover {
  border-color: var(--sp-gold);
}

.sp-status-line {
  margin-top: 26px;
  font-size: 0.86rem;
  color: var(--sp-ink-60);
}

.sp-theme-dark .sp-status-line {
  color: var(--sp-ivory-55);
}

.sp-theme-dark .sp-chip {
  color: var(--sp-gold);
  border-color: rgba(246, 243, 236, 0.22);
}

/* ============================================================
   Home detail pages — character copy, moments list, gallery,
   ambience band
   ============================================================ */
.sp-character-copy {
  max-width: 68ch;
}

.sp-character-copy p {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.75;
  color: var(--sp-ink-80);
}

.sp-character-copy p + p {
  margin-top: 18px;
}

.sp-moments-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 68ch;
}

.sp-moments-list li {
  padding: 24px 0;
  border-top: 1px solid rgba(201, 162, 87, 0.35);
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--sp-ink-90);
}

.sp-moments-list li:last-child {
  border-bottom: 1px solid rgba(201, 162, 87, 0.35);
}

.sp-gallery-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sp-gallery-row img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--sp-r-outer);
  filter: saturate(1.08) sepia(0.08) brightness(1.03);
}

.sp-ambience-band {
  position: relative;
  height: clamp(280px, 42vw, 460px);
  overflow: hidden;
  border-radius: var(--sp-r-outer);
}

.sp-ambience-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) sepia(0.1) brightness(0.97) contrast(1.04);
}

.sp-ambience-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 20, 33, 0.06), rgba(13, 20, 33, 0.18));
  pointer-events: none;
}

.sp-host-list--2 {
  grid-template-columns: repeat(2, 1fr);
}

/* ============================================================
   Detail pages — responsive
   ============================================================ */
@media (max-width: 1080px) {
  .sp-app-hero-inner,
  .sp-app-hero--flip .sp-app-hero-inner,
  .sp-beat-row,
  .sp-beat-row--reverse,
  .sp-gallery-row,
  .sp-host-list--2 {
    grid-template-columns: 1fr;
  }

  .sp-app-hero--flip .sp-app-hero-copy,
  .sp-app-hero--flip .sp-app-hero-device,
  .sp-beat-row--reverse .sp-beat-device-wrap,
  .sp-beat-row--reverse .sp-beat-copy {
    order: 0;
  }

  .sp-app-hero-device {
    margin-top: 12px;
  }
}

@media (max-width: 720px) {
  .sp-app-hero {
    min-height: 82vh;
  }

  .sp-app-hero-inner {
    padding: clamp(120px, 22vh, 190px) 0 48px;
  }

  .sp-app-hero-giant {
    font-size: 22vw;
    opacity: 0.06;
  }

  .sp-app-device--hero {
    width: min(230px, 66vw);
  }
}

/* ============================================================
   Home pages — real photo gallery (bento grid) + lightbox-lite.
   Vanilla, no external library; see subpages.js for the open/close/
   step logic. Warm grade matches the existing .sp-gallery-row /
   .sp-ambience-band treatment used elsewhere on these pages.
   ============================================================ */
.sp-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(96px, 11vw, 150px);
  grid-auto-flow: dense;
  gap: 14px;
}

.sp-photo-tile {
  position: relative;
  display: block;
  grid-column: span 1;
  grid-row: span 1;
  padding: 0;
  border: 0;
  border-radius: var(--sp-r-inner);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--sp-ink-08, rgba(13, 20, 33, 0.06));
}

.sp-photo-tile--lg {
  grid-column: span 2;
  grid-row: span 2;
}

.sp-photo-tile--wide {
  grid-column: span 2;
  grid-row: span 1;
}

.sp-photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) sepia(0.08) brightness(1.02);
  transition: transform 260ms var(--sp-ease-out);
}

.sp-photo-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: 0 0 0 1px rgba(13, 20, 33, 0.08) inset;
  border-radius: inherit;
  pointer-events: none;
}

.sp-photo-tile:hover img,
.sp-photo-tile:focus-visible img {
  transform: scale(1.045);
}

.sp-photo-tile:focus-visible {
  outline: 2px solid var(--sp-gold-deep);
  outline-offset: 2px;
}

.sp-photo-tile:active img {
  transform: scale(1.01);
}

@media (max-width: 720px) {
  .sp-photo-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: clamp(120px, 38vw, 180px);
    gap: 10px;
  }

  .sp-photo-tile,
  .sp-photo-tile--lg,
  .sp-photo-tile--wide {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* ---------- Lightbox-lite overlay ---------- */
.sp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 6vw, 56px);
  background: rgba(9, 11, 15, 0.94);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 220ms var(--sp-ease-out),
    visibility 220ms var(--sp-ease-out);
}

.sp-lightbox[hidden] {
  display: flex;
}

.sp-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.sp-lightbox-figure {
  position: relative;
  margin: 0;
  max-width: min(1140px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sp-lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: var(--sp-r-inner);
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.55);
  filter: saturate(1.08) sepia(0.08) brightness(1.02);
}

.sp-lightbox-figure figcaption {
  margin-top: 16px;
  max-width: 60ch;
  text-align: center;
  color: var(--sp-ivory-70);
  font-size: 0.92rem;
  line-height: 1.5;
}

.sp-lightbox-close,
.sp-lightbox-prev,
.sp-lightbox-next {
  position: fixed;
  /* v24 mobile-QA fix: on narrow viewports the enlarged photo (later in
     DOM order, z-index:auto) painted over these buttons and swallowed
     every tap — close/prev/next were completely dead on mobile. Both
     were "auto" stacking, so DOM order decided it; an explicit z-index
     puts the controls back on top without touching the image. */
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(246, 243, 236, 0.22);
  background: rgba(20, 22, 28, 0.62);
  color: var(--sp-ivory);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 160ms var(--sp-ease-out),
    transform 160ms var(--sp-ease-out);
}

.sp-lightbox-close:hover,
.sp-lightbox-prev:hover,
.sp-lightbox-next:hover {
  background: rgba(44, 46, 54, 0.88);
}

.sp-lightbox-close:active {
  transform: scale(0.96);
}

.sp-lightbox-prev:active {
  transform: translateY(-50%) scale(0.96);
}

.sp-lightbox-next:active {
  transform: translateY(-50%) scale(0.96);
}

.sp-lightbox-close {
  top: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
}

.sp-lightbox-prev,
.sp-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.sp-lightbox-prev {
  left: clamp(10px, 2.4vw, 26px);
}

.sp-lightbox-next {
  right: clamp(10px, 2.4vw, 26px);
}

body.sp-lightbox-lock {
  overflow: hidden;
}

/* v24 mobile-QA fix: with the lightbox open, both the floating header
   (transform: translateX for centering) and any scroll-revealed content
   behind it (`[data-reveal-child]` sets transform: translateY(0) once
   visible) were painting ABOVE the lightbox's dark backdrop despite a
   lower z-index (100 vs 300) — a compositing-order mismatch tied to
   transform-promoted layers, reproducible regardless of how high the
   lightbox z-index was raised. Content behind an open modal should be
   inert anyway, so hiding it outright both fixes the bleed-through and
   removes dead, non-interactive tap targets from under the modal. */
body.sp-lightbox-lock .site-header,
body.sp-lightbox-lock main,
body.sp-lightbox-lock .site-footer {
  visibility: hidden;
}

@media (max-width: 640px) {
  .sp-lightbox-close,
  .sp-lightbox-prev,
  .sp-lightbox-next {
    /* v24 mobile-QA fix: was 38px — below the 44px tap-target floor, and
       this is the ONLY way to close/navigate the lightbox on mobile. */
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-photo-tile img {
    transition: none;
  }

  .sp-lightbox {
    transition: none;
  }
}

/* ============================================================
   v18 — App hero entrance choreography
   ============================================================ */

/* Hero device tile: cinematic load-in (rise + tilt-settle + blur-to-
   sharp), once, replacing the plain 18px-rise the generic
   [data-reveal-group] [data-reveal-child] rule gives every other hero
   child. Selector is one attribute + one class either way, so this
   must — and does, by appearing later in the cascade — win the tie
   over that generic rule near the top of the file. */
.sp-app-hero-device[data-reveal-child] {
  opacity: 0;
  transform: translateY(40px) rotate(4deg);
  filter: blur(14px);
  transition:
    opacity 900ms var(--sp-ease-out),
    transform 900ms var(--sp-ease-out),
    filter 900ms var(--sp-ease-out);
}

[data-reveal-group].is-visible .sp-app-hero-device[data-reveal-child] {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
  filter: blur(0);
}

/* Hero device: always-on specular sheen sweep, once every ~9s. Clipped
   by .sp-app-device's own overflow:hidden/border-radius, so it reads
   as light crossing the phone glass rather than the whole hero. */
.sp-app-device--hero {
  position: relative;
}

.sp-app-device--hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.45) 48%, transparent 62%);
  background-size: 250% 250%;
  background-position: 130% 130%;
  mix-blend-mode: screen;
  animation: sp-sheen-sweep 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes sp-sheen-sweep {
  0% { background-position: 130% 130%; }
  14% { background-position: -30% -30%; }
  100% { background-position: -30% -30%; }
}

/* Feature-beat device tiles: scroll-reveal with alternating slight
   rotation settle (default rows tilt from -3deg, reversed rows from
   +3deg), layered on top of the existing [data-reveal] fade/rise on
   the row itself — two different elements, so the transforms compose
   instead of fighting. */
.sp-beat-device-wrap {
  transform: rotate(-3deg);
  transition: transform 640ms var(--sp-ease-out);
}

.sp-beat-row--reverse .sp-beat-device-wrap {
  transform: rotate(3deg);
}

.sp-beat-row.is-visible .sp-beat-device-wrap {
  transform: rotate(0deg);
}

@media (prefers-reduced-motion: reduce) {
  .sp-app-hero-device[data-reveal-child] {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .sp-app-device--hero::after {
    animation: none;
    opacity: 0;
  }

  .sp-beat-device-wrap {
    transform: none;
    transition: none;
  }
}

/* ================= v19: universal focus-visible (a11y) =================
   .sp-photo-tile:focus-visible (above) keeps its own gold-deep ring as
   authored. This rule is deliberately unqualified (no class/id prefix) so
   its specificity stays LOWER than that bespoke rule and never overrides
   it. Everything else interactive on subpages — links, buttons, and any
   role="button"/tabindex custom control — gets the standard gold ring
   instead of falling back to the browser default outline. See
   docs/v19-fit-finish-spec.md. */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--sp-gold);
  outline-offset: 2px;
}

/* ================= v20: Santa Ray — "Book your stay" section =================
   New dedicated booking section (homes/santa-ray/index.html only, `#book`).
   One glass card (`.sp-card`, reused verbatim — see the card primitive
   above) holding two rows: a real primary "Book direct" pill (the verified
   direct-booking URL), and a plain text line for Airbnb — production's
   Airbnb listing URL currently 410s, so per the Asset Policy ("never
   invent a booking/download path that isn't real") this row is honest
   about not having a live link and points at /contact/ instead. Appended
   here rather than placed near .sp-contact-card above, per this pass's
   "append only" constraint on this file. */
#book {
  scroll-margin-top: 120px;
}

.sp-booking-wrap {
  display: flex;
  justify-content: center;
}

.sp-booking-card {
  width: min(720px, 100%);
  padding: clamp(32px, 4.5vw, 48px) clamp(28px, 4vw, 48px);
}

.sp-booking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 40px);
  padding: 22px 0;
}

.sp-booking-row-copy h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.sp-booking-row-copy p {
  color: var(--sp-ink-70);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 46ch;
}

.sp-booking-divider {
  height: 1px;
  background: var(--sp-ink-14);
}

.sp-booking-cta {
  flex: none;
}

/* The Airbnb row has no button — the sentence itself is the link (there is
   no real Airbnb URL to send anyone to). Block-level with vertical padding
   so the tap target still clears the 32px floor despite being plain text,
   not a pill. Color is full ink, not --sp-gold-deep: measured against the
   card's real composited background, gold-deep only reached ~3.9:1 (this
   is a real, actionable link — the only path for an Airbnb-preferring
   visitor — not a decorative eyebrow, so it needs body-text-grade
   contrast, not the eyebrow/kicker convention's lighter bar). Ink clears
   4.5:1 with wide margin; the gold-tinted underline keeps a touch of the
   brand accent without weakening the text color itself. */
.sp-booking-text-link {
  display: inline-block;
  padding: 6px 0;
  color: var(--sp-ink);
  font-size: 0.95rem;
  line-height: 1.6;
  text-decoration: underline;
  text-decoration-color: rgba(201, 162, 87, 0.55);
  text-underline-offset: 3px;
  max-width: 46ch;
}

.sp-booking-text-link:hover {
  color: var(--sp-gold-deep);
  text-decoration-color: var(--sp-gold-deep);
}

@media (max-width: 720px) {
  .sp-booking-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .sp-booking-cta {
    align-self: stretch;
    justify-content: center;
  }
}

/* ============================================================
   Contact form — reuses .sp-card / .sp-btn-dark verbatim (Constitution
   §4 "reuse before invention"); only the field controls are new here.
   ============================================================ */
.sp-form {
  display: grid;
  gap: 18px;
  text-align: left;
}

.sp-field {
  display: grid;
  gap: 8px;
}

.sp-field label {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sp-ink-70);
}

.sp-field input,
.sp-field select,
.sp-field textarea {
  min-height: 52px;
  padding: 0 18px;
  border-radius: var(--sp-r-inner);
  border: 1px solid var(--sp-ink-14);
  background: rgba(255, 255, 255, 0.55);
  color: var(--sp-ink);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  /* 16px floor: anything under 16px triggers iOS Safari's auto-zoom on
     focus (Mobile QA Protocol §2.4). Keep form fields at exactly 1rem. */
  font-size: 1rem;
  line-height: 1.4;
  transition:
    border-color 200ms var(--sp-ease-out),
    box-shadow 200ms var(--sp-ease-out);
}

.sp-field textarea {
  min-height: 140px;
  padding-block: 14px;
  resize: vertical;
}

.sp-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230d1421' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='.55'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 42px;
}

.sp-field input:focus-visible,
.sp-field select:focus-visible,
.sp-field textarea:focus-visible {
  outline: none;
  border-color: var(--sp-gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 87, 0.25);
}

.sp-field input::placeholder,
.sp-field textarea::placeholder {
  color: var(--sp-ink-40);
}

/* Honeypot: kept in the tab/DOM order so bots that fill every field still
   trip it, but invisible and unreachable for real visitors — off-screen
   rather than display:none, which some spam bots skip over. */
.sp-field-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sp-form-submit {
  justify-self: start;
  gap: 10px;
}

.sp-form-submit[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.sp-form-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(246, 243, 236, 0.35);
  border-top-color: var(--sp-paper);
  animation: sp-form-spin 700ms linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .sp-form-spinner {
    animation-duration: 1400ms;
  }
}

@keyframes sp-form-spin {
  to {
    transform: rotate(360deg);
  }
}

.sp-form-status {
  margin: 0;
  padding: 14px 18px;
  border-radius: var(--sp-r-inner);
  font-size: 0.92rem;
  line-height: 1.55;
}

.sp-form-status[data-state="ok"] {
  background: rgba(201, 162, 87, 0.14);
  color: var(--sp-ink);
  border: 1px solid rgba(201, 162, 87, 0.35);
}

.sp-form-status[data-state="error"] {
  background: rgba(13, 20, 33, 0.06);
  color: var(--sp-ink-80);
  border: 1px solid var(--sp-ink-14);
}

.sp-form-status a {
  color: var(--sp-ink);
  text-decoration: underline;
  text-decoration-color: rgba(201, 162, 87, 0.55);
  text-underline-offset: 2px;
}
