/* --------- Design tokens --------- */
:root {
  --bg: #0e0e10;
  --fg: #ededef;
  --muted: #b9b9c0;
  --line: #2a2a2e;
  --accent: #8fd3ff; /* only for focus rings & tiny accents */
  --maxw: 1120px;
  --radius: 14px;
  --space: clamp(16px, 2.5vw, 28px);
  --s-2: calc(var(--space) * 0.5);
  --s-1: calc(var(--space) * 0.75);
  --s0: var(--space);
  --s1: calc(var(--space) * 1.5);
  --s2: calc(var(--space) * 2);
  --s3: calc(var(--space) * 3);
  --fs-hero: clamp(38px, 6vw, 64px);
  --fs-lede: clamp(16px, 2.2vw, 20px);
  --fs-h2: clamp(22px, 2.6vw, 28px);
  --ring: 0 0 0 3px color-mix(in oklab, var(--accent) 40%, transparent);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fcfcfd;
    --fg: #0d0d10;
    --muted: #5c5d65;
    --line: #e7e7ec;
  }
}

/* --------- Base --------- */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s0);
}
.semi {
  font-weight: 600;
}

/* --------- Tiny scroll progress --------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  background: linear-gradient(
    to right,
    currentColor 0,
    currentColor calc(var(--p, 0) * 100%),
    transparent 0
  );
  color: var(--fg);
  opacity: 0.35;
}

/* --------- Header --------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(0px);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.brand .wordmark {
  font-weight: 600;
  letter-spacing: 0.2px;
}
.nav-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 10px;
}
.nav-cta a svg {
  width: 14px;
  height: 14px;
}

/* --------- Hero --------- */
.hero {
  position: relative;
  padding-block: clamp(48px, 10vw, 120px);
  border-bottom: 1px solid var(--line);
  overflow: clip;
}
.hero-grid {
  display: grid;
  gap: var(--s2);
  grid-template-columns: 1.1fr 0.9fr;
}
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
.section-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.3px;
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  margin-bottom: var(--s-1);
}
.with-corners {
  position: relative;
  display: inline-block;
  padding: 6px 8px 2px 8px;
  margin: 0 0 var(--s1) 0;
}
.with-corners::before,
.with-corners::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--line);
}
.with-corners::before {
  left: -8px;
  top: -6px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 4px;
}
.with-corners::after {
  right: -8px;
  bottom: -6px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 4px;
}

.hero h1 {
  font-size: var(--fs-hero);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.lede {
  font-size: var(--fs-lede);
  color: var(--muted);
  max-width: 48ch;
  margin-bottom: var(--s1);
}
.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--s2);
}

.cta-row {
  display: flex;
  gap: var(--s0);
  align-items: center;
  flex-wrap: wrap;
}
.cta-row .badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
}
.cta-row .badge img {
  height: 38px;
  width: auto;
}
.subnote {
  font-size: 13px;
  color: var(--muted);
}

.mockup-wrap {
  position: relative;
  max-width: 340px;
}
.mockup-wrap img.phone {
  inset: 0;
  margin: auto;
  width: 100%;
  height: 100%;
}

/* --------- Features --------- */
.features {
  padding-block: var(--s3);
  border-bottom: 1px solid var(--line);
}
.features h2 {
  margin: 0 0 var(--s1) 0;
  font-size: clamp(24px, 3vw, 34px);
}
.feat-grid {
  display: grid;
  gap: var(--s1);
  grid-template-columns: repeat(12, 1fr);
}
.feat-card {
  grid-column: span 4;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media (max-width: 1000px) {
  .feat-card {
    grid-column: span 6;
  }
}
@media (max-width: 680px) {
  .feat-card {
    grid-column: span 12;
  }
  .cta-row {
    justify-content: center;
  }
  .meta-row {
    justify-content: center;
  }
}
.feat-card h3 {
  margin: 0 0 var(--s-1) 0;
  letter-spacing: -0.01em;
  font-size: var(--fs-h2);
}
.feat-card p {
  margin: 0;
  color: var(--muted);
}
.feat-card .rule {
  height: 1px;
  background: var(--line);
  margin-block: var(--s-1);
}
.icon {
  width: 24px;
  height: 24px;
  opacity: 0.9;
}
.icon svg {
  width: 100%;
  height: 100%;
}

/* --------- Gallery stripe --------- */
.stripe {
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
}
.stripe .rail {
  display: grid;
  grid-auto-flow: column;
  gap: var(--s0);
  padding: var(--s2) 0;
  overflow: auto;
  scrollbar-width: thin;
}
.stripe .shot {
  min-width: clamp(260px, 40vw, 420px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------- Press / Specs --------- */
.press {
  padding-block: var(--s3);
  border-bottom: 1px solid var(--line);
}
.press-grid {
  display: grid;
  gap: var(--s1);
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}
@media (max-width: 960px) {
  .press-grid {
    grid-template-columns: 1fr;
  }
}
.quote {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s2);
}
blockquote {
  margin: 0;
  font-size: clamp(18px, 2.6vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
blockquote footer {
  margin-top: var(--s1);
  color: var(--muted);
  font-size: 14px;
}
.specs {
  display: grid;
  gap: var(--s-1);
}
.specs .row {
  display: flex;
  justify-content: space-between;
  gap: var(--s-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11.4px 14px;
  font-size: 14px;
  color: var(--muted);
}
.specs .row strong {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* --------- CTA --------- */
.cta {
  padding-block: var(--s3);
}
.cta .pad {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s2);
  display: grid;
  gap: var(--s1);
  grid-template-columns: 1fr auto;
  align-items: center;
}
@media (max-width: 760px) {
  .cta .pad {
    grid-template-columns: 1fr;
  }
}
.cta h2 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 36px);
  letter-spacing: -0.02em;
}
.cta p {
  margin: 0;
  color: var(--muted);
}

/* --------- Footer --------- */
footer {
  padding-block: var(--s2);
  color: var(--muted);
}
.footline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s1);
  border-top: 1px solid var(--line);
  padding-top: var(--s1);
  font-size: 14px;
}
.footline nav {
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
}
.footline a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------- Subtle reveal motion --------- */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  .progress {
    display: none;
  }
}

