/* ============================================================
   Sitelines
   Plain CSS. Mobile first. No build step.
   ============================================================ */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ol, ul, li, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img, video, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------- tokens ---------- */
:root {
  --ink:            #0A0A0B;
  --paper:          #F2EEE7;
  --accent:         #C05A32;
  --accent-deep:    #A8431F;
  --accent-bright:  #E8825A;
  --wa:             #25D366;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --pad: clamp(1.25rem, 5.2vw, 4rem);
  --measure: 34ch;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* hero scroll distance: one extra screen on phones, more on desktop */
  --hero-scroll: 200svh;
}

@media (min-width: 800px) { :root { --hero-scroll: 270vh; --measure: 46ch; } }

[data-theme="dark"] {
  --bg: var(--ink);
  --fg: #F2EEE7;
  --fg-dim: rgba(242, 238, 231, 0.60);
  --rule: rgba(242, 238, 231, 0.15);
  --acc: var(--accent-bright);
  --field-bg: rgba(242, 238, 231, 0.05);
}
[data-theme="light"] {
  --bg: var(--paper);
  --fg: #14110F;
  --fg-dim: rgba(20, 17, 15, 0.62);
  --rule: rgba(20, 17, 15, 0.14);
  --acc: var(--accent-deep);
  --field-bg: rgba(20, 17, 15, 0.04);
}

/* ---------- base ---------- */
html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--paper);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

section { background: var(--bg); color: var(--fg); }

.wrap {
  padding-inline: var(--pad);
  max-width: 78rem;
  margin-inline: auto;
  width: 100%;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--paper); color: var(--ink); padding: 0.75rem 1rem;
}
.skip:focus { left: 0; }

/* visible focus everywhere */
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 2px; }

/* ---------- shared type ---------- */
.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 1.75rem;
}
.label::before {
  content: ""; display: inline-block;
  width: 1.75rem; height: 1px; margin-right: 0.75rem;
  background: currentColor; vertical-align: 0.25em;
}

.section__h2, .problem__h2, .demo__h2, .enq__h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 7.6vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 18ch;
  text-wrap: balance;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.wordmark--sm { font-size: 1.125rem; }

/* ---------- reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ============================================================
   1 · HERO
   ============================================================ */
.hero__track { height: var(--hero-scroll); position: relative; }

.hero__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: grid;
}
.hero__media, .hero__ui { grid-area: 1 / 1; }

.hero__media { position: relative; overflow: hidden; }
.hero__poster, .hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__video { opacity: 0; transition: opacity 0.6s ease; }
.hero__video.is-live { opacity: 1; }

/* readability scrim: strongest where the copy sits */
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(10,10,11,0.92) 0%, rgba(10,10,11,0.55) 32%, rgba(10,10,11,0.10) 62%, rgba(10,10,11,0.45) 100%);
}

.hero__ui {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: calc(var(--pad) * 0.9) var(--pad) calc(var(--pad) * 1.1);
  padding-bottom: max(calc(var(--pad) * 1.1), env(safe-area-inset-bottom));
}

.hero__copy {
  grid-row: 2;
  align-self: end;
  will-change: opacity, transform;
}

.hero__h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.15rem, 9.6vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 15ch;
  text-wrap: balance;
}

.hero__facts {
  margin-top: 1.125rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(242, 238, 231, 0.78);
}

/* bottom row: download progress on the left, scroll cue on the right */
.hero__foot {
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 1.25rem;
}

.hero__load {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(242, 238, 231, 0.62);
  opacity: 0;
  visibility: hidden;
  /* This rule drives the fade OUT, when .is-on is removed. Gentle, so it
     does not snap away the moment the clip lands. */
  transition: opacity 0.4s ease, visibility 0.4s;
}
.hero__load.is-on {
  opacity: 1;
  visibility: visible;
  /* This rule drives the fade IN. Quick, so the bar is useful immediately
     on the slow connections that are the only ones to see it. */
  transition: opacity 0.18s ease, visibility 0.18s;
}

.hero__load-track {
  display: block;
  width: clamp(2.5rem, 14vw, 5rem);
  height: 1px;
  background: rgba(242, 238, 231, 0.22);
  overflow: hidden;
}
.hero__load-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s linear;
}
.hero__load-pct {
  font-variant-numeric: tabular-nums;
  color: var(--accent-bright);
  min-width: 2.5em;
}

