/* ============================================================
   byta — landing page  ·  mobile-first
   Brand: warm off-white canvas, monochrome ink chrome,
   tier hues live ONLY on the score ring (per design system).
   ============================================================ */

:root {
  --bg:        #F7F7F5;
  --bg-card:   #F4F1EC;
  --ink:       #0A0A0A;
  --ink-70:    rgba(10,10,10,0.70);
  --ink-50:    rgba(10,10,10,0.50);
  --ink-40:    rgba(10,10,10,0.40);
  --ink-25:    rgba(10,10,10,0.25);
  --ink-12:    rgba(10,10,10,0.12);
  --ink-06:    rgba(10,10,10,0.06);
  --cream:     #F7F7F5;
  --dark-bg:   #0e0e0e;

  --tier-excellent: #2E8B57;
  --tier-good:      #7AAA55;
  --tier-mediocre:  #CC8844;
  --tier-bad:       #D4564A;

  --serif: "DM Serif Display", Georgia, serif;
  --edit:  "Instrument Serif", Georgia, serif;
  --body:  "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  --pad: 24px;
  --maxw: 480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* warm ambient wash behind everything */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 45% at 50% -5%,  rgba(204,136,68,0.10), transparent 70%),
    radial-gradient(60% 40% at 90% 20%,  rgba(46,139,87,0.06),  transparent 70%),
    radial-gradient(80% 50% at 10% 80%,  rgba(212,86,74,0.05),  transparent 70%);
}

em { font-family: var(--edit); font-style: italic; font-weight: 400; }

/* ─────────────  shared type  ───────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.eyebrow.center { text-align: center; }

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1.05;
  text-align: center;
  margin-top: 8px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark .dot { color: var(--tier-bad); }
.wordmark.small { font-size: 30px; }

/* ─────────────  nav  ───────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background: rgba(247,247,245,0.72);
  border-bottom: 1px solid var(--ink-06);
}
.nav-cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 9px 14px;
  border: 1px solid var(--ink-12);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--ink); color: var(--cream); }

/* ─────────────  hero  ───────────── */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.hero { padding-top: 44px; text-align: center; }
.hero .eyebrow { margin-bottom: 18px; }

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 15vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.015em;
}
.hero-title-alt { display: block; color: var(--ink-70); margin-top: 4px; }

.hero-sub {
  font-size: 17px;
  color: var(--ink-70);
  margin: 22px auto 0;
  max-width: 30ch;
}

.hero-actions {
  display: flex; flex-direction: column; gap: 10px;
  margin: 28px auto 0; max-width: 320px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 15px 22px; border-radius: 14px; border: none;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, opacity .2s, background .2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink-12); }
.btn-ghost:hover { background: var(--bg-card); }

.hero-note {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-40); margin-top: 16px;
}

/* ─────────────  phone demo  ───────────── */
.phone-wrap { margin: 44px auto 0; }
.demo-eyebrow { margin-bottom: 14px; }

/* step indicator */
.demo-steps {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 auto 22px; max-width: 320px;
}
.step {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-40);
  transition: color .3s;
}
.step b {
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink-12); color: var(--ink-50);
  font-weight: 500; font-size: 10px;
  transition: background .3s, color .3s, transform .3s;
}
.step.is-active { color: var(--ink); }
.step.is-active b { background: var(--ink); color: var(--cream); transform: scale(1.08); }
.step.is-done b { background: var(--tier-excellent); color: var(--cream); }
.step-line { flex: 1; max-width: 28px; height: 1px; background: var(--ink-12); }

/* tap-to-play overlay */
.play-overlay {
  position: absolute; inset: 6px; z-index: 9;
  border: none; background: transparent; cursor: pointer;
  border-radius: 40px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; color: var(--cream);
  transition: opacity .35s ease, visibility .35s;
}
.play-overlay::before {
  content: ""; position: absolute; inset: 0; border-radius: 40px;
  background: rgba(10,10,10,0.42);
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
}
.play-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.play-ring {
  position: relative; width: 66px; height: 66px; border-radius: 50%;
  background: rgba(247,247,245,0.16); border: 1.5px solid rgba(247,247,245,0.9);
  display: grid; place-items: center;
}
.play-ring::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 1.5px solid rgba(247,247,245,0.55);
  animation: playPulse 1.9s ease-out infinite;
}
@keyframes playPulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}
.play-icon { position: relative; font-size: 22px; margin-left: 3px; }
.play-label {
  position: relative;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
}
.phone {
  position: relative;
  width: 260px; height: 540px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 46px;
  padding: 6px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.phone:hover { transform: translateY(-4px); }
/* Dynamic Island — floating pill */
.phone-notch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 30px; background: #000; border-radius: 999px; z-index: 6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.screen {
  position: absolute; inset: 6px;
  border-radius: 40px;
  overflow: hidden;
  display: flex; flex-direction: column;
  padding: 58px 20px 22px;
  animation: screenIn .45s cubic-bezier(.2,.8,.2,1);
}
.screen[hidden] { display: none; }
@keyframes screenIn {
  from { opacity: 0; transform: scale(1.02); }
  to   { opacity: 1; transform: scale(1); }
}

