/* Page-level marketing site styles — outside the macOS window. */

.page {
  position: relative;
  min-height: 100vh;
  overflow-x: clip; /* clip lets descendants still position: sticky; hidden would break it */
}

/* Ambient glow that follows scenes */
.ambient-glow {
  position: fixed;
  top: 30%; left: 50%;
  width: 1200px; height: 800px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, hsla(220 10% 14% / 0.55), hsla(0 0% 0% / 0) 65%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
  transition: opacity 800ms var(--ease-apple);
}

/* Top nav (always visible) */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: linear-gradient(to bottom, hsla(220 10% 8% / 0.85), hsla(220 10% 8% / 0));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.top-nav .brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.top-nav .brand img { width: 30px; height: 30px; border-radius: 7px; }
.top-nav-actions { display: flex; gap: 10px; }

.nav-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 7px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 200ms var(--ease-apple), border-color 200ms var(--ease-apple), transform 200ms var(--ease-apple);
}
.nav-btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border-default); }
.nav-btn-ghost:hover { background: var(--bg-surface); border-color: var(--text-muted); }
.nav-btn-primary { background: var(--accent); color: var(--bg-deep); border-color: var(--accent); }
.nav-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px hsla(14 100% 60% / 0.3); }
.nav-btn-white { background: #fff; color: var(--bg-deep); border-color: #fff; }
.nav-btn-white:hover { transform: translateY(-1px); box-shadow: 0 8px 24px hsla(0 0% 100% / 0.18); }
/* Compact variant for the in-nav sticky download — sits next to the GitHub
   ghost link without dominating the bar. Drives its own opacity/transform
   from heroProgress (see App.jsx). */
.nav-btn-compact { padding: 7px 12px; font-size: 12.5px; }
.nav-btn-compact svg { width: 12px; height: 12px; }

/* Two-line download CTA — icon + (label / meta) */
.download-btn { padding: 8px 18px; min-height: 44px; }
.download-btn .download-btn-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  gap: 2px;
}
.download-btn .download-btn-label {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.download-btn .download-btn-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  opacity: 0.72;
  letter-spacing: 0.04em;
}
.hero-release-meta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.hero-release-meta a { color: var(--text-secondary); text-decoration: none; }
.hero-release-meta a:hover { color: var(--accent); }

/* =================================================================
   STAGE — unified hero + narrative section. Holds the sticky window
   pin that morphs from "hero size" to "pin size" with scroll.
   ================================================================= */
.stage {
  position: relative;
  width: 100%;
}
.stage-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 80px 24px 32px;
  overflow: hidden;
}
/* Spacer that gives the stage its full scroll height. Beats use it as a
   reference for scroll progress (it's what useStageState measures via
   #narrative). */
.narrative-spacer {
  width: 100%;
  pointer-events: none;
}

/* Hero copy — sits in upper third of viewport. The macOS window peeks up
   from the bottom edge during hero, so copy doesn't overlap it. */
.hero-copy {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6vh 24px 0;
  pointer-events: auto;
  /* No CSS transition — fade is driven by scroll-derived inline opacity. */
}
.hero-copy .hero-logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  margin: 24px 0 15px;
  box-shadow: var(--shadow-lg);
}
.hero-copy .hero-title {
  font-family: var(--font-display);
  margin: 0 0 10px;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}
