/* tiltGuard landing — design tokens + base layout */
:root {
  --bg: #070a08;
  --bg-2: #0a1210;
  --text: #f2f5f0;
  --muted: #93a19a;
  --line: rgba(242, 245, 240, 0.12);
  --green: #8cffc1;
  --red: #ff4d5e;
  --card: rgba(242, 245, 240, 0.055);
  --font-display: "Unbounded", "Inter Tight", system-ui, sans-serif;
  --font-body: "Inter Tight", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  z-index: 50;
}

::selection { background: var(--green); color: #06110c; }

a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.red { color: var(--red); }
.accent-red { color: var(--red); }

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}
.container-narrow { width: min(760px, calc(100% - 40px)); }

.section { padding: clamp(72px, 10vw, 160px) 0; position: relative; }

.kicker {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.kicker::before { content: "// "; color: var(--green); }

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.1rem + 2.2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: clamp(28px, 4vw, 48px);
  max-width: 22ch;
}
h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }

/* ---------- preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.preloader-word {
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 96px 0 120px;
}
#equity-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.eyebrow {
  color: var(--green);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.1rem + 4.6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 16ch;
  margin-bottom: 32px;
}
.hero-line { display: block; }
.hero-title .word { overflow: hidden; }
#scramble { display: inline-block; min-width: 5ch; }
.hero-sub {
  color: var(--muted);
  max-width: 46ch;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

/* ---------- CTA ---------- */
.cta {
  display: inline-block;
  background: var(--text);
  color: #06110c;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 999px;
  font-size: 1rem;
  transition: background 0.25s ease;
  will-change: transform;
}
.cta:hover { background: var(--green); }
.cta-small { padding: 12px 26px; font-size: 0.95rem; }
.cta-big { padding: 20px 44px; font-size: 1.1rem; }
.cta-ghost {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.cta-ghost:hover { color: var(--text); border-color: var(--text); }

/* ---------- ticker ---------- */
.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  overflow: hidden;
  z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  gap: 48px;
  width: max-content;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-track span::after { content: "·"; margin-left: 48px; color: var(--line); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- pain ---------- */
.pain { background: var(--bg-2); border-block: 1px solid var(--line); }
.pain-line {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 0.95rem + 1.6vw, 2rem);
  line-height: 1.3;
  color: var(--muted);
  max-width: 26ch;
  margin-bottom: 28px;
}
.pain-line-accent { color: var(--text); }
.pain-line-accent::after { content: ""; display: block; width: 64px; height: 2px; background: var(--red); margin-top: 24px; }

/* ---------- sticky scene ---------- */
.scene-revenge { min-height: 100svh; display: flex; align-items: center; }
.scene-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.trade-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.trade-card-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 70% 30%, rgba(255, 77, 94, 0.22), transparent 60%);
  opacity: 0;
  pointer-events: none;
}
.pair { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.1em; margin-bottom: 24px; text-transform: uppercase; }
.trade-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.trade-row b { color: var(--text); font-weight: 700; }
.trade-row b.red { color: var(--red); }
.trade-row-result { border-bottom: 0; }
.trade-row-result b { font-size: 1.4rem; }
.scene-note {
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem);
  color: var(--muted);
  margin-bottom: 14px;
  padding-left: 20px;
  border-left: 2px solid var(--line);
}
.scene-note strong, .scene-note.is-active { color: var(--text); border-color: var(--red); }

/* ---------- demo ---------- */
.demo { background: var(--bg-2); border-block: 1px solid var(--line); }
.demo-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.pattern-tabs { display: flex; flex-direction: column; gap: 12px; }
.pattern-tabs button {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  text-align: left;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.pattern-tabs button:hover { color: var(--text); border-color: var(--muted); }
.pattern-tabs button[aria-selected="true"] {
  color: var(--red);
  border-color: var(--red);
  background: rgba(255, 77, 94, 0.06);
}
.pattern-tabs button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.coach-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  min-height: 240px;
}
.coach-head {
  color: var(--green);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
#coach-text { font-size: 1.1rem; max-width: 52ch; }
.coach-rule { color: var(--red); margin-top: 16px; font-size: 0.9rem; }

/* ---------- proof ---------- */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.proof-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
}
.proof-card-red { border-color: rgba(255, 77, 94, 0.35); }
.proof-num {
  font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 12px;
}
.proof-label { color: var(--muted); font-size: 0.9rem; }
.proof-note { color: var(--muted); font-size: 0.78rem; margin-top: 24px; }

/* ---------- how ---------- */
.how { background: var(--bg-2); border-block: 1px solid var(--line); }
.how-list { list-style: none; display: grid; gap: 8px; }
.how-step {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.how-step:last-child { border-bottom: 0; }
.how-num { color: var(--green); font-size: 0.9rem; padding-top: 4px; }
.how-step p { color: var(--muted); max-width: 52ch; }

/* ---------- pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}
.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.price-card-main { border-color: var(--green); }
.price-card h3 { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.85rem; color: var(--muted); }
.price-card-main h3 { color: var(--green); }
.price { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem); font-weight: 700; line-height: 1; }
.price span { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.price-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.pricing-note { color: var(--muted); font-size: 0.78rem; margin-top: 24px; }

/* ---------- faq ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 24px 0;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 1.3rem;
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--muted); padding: 0 0 24px; max-width: 56ch; }

/* ---------- final cta ---------- */
.final-cta { text-align: center; }
.final-cta h2 { margin-inline: auto; }
.final-cta .cta { margin-top: 8px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}

/* ---------- reveal defaults ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); }
.no-motion [data-reveal], .no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; }
}
@media (max-width: 768px) {
  .scene-grid { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
  .pattern-tabs { flex-direction: row; flex-wrap: wrap; }
  .pattern-tabs button { flex: 1 1 auto; text-align: center; }
  .hero { padding-bottom: 96px; }
}
@media (max-width: 480px) {
  .proof-grid { grid-template-columns: 1fr 1fr; }
  .how-step { grid-template-columns: 48px 1fr; gap: 16px; }
  .cta { width: 100%; text-align: center; }
  .hero-actions .cta-ghost { margin-inline: auto; }
}

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