/* stōw marketing site — TAP-29 v5 (screenshot-led, App Store page order; sliders) */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--font-body); font-size: 18px; line-height: 28px;
  color: var(--stow-on); background: var(--stow-base); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--stow-on); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--stow-accent); }
a:focus-visible { outline: 2px solid var(--stow-accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 16px; letter-spacing: -0.015em; }
h1 { font-size: 56px; line-height: 60px; letter-spacing: -0.025em; }
h2 { font-size: 36px; line-height: 40px; }
h3 { font-size: 20px; line-height: 28px; }
p { margin: 0 0 16px; }
.container { max-width: calc(var(--max) + 96px); margin: 0 auto; padding: 0 48px; }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  font-family: var(--font-mono); font-weight: 500; font-size: 12px; line-height: 16px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--stow-on-secondary); margin: 0 0 12px;
}
.wordmark {
  font-family: var(--font-wordmark); font-size: 26px; line-height: 1; letter-spacing: 0.06em;
  color: var(--stow-on); text-decoration: none;
}
.wordmark--sm { font-size: 20px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid transparent; transition: border-color 200ms; }
.nav.is-scrolled { border-bottom-color: var(--stow-hairline); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-links { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: 15px; line-height: 20px; }

/* Bands */
.band-white { background: var(--stow-base); }
.band-tint { background: var(--stow-surface); }
.band-dark { background: var(--stow-midnight); color: var(--stow-midnight-on); }
.band, .row { padding: 120px 0; }

/* Frames: no overlays, visible edges */
.frame { display: block; }
.frame img { border: 1px solid var(--stow-hairline); box-shadow: var(--frame-shadow); background: #fff; }
.frame--iphone img { border-radius: 40px; width: 320px; }
.frame--ipad img { border-radius: 32px; width: 520px; }
.frame--mac img { border-radius: 20px; width: 960px; }
.band-dark .frame img { border-color: #1A191D; box-shadow: none; background: var(--stow-midnight); }

/* Hero */
.hero { padding: 96px 0 120px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.lede { font-size: 20px; line-height: 30px; max-width: 30em; margin-bottom: 12px; }
.lede-2 { font-size: 18px; line-height: 28px; max-width: 30em; margin-bottom: 32px; color: var(--stow-on-secondary); }
.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badge { display: inline-block; line-height: 0; border-radius: 10px; }
.badge img { height: 50px; width: auto; }
.platforms { margin-top: 20px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stow-on-secondary); }
.hero-media { display: flex; justify-content: center; }

/* Feature copy (used inside the features slider) */
.row-text { font-size: 22px; line-height: 32px; color: var(--stow-on); }
.band-dark .row-text { color: var(--stow-midnight-on); }
.band-dark .eyebrow { color: var(--stow-midnight-secondary); }
.platform {
  display: inline-block; font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: 0.04em;
  padding: 6px 10px; border: 1px solid var(--stow-hairline); border-radius: 999px; color: var(--stow-on-secondary); background: #fff;
}
.themes { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.themes li {
  font-size: 15px; line-height: 20px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid #2A282F; color: var(--stow-midnight-on);
}

/* iPad + Mac */
.split { display: grid; grid-template-columns: 1fr auto; gap: 96px; align-items: center; }
.split-copy { max-width: 460px; }
.mac { display: grid; gap: 48px; justify-items: center; text-align: center; }
.mac-copy { max-width: 640px; }
.note { font-size: 15px; line-height: 24px; color: var(--stow-on-secondary); }


/* Beta (quiet) */
.beta-inner { max-width: 640px; text-align: center; } /* own tint band after the Mac band (pricing removed) */
.beta h2 { font-size: 28px; line-height: 34px; }
.text-link { color: var(--stow-accent); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; color: var(--stow-accent); }

/* Final CTA */
.final-inner { text-align: center; max-width: 720px; }
.final .badges { justify-content: center; margin-top: 32px; }

/* Footer */
.footer { border-top: 1px solid var(--stow-hairline); padding: 40px 0; font-size: 15px; line-height: 22px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; flex: 1; }
.copyright { margin: 0; color: var(--stow-on-secondary); }

/* Motion: 200ms fade-up only */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 200ms ease-out, transform 200ms ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Tablet */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .split { gap: 56px; }
  .split { grid-template-columns: 1fr; justify-items: center; }
  .frame--mac img { width: 100%; }
}
/* Mobile */
@media (max-width: 720px) {
  body { font-size: 17px; line-height: 26px; }
  .container { padding: 0 24px; }
  .band, .row { padding: 72px 0; }
  .hero { padding: 48px 0 72px; }
  h1 { font-size: 40px; line-height: 44px; }
  h2 { font-size: 30px; line-height: 34px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 14px; }
  .row-text { font-size: 19px; line-height: 28px; }
  .frame--iphone img { width: 220px; border-radius: 28px; }
  .frame--ipad img { width: 100%; border-radius: 24px; }
  .frame--mac img { border-radius: 12px; }
  .badges { flex-direction: column; align-items: stretch; }
  .badge { display: flex; justify-content: center; background: #000; border-radius: 10px; }
  .badge img { height: 50px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ==========================================================================
   Sliders (v5). Self-contained: features slider, Mac inline slider, Mac lightbox.
   Only tokens from tokens.css. Adjust here for Melanie's slider spec.
   ========================================================================== */
.carousel { position: relative; }
.carousel-track {
  position: relative; display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; outline: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 2px solid var(--stow-accent); outline-offset: 4px; border-radius: 20px; }
.carousel-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; }
.no-js .carousel-controls, .no-js .mac-hint { display: none; }
.carousel-btn {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; padding: 0;
  background: var(--stow-base); border: 1px solid var(--stow-hairline); color: var(--stow-on); cursor: pointer;
  transition: border-color 150ms, opacity 150ms;
}
.carousel-btn:hover { border-color: var(--stow-tinted); }
.carousel-btn:disabled { opacity: 0.4; cursor: default; }
.carousel-btn:focus-visible, .carousel-dot:focus-visible, .mac-open:focus-visible, .lightbox-close:focus-visible {
  outline: 2px solid var(--stow-accent); outline-offset: 3px;
}
.carousel-dots { display: flex; align-items: center; gap: 0; }
.carousel-dot { padding: 8px; border: 0; background: none; cursor: pointer; line-height: 0; border-radius: 999px; }
.carousel-dot::before {
  content: ""; display: block; width: 8px; height: 8px; border-radius: 999px; background: var(--stow-tinted);
  transition: width 200ms ease-out, background-color 200ms ease-out;
}
.carousel-dot[aria-current="true"]::before { width: 24px; background: var(--stow-accent); }
.carousel-count {
  margin: 12px 0 0; text-align: center; font-family: var(--font-mono); font-size: 12px; line-height: 16px;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* Features slider: one slide per view, frame left / copy right (desktop), stacked (mobile) */
.features { padding: 72px 0; }
.feature-slide {
  display: grid; grid-template-columns: auto minmax(0, 440px); gap: 96px; align-items: center; justify-content: center;
  padding: 40px; background: var(--stow-base); border: 1px solid var(--stow-hairline); border-radius: 20px;
}
.feature-slide .frame--iphone img { width: auto; height: 640px; } /* spec: max 640 desktop */
.slide--dark { background: var(--stow-midnight); border-color: var(--stow-midnight); color: var(--stow-midnight-on); }
.slide--dark .row-text { color: var(--stow-midnight-on); }
.slide--dark .eyebrow { color: var(--stow-midnight-secondary); }
.slide--dark .frame img { border-color: #1A191D; box-shadow: none; background: var(--stow-midnight); }

/* Mac band: inline slider, each frame opens the lightbox */
/* Mac band: slider left, copy right (mirrors the iPad band); stacks at <=1080px */
.mac { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 72px; align-items: center; justify-items: stretch; text-align: left; }
.mac-copy { max-width: 460px; }
.mac-media { min-width: 0; margin: 0 -48px; } /* room for the frame shadow inside the scroller */
.carousel--mac .mac-open { width: 100%; }
.carousel--mac .frame--mac img { width: 100%; }
.mac-media .mac-hint { text-align: center; }
.carousel--mac .carousel-track { padding: 24px 0 72px; margin: -24px 0 -56px; }
.carousel--mac .carousel-track:focus-visible { outline-offset: -2px; }
.mac-slide { display: flex; justify-content: center; padding: 0 48px; }
.carousel--mac .carousel-controls { position: relative; z-index: 1; } /* sits over the track's shadow padding */
.mac-open {
  display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 20px;
  transition: transform 200ms ease-out;
}
.mac-open .frame img { transition: box-shadow 200ms ease-out; }
.mac-open:hover { transform: translateY(-2px); }
.mac-open:hover .frame img { box-shadow: 0 28px 56px rgba(69, 60, 92, 0.16); }
.mac-hint { margin: 12px 0 0; font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--stow-on); opacity: 0.6; }

/* Mac lightbox (<dialog>) */
html.is-locked, html.is-locked body { overflow: hidden; }
/* Nothing from the inline Mac slider shows through behind the lightbox counter */
html.is-locked .carousel--mac .carousel-controls, html.is-locked .mac-hint { visibility: hidden; }
.lightbox {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(6, 6, 7, 0.96); color: #fff; overflow: hidden;
}
.lightbox[open] { display: flex; flex-direction: column; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox-slide { display: flex; align-items: center; justify-content: center; padding: 0 72px; }
.lightbox-frame img {
  width: auto; max-width: min(1200px, 100%); max-height: 80vh; height: auto; border-radius: 16px; background: var(--stow-midnight);
}
.lightbox-frame { display: flex; justify-content: center; max-width: 100%; }
.lightbox .carousel-btn { background: #fff; border-color: #fff; color: var(--stow-midnight); }
.lightbox .carousel-btn:disabled { opacity: 0.3; }
.lightbox .carousel-dot::before { background: rgba(255, 255, 255, 0.35); }
.lightbox .carousel-dot[aria-current="true"]::before { background: #fff; }
.lightbox .carousel-btn:focus-visible, .lightbox .carousel-dot:focus-visible, .lightbox-close:focus-visible { outline-color: #fff; }
.lightbox .carousel-track:focus-visible { outline-color: rgba(255, 255, 255, 0.6); outline-offset: -2px; }
.lightbox .carousel-count { color: var(--stow-midnight-secondary); }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, 0.4); background: transparent; color: #fff; cursor: pointer;
}
.lightbox-close:hover { border-color: #fff; }
.carousel--lightbox .carousel-btn { position: absolute; z-index: 1; top: calc(50% - 44px); } /* spec: at the sides */
.carousel--lightbox [data-prev] { left: 16px; }
.carousel--lightbox [data-next] { right: 16px; }
/* Theme chips inside the 05 · Themes slide (spec: name-only chips under the sentence) */
.slide--dark .themes { margin-top: 20px; gap: 8px; }
.slide--dark .themes li {
  font-size: 14px; line-height: 20px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--stow-midnight-secondary) 35%, transparent); color: var(--stow-midnight-on);
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track { scroll-behavior: auto; }
  .carousel-dot::before, .mac-open, .mac-open .frame img, .carousel-btn { transition: none; }
  .mac-open:hover { transform: none; }
}
@media (max-width: 1080px) {
  .mac { grid-template-columns: 1fr; gap: 48px; text-align: center; justify-items: center; }
  .mac-copy { order: -1; max-width: 640px; }
  .mac-media { width: calc(100% + 96px); }
  .feature-slide { gap: 56px; padding: 32px; }
  .feature-slide .frame--iphone img { height: 560px; } /* spec: max 560 tablet */
}
@media (max-width: 767px) {
  .carousel--features .carousel-btn, .carousel--mac .carousel-btn { display: none; }
  .carousel-controls { margin-top: 16px; }
}
@media (max-width: 720px) {
  .features { padding: 56px 0; }
  .mac-slide { padding: 0 24px; }
  .mac-media { margin: 0 -24px; width: calc(100% + 48px); }
  .mac { gap: 32px; }
  .feature-slide { grid-template-columns: 1fr; gap: 24px; padding: 24px; justify-items: center; align-content: start; }
  .feature-copy { justify-self: stretch; }
  .feature-slide .frame--iphone img { width: min(220px, 32.2vh); height: auto; } /* v4 mobile size, capped at 70vh tall (spec) */
  .lightbox-slide { padding: 0 16px; }
  .carousel--lightbox [data-prev] { left: 4px; }
  .carousel--lightbox [data-next] { right: 4px; }
  .lightbox-frame img { border-radius: 10px; }
}

/* ==========================================================================
   Legal pages (v5d): /privacy-policy and /terms-of-service. Existing tokens and type scale only.
   ========================================================================== */
.legal-band { padding: 72px 0 120px; }
.legal { max-width: 68ch; margin: 0 auto; }
.legal h1 { margin-bottom: 8px; }
.legal-date { font-size: 15px; line-height: 24px; color: var(--stow-on-secondary); margin-bottom: 40px; }
.legal h2 { font-size: 20px; line-height: 28px; margin: 40px 0 12px; scroll-margin-top: 80px; }
.legal p, .legal li { font-size: 17px; line-height: 28px; }
.legal ul { margin: 0 0 16px; padding-left: 1.25em; }
.legal li { margin: 0 0 8px; }
.legal a { overflow-wrap: anywhere; }
.footer-links a[aria-current="page"] { color: var(--stow-accent); }
@media (max-width: 720px) {
  .legal-band { padding: 40px 0 72px; }
  .legal h1 { font-size: 36px; line-height: 40px; }
  .legal p, .legal li { font-size: 16px; line-height: 26px; }
}
