/* ============================================================
   GymProof Prelaunch — Swiss editorial / Bauhaus sportswear
   Tokens mirror lib/theme/theme.dart from the iOS app.
   ============================================================ */

:root {
  /* Backgrounds */
  --bg: #FAFAF7;
  --bg-deep: #F1F1ED;
  --surface: #FFFFFF;
  --surface-hi: #F4F4EF;

  /* Ink — pure black + stepped opacity (not grey) */
  --ink: #000000;
  --dim: rgba(0, 0, 0, 0.80);
  --faint: rgba(0, 0, 0, 0.60);
  --vfaint: rgba(0, 0, 0, 0.30);

  /* Hairlines */
  --hair: rgba(0, 0, 0, 0.08);
  --hair-hi: rgba(0, 0, 0, 0.14);
  --hair-soft: rgba(0, 0, 0, 0.04);

  /* Frame outline — pure black, 1px */
  --frame: #000000;

  /* Accent — single lime, no second decorative color */
  --accent: #9DD33B;
  --accent-dim: rgba(157, 211, 59, 0.24);
  --accent-dimmer: rgba(157, 211, 59, 0.12);

  /* Radii */
  --r-card: 18px;
  --r-card-sm: 14px;
  --r-input: 12px;
  --r-pill: 999px;

  /* Type */
  --display: "Inter Tight", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ============================================================
   TYPOGRAPHY — three voices
   ============================================================ */
.display {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 8.5vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--ink);
}
.display--md {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.028em;
}

.mono {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.lede {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 60ch;
  margin: 0;
}

.dim   { color: var(--faint); }
.hl    { color: var(--ink); background: var(--accent); padding: 0 0.12em; border-radius: 3px; }
.strike{ position: relative; color: var(--vfaint); }
.strike::after{
  content: ""; position: absolute; left: -2%; right: -2%; top: 56%;
  height: 6px; background: var(--ink); transform: skewY(-3deg);
}

/* Editorial section eyebrow: rule + mono label */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 18px;
}
.eyebrow .rule {
  width: 28px; height: 1px; background: var(--ink); display: block;
}
.eyebrow .mono { color: var(--ink); font-weight: 600; }

/* ============================================================
   LAYOUT
   ============================================================ */
.section, main, .hero, .foot { width: 100%; }

.nav__inner,
.hero__inner,
.section__inner,
.foot__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--hair);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding-top: 50px;
  padding-bottom: 50px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
}
.brand__mark {
  width: 32px; height: 32px;
  border-radius: 7px;
  border: 1px solid var(--frame);
}
.brand__mark--sm { width: 28px; height: 28px; }
.brand__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.nav__pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--frame);
  border-radius: var(--r-pill);
  background: var(--surface);
}
.nav__pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(157, 211, 59, 0.55);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(157, 211, 59, 0.55); }
  60%  { box-shadow: 0 0 0 10px rgba(157, 211, 59, 0); }
  100% { box-shadow: 0 0 0 0   rgba(157, 211, 59, 0); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 56px 0 80px; }
.hero__inner > * + * { margin-top: 28px; }

.hero .display { max-width: 14ch; }
.hero .lede { max-width: 58ch; }

/* ============================================================
   CARD (universal — the "framed clipping" container)
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--frame);
  border-radius: var(--r-card);
  padding: 22px;
  position: relative;
}

/* ============================================================
   HERO VIDEO
   ============================================================ */