.hero__cue {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242, 238, 231, 0.55);
  transition: opacity 0.4s ease;
}
.hero__cue-line {
  display: block; width: 2.5rem; height: 1px;
  background: rgba(242, 238, 231, 0.35);
  position: relative; overflow: hidden;
}
.hero__cue-line::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent-bright);
  transform: translateX(-100%);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0%   { transform: translateX(-100%); }
  55%  { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ============================================================
   2 · PROBLEM
   ============================================================ */
.problem { padding-block: clamp(5rem, 16vw, 10rem); }
.problem__body {
  margin-top: 1.75rem;
  font-size: clamp(1.0625rem, 4.1vw, 1.375rem);
  line-height: 1.6;
  color: var(--fg-dim);
  max-width: var(--measure);
}

/* ============================================================
   3 · LIVE DEMO
   ============================================================ */
.demo { padding-top: clamp(3rem, 10vw, 6rem); }
.demo__body {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 3.9vw, 1.1875rem);
  line-height: 1.6;
  color: var(--fg-dim);
  max-width: var(--measure);
}

.demo__stageWrap { height: 210svh; position: relative; margin-top: 2.5rem; }
.demo__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
}

.phone {
  position: relative;
  width: min(64vw, 268px);
  padding: 9px;
  border-radius: 2.5rem;
  background: linear-gradient(160deg, #34343a 0%, #131316 45%, #0d0d10 100%);
  box-shadow:
    0 2.5rem 5rem -1.25rem rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.phone__notch {
  position: absolute; top: 17px; left: 50%; transform: translateX(-50%);
  width: 28%; height: 0.35rem; border-radius: 1rem;
  background: #08080a; z-index: 3;
}
.phone__screen {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 1.95rem;
  overflow: hidden;
  background: #000;
}
.phone__poster, .phone__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.phone__video { opacity: 0; transition: opacity 0.5s ease; }
.phone__video.is-live { opacity: 1; }
.phone__vignette {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 38%, transparent 65%);
}
.phone__caption {
  position: absolute; left: 0.9rem; right: 0.9rem; bottom: 1rem;
  display: grid; gap: 0.15rem;
}
.phone__mark {
  font-family: var(--serif);
  font-size: 1.0625rem;
  color: #F2EEE7;
  line-height: 1.1;
}
.phone__line {
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 238, 231, 0.6);
}

.demo__meter {
  display: flex; align-items: center; gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.demo__meterValue { color: var(--acc); font-variant-numeric: tabular-nums; }
.demo__meterTrack {
  display: block; width: 5.5rem; height: 2px;
  background: var(--rule); overflow: hidden;
}
.demo__meterFill {
  display: block; height: 100%; width: 0%;
  background: var(--acc);
}

/* ============================================================
   4 · INCLUDED
   ============================================================ */
.incl { padding-block: clamp(4.5rem, 14vw, 9rem); }
.incl__list { margin-top: clamp(2.5rem, 7vw, 4rem); border-top: 1px solid var(--rule); }
.incl__item {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 4vw, 2.5rem);
  padding-block: clamp(1.05rem, 3.4vw, 1.5rem);
  border-bottom: 1px solid var(--rule);
}
.incl__n {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--acc);
  flex: none;
}
.incl__t {
  font-size: clamp(1.0625rem, 4.2vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ============================================================
   6 · PROCESS
   ============================================================ */
.proc { padding-bottom: clamp(5rem, 15vw, 9.5rem); }
.proc__list {
  margin-top: clamp(2.5rem, 7vw, 4rem);
  display: grid;
  gap: 0;
}
@media (min-width: 900px) {
  .proc__list { grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); }
  .proc__step { background: var(--bg); padding: 2rem 1.5rem 2.5rem; border: 0 !important; }
}

.proc__step {
  display: flex;
  gap: clamp(1rem, 4vw, 1.75rem);
  padding-block: clamp(1.5rem, 5vw, 2rem);
  border-bottom: 1px solid var(--rule);
}
.proc__step:first-child { border-top: 1px solid var(--rule); }
.proc__n {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--acc);
  flex: none;
  padding-top: 0.35rem;
}
.proc__t {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.375rem, 5.4vw, 1.625rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.proc__d {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 38ch;
}

/* ============================================================
   7 · ENQUIRY
   ============================================================ */
.enq { padding-block: clamp(5rem, 15vw, 9.5rem); }
.enq__body {
  margin-top: 1.25rem;
  font-size: clamp(1rem, 3.9vw, 1.125rem);
  color: var(--fg-dim);
  max-width: var(--measure);
}

.form { margin-top: clamp(2.5rem, 7vw, 3.5rem); max-width: 44rem; }
.form__hp { position: absolute; left: -9999px; }
.form__row { display: grid; gap: 1rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; gap: 1.25rem; } }