/* --- Compact phone carousel (non-interactive) --- */
.mockup-wrap {
  position: relative;
  max-width: 340px; /* same small footprint as now */
}

/* Each slide is layered and cross-fades in place */
.phone-carousel .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 120%;
  opacity: 0;
  animation: wf-fade 12s infinite ease-in-out;
}

/* Staggered starts for 3 slides */
.phone-carousel .slide:nth-child(1) {
  animation-delay: 0s;
}
.phone-carousel .slide:nth-child(2) {
  animation-delay: 4s;
}
.phone-carousel .slide:nth-child(3) {
  animation-delay: 8s;
}

/* Cross-fade curve: visible ~1/3 of the time */
@keyframes wf-fade {
  0% {
    opacity: 0;
  }
  6% {
    opacity: 1;
  } /* quick fade in */
  28% {
    opacity: 1;
  } /* stay visible */
  34% {
    opacity: 0;
  } /* fade out */
  100% {
    opacity: 0;
  }
}

/* Respect reduced motion: show first frame, no animation */
@media (prefers-reduced-motion: reduce) {
  .phone-carousel .slide {
    animation: none;
  }
  .phone-carousel .slide:nth-child(1) {
    opacity: 1;
  }
}

/* size the mockup wrapper and center it */
.mockup-wrap {
  position: relative;
  max-width: 340px;
  width: 100%;
  aspect-ratio: 1125 / 2436; /* iPhone-ish portrait ratio */
  margin-inline: auto;
  margin-top: -20px;
}

/* make the carousel fill the wrapper */
.phone-carousel {
  position: absolute;
  inset: 0;
}

/* slides fill the available box (no extra 120% height) */
.phone-carousel .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation: wf-fade 12s infinite ease-in-out;
}

/* Allow children to actually shrink */
.cta .pad > * {
  min-width: 0;
}
.countdown-wrap {
  min-width: 0;
}
.tick {
  min-width: 0;
  max-width: 100%;
}

.tick {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.6em;
  font-size: 64px;
  line-height: 1;
}

.tick .tick-group {
  margin-inline: 0.15em;
}

/* Make all numerals equal width */
.tick,
.tick * {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1; /* extra safety */
}

.tick .tick-flip,
.tick .tick-flip-spacer {
  margin-inline: 0.06em;
}

.tick .tick-label {
  font-size: 0.22em;
  opacity: 0.7;
  margin-top: 0.35em;
}

.tick .side-label {
  font-size: 0.24em;
  color: var(--muted, rgba(255, 255, 255, 0.75));
  white-space: nowrap;
  align-self: center;
}

@media (min-width: 768px) {
  .tick .tick-label {
    display: none;
  }
}

@media (max-width: 700px) {
  .tick .side-label {
    flex-basis: 100%;
    text-align: center;
    margin-top: 0.4em;
  }
}

.separator {
  width: 100%;
  text-align: center;
  margin: 1.5rem 0 0.75rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--muted);
}
.separator::before,
.separator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--line);
}
.separator::before {
  left: 0;
}
.separator::after {
  right: 0;
}
/* ---------- WIP page tweaks ---------- */

.hero-wip {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(48px, 10vw, 120px);
}

.hero-grid-wip {
  align-items: center;
}

/* WIP status card */
.wip-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s1);
  background: color-mix(in oklab, var(--bg) 94%, transparent);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 0;
}

.wip-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-1);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 4px 10px;
  font-size: 12px;
  color: var(--muted);
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--muted);
}

.status-pill--building .dot {
  background: #ffd166;
}

/* checklist */
.wip-steps {
  list-style: none;
  padding: 0;
  margin: var(--s-1) 0 0 0;
  display: grid;
  gap: 6px;
}

.wip-step {
  display: flex;
  justify-content: space-between;
  gap: var(--s-1);
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in oklab, var(--line) 80%, transparent);
  font-size: 13px;
  color: var(--muted);
}

.wip-step .label {
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--fg);
}

.wip-step .meta {
  opacity: 0.8;
  white-space: nowrap;
}

.wip-step.done {
  border-color: color-mix(in oklab, #50fa7b 50%, var(--line));
}

.wip-step.done .label::before {
  content: "✔ ";
  font-size: 0.9em;
}

.wip-step.active {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--line));
  background: color-mix(in oklab, var(--bg) 88%, transparent);
}

.wip-footnote {
  margin: var(--s-1) 0 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* smaller section spacing for WIP features */
.wip-features {
  padding-block: var(--s2);
}

@media (max-width: 768px) {
  .hero-grid-wip {
    grid-template-columns: 1fr;
  }

  .hero-wip .cta-row {
    justify-content: center;
  }

  .hero-copy {
    padding-inline: var(--s1);
  }

  .section-tag {
    margin-left: -8px;
    margin-bottom: 20px;
  }
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1; /* push footer to the bottom */
}
