/* Landing page only. Tokens and shared chrome are in site.css. */

.eyebrow {
  font: 700 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted); margin: 0 0 14px;
}
.fine { font: 12px/1.5 var(--mono); color: var(--muted); }
.center { text-align: center; }

/* The page opens on black (behind the nav too); later sections bring their own paper. */
body.landing { background: var(--night); }
.gallery, .details, .support { background: var(--paper); }

/* ---------- Story: pinned 3D phone, steps scroll past ---------- */
.story { position: relative; background: var(--night); color: var(--night-ink); }
.story .eyebrow, .story .fine { color: var(--night-muted); }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100lvh;
  overflow: hidden; pointer-events: none;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-glow {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(42vmax 42vmax at var(--glow-x, 50%) var(--glow-y, 70%), rgba(255, 255, 255, 0.09), transparent 70%);
  transition: background-position 0.6s;
}
.steps { position: relative; margin-top: -100vh; margin-top: -100lvh; }

.step {
  --vis: 1;
  min-height: 115vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 max(16px, 7vw);
  opacity: var(--vis);
  transform: translateY(calc((1 - var(--vis)) * 24px));
  will-change: opacity, transform;
}
.step > * { max-width: 420px; }
.step h2 {
  text-wrap: balance;
  font-size: clamp(34px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 800;
  margin: 0 0 18px;
}
.step p { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.5; color: var(--night-muted); margin: 0 0 12px; }
.step p.fine { font-size: 12px; }
.step-shot { display: none; }

.step-hero {
  min-height: 100vh; justify-content: flex-start; align-items: center; text-align: center;
  padding-top: calc(var(--nav-h) + 6vh);
}
.step-hero > * { max-width: 760px; }
.step-hero h1 {
  font-size: clamp(52px, min(9vw, 13vh), 124px); line-height: 0.95; letter-spacing: -0.05em; font-weight: 800;
  margin: 0 0 20px;
}
.step-hero .lede { font-size: clamp(19px, 1.9vw, 24px); line-height: 1.4; color: var(--night-muted); max-width: 560px; margin: 0 auto 28px; }
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.hero-note { font: 12px var(--mono); color: var(--night-muted); text-transform: uppercase; letter-spacing: 0.12em; }
.step-outro .hero-cta { justify-content: flex-start; margin-top: 18px; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; width: 26px; height: 42px; margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: #fff; animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
.step-hero { position: relative; }

/* Phones and small tablets: phone in the upper half, text in a glass card below. */
@media (max-width: 820px) {
  .stage::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.88) 38%, #000);
    opacity: var(--fade, 1); transition: opacity 0.4s;
  }
  .step { justify-content: flex-end; padding: 0 16px 7vh; min-height: 120vh; }
  .step > * { max-width: 560px; }
  .step h2 { font-size: 30px; margin-bottom: 10px; }
  .step p { font-size: 16px; }
  .step-hero { min-height: 100vh; justify-content: flex-start; padding-top: calc(var(--nav-h) + 6vh); }
  .step-outro .hero-cta { justify-content: flex-start; }
}

/* Without WebGL: show each step's screenshot inline instead of the 3D phone. */
.no-webgl .stage { display: none; }
.no-webgl .steps { margin-top: 0; }
.no-webgl .step { min-height: auto; padding-top: 12vh; padding-bottom: 12vh; opacity: 1; transform: none; }
.no-webgl .step-shot {
  display: block; width: min(280px, 70vw); margin-top: 28px;
  border-radius: 34px; border: 7px solid #2a2a2c;
}
.no-webgl .step-shot[src*="land-"] { width: min(560px, 100%); }
.no-webgl .scroll-cue { display: none; }

