/* TiltProof — landing site. Tokens mirror TiltProof/Theme.swift exactly. */

:root {
  --ink: #1e2022;
  --charcoal: #2d2f31;
  --raised: #3a3d40;
  --slate: #50545a;
  --coral: #ff5757;
  --coral-soft: #ff7d7d;
  --coral-deep: #e23e3e;
  --gold: #e8b54a;
  --good: #2ecf7f;
  --leak: #f6b73c;
  --mistake: #e5484d;
  --sky: #6cb8f6;
  --text: #f4f4f5;
  --muted: #a6a9ae;
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

::selection { background: rgba(255, 87, 87, 0.35); }

a { color: var(--coral); text-decoration: none; }
a:hover { color: var(--coral-soft); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- reveal-on-scroll system ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(30, 32, 34, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand em { font-style: normal; color: var(--coral); }
.nav-links { display: flex; gap: 26px; align-items: center; font-size: 14.5px; font-weight: 600; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--coral); color: #fff !important;
  padding: 8px 16px; border-radius: 99px; font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(255, 87, 87, 0.4); }

/* ---------- hero ---------- */
header.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 110px 0 70px;
  background:
    radial-gradient(1100px 620px at 78% 18%, rgba(255, 87, 87, 0.10), transparent 62%),
    radial-gradient(900px 700px at 12% 88%, rgba(232, 181, 74, 0.05), transparent 60%),
    var(--ink);
  overflow: hidden;
}
.suits { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.suit {
  position: absolute; font-size: var(--s, 90px); opacity: 0.05;
  color: var(--coral);
  animation: drift 16s ease-in-out infinite alternate;
  animation-delay: var(--ad, 0s);
  will-change: transform;
}
.suit.gold { color: var(--gold); }
@keyframes drift {
  from { transform: translateY(-14px) rotate(-7deg); }
  to   { transform: translateY(16px) rotate(8deg); }
}

.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; position: relative; z-index: 1; }

.hero h1 { font-size: clamp(38px, 5.2vw, 62px); line-height: 1.06; font-weight: 850; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero .tagline {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.hero .tagline::before { content: ""; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; }
.hero p.sub { margin: 22px 0 30px; font-size: 18.5px; color: var(--muted); max-width: 480px; }
.hero p.sub strong { color: var(--text); font-weight: 650; }

.store-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 11px;
  background: #000; border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 13px; padding: 10px 22px 10px 16px; color: #fff !important;
  transition: transform 0.2s, box-shadow 0.2s;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.store-badge svg { width: 26px; height: 26px; }
.store-badge .txt { line-height: 1.15; text-align: left; }
.store-badge .txt small { display: block; font-size: 10.5px; color: #cfcfd2; }
.store-badge .txt span { font-size: 19px; font-weight: 650; }
.play-money-chip {
  font-size: 12.5px; color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 99px; padding: 7px 14px;
}
.play-money-chip b { color: var(--good); font-weight: 700; }

/* phone mockup */
.phone-stage { display: flex; justify-content: center; perspective: 1100px; }
.phone {
  width: min(310px, 78vw); aspect-ratio: 1320 / 2868;
  border-radius: 46px; padding: 11px;
  background: linear-gradient(160deg, #46494d, #202225 60%);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.09),
    0 0 120px rgba(255, 87, 87, 0.12);
  transform-style: preserve-3d;
  animation: float 7s ease-in-out infinite alternate;
  will-change: transform;
}
.phone .screen { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--ink); position: relative; }
.phone .screen img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease; }
.phone .screen img.on { opacity: 1; }
@keyframes float { from { transform: translateY(-10px) rotateY(-4deg) rotateX(1.5deg); } to { transform: translateY(10px) rotateY(4deg) rotateX(-1.5deg); } }

/* ---------- problem strip ---------- */
.problem {
  background: linear-gradient(180deg, var(--ink), #232528 50%, var(--ink));
  padding: 110px 0; text-align: center;
}
.problem h2 { font-size: clamp(26px, 3.6vw, 42px); font-weight: 800; line-height: 1.25; max-width: 880px; margin: 0 auto; letter-spacing: -0.01em; }
.problem h2 .strike { color: var(--muted); }
.problem h2 em { font-style: normal; color: var(--coral); }
.problem p { color: var(--muted); margin-top: 18px; font-size: 17px; }

/* ---------- section scaffolding ---------- */
section.block { padding: 110px 0; position: relative; }
.kicker {
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--coral); margin-bottom: 14px;
}
.block h2.title { font-size: clamp(30px, 4vw, 46px); font-weight: 830; letter-spacing: -0.02em; line-height: 1.1; }
.block p.lead { color: var(--muted); font-size: 17.5px; margin-top: 16px; max-width: 520px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }

/* ---------- coaching card (live recreation) ---------- */
.coach-card {
  background: linear-gradient(165deg, #34373b, var(--charcoal) 70%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  padding: 26px;
  max-width: 460px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  margin: 0 auto;
}
.coach-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sev-chip {
  font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--mistake); background: rgba(229, 72, 77, 0.14);
  border: 1px solid rgba(229, 72, 77, 0.4);
  padding: 5px 12px; border-radius: 99px;
}
.cost-badge {
  font-variant-numeric: tabular-nums;
  font-size: 21px; font-weight: 850; color: var(--mistake);
  background: rgba(229, 72, 77, 0.1); border-radius: 12px; padding: 4px 12px;
}
.coach-card h3 { font-size: 21px; font-weight: 800; margin: 10px 0 2px; }
.coach-card .spot { font-size: 13.5px; color: var(--muted); margin-bottom: 20px; }
.coach-card .spot b { color: var(--gold); font-weight: 700; }

.eq-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.eq-label b { color: var(--text); }
.equity-bar { position: relative; height: 14px; border-radius: 99px; background: var(--raised); overflow: visible; }
.equity-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--coral-deep), var(--mistake));
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}
.in .equity-fill { width: 28%; }
.equity-tick {
  position: absolute; top: -5px; bottom: -5px; left: 33%; width: 3px;
  background: var(--text); border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}
