/* ==========================================================================
   Tiebreak — landing page
   Shares the app's tokens (css/styles.css): warm paper
   surfaces, near-black ink, lime accent, Space Grotesk + IBM Plex Mono.
   Mobile-first; widens into two columns from 900px.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --surface-page:   #f6f6f1;
  --surface-raised: #ffffff;
  --surface-dark:   #171a14;
  --surface-dark-2: #21251c;

  --ink:    #171a14;
  --ink-70: rgba(23, 26, 20, .70);
  --ink-60: rgba(23, 26, 20, .60);
  --ink-45: rgba(23, 26, 20, .45);
  --ink-20: rgba(23, 26, 20, .20);
  --ink-12: rgba(23, 26, 20, .12);
  --ink-08: rgba(23, 26, 20, .08);

  --paper:    #f6f6f1;
  --paper-70: rgba(246, 246, 241, .70);
  --paper-60: rgba(246, 246, 241, .60);
  --paper-45: rgba(246, 246, 241, .45);
  --paper-20: rgba(246, 246, 241, .20);
  --paper-12: rgba(246, 246, 241, .12);

  --accent:        #c9f24b;
  --accent-edge:   #a4ce1d;
  --accent-border: #8fb51a;
  --accent-text:   #5a7311;
  --accent-tile:   #e9f5c4;

  --font-ui:   'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --r-card: 16px;
  --r-row:  12px;
  --r-pill: 99px;

  --gutter: 16px;
  --max:    1160px;

  --glow-cta:    0 6px 11px rgba(143, 181, 26, .45);
  --glow-chip:   0 2px 6px rgba(143, 181, 26, .35);
  --shadow-card: 0 1px 0 rgba(23, 26, 20, .04);
  --shadow-lift: 0 24px 60px rgba(0, 0, 0, .45);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur:  200ms;
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--ink);
  font: 400 17px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--ink); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 780px; }
@media (min-width: 640px) { :root { --gutter: 32px; } }

.hl { color: var(--accent); }

.eyebrow {
  font: 500 14px/1 var(--font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-45);
}
.eyebrow--accent { color: var(--accent-text); }
.hero .eyebrow--accent, .price-card .eyebrow--accent { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent-border); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font: 600 17px/1 var(--font-ui);
  text-decoration: none; white-space: nowrap;
  transition: transform var(--dur) var(--ease), filter var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent); color: var(--ink);
  border-color: var(--accent-edge);
  box-shadow: var(--glow-cta);
}
.btn--primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn--outline-light { color: var(--paper); border-color: var(--paper-20); }
.btn--outline-light:hover { background: var(--paper-12); }
.btn--ghost { min-height: 40px; padding: 8px 16px; border-color: var(--ink-20); font-size: 15px; }
.btn--ghost:hover { background: var(--ink-08); }
.btn--block { display: flex; width: 100%; }

/* --------------------------------------------------------------------------
   4. Nav
   -------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 246, 241, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--ink-08); }
.nav__inner { display: flex; align-items: center; gap: 16px; height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 20px/1 var(--font-ui); letter-spacing: -.3px;
  text-decoration: none;
}
.brand__mark {
  position: relative;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--accent-border);
  overflow: hidden;
}
/* Ball seam */
.brand__mark::before, .brand__mark::after {
  content: ""; position: absolute; top: -4px; width: 16px; height: 34px;
  border: 1.5px solid var(--accent-border); border-radius: 50%;
}
.brand__mark::before { left: -10px; }
.brand__mark::after  { right: -10px; }
.brand--small { font-size: 17px; }
.brand--small .brand__mark { width: 20px; height: 20px; }