.video {
  padding: 0;
  overflow: hidden;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.video__frame {
  aspect-ratio: 9 / 16;
  background: var(--ink);
  border-bottom: 1px solid var(--frame);
  overflow: hidden;
}
.video__frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.video__cap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  gap: 12px;
}
.video__mute {
  appearance: none;
  background: var(--surface-hi);
  color: var(--ink);
  border: 1px solid var(--frame);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.video__mute[aria-pressed="false"] {
  background: var(--accent);
  color: var(--ink);
}

/* ============================================================
   COUNTDOWN
   ============================================================ */
.countdown__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair-hi);
}
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding-top: 18px;
}
.cu {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 4px 18px;
  border-left: 1px solid var(--hair-hi);
}
.cu:first-child { border-left: 0; padding-left: 0; }
.cu__n {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 9vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cu__l {
  margin-top: 8px;
  color: var(--faint);
}

/* ============================================================
   FORM
   ============================================================ */
.form__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair-hi);
  margin-bottom: 16px;
}
.form__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.0;
  letter-spacing: -0.028em;
  margin: 8px 0 22px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.field {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.field .lbl { color: var(--faint); }
.field input {
  appearance: none;
  width: 100%;
  background: var(--surface-hi);
  border: 1px solid var(--frame);
  border-radius: var(--r-input);
  padding: 14px 14px;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  transition: border-color 200ms var(--ease), background 200ms var(--ease), box-shadow 200ms var(--ease);
}
.field input::placeholder { color: var(--vfaint); }
.field input:focus {
  outline: none;
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.field input:invalid:not(:placeholder-shown) {
  border-color: #E34A40;
  box-shadow: 0 0 0 3px rgba(227, 74, 64, 0.16);
}

.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px;
  border: 1px solid var(--frame);
  border-radius: var(--r-input);
  background: var(--ink);
  color: #fff;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 160ms var(--ease), background 200ms var(--ease), color 200ms var(--ease), box-shadow 220ms var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--accent {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 0 0 rgba(157, 211, 59, 0.0);
}
.btn--accent:hover {
  box-shadow: 0 10px 30px -10px rgba(157, 211, 59, 0.55);
}
.btn--lg { padding: 16px 24px; font-size: 16px; }

.form__msg {
  margin: 14px 0 0;
  min-height: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.form__msg.is-ok { color: var(--ink); }
.form__msg.is-ok::before {
  content: "✓ ";
  color: var(--ink);
  background: var(--accent);
  padding: 0 6px;
  margin-right: 6px;
  border-radius: 3px;
}
.form__msg.is-err { color: #E34A40; }

.form__fine { margin-top: 14px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 96px 0; border-top: 1px solid var(--hair); }
.section__head { max-width: 900px; margin-bottom: 56px; }
.section__head > * + * { margin-top: 18px; }

/* PROBLEM — evidence cards */
.section--problem .section__head > .lede { margin-top: 22px; }

.proof-shot {
  margin: 0 auto 32px;
  max-width: 360px;
  display: flex;
  justify-content: center;
}
.proof-shot--wide { max-width: 680px; }
.proof-shot__img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 72%, rgba(0,0,0,0.55) 88%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 72%, rgba(0,0,0,0.55) 88%, transparent 100%);
}

/* Evidence row — three numbered editorial cards */
.evidence {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.evidence__item { display: flex; flex-direction: column; gap: 10px; }
.evidence__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair-hi);
}
.evidence__n { color: var(--ink); font-weight: 700; }
.evidence__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 4px 0 0;
}
.evidence__item p {
  color: var(--dim);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

/* SOLUTION */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 56px;
}
.step { display: flex; flex-direction: column; gap: 14px; }
.step__head {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair-hi);
}
.step__n { color: var(--ink); font-weight: 600; }
.step__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 4px 0 0;
}
.step__copy { color: var(--dim); margin: 0; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip {
  padding: 7px 11px;
  border: 1px solid var(--frame);
  border-radius: 10px;
  background: var(--surface-hi);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--faint);
}
.chip--on { background: var(--accent); color: var(--ink); }

.proof-row {
  display: flex; flex-direction: column; gap: 10px; margin-top: 6px;
}
.proof-row__item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--frame);
  border-radius: 12px;
  background: var(--surface-hi);
}
.proof-row__icon {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--frame);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
.proof-row__icon svg { width: 16px; height: 16px; }
.proof-row__item .mono { color: var(--ink); font-weight: 600; flex: 1; }
.proof-row__tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; font-weight: 700;
  text-transform: uppercase;
  background: var(--accent); color: var(--ink);
  padding: 4px 8px; border-radius: 6px;
}

.sms {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--frame);
  border-radius: 12px;
  background: var(--surface-hi);
  position: relative;
}
.sms__body {
  margin: 0;
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink);
  line-height: 1.45;
}

/* Big footer form gets a soft lime wash to differentiate */
.form--lg {
  background: linear-gradient(180deg, var(--surface) 0%, var(--accent-dimmer) 220%);
  padding: 28px;
}

/* ============================================================
   FORM SUCCESS STATE — the "dramatic" thank-you swap
   ============================================================ */
.form { position: relative; }

.form__body { display: block; }
.form__success { display: none; }

.form.is-success .form__body { display: none; }
.form.is-success .form__success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  animation: successIn 460ms var(--ease) both;
}