.equity-tick::after {
  content: "price: 33%"; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap;
}

.alts { display: flex; gap: 10px; margin-top: 26px; }
.alt {
  flex: 1; text-align: center; border-radius: 14px; padding: 12px 8px 10px;
  background: var(--raised); border: 1px solid transparent; font-variant-numeric: tabular-nums;
}
.alt small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.alt b { font-size: 15.5px; font-weight: 800; }
.alt.best { border-color: rgba(46, 207, 127, 0.5); background: rgba(46, 207, 127, 0.1); }
.alt.best b { color: var(--good); }
.alt.you { border-color: rgba(229, 72, 77, 0.5); background: rgba(229, 72, 77, 0.09); }
.alt.you b { color: var(--mistake); }
.alt .tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.07em; border-radius: 99px; padding: 2px 8px; margin-top: 6px; }
.alt.best .tag { background: var(--good); color: #06301b; }
.alt.you .tag { background: var(--mistake); color: #fff; }

.coach-note { margin-top: 22px; font-size: 14.5px; color: var(--muted); border-left: 3px solid var(--coral); padding-left: 14px; }
.coach-note b { color: var(--text); }

/* ---------- tiltscore gauge ---------- */
.gauge-stage { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gauge-wrap { position: relative; width: min(340px, 80vw); }
.gauge-wrap svg { width: 100%; height: auto; display: block; }
.gauge-track { fill: none; stroke: var(--raised); stroke-width: 22; stroke-linecap: round; }
.gauge-arc {
  fill: none; stroke: url(#gaugeGrad); stroke-width: 22; stroke-linecap: round;
  filter: drop-shadow(0 0 14px rgba(255, 87, 87, 0.35));
}
.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 8px; }
.gauge-num { font-size: 78px; font-weight: 850; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.gauge-tier {
  margin-top: 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); transition: color 0.4s;
}
.gauge-trend { margin-top: 6px; font-size: 15px; font-weight: 700; color: var(--good); opacity: 0; transition: opacity 0.6s 1.6s; }
.in .gauge-trend { opacity: 1; }

/* ---------- feature grid + neon chase ---------- */
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 54px; }
@property --chase { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.feature {
  position: relative; border-radius: var(--radius);
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 30px 28px;
  overflow: hidden;
  transition: transform 0.25s;
}
.feature:hover { transform: translateY(-4px); }
.feature::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--chase), transparent 0 78%, var(--fc, var(--coral)) 88%, transparent 98%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s;
}
.feature:hover::before { opacity: 1; animation: chase 2.6s linear infinite; }
@keyframes chase { to { --chase: 360deg; } }
.feature .ico {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: rgba(255, 87, 87, 0.12); margin-bottom: 18px;
}
.feature h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.feature p { font-size: 14.5px; color: var(--muted); }

/* ---------- screenshot rail ---------- */
.rail-block { background: linear-gradient(180deg, var(--ink), #232528 40%, var(--ink)); }
.rail {
  display: flex; gap: 26px; overflow-x: auto; padding: 54px 24px 30px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  max-width: 1220px; margin: 0 auto;
}
.rail::-webkit-scrollbar { display: none; }
.shot {
  flex: 0 0 auto; width: 232px; scroll-snap-align: center;
  border-radius: 34px; padding: 8px;
  background: linear-gradient(160deg, #46494d, #202225 60%);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  opacity: 0; transform: translateY(40px) rotate(var(--rot, 0deg));
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.shot.in { opacity: 1; transform: translateY(0) rotate(0deg); }
.shot img { width: 100%; display: block; border-radius: 27px; }
.shot figcaption { text-align: center; font-size: 13px; font-weight: 650; color: var(--muted); padding: 12px 0 6px; }

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 26px; margin-top: 54px; align-items: stretch; }
.plan {
  border-radius: var(--radius); padding: 34px 32px;
  background: var(--charcoal); border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column;
}
.plan.pro {
  background: linear-gradient(165deg, #3b2f30, var(--charcoal) 55%);
  border: 1px solid rgba(255, 87, 87, 0.35);
  box-shadow: 0 30px 80px rgba(255, 87, 87, 0.08);
  position: relative;
}
.plan .plan-name { font-size: 14px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.plan.pro .plan-name { color: var(--coral); }
.plan .plan-price { font-size: 34px; font-weight: 850; margin: 12px 0 2px; letter-spacing: -0.02em; }
.plan .plan-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.plan li { display: flex; gap: 11px; align-items: baseline; }
.plan li::before { content: "✓"; color: var(--good); font-weight: 800; }
.plan li.dim { color: var(--slate); }
.plan li.dim::before { content: "—"; color: var(--slate); }
.pro-tiers { display: flex; gap: 10px; margin: 6px 0 22px; flex-wrap: wrap; }
.tier {
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 13px; padding: 10px 14px;
  font-size: 13px; color: var(--muted); text-align: center; flex: 1; min-width: 96px;
}
.tier b { display: block; color: var(--text); font-size: 16.5px; font-weight: 800; margin-bottom: 1px; }
.tier.hot { border-color: rgba(232, 181, 74, 0.55); background: rgba(232, 181, 74, 0.07); }
.tier.hot small { color: var(--gold); font-weight: 700; }

/* ---------- faq ---------- */
.faq-list { max-width: 720px; margin: 46px auto 0; display: flex; flex-direction: column; gap: 12px; }
details {
  background: var(--charcoal); border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px; overflow: hidden;
}
details summary {
  cursor: pointer; list-style: none; padding: 19px 22px;
  font-weight: 700; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--coral); transition: transform 0.3s; flex-shrink: 0; }
details[open] summary::after { transform: rotate(45deg); }
details .a { padding: 0 22px 20px; color: var(--muted); font-size: 15px; }
details .a a { font-weight: 650; }

/* ---------- final cta ---------- */
.final {
  text-align: center; padding: 130px 0 120px;
  background:
    radial-gradient(700px 420px at 50% 0%, rgba(255, 87, 87, 0.12), transparent 65%),
    var(--ink);
}
.final h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 850; letter-spacing: -0.02em; }
.final h2 em { font-style: normal; color: var(--coral); }
.final p { color: var(--muted); margin: 16px 0 34px; font-size: 17px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid rgba(255, 255, 255, 0.07); padding: 44px 0 54px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
footer .cols { display: flex; gap: 26px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
.legal-line { width: 100%; margin-top: 18px; font-size: 12.5px; color: var(--slate); }

/* ---------- support page ---------- */
.page-head { padding: 150px 0 60px; text-align: center; }
.page-head h1 { font-size: clamp(32px, 4.5vw, 50px); font-weight: 850; letter-spacing: -0.02em; }
.page-head p { color: var(--muted); margin-top: 14px; font-size: 17px; }
.contact-card {
  max-width: 720px; margin: 40px auto 0; text-align: center;
  background: linear-gradient(165deg, #34373b, var(--charcoal) 70%);
  border: 1px solid rgba(255, 255, 255, 0.09); border-radius: var(--radius); padding: 40px 32px;
}
.btn-coral {
  display: inline-block; background: var(--coral); color: #fff !important;
  font-weight: 800; font-size: 16px; padding: 14px 30px; border-radius: 99px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-coral:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(255, 87, 87, 0.45); }
.contact-card .alt-link { display: block; margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding-top: 96px; min-height: auto; }
  .split .visual { order: -1; }
  .grid4 { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .suit, .phone { animation: none; }
  .reveal, .shot { transition: opacity 0.4s; transform: none; }
  .feature:hover::before { animation: none; opacity: 0.5; }
  .equity-fill { transition: width 0.4s; }
}