.field { display: grid; gap: 0.5rem; }
.field__label {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.field__input {
  background: var(--field-bg);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.95rem 1rem;
  font-size: 1rem; /* 16px keeps iOS from zooming on focus */
  color: var(--fg);
  transition: border-color 0.25s ease, background 0.25s ease;
  width: 100%;
}
.field__input::placeholder { color: rgba(242, 238, 231, 0.28); }
.field__input:focus { outline: none; border-color: var(--acc); background: rgba(242, 238, 231, 0.08); }
.field__input:user-invalid { border-color: #D9583F; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.05rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s ease, background 0.2s ease;
  min-height: 48px; /* thumb target */
  width: 100%;
}
@media (min-width: 640px) { .btn { width: auto; } }
.btn:active { transform: scale(0.985); }

.btn--primary { background: var(--accent-deep); color: #FFF7F3; margin-top: 0.5rem; }
.btn--primary:hover { background: var(--accent); }
.btn--primary[disabled] { opacity: 0.55; cursor: progress; }

.btn--wa { background: var(--wa); color: #06301A; font-weight: 600; }
.btn--wa:hover { filter: brightness(1.06); }
.wa__icon { width: 1.15rem; height: 1.15rem; flex: none; }

.form__status {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--acc);
  min-height: 1.3em;
}
.form__status.is-error { color: #F0806A; }

.enq__alt {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  max-width: 44rem;
}
@media (min-width: 640px) { .enq__alt { flex-direction: row; align-items: center; } }
.enq__or {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ---------- footer ---------- */
.foot { padding-block: 2.5rem; border-top: 1px solid var(--rule); background: var(--bg); color: var(--fg); }
.foot__inner { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: baseline; justify-content: space-between; }
.foot__meta { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim); }

/* ---------- sticky mobile CTA ---------- */
.stick {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
  gap: 0.6rem;
  align-items: center;
  padding: 0.7rem var(--pad);
  padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(10, 10, 11, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(242, 238, 231, 0.12);
  transform: translateY(110%);
  transition: transform 0.45s var(--ease);
}
@media (max-width: 799px) { .stick { display: flex; } }
.stick.is-visible { transform: none; }

.stick__wa {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.7rem 1rem;
  background: var(--wa);
  color: #06301A;
  font-size: 0.9375rem;
  font-weight: 600;
}
.stick__form {
  flex: none;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 0.9rem;
  font-size: 0.8125rem;
  color: rgba(242, 238, 231, 0.75);
  border: 1px solid rgba(242, 238, 231, 0.2);
}

/* keep the sticky bar from covering the end of the form */
@media (max-width: 799px) { .foot { padding-bottom: 6rem; } }

/* ============================================================
   No scrub: save-data, 2G, low memory, or the video never loaded.
   Collapse the tall tracks so there is no dead scroll behind a
   static poster.
   ============================================================ */
/* .hero-static / .demo-static are set at runtime when a clip fails to load. */
.no-scrub .hero__track,
.hero-static .hero__track { height: auto; }

.no-scrub .hero__stage,
.hero-static .hero__stage { position: relative; height: 100svh; }

.no-scrub .hero__cue,
.hero-static .hero__cue { display: none; }

.no-scrub .demo__stageWrap,
.demo-static .demo__stageWrap { height: auto; margin-top: 2rem; }

.no-scrub .demo__stage,
.demo-static .demo__stage { position: relative; height: auto; padding-block: clamp(2rem, 8vw, 4rem); }

.no-scrub .demo__meter,
.demo-static .demo__meter { display: none; }

/* ============================================================
   Reduced motion: no pin, no scrub, no reveal. Poster only.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__track { height: auto; }
  .hero__stage { position: relative; height: 100svh; }
  .demo__stageWrap { height: auto; margin-top: 2rem; }
  .demo__stage { position: relative; height: auto; padding-block: 3rem; }
  .hero__cue-line::after { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .stick { transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