.nav__links { display: none; gap: 28px; margin-left: 24px; }
.nav__links a { font-size: 15px; font-weight: 500; color: var(--ink-70); text-decoration: none; }
.nav__links a:hover { color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
@media (min-width: 900px) { .nav__links { display: flex; } }
@media (max-width: 379px) { .nav__signin { display: none; } }

.lang {
  display: inline-flex; padding: 3px;
  background: var(--ink-08); border-radius: var(--r-pill);
}
.lang__btn {
  min-width: 40px; height: 32px; padding: 0 10px;
  border: 0; border-radius: var(--r-pill);
  background: none;
  font: 500 13px/1 var(--font-mono); color: var(--ink-60);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang__btn[aria-pressed="true"] { background: var(--surface-dark); color: var(--accent); }

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--surface-dark);
  color: var(--paper);
  overflow: hidden;
}
/* Lime glow behind the phone */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 80% 40%, rgba(201, 242, 75, .14), transparent 70%);
}
.hero__inner {
  position: relative;
  display: grid; gap: 56px;
  padding-top: 56px; padding-bottom: 72px;
}
.hero__copy { display: flex; flex-direction: column; gap: 22px; max-width: 600px; container-type: inline-size; }
.hero__title {
  font: 700 clamp(42px, 9vw, 76px)/1 var(--font-ui);
  letter-spacing: -.03em;
}
.hero__lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--paper-70); max-width: 520px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero__ticks {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin: 4px 0 0; padding: 0; list-style: none;
  font: 400 14px/1.3 var(--font-mono); color: var(--paper-60);
}
.hero__ticks li { display: flex; align-items: center; gap: 8px; }
/* All on one row or one per row, never 2 + 1: stack them once the copy column is too narrow for the row. */
@container (max-width: 560px) {
  .hero__ticks { flex-direction: column; }
}
.hero__ticks li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(201, 242, 75, .18);
}

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.15fr .85fr; align-items: center; padding-top: 88px; padding-bottom: 104px; }
}
@media (max-width: 479px) {
  .hero__ctas .btn { flex: 1 1 100%; }
}

/* Phone mock ---------------------------------------------------------------- */
.phone {
  position: relative;
  justify-self: center;
  width: min(100%, 340px);
  padding: 10px;
  border-radius: 44px;
  background: #0d0f0b;
  box-shadow: 0 0 0 1px var(--paper-12), var(--shadow-lift);
  transform: rotate(-2deg);
  animation: float 7s ease-in-out infinite;
}
.phone__screen {
  overflow: hidden;
  border-radius: 34px;
  background: var(--surface-page);
  color: var(--ink);
}
.mock-hero {
  display: flex; flex-direction: column; gap: 10px;
  padding: 34px 18px 18px;
  background: var(--surface-dark); color: var(--paper);
}
.mock-row { display: flex; justify-content: space-between; align-items: center; }
.mock-eyebrow { font: 500 11px var(--font-mono); text-transform: uppercase; color: var(--accent); }
.mock-chip {
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--ink);
  font: 600 11px/1 var(--font-ui); box-shadow: var(--glow-chip);
}
.mock-when  { font: 700 28px/1.05 var(--font-ui); letter-spacing: -.5px; }
.mock-where { font-size: 13px; color: var(--paper-60); }
.mock-balance {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--paper-12);
  font: 500 11px var(--font-mono); text-transform: uppercase; color: var(--paper-45);
}
.mock-balance strong { font: 600 15px var(--font-ui); color: var(--paper); text-transform: none; }