.hero-copy .hero-title .accent { color: var(--accent); }
.hero-copy .hero-lede {
  margin: 0 auto 32px;
  max-width: 600px;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.5;
  color: var(--text-secondary);
}
.hero-copy .hero-actions {
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  margin: 0 0 14px;
}
.hero-copy .hero-meta {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* The macOS window frame — sized for narrative pin context; transformed
   in JS for the hero state. */
.pinned-window-frame {
  width: 100%;
  max-width: 1180px;
  height: min(720px, calc(100vh - 120px));
  position: relative;
  z-index: 2;
  transform-origin: center center;
  /* No CSS transition — transform is driven from scroll progress in React. */
}

/* Scene copy overlay — sits over the pinned window, fixed within the pin. */
.scene-copy-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.scene-copy-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Full-window wash so the entire app screenshot dims when copy is overlaid.
   A subtle gradient keeps the text side a hair darker for legibility. */
.scene-copy-backdrop.backdrop-left {
  background: linear-gradient(to right,
    hsla(220 12% 6% / 0.86) 0%,
    hsla(220 12% 6% / 0.70) 100%);
}
.scene-copy-backdrop.backdrop-right {
  background: linear-gradient(to left,
    hsla(220 12% 6% / 0.86) 0%,
    hsla(220 12% 6% / 0.70) 100%);
}

.scene-copy {
  position: absolute;
  left: 5%;
  bottom: 14vh;
  max-width: 460px;
  pointer-events: auto;
  /* No CSS transition — opacity/transform/filter are driven directly from
     scroll progress in React, frame-by-frame. A CSS transition would lag
     behind the scroll and create stuck pending transitions. */
}
.scene-copy.right { left: auto; right: 5%; }

/* Editorial kicker — small mono caps, no pill, no border. Step number sits
   in front in a muted hairline so the eye lands on the label. */
.scene-eyebrow {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  padding-left: 12px;
  border-left: 1px solid var(--accent-border);
}
.scene-eyebrow .step {
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  font-feature-settings: "tnum" 1;
}

.scene-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 18px;
}
.scene-title .accent { color: var(--accent); }

.scene-blurb {
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0;
}

/* HERO — legacy block removed; hero copy now lives inside .stage-pin
   (see .hero-copy in the STAGE section above).
   Some shared classes (.hero-badge, .hero-title, .hero-lede, .hero-meta,
   .hero-actions) are still used by .hero-copy children, so their rules
   remain below. */
/* Hero arch-alt: small inline link beneath the primary download for users
   on Intel. Replaces the duplicate-looking ghost button. */
.hero-arch-alt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 4px;
  border-radius: 4px;
  transition: color 200ms var(--ease-apple);
}
.hero-arch-alt:hover { color: var(--accent); }
.hero-arch-alt:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.hero-title {
  font-family: var(--font-display);
  margin: 0 0 18px;
  font-size: clamp(42px, 7.5vw, 84px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}
.hero-title .accent { color: var(--accent); }

.hero-lede {
  margin: 0 auto 28px;
  max-width: 620px;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--text-secondary);
}
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.hero-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* Scroll hint — shows the step number + first beat label so users know
   what they're scrolling into, plus a subtle vertical line. */
.scroll-hint {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: scrollHint 2.4s ease-in-out infinite;
  white-space: nowrap;
}
.scroll-hint > span { display: block; line-height: 1.2; }
.scroll-hint-step { color: var(--accent); font-weight: 600; }
.scroll-hint::after {
  content: "";
  width: 1px; height: 28px;
  margin-top: 4px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
}
@keyframes scrollHint {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.6; }
  50% { transform: translate(-50%, 6px); opacity: 1; }
}

/* CTA / Footer scene */
.cta-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  position: relative;
  z-index: 10;
  text-align: center;
}
.cta-content { max-width: 720px; }
.cta-content h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  color: var(--text-primary);
}
.cta-content h2 .accent { color: var(--accent); }
.cta-content p { font-size: 17px; color: var(--text-secondary); margin: 0 0 28px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

footer.site-foot {
  padding: 32px 32px 28px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
}
footer.site-foot .site-foot-line { color: var(--text-muted); }
footer.site-foot a { color: var(--text-secondary); text-decoration: none; margin: 0 10px; }
footer.site-foot a:hover { color: var(--accent); }
footer.site-foot .made-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  text-decoration: none;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}
footer.site-foot .made-by:hover { color: var(--text-secondary); }
footer.site-foot .made-by img { width: 18px; height: 18px; display: block; }
footer.site-foot .made-by span {
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.12em;
}
footer.site-foot .made-by:hover span { color: var(--accent); }
@media (max-width: 640px) {
  footer.site-foot { justify-content: center; text-align: center; }
}