/* ---------- Section heads ---------- */
.section-head { max-width: 760px; margin: 0 auto; padding: 0 16px 44px; text-align: center; }
.section-head h2 { text-wrap: balance; font-size: clamp(38px, 6vw, 72px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; margin: 0; }
.section-sub { color: var(--muted); font-size: 19px; margin: 16px auto 0; max-width: 560px; }

/* ---------- Gallery carousel ---------- */
.gallery { padding: 120px 0 96px; overflow: hidden; }
.track {
  position: relative;
  display: flex; gap: 24px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 8px max(16px, calc(50vw - 390px)) 28px;
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.slide {
  flex: 0 0 min(780px, calc(100vw - 32px));
  scroll-snap-align: center;
  margin: 0; padding: 44px 52px;
  background: var(--card); border-radius: 32px;
  display: grid; grid-template-columns: 250px 1fr; gap: 48px; align-items: center;
  opacity: 0.45; transform: scale(0.96);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.slide.is-active { opacity: 1; transform: none; }
.slide.is-wide { grid-template-columns: 1fr; gap: 28px; }

.device { position: relative; background: #0a0a0a; border-radius: 36px; padding: 7px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.35); }
.device img { display: block; width: 100%; border-radius: 29px; }
.device.landscape { border-radius: 36px; }

.pin {
  position: absolute; left: var(--x); top: var(--y);
  width: 22px; height: 22px; margin: -11px 0 0 -11px; padding: 0;
  border: 2px solid #fff; border-radius: 50%;
  background: var(--accent); color: #fff;
  font: 700 11px/18px var(--mono); text-align: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.45);
  transition: transform 0.25s cubic-bezier(.2, .9, .3, 1.4), background 0.2s;
}
.pin::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0; animation: ping 2.4s ease-out infinite;
}
.slide:not(.is-active) .pin::after { animation: none; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.8; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
.pin.is-hot { transform: scale(1.3); background: var(--ink); }

figcaption h3 { font-size: 30px; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 18px; }
figcaption ol { list-style: none; margin: 0; padding: 0; }
figcaption li {
  position: relative; padding: 12px 0 12px 40px; border-top: 1px solid var(--line);
  font-size: 17px; line-height: 1.4; cursor: default; transition: color 0.2s;
}
figcaption li::before {
  content: attr(data-n); position: absolute; left: 0; top: 11px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font: 700 11px/24px var(--mono); text-align: center;
  transition: background 0.2s;
}
figcaption li.is-hot::before { background: var(--ink); }
.slide.is-wide figcaption ol { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 24px; }

.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 8px; }
.arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(10, 10, 10, 0.08); color: var(--ink);
  display: grid; place-items: center; transition: background 0.2s;
}
.arrow:hover { background: rgba(10, 10, 10, 0.14); }
.arrow:disabled { opacity: 0.35; cursor: default; }
.arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dots { display: flex; gap: 8px; }
.dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; cursor: pointer;
  background: rgba(10, 10, 10, 0.25); transition: width 0.3s, background 0.3s;
}
.dots button[aria-selected="true"] { width: 26px; background: var(--ink); }

@media (max-width: 820px) {
  .gallery { padding: 88px 0 72px; }
  .slide { grid-template-columns: 1fr; gap: 26px; padding: 26px 20px 20px; border-radius: 28px; }
  .slide .device:not(.landscape) { width: min(230px, 66vw); margin: 0 auto; }
  .slide.is-wide figcaption ol { grid-template-columns: 1fr; }
  figcaption h3 { font-size: 24px; margin-bottom: 10px; }
  figcaption li { font-size: 15px; padding: 10px 0 10px 36px; }
  figcaption li::before { top: 9px; }
  .pin { width: 20px; height: 20px; margin: -10px 0 0 -10px; font-size: 10px; line-height: 16px; }
}

/* ---------- The little things ---------- */
.details { padding: 40px 16px 110px; }
.bento { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { background: var(--card); border-radius: 26px; padding: 30px 28px 26px; }
.tile .glyph {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: #fff; margin-bottom: 22px;
}
.tile .glyph svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { font-size: 22px; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 8px; }
.tile p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing { background: var(--card); padding: 110px 16px 90px; }
.plans { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { background: var(--paper); border-radius: 28px; padding: 34px 30px; }
.plan h3 { font: 700 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.18em; margin: 0 0 18px; color: var(--muted); }
.plan .price { color: var(--ink); font-size: 52px; line-height: 1; letter-spacing: -0.04em; font-weight: 800; margin: 0 0 16px; }
.plan .price small { font-size: 18px; letter-spacing: 0; font-weight: 600; color: var(--muted); }
.plan p { margin: 0; color: var(--muted); }
.plan-plus { background: var(--ink); color: #fff; }
.plan-plus h3, .plan-plus p, .plan-plus .price small { color: var(--night-muted); }
.plan-plus .price { color: #fff; }
.packs { list-style: none; margin: 0 0 16px; padding: 0; }
.packs li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.packs li:first-child { padding-top: 0; }
.packs b { font-weight: 800; }
.pricing .fine { margin: 28px 0 0; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 520px; } }

/* ---------- Support ---------- */
.support { padding: 100px 0 40px; }
.support .section-head { padding-bottom: 0; }
.support .prose { padding-top: 24px; }
.support .prose h2:first-child { border-top: 0; margin-top: 0; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .track { scroll-behavior: auto; }
  .pin::after, .scroll-cue span { animation: none; }
  .step { transform: none; }
}