/* scan screen (dark camera) */
.screen-scan {
  background: radial-gradient(100% 70% at 50% 35%, #2a2622 0%, #0e0e0e 80%);
  color: var(--cream);
  align-items: center;
}
.scan-eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  color: rgba(247,247,245,0.6); margin-bottom: 28px;
}
.reticle {
  position: relative; width: 168px; height: 120px; margin-bottom: 26px;
}
.corner {
  position: absolute; width: 22px; height: 22px;
  border: 2px solid rgba(247,247,245,0.85);
}
.corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 6px 0 0 0; }
.corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 6px 0 0; }
.corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 6px; }
.corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 6px 0; }
.barcode {
  position: absolute; inset: 30px 22px;
  background: repeating-linear-gradient(90deg,
    rgba(247,247,245,0.85) 0 3px, transparent 3px 7px,
    rgba(247,247,245,0.85) 7px 9px, transparent 9px 15px);
  opacity: 0.5;
}
.scan-line {
  position: absolute; left: 8px; right: 8px; height: 2px;
  background: linear-gradient(90deg, transparent, #7AAA55, transparent);
  box-shadow: 0 0 12px 2px rgba(122,170,85,0.5);
  animation: scanMove 1.6s ease-in-out infinite;
}
@keyframes scanMove {
  0%,100% { top: 12%; } 50% { top: 84%; }
}
.scan-status { width: 100%; }
.scan-row {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em;
  color: rgba(247,247,245,0.85); padding: 5px 0;
  padding-left: 20px; position: relative;
}
.scan-row::before { content: "✓"; position: absolute; left: 0; color: #7AAA55; }
.scan-row.pending { color: rgba(247,247,245,0.5); }
.scan-row.pending::before { content: "◐"; color: rgba(247,247,245,0.5); }

/* result screen */
.screen-result { background: var(--bg); }
.result-eyebrow, .swap-headline ~ * { }
.result-eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--ink-40); margin-bottom: 18px;
}
.result-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }

.ring {
  --pct: 0; --tier: var(--tier-bad);
  position: relative; flex: 0 0 auto;
  width: 88px; height: 88px; border-radius: 50%;
  background:
    conic-gradient(var(--tier) calc(var(--pct) * 1%), color-mix(in srgb, var(--tier) 15%, transparent) 0);
  display: grid; place-items: center;
  transition: background .1s linear;
}
.ring::after {
  content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--bg);
}
.ring-num {
  position: relative; z-index: 1;
  font-family: var(--serif); font-size: 34px; color: var(--tier); line-height: 1;
}
.result-meta { text-align: left; }
.result-name { font-family: var(--serif); font-size: 22px; line-height: 1.05; }
.result-brand { font-size: 13px; color: var(--ink-50); margin-top: 2px; }
.tier-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-70); margin-top: 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.dot-i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-40); }

.drivers { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.drivers li {
  font-size: 13px; color: var(--ink-70); line-height: 1.35;
  display: flex; gap: 9px; align-items: flex-start;
  padding: 11px 12px; background: var(--bg-card); border-radius: 12px;
}
.flag { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; }
.flag.bad { background: var(--tier-bad); }
.flag.mid { background: var(--tier-mediocre); }

.swap-cta {
  margin-top: auto; width: 100%;
  font-family: var(--body); font-weight: 600; font-size: 14px;
  padding: 14px; border-radius: 14px; border: none;
  background: var(--ink); color: var(--cream); cursor: pointer;
  transition: transform .12s;
}
.swap-cta:active { transform: scale(0.97); }
.swap-cta.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink-12); }

/* swap — bottom sheet overlay */
.overlay-layer {
  position: absolute; inset: 6px; z-index: 8;
  border-radius: 40px; overflow: hidden; pointer-events: none;
  /* Safari/WebKit: overflow+border-radius won't clip a transformed child
     (the sliding sheet) unless the clipping box is forced onto its own layer.
     A mask + isolation makes WebKit respect the rounded clip. */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  isolation: isolate;
  transform: translateZ(0);
}
.overlay-layer.open { pointer-events: auto; }
.sheet-backdrop {
  position: absolute; inset: 0; background: rgba(10,10,10,0.30);
  opacity: 0; transition: opacity .4s ease;
}
.overlay-layer.open .sheet-backdrop { opacity: 1; }
.swap-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 90%;
  background: var(--bg);
  border-radius: 34px 34px 40px 40px;
  padding: 12px 20px 18px;
  display: flex; flex-direction: column;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.18);
  transform: translateY(112%);
  transition: transform .5s cubic-bezier(.22,.9,.28,1);
}
.overlay-layer.open .swap-sheet { transform: translateY(0); }
.sheet-grab {
  width: 40px; height: 4px; border-radius: 999px; background: var(--ink-12);
  margin: 2px auto 14px;
}
.swap-headline {
  font-family: var(--serif); font-weight: 400; font-size: 28px;
  line-height: 1.0; margin: 2px 0 16px;
}
.compare { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.compare-card {
  flex: 1; background: var(--bg-card); border-radius: 16px;
  padding: 16px 10px; text-align: center;
}
.compare-card.faded { opacity: 0.5; }
.mini-ring {
  width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 22px; color: var(--tier);
  border: 3px solid var(--tier);
}
.compare-name { font-size: 12px; font-weight: 600; line-height: 1.2; }
.arrow { font-size: 20px; color: var(--ink-25); flex: 0 0 auto; }
.delta-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.delta {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.03em;
  padding: 6px 10px; border-radius: 999px; background: var(--bg-card); color: var(--ink-70);
}
.swap-sheet .swap-cta { margin-top: auto; }

.phone-caption {
  text-align: center; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-40);
  margin-top: 20px;
}
.phone-caption span { color: var(--ink-25); }