/* Section dot indicator (right side) — clickable scene navigator. */
.scene-dots {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 50;
  padding: 8px 6px;
}
.scene-dots .dot {
  /* button reset */
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  /* dot styling */
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  position: relative;
  transition: background-color 300ms var(--ease-apple), transform 300ms var(--ease-apple), box-shadow 300ms var(--ease-apple);
}
/* Larger invisible hit area for comfortable clicking. */
.scene-dots .dot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
}
/* Hover/active label that slides out to the left — turns the dot column
   into a real ToC for sighted users. */
.scene-dots .dot .dot-label {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translate(8px, -50%);
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 10px;
  border-radius: 6px;
  background: hsla(220 12% 6% / 0.92);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-apple), transform 220ms var(--ease-apple);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.scene-dots .dot .dot-label-step { color: var(--accent); font-weight: 600; }
.scene-dots .dot:hover .dot-label,
.scene-dots .dot:focus-visible .dot-label { opacity: 1; transform: translate(0, -50%); }
.scene-dots .dot:hover { background: var(--text-muted); transform: scale(1.25); }
.scene-dots .dot.is-active { background: var(--accent); transform: scale(1.5); box-shadow: 0 0 8px var(--accent); }
.scene-dots .dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Pipeline scene specifics */
.pipeline-stages {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  height: 100%;
  gap: 16px;
}
.pipeline-stage {
  flex: 1;
  text-align: center;
  padding: 14px 12px;
  border: 1px solid var(--border-subtle);
  background: hsl(220 10% 7%);
  border-radius: 8px;
  position: relative;
  transition: all 600ms var(--ease-apple);
}
.pipeline-stage.is-active {
  border-color: var(--accent-border);
  background: hsla(14 100% 60% / 0.06);
  box-shadow: 0 0 0 1px var(--accent-border), 0 8px 24px hsla(14 100% 60% / 0.15);
}
.pipeline-stage-num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.pipeline-stage.is-active .pipeline-stage-num { color: var(--accent); }
.pipeline-stage-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin: 6px 0 4px; }
.pipeline-stage-sub { font-size: 10.5px; color: var(--text-muted); }
.pipeline-arrow {
  flex: 0 0 24px;
  height: 1px;
  background: var(--border-default);
  position: relative;
}
.pipeline-arrow::after {
  content: ""; position: absolute; right: -1px; top: -3px;
  width: 0; height: 0;
  border-left: 6px solid var(--border-default);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

/* Tweaks panel additions */
.cta-content .nav-btn { font-size: 14px; padding: 10px 18px; }

@media (max-width: 920px) {
  .scene-copy { left: 24px; right: 24px; bottom: 24vh; max-width: none; }
  .scene-copy.right { left: 24px; right: 24px; }
  .scene-copy.center { transform: none; left: 24px; right: 24px; }
  .scene-dots { display: none; }
}

/* Reduced motion — keep the scene composition functional but stop the
   ambient + decorative loops, the long blur transitions, and any
   transform-based hover lift. The scroll engine itself respects this in
   App.jsx (smoothScrollTo and useScrollSnap become no-ops). */
@media (prefers-reduced-motion: reduce) {
  .scroll-hint,
  .scroll-hint::after { animation: none; }
  .ambient-glow { transition: none; }
  .nav-btn-primary:hover,
  .nav-btn-white:hover { transform: none; box-shadow: none; }
  .scene-dots .dot,
  .scene-dots .dot:hover,
  .scene-dots .dot.is-active { transition: background-color 200ms linear; transform: none; }
  .pipeline-stage { transition: none; }
}