.mock-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 14px 18px; }
.mock-label { font: 500 11px var(--font-mono); text-transform: uppercase; color: var(--ink-45); margin-bottom: 2px; }
.mock-card {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--ink-08); border-radius: var(--r-row);
  background: var(--surface-raised);
}
.mock-card--on { border-color: var(--accent-border); background: #fafdee; }
.mock-card div { display: flex; flex-direction: column; gap: 2px; }
.mock-card strong { font: 600 14px/1.2 var(--font-ui); }
.mock-card span   { font-size: 12px; color: var(--ink-45); }
.mock-card--muted strong { color: var(--ink-45); }
.mock-toggle {
  position: relative; flex: none;
  width: 34px; height: 20px; border-radius: var(--r-pill);
  background: var(--ink-12);
}
.mock-toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.mock-toggle--on { background: var(--accent-edge); }
.mock-toggle--on::after { left: 16px; }
.mock-cta {
  margin-top: 6px; padding: 11px;
  border-radius: var(--r-pill);
  background: var(--accent); box-shadow: var(--glow-cta);
  text-align: center; font: 600 15px/1 var(--font-ui);
}

.phone__toast {
  position: absolute; left: -18px; bottom: 96px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 12px;
  border-radius: 14px;
  background: var(--surface-raised); color: var(--ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  transform: rotate(2deg);
  animation: pop 7s var(--ease) infinite;
}
.phone__toast span:last-child { display: flex; flex-direction: column; }
.phone__toast strong { font: 600 14px/1.2 var(--font-ui); }
.phone__toast small  { font: 400 11px/1.3 var(--font-mono); color: var(--ink-45); }
.phone__toast-dot {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171a14' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (max-width: 379px) { .phone__toast { left: -6px; } }

@keyframes float {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50%      { transform: rotate(-2deg) translateY(-10px); }
}
@keyframes pop {
  0%, 8%    { opacity: 0; transform: rotate(2deg) translateY(8px) scale(.96); }
  14%, 86%  { opacity: 1; transform: rotate(2deg) translateY(0) scale(1); }
  94%, 100% { opacity: 0; transform: rotate(2deg) translateY(8px) scale(.96); }
}

/* --------------------------------------------------------------------------
   6. Stat strip
   -------------------------------------------------------------------------- */
.strip { background: var(--accent); border-bottom: 1px solid var(--accent-border); }
.strip__inner { display: grid; gap: 0; }
.stat {
  display: flex; align-items: baseline; gap: 16px;
  padding: 22px 0;
  border-top: 1px solid rgba(23, 26, 20, .14);
}
.stat:first-child { border-top: 0; }
.stat__num { flex: none; min-width: 108px; font: 700 34px/1 var(--font-ui); letter-spacing: -.03em; }
.stat__txt { font-size: 15px; line-height: 1.35; color: var(--ink-70); }
@media (min-width: 768px) {
  .strip__inner { grid-template-columns: repeat(3, 1fr); }
  .stat { flex-direction: column; gap: 8px; padding: 32px 28px; border-top: 0; border-left: 1px solid rgba(23, 26, 20, .14); }
  .stat:first-child { border-left: 0; padding-left: 0; }
  .stat__num { font-size: 44px; }
}

/* --------------------------------------------------------------------------
   7. Sections
   -------------------------------------------------------------------------- */
.section { padding: 80px 0; }
.section--raised { background: var(--surface-raised); border-top: 1px solid var(--ink-08); border-bottom: 1px solid var(--ink-08); }
.section__title {
  margin-top: 14px;
  max-width: 720px;
  font: 700 clamp(32px, 5.5vw, 52px)/1.04 var(--font-ui);
  letter-spacing: -.025em;
}
.section__lead { margin-top: 18px; max-width: 560px; font-size: 18px; color: var(--ink-60); }
@media (min-width: 900px) { .section { padding: 112px 0; } }

/* Steps -------------------------------------------------------------------- */
.steps {
  display: grid; gap: 16px;
  margin: 48px 0 0; padding: 0; list-style: none;
}
.step {
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px;
  border: 1px solid var(--ink-08); border-radius: var(--r-card);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}
.step__num { font: 500 14px/1 var(--font-mono); color: var(--accent-text); }
.step__title { font: 600 22px/1.2 var(--font-ui); letter-spacing: -.01em; }
.step p { color: var(--ink-60); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.ladder { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 10px; }
.ladder__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--ink-08); border-radius: var(--r-row);
  font-weight: 500; font-size: 15px;
}
.ladder__item b {
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 8px;
  background: var(--ink-08); font: 500 13px var(--font-mono);
}
.ladder__item--first { border-color: var(--accent-border); background: #fafdee; }
.ladder__item--first b { background: var(--accent); }

.timeline { margin-top: auto; padding-top: 14px; }
.timeline__track { display: flex; align-items: center; }
.timeline__start, .timeline__end { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.timeline__start { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tile); }
.timeline__end   { background: var(--ink); }
.timeline__line  { flex: 1; height: 2px; margin: 0 6px; background: repeating-linear-gradient(90deg, var(--ink-20) 0 6px, transparent 6px 10px); }
.timeline__labels { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-top: 10px; }
.timeline__labels > span { display: flex; flex-direction: column; gap: 2px; }
.timeline__right { text-align: right; }
.timeline__who  { font: 500 11px var(--font-mono); text-transform: uppercase; color: var(--ink-45); }
.timeline__who--bot { color: var(--accent-text); }
.timeline__when { font: 600 15px var(--font-ui); }
.timeline__lead {
  align-self: center;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--ink-08); font: 500 12px var(--font-mono);
}

/* Features ------------------------------------------------------------------ */
.features { display: grid; gap: 28px 32px; margin-top: 48px; }
.feature { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 1px solid var(--ink-12); }
.feature h3 { font: 600 20px/1.25 var(--font-ui); }
.feature p  { color: var(--ink-60); font-size: 16px; }
.feature__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 6px;
  border-radius: var(--r-row); background: var(--accent-tile);
}
.feature__icon svg {
  width: 22px; height: 22px;
  fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }

/* Pricing ------------------------------------------------------------------- */
.pricing { display: grid; gap: 40px; align-items: center; }
.price-card {
  display: flex; flex-direction: column; gap: 20px;
  padding: 28px;
  border-radius: 24px;
  background: var(--surface-dark); color: var(--paper);
  box-shadow: 0 20px 50px rgba(23, 26, 20, .18);
}
.price-card__list { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.price-card__list li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; }
.price-card__list li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171a14' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.price-card .btn { margin-top: 8px; }
@media (min-width: 900px) {
  .pricing { grid-template-columns: 1.1fr .9fr; gap: 72px; }
  .price-card { padding: 40px; }
}

/* FAQ ----------------------------------------------------------------------- */
.faq { margin-top: 40px; border-top: 1px solid var(--ink-12); }
.faq details { border-bottom: 1px solid var(--ink-12); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0;
  font: 600 19px/1.3 var(--font-ui);
  list-style: none; cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink-08);
  font: 400 20px/1 var(--font-mono);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--accent); }
.faq details p { padding: 0 48px 24px 0; color: var(--ink-60); }

/* Final CTA ----------------------------------------------------------------- */
.final { background: var(--surface-dark); color: var(--paper); }
.final__inner {
  display: flex; flex-direction: column; align-items: flex-start; gap: 28px;
  padding-top: 88px; padding-bottom: 88px;
}
.final__title {
  max-width: 820px;
  font: 700 clamp(34px, 6vw, 60px)/1.02 var(--font-ui);
  letter-spacing: -.03em;
}
@media (min-width: 900px) {
  .final__inner { flex-direction: row; align-items: flex-end; justify-content: space-between; padding-top: 120px; padding-bottom: 120px; }
}

/* Footer -------------------------------------------------------------------- */
.footer { background: var(--surface-dark); color: var(--paper-60); border-top: 1px solid var(--paper-12); }
.footer .brand { color: var(--paper); }
.footer__inner {
  display: flex; flex-direction: column; gap: 10px;
  padding-top: 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom));
  font-size: 14px;
}
.footer__copy { font-family: var(--font-mono); font-size: 13px; }
@media (min-width: 768px) {
  .footer__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
}

/* --------------------------------------------------------------------------
   8. Reveal on scroll
   -------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
