/* scroll-scrub.css — cinematic scroll-scrub landing template (cinematic-landing skill).
   Canvas frame-sequence hero pinned via position:sticky, captions ride on top.
   Re-theme via the CSS custom properties in .ss-root below (--accent, --surface, fonts). */

/* NOTE: do NOT add overflow-x:hidden on html/body/.ss-root or any ancestor of
   .ss-video-stage. Any ancestor with overflow != visible breaks position:sticky
   for its descendants (the canvas detaches and scrolls away instead of
   pinning) — that is what caused the black-void scroll bug, twice. There is
   currently no horizontal overflow source in this layout (verified live:
   document.documentElement.scrollWidth < window.innerWidth), so the rule
   isn't needed. If horizontal overflow ever appears, fix the specific
   offending element (e.g. clamp its width/margin) instead of reintroducing
   this rule on an ancestor. */

.ss-root {
  /* Tweaker.0ms brand palette — matches the real app (PaywallModal, HudStrip):
     cyan primary #00D9FF, green secondary #00FF94, amber #FFB800 (MK1/S-tier),
     near-black surfaces #0A0A0B / #111111. Re-themed from the mold defaults. */
  --accent: #00d9ff;
  --accent-2: #00ff94;
  --accent-3: #ffb800;
  --ink: #e8e8ea;
  --ink-dim: rgba(232, 232, 234, 0.68);
  --surface: #0a0a0b;
  --surface-2: #111111;
  --display-stack: "Space Grotesk", "Inter", "Helvetica Neue", Arial, sans-serif;
  --text-stack: "Inter", "Helvetica Neue", Arial, sans-serif;

  position: relative;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--text-stack);
}

.ss-root * {
  box-sizing: border-box;
}

/* ---------- Nav ---------- */
.ss-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  background: transparent;
}

/* Scrim behind the nav content — sized independently of the nav's own flex
   height (a background on .ss-nav itself is capped at its content box, too
   short to clear dense hero-UI text). The hero background here is real app
   UI, not a photo, so this needs real room to fade out. */
.ss-nav::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 220px;
  background: linear-gradient(to bottom, rgba(10, 10, 11, 0.92) 0%, rgba(10, 10, 11, 0.6) 60%, transparent 100%);
  z-index: -1;
  pointer-events: none;
  pointer-events: none;
}

.ss-nav > * {
  pointer-events: auto;
}

.ss-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display-stack);
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
}

.ss-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: conic-gradient(from 200deg, var(--accent), var(--accent-3), var(--accent-2), var(--accent));
  box-shadow: 0 0 18px rgba(255, 107, 107, 0.45);
}

.ss-nav-links {
  display: flex;
  gap: 1.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.ss-nav-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ss-nav-links a:hover {
  color: var(--accent-3);
}

.ss-nav-cta {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  background: var(--accent-3);
  color: var(--surface);
  text-decoration: none;
  white-space: nowrap;
}

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

  /* Narrow viewports crop the 16:9 hero frames much harder (object-fit:cover),
     so scene text competes with more background detail per pixel. A soft
     scrim behind the text block (not a full-bleed one — keeps the frame
     visible) buys legibility without a second mobile frame set. */
  .ss-scene {
    background: radial-gradient(ellipse at center, rgba(10, 10, 11, 0.72) 0%, rgba(10, 10, 11, 0.35) 65%, transparent 100%);
    padding: 1.5rem 1.25rem;
    border-radius: 1.25rem;
  }
}

/* ---------- Scrub canvas + spacer ---------- */
.ss-video-spacer {
  position: relative;
  height: 720vh;
}

.ss-video-stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--surface);
}

.ss-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ss-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--surface);
  z-index: 5;
  transition: opacity 0.6s ease;
}

.ss-loader[data-hidden="true"] {
  opacity: 0;
  pointer-events: none;
}

.ss-loader-bar {
  width: min(220px, 50vw);
  height: 2px;
  background: rgba(244, 244, 242, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.ss-loader-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transition: width 0.2s ease;
}

.ss-loader-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* Overlay captions riding on top of the canvas */
.ss-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.ss-scene {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 0 1.5rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.ss-scene[data-active="true"] {
  opacity: 1;
  transform: translateY(0);
}

.ss-scene--hero {
  top: 58%;
}

.ss-scene--top {
  top: 12%;
}

.ss-scene--bottom {
  top: auto;
  bottom: 14%;
}

.ss-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-3);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.ss-headline {
  font-family: var(--display-stack);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.65);
}

.ss-headline .accent {
  color: var(--accent);
}