@keyframes successIn {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.success__mark {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  border: 1px solid var(--frame);
  box-shadow: 0 14px 30px -10px rgba(157, 211, 59, 0.55);
  animation: checkPop 600ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 60ms;
}
.success__mark svg { width: 28px; height: 28px; }
.success__mark--lg { width: 72px; height: 72px; }
.success__mark--lg svg { width: 36px; height: 36px; }

@keyframes checkPop {
  0%   { transform: scale(0.3); opacity: 0; }
  55%  { transform: scale(1.14); opacity: 1; }
  100% { transform: scale(1); }
}

.success__head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair-hi);
  gap: 12px;
  flex-wrap: wrap;
}

.success__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.028em;
  line-height: 1.02;
  margin: 4px 0 0;
  color: var(--ink);
}
.success__title--lg {
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.032em;
}
.success__title-dim { color: var(--dim); font-weight: 700; }

.success__sub {
  margin: 0;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.45;
  max-width: 60ch;
}
.success__sub strong { color: var(--ink); font-weight: 600; }

[data-success-rank] {
  color: var(--ink);
  font-weight: 700;
}

.btn--sm {
  padding: 10px 16px;
  font-size: 13px;
}

/* Seat pill — micro-bump when the count tweens upward */
.seat-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: transparent;
  font-variant-numeric: tabular-nums;
  transition: background 320ms var(--ease), color 320ms var(--ease),
              border-color 320ms var(--ease), transform 320ms var(--ease),
              box-shadow 320ms var(--ease);
}
.seat-pill.is-bumped {
  background: var(--accent);
  color: var(--ink) !important;
  border-color: var(--frame);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(157, 211, 59, 0.6);
}

/* ============================================================
   FLOATING CTA
   ============================================================ */
.fab {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 60;

  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;

  background: var(--accent);
  color: var(--ink);
  border: 1px solid var(--frame);
  border-radius: var(--r-pill);

  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  text-decoration: none;

  box-shadow: 0 14px 36px -10px rgba(157, 211, 59, 0.55),
              0 2px 0 0 rgba(0, 0, 0, 0.08);
  transition: transform 200ms var(--ease), box-shadow 220ms var(--ease);
}
.fab:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 18px 42px -10px rgba(157, 211, 59, 0.65),
              0 2px 0 0 rgba(0, 0, 0, 0.10);
}
.fab:active { transform: translateX(-50%) translateY(0); }
.fab svg { width: 16px; height: 16px; }
.fab__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.55);
  animation: pulseInk 2.6s var(--ease) infinite;
}
@keyframes pulseInk {
  0%   { box-shadow: 0 0 0 0   rgba(0, 0, 0, 0.45); }
  60%  { box-shadow: 0 0 0 8px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0   rgba(0, 0, 0, 0); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  border-top: 1px solid var(--hair);
  padding: 36px 0 96px;
  background: var(--bg-deep);
}
.foot__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.foot__col { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.foot__tag { margin: 0; }

/* ============================================================
   REVEAL / MOTION — staggered fade + 8px upward translate
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    transition-duration: 0ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .evidence {
    display: flex;
    flex-direction: row;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 14px;
    margin-left: -32px;
    margin-right: -32px;
    padding: 4px 7% 28px;
  }
  .evidence::-webkit-scrollbar { display: none; }
  .evidence__item {
    flex: 0 0 86%;
    max-width: 360px;
    scroll-snap-align: center;
  }
  .steps { grid-template-columns: 1fr; }

  .form__row {
    grid-template-columns: 1fr;
  }
  .btn { width: 100%; }

  .countdown__grid { grid-template-columns: repeat(4, 1fr); }
  .cu { padding: 4px 10px; }
  .cu__n { font-size: clamp(36px, 12vw, 64px); }
}

@media (max-width: 560px) {
  .nav__inner,
  .hero__inner,
  .section__inner,
  .foot__inner {
    padding: 0 20px;
  }

  .fab { padding: 12px 18px; font-size: 14px; bottom: 16px; }

  .evidence {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 7%;
    padding-right: 7%;
  }
  .evidence__item { flex: 0 0 86%; }
  .hero { padding: 36px 0 56px; }
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 32px; }
  .card { padding: 18px; }
  .form--lg { padding: 22px; }

  .display { font-size: clamp(40px, 11vw, 64px); }
  .display--md { font-size: clamp(32px, 9vw, 48px); }
  .lede { font-size: 16px; }

  .countdown__grid { gap: 4px; }
  .cu { padding: 4px 6px; }
  .cu__n { font-size: clamp(28px, 10vw, 44px); }
  .cu__l { font-size: 9px; }

  .nav__pill .mono { font-size: 9px; }
}