/* ─────────────  section rhythm  ───────────── */
section:not(.hero) { padding-top: 84px; }
.loop, .tiers, .promise, .waitlist { text-align: center; }

/* loop */
.loop-grid { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.loop-card {
  background: var(--bg-card); border-radius: 18px; padding: 22px 20px;
  text-align: left; position: relative; overflow: hidden;
}
.loop-num {
  font-family: var(--edit); font-style: italic; font-size: 38px;
  color: var(--ink-25); position: absolute; top: 14px; right: 18px; line-height: 1;
}
.loop-card h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; }
.loop-card p { font-size: 14px; color: var(--ink-70); margin-top: 6px; max-width: 34ch; }

/* tiers — hollow score rings, echoing the app's <ScoreRing> */
.tier-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 30px 0 22px;
}
.tier-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 12px 18px;
  border: 1px solid var(--ink-06);
  border-radius: 18px;
  background: var(--bg-card);
}
.tier-ring {
  --pct: 0;
  position: relative; width: 70px; height: 70px; border-radius: 50%;
  background: conic-gradient(
    var(--t) calc(var(--pct) * 1%),
    color-mix(in srgb, var(--t) 15%, transparent) 0
  );
  display: grid; place-items: center;
}
.tier-ring::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg-card);
}
.tier-score {
  position: relative; z-index: 1;
  font-family: var(--serif); font-size: 27px; color: var(--t); line-height: 1;
}
.tier-name { font-weight: 600; font-size: 15px; }
.tier-range {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.07em;
  color: var(--ink-40); margin-top: -4px;
}
.tiers-note { font-size: 14px; color: var(--ink-70); max-width: 34ch; margin: 0 auto; }
.tiers-note strong { font-weight: 600; }

/* promise */
.promise-quote {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 9vw, 42px); line-height: 1.05; margin: 14px 0 20px;
}
.promise-body { font-size: 15px; color: var(--ink-70); max-width: 36ch; margin: 0 auto 30px; }
.promise-vs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left;
}
.vs-col { padding: 18px 16px; border-radius: 16px; }
.vs-them { background: var(--bg-card); }
.vs-us { background: var(--ink); color: var(--cream); }
.vs-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-40); display: block; margin-bottom: 8px;
}
.vs-us .vs-tag { color: rgba(247,247,245,0.6); }
.vs-col p { font-size: 14px; line-height: 1.35; }

/* waitlist */
.waitlist-sub { font-size: 15px; color: var(--ink-70); max-width: 34ch; margin: 12px auto 24px; }
.waitlist-form {
  display: flex; flex-direction: column; gap: 10px; max-width: 340px; margin: 0 auto;
}
.waitlist-form input {
  font-family: var(--body); font-size: 15px;
  padding: 15px 18px; border-radius: 14px;
  border: 1px solid var(--ink-12); background: var(--bg-card); color: var(--ink);
  text-align: center;
}
.waitlist-form input::placeholder { color: var(--ink-25); }
.hp-field {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.waitlist-form input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.form-msg {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  min-height: 18px; margin-top: 14px; color: var(--tier-excellent);
}
.form-msg.error { color: var(--tier-bad); }

/* footer */
.footer {
  text-align: center; padding: 70px var(--pad) 48px; margin-top: 84px;
  border-top: 1px solid var(--ink-06);
}
.footer-tag { font-family: var(--edit); font-style: italic; font-size: 18px; color: var(--ink-70); margin-top: 6px; }
.footer-legal {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
  color: var(--ink-40); margin-top: 18px;
}

/* ─────────────  reveal on scroll  ───────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ─────────────  tablet / desktop polish  ───────────── */
@media (min-width: 720px) {
  :root { --maxw: 680px; }
  .hero-actions { flex-direction: row; justify-content: center; }
  .hero-actions .btn { flex: 0 1 200px; }
  .loop-grid { flex-direction: row; }
  .loop-card { flex: 1; }
  .tier-row { grid-template-columns: repeat(4, 1fr); }
}