.ss-sub {
  max-width: 34rem;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: var(--ink-dim);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.ss-scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.ss-scroll-hint::after {
  content: "";
  width: 1px;
  height: 26px;
  background: linear-gradient(to bottom, var(--accent-3), transparent);
  animation: ss-hint-fall 1.6s ease-in-out infinite;
}

@keyframes ss-hint-fall {
  0% { transform: translateY(-6px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

.ss-stat {
  font-family: var(--display-stack);
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  line-height: 0.95;
  color: var(--ink);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.65);
}

.ss-stat .unit {
  font-size: 0.4em;
  margin-left: 0.3rem;
  color: var(--accent-2);
  vertical-align: middle;
}

/* ---------- Content sections below the scrub ---------- */
.ss-content {
  position: relative;
  z-index: 2;
  background: var(--surface);
}

.ss-section {
  padding: clamp(4rem, 9vw, 7rem) clamp(1.5rem, 6vw, 5rem);
  max-width: 1180px;
  margin: 0 auto;
}

.ss-section-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}

.ss-section-title {
  font-family: var(--display-stack);
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}

/* Spec grid */
.ss-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: rgba(244, 244, 242, 0.1);
  border-radius: 1.25rem;
  overflow: hidden;
  margin-top: 2rem;
}

.ss-spec-cell {
  background: var(--surface-2);
  padding: 2rem 1.5rem;
}

.ss-spec-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.5rem;
}

.ss-spec-value {
  font-family: var(--display-stack);
  font-size: 1.6rem;
  color: var(--accent-3);
}

/* Product color swatches */
.ss-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.ss-swatch-card {
  flex: 1 1 240px;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid rgba(244, 244, 242, 0.08);
}

.ss-swatch-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.ss-swatch-card figcaption {
  padding: 1rem 1.25rem 1.4rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

/* Feature rows (from real product images) */
.ss-feature-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-top: 2.5rem;
}

.ss-feature-card {
  background: var(--surface-2);
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(244, 244, 242, 0.08);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.ss-feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 217, 61, 0.35);
}

.ss-feature-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.ss-feature-card figcaption {
  padding: 1.1rem 1.3rem 1.4rem;
  font-size: 0.92rem;
  color: var(--ink-dim);
  line-height: 1.4;
}

/* Pull quote */
.ss-quote {
  border-left: 3px solid var(--accent);
  padding-left: 1.75rem;
  font-family: var(--display-stack);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.3;
  color: var(--ink);
}

.ss-quote cite {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--text-stack);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* Pricing / product cards */
.ss-price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 2.5rem;
}

.ss-price-card {
  background: var(--surface-2);
  border-radius: 1.5rem;
  padding: 2.25rem;
  border: 1px solid rgba(244, 244, 242, 0.08);
  position: relative;
}

.ss-price-card[data-hero="true"] {
  border-color: rgba(255, 107, 107, 0.5);
  background: linear-gradient(160deg, rgba(255, 107, 107, 0.08), var(--surface-2) 55%);
}

.ss-price-tag {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-3);
  color: var(--surface);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-weight: 700;
}

.ss-price-name {
  font-family: var(--display-stack);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.ss-price-value {
  font-family: var(--display-stack);
  font-size: 2.6rem;
  color: var(--accent-3);
  margin-bottom: 1rem;
}

.ss-price-value span {
  font-size: 1rem;
  color: var(--ink-dim);
  font-family: var(--text-stack);
}

.ss-price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink-dim);
}

.ss-price-list li::before {
  content: "→ ";
  color: var(--accent-2);
}

/* CTA closer */
.ss-cta {
  text-align: center;
  padding: clamp(5rem, 10vw, 8rem) clamp(1.5rem, 6vw, 5rem);
  background: radial-gradient(circle at 50% 30%, rgba(255, 107, 107, 0.14), transparent 60%),
    var(--surface-2);
}

.ss-cta-title {
  font-family: var(--display-stack);
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: 1rem;
}

.ss-cta-sub {
  color: var(--ink-dim);
  max-width: 32rem;
  margin: 0 auto 2rem;
}

.ss-cta-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 999px;
  background: var(--accent-3);
  color: var(--surface);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.2s ease;
}

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

/* Footer */
.ss-footer {
  border-top: 1px solid rgba(244, 244, 242, 0.08);
  padding: 3rem clamp(1.5rem, 6vw, 5rem) 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

.ss-footer-col h4 {
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.ss-footer-col a {
  display: block;
  color: inherit;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.ss-footer-col a:hover {
  color: var(--accent-3);
}

.ss-footer-bottom {
  grid-column: 1 / -1;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(244, 244, 242, 0.06);
  font-size: 0.75rem;
  opacity: 0.6;
}
