/* ioanbarber.com
   One typeface (Geist). Spacing only from: 0 2 4 8 12 16 24 32 40 48 64 80 96.
   Type sizes only from the Tailwind scale. Flat backgrounds, one accent. */

:root {
  color-scheme: dark;
  --bg: #181818;
  --surface: #1F1F1F;
  --ink: #F5F5F2;
  --muted: #A3A29D;
  --line: #313131;
  --line-strong: #4A4A48;
  --accent: #C6F432;
  --accent-hover: #B2DE22;
  --on-accent: #111110;
  --dark: #000000;
  --dark-2: #1F1F1F;
  --dark-line: #272727;
  --on-dark: #F5F5F2;
  --on-dark-muted: #A3A29D;
  --ok: #86EFAC;
  --danger: #F87171;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --container: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; }
p, li, small { text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }

.ic { width: 20px; height: 20px; fill: currentColor; flex: none; }

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

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--ink); color: var(--surface);
  padding: 8px 12px; border-radius: 8px; text-decoration: none;
  font-size: 14px; line-height: 20px; font-weight: 600;
  transition: top 300ms var(--ease);
}
.skip:focus { top: 16px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 800px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 9999px;
  font-size: 16px; line-height: 24px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color 500ms var(--ease), color 500ms var(--ease), border-color 500ms var(--ease), transform 500ms var(--ease), translate 300ms var(--ease);
  translate: var(--mx, 0px) var(--my, 0px);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }
.btn .ic { width: 16px; height: 16px; }
.btn-sm { font-size: 14px; line-height: 20px; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-dark { background: var(--ink); color: var(--surface); }
.btn-dark:hover { background: #D9D9D4; }
.btn-outline { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

.link-quiet {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--muted); font-weight: 500; text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 500ms var(--ease), border-color 500ms var(--ease);
}
.link-quiet .ic { width: 16px; height: 16px; }
.link-quiet:hover { color: var(--ink); border-color: var(--ink); }

.eyebrow {
  font-size: 14px; line-height: 20px; font-weight: 500;
  color: var(--accent); margin-bottom: 16px;
}

/* ---------- Nav (floating island) ---------- */
.nav-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 24px 16px 0; pointer-events: none; }
.nav {
  pointer-events: auto;
  margin: 0 auto; width: max-content; max-width: 100%;
  display: flex; align-items: center; gap: 24px;
  padding: 8px 8px 8px 24px;
  border-radius: 9999px;
  background: rgba(24, 24, 24, 0.72);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.brand { font-weight: 600; font-size: 16px; line-height: 24px; text-decoration: none; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  display: block; padding: 4px 12px; border-radius: 9999px;
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); text-decoration: none;
  transition: color 500ms var(--ease), background-color 500ms var(--ease);
}
.nav-links a:hover { color: var(--ink); background: rgba(245, 245, 242, 0.06); }
.nav-links a[aria-current="true"] { color: var(--ink); background: rgba(245, 245, 242, 0.1); }

.burger {
  display: none; position: relative; width: 40px; height: 40px;
  border: 0; border-radius: 9999px; background: var(--ink); cursor: pointer;
}
.burger span {
  position: absolute; left: 12px; width: 16px; height: 2px; border-radius: 2px; background: var(--surface);
  transition: transform 700ms var(--ease), top 700ms var(--ease);
}
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 22px; }
.burger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(64px); backdrop-filter: blur(64px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 700ms var(--ease);
}
.menu[hidden] { display: none; }
.menu.open { opacity: 1; }
.menu ul { display: flex; flex-direction: column; gap: 16px; text-align: center; }
.menu a {
  display: inline-block; font-size: 30px; line-height: 36px; font-weight: 600; text-decoration: none;
  opacity: 0; transform: translateY(48px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.menu.open a { opacity: 1; transform: translateY(0); }
.menu.open li:nth-child(1) a { transition-delay: 100ms; }
.menu.open li:nth-child(2) a { transition-delay: 150ms; }
.menu.open li:nth-child(3) a { transition-delay: 200ms; }
.menu.open li:nth-child(4) a { transition-delay: 250ms; }
.menu.open li:nth-child(5) a { transition-delay: 300ms; color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 128px 0 96px; text-align: center;
}
.hero-fluid { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; pointer-events: none; }
.hero-scroll {
  position: absolute; left: 24px; top: 50%; transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl; font-size: 12px; line-height: 16px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-title {
  max-width: 896px;
  font-size: 60px; line-height: 1.05; letter-spacing: -0.03em; font-weight: 600;
  color: var(--ink); text-wrap: balance;
}
.hero-title-lead {
  display: block; padding-bottom: 4px;
  background: linear-gradient(90deg, var(--accent), #FFFFFF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 640px; margin-top: 32px; font-size: 18px; line-height: 28px; color: var(--muted); text-wrap: balance; }
.hero-actions { margin-top: 40px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.h2 { font-size: 36px; line-height: 40px; letter-spacing: -0.02em; max-width: 800px; }
.section p { color: var(--muted); }
.section .eyebrow { color: var(--accent); }

/* ---------- Problem: three leaks that join up ---------- */
.problem-head { max-width: 800px; margin: 0 auto 48px; text-align: center; }
.problem-head .h2 { margin: 0 auto; font-size: 48px; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.hl { color: var(--accent); }
.leaks { display: grid; grid-template-columns: 1fr 64px 1fr 64px 1fr; align-items: center; }
.leak {
  position: relative; height: 100%; padding: 24px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color 700ms var(--ease), box-shadow 700ms var(--ease);
}
.leak-name { margin-top: 16px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--muted); }
.section .leak-text { margin-top: 4px; font-size: 18px; line-height: 28px; font-weight: 600; color: var(--ink); }
.leak-tag { margin-top: 16px; font-size: 12px; line-height: 16px; font-weight: 600; }
.leak-tag span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 9999px; }
.leak-tag span::before { content: ""; width: 6px; height: 6px; border-radius: 9999px; background: currentColor; }
.tag-bad { color: var(--danger); background: rgba(248, 113, 113, 0.12); }
.tag-good { display: none !important; color: var(--accent); background: rgba(198, 244, 50, 0.12); }
.joint { position: relative; height: 2px; }
.joint::before, .joint::after { content: ""; position: absolute; top: 0; height: 2px; border-radius: 2px; }
/* Broken: two dashed stubs with a gap in the middle. */
.joint::before {
  left: 8px; right: 8px;
  background: linear-gradient(90deg, var(--line-strong) 0 35%, transparent 35% 65%, var(--line-strong) 65% 100%);
}
.joint::after { left: 0; right: 0; background: var(--accent); box-shadow: 0 0 12px rgba(198, 244, 50, 0.6); transform: scaleX(0); transition: transform 700ms var(--ease); }
.leaks.joined .joint::after { transform: scaleX(1); }
.leaks.joined .joint ~ .joint::after { transition-delay: 300ms; }
.leaks.joined .leak { border-color: rgba(198, 244, 50, 0.5); box-shadow: 0 0 32px rgba(198, 244, 50, 0.08); }
.leaks.joined .tag-bad { display: none; }
.leaks.joined .tag-good { display: inline-flex !important; }
.problem-close { max-width: 720px; margin: 48px auto 0; text-align: center; font-size: 18px; line-height: 28px; }
.section .problem-close strong { color: var(--ink); font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 32px;
  transition: border-color 500ms var(--ease), transform 500ms var(--ease);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.card h3 { font-size: 20px; line-height: 28px; margin: 24px 0 8px; }
.card-ic {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--ink); color: var(--surface);
}

/* ---------- Live dashboard ---------- */
.live-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.chart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px;
  display: flex; flex-direction: column; gap: 24px;
}
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.chart-label { font-size: 14px; line-height: 20px; color: var(--muted); }
.section .chart-value { color: var(--ink); }
.chart-value { display: flex; align-items: center; gap: 12px; margin-top: 4px; font-size: 48px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.chart-up {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 9999px;
  background: rgba(198, 244, 50, 0.12); color: var(--accent);
  font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0;
}
.chart-up .ic { width: 16px; height: 16px; }
.chart-tag { font-size: 12px; line-height: 16px; color: var(--muted); border: 1px solid var(--line); border-radius: 9999px; padding: 4px 8px; }
.chart-wrap { position: relative; flex: 1; min-height: 200px; }
.chart { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 4 6; }
.chart-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.chart-legend { display: flex; gap: 12px; font-size: 12px; line-height: 16px; color: var(--muted); }
.section .chart-legend { color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 4px; }
.chart-legend span::before { content: ""; width: 12px; height: 2px; border-radius: 2px; }
.lg-now::before { background: var(--accent); }
.lg-prev::before { background: repeating-linear-gradient(90deg, var(--line-strong) 0 3px, transparent 3px 5px); }
.chart-prev { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 8px rgba(198, 244, 50, 0.5)); }
.chart-dot {
  position: absolute; left: 100%; top: calc(31 / 220 * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 9999px; background: var(--accent); box-shadow: 0 0 0 0 rgba(198, 244, 50, 0.6);
}
.chart-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; }
.stat-n { display: block; font-size: 24px; line-height: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-l { display: block; font-size: 14px; line-height: 20px; color: var(--muted); }
.chart-start {
  position: absolute; top: 0; bottom: 0; left: 35%; width: 0;
  border-left: 2px dashed var(--line-strong); pointer-events: none;
}
.chart-start span {
  position: absolute; top: 0; left: 8px; white-space: nowrap;
  font-size: 12px; line-height: 16px; font-weight: 600; color: var(--accent);
  padding: 4px 8px; border-radius: 9999px; background: rgba(198, 244, 50, 0.12);
}
html.js .chart-start { opacity: 0; transform: scaleY(0); transform-origin: bottom; transition: opacity 400ms var(--ease), transform 600ms var(--ease); }
html.js .chart-start.on { opacity: 1; transform: none; }
html.js .chart-dot { opacity: 0; }
html.js .chart-dot.on { opacity: 1; animation: ping 1800ms var(--ease) infinite; }
[data-stat-wrap], .chart-value > span:first-child { display: inline-block; }
.bump { animation: bump 900ms var(--ease); }
@keyframes bump { 0% { color: var(--accent); transform: translateY(-4px); } 100% { transform: none; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(198, 244, 50, 0.6); } 100% { box-shadow: 0 0 0 16px rgba(198, 244, 50, 0); } }

.phone {
  justify-self: center; width: 100%; max-width: 320px; height: 560px;
  border-radius: 48px; padding: 12px; background: #0B0B0B; border: 1px solid var(--line-strong);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
}
.phone-screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 40px; padding: 48px 12px 12px;
  background: radial-gradient(120% 80% at 50% 0%, #2A3A0A 0%, #121212 60%);
}
.section .phone-time { color: var(--ink); }
.phone-time { text-align: center; font-size: 60px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.phone-date { text-align: center; margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--muted); }
.notifs { position: relative; display: flex; flex-direction: column; gap: 8px; margin-top: 32px; }
.notif {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px;
  background: rgba(40, 40, 40, 0.85); border: 1px solid rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.notif-ic { width: 32px; height: 32px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.notif-ic .ic { width: 16px; height: 16px; }
.notif-body { min-width: 0; flex: 1; }
.notif-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 16px; color: var(--muted); }
.notif strong { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.notif small { display: block; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif.enter { animation: notif-in 600ms var(--ease) both; }
.notif.enter-quick { animation: notif-in 160ms var(--ease) both; }
.notif.leave { animation: notif-out 400ms var(--ease) both; }
@keyframes notif-in { from { opacity: 0; transform: translateY(-24px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes notif-out { to { opacity: 0; transform: scale(0.92); } }

.phone { position: relative; }
.phone-sound {
  position: absolute; top: 24px; right: 24px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 9999px;
  font: inherit; font-size: 12px; line-height: 16px; font-weight: 600; cursor: pointer;
  color: var(--ink); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.phone-sound .ic { width: 16px; height: 16px; }
.phone-sound:hover { background: rgba(255, 255, 255, 0.16); }
.phone-sound[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.phone.buzzing { animation: buzz 320ms linear infinite; }
@keyframes buzz {
  0%, 100% { transform: none; }
  20% { transform: translateX(-3px) rotate(-1deg); }
  40% { transform: translateX(3px) rotate(1deg); }
  60% { transform: translateX(-2px) rotate(-0.5deg); }
  80% { transform: translateX(2px) rotate(0.5deg); }
}

/* Rocket finale */
.phone-slot { position: relative; z-index: 5; display: grid; justify-items: center; align-content: center; }
.phone-flame {
  position: absolute; left: 50%; top: 100%; z-index: -1; width: 72px; height: 0; margin-left: -36px; margin-top: -8px;
  border-radius: 50% 50% 50% 50% / 20% 20% 80% 80%;
  background: radial-gradient(ellipse at 50% 15%, #FFFFFF 0%, #F6FFB0 20%, var(--accent) 45%, rgba(255, 140, 40, 0.8) 70%, rgba(255, 80, 0, 0) 100%);
  filter: blur(2px); opacity: 0; transform-origin: top;
  transition: height 600ms var(--ease), opacity 300ms var(--ease);
}
.phone.ignite .phone-flame { height: 72px; opacity: 1; animation: flicker 90ms linear infinite alternate; }
.phone.launch .phone-flame { height: 240px; }
.phone.ignite { animation: rumble 80ms linear infinite; }
.phone.launch { animation: launch 2200ms cubic-bezier(0.7, 0, 1, 0.6) forwards; }
@keyframes rumble {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, 2px); }
  100% { transform: translate(1px, -2px); }
}
@keyframes launch { from { transform: translateY(0); } to { transform: translateY(-240vh); } }
@keyframes flicker { from { transform: scaleY(0.9) scaleX(1.05); } to { transform: scaleY(1.1) scaleX(0.95); } }
.confetti-layer { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.confetti {
  position: absolute; width: 8px; height: 12px; margin: -6px 0 0 -4px;
  border-radius: 2px; pointer-events: none; will-change: transform, opacity;
}
.boom {
  position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 9999px;
  background: radial-gradient(circle, #FFFFFF 0%, rgba(198, 244, 50, 0.8) 40%, rgba(198, 244, 50, 0) 70%);
  animation: boom 600ms ease-out forwards;
}
@keyframes boom { from { transform: scale(0.4); opacity: 1; } to { transform: scale(9); opacity: 0; } }
.phone.gone { visibility: hidden; }
.smoke {
  position: absolute; left: 50%; bottom: -40px; width: 88px; height: 88px; margin-left: -44px;
  border-radius: 9999px; pointer-events: none;
  background: radial-gradient(circle, rgba(230, 230, 225, 0.8) 0%, rgba(200, 200, 195, 0.35) 45%, rgba(200, 200, 195, 0) 70%);
  animation: puff 2600ms ease-out forwards;
}
@keyframes puff {
  from { transform: translate(0, 0) scale(0.5); opacity: 0.9; }
  to { transform: translate(var(--dx), var(--dy)) scale(var(--s)); opacity: 0; }
}

.phone-count {
  min-height: 16px; margin-top: 8px; text-align: center;
  font-size: 12px; line-height: 16px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums;
}
.phone-end {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  text-align: center; font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em;
  opacity: 0; pointer-events: none;
}
.section .phone-end { color: var(--ink); }
.section .phone-count { color: var(--accent); }
.phone-slot.launched .phone-end { opacity: 1; transition: opacity 900ms var(--ease); }

/* Chart finish: numbers lock in lime. */
.chart-card .stat-n, .chart-card .chart-value > span:first-child { transition: color 900ms var(--ease); }
.chart-card.done .stat-n, .chart-card.done .chart-value > span:first-child { color: var(--accent); }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 2px; pointer-events: none;
  background: var(--accent); box-shadow: 0 0 8px rgba(198, 244, 50, 0.6);
  transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
}

/* ---------- Button shine ---------- */
.btn-accent { position: relative; overflow: hidden; }
.btn-accent::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.6) 50%, transparent 65%);
  transform: translateX(-120%); animation: shine 5s var(--ease) 2s infinite;
}
@keyframes shine { 0% { transform: translateX(-120%); } 25%, 100% { transform: translateX(120%); } }

/* ---------- Cursor spotlight on cards ---------- */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(320px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(198, 244, 50, 0.12), transparent 70%);
  opacity: 0; transition: opacity 500ms var(--ease);
}
.spot.is-spot::before { opacity: 1; }

/* ---------- Tagline reveal ---------- */
.tagline { background: var(--dark); padding: 96px 0; }
.tagline-text {
  max-width: 680px;
  font-size: 48px; line-height: 1; letter-spacing: -0.02em; font-weight: 600;
  color: var(--on-dark); text-wrap: balance;
}
.tagline-text .w { color: rgba(245, 245, 242, 0.3); transition: color 700ms var(--ease); }
.tagline-text .w.on { color: var(--on-dark); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { border: 1px solid var(--line); border-radius: 16px; padding: 32px; background: var(--surface); }
.step-n {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600;
}
.step h3 { font-size: 20px; line-height: 28px; margin: 24px 0 8px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.about-copy p { margin-top: 16px; font-size: 18px; line-height: 28px; }
.about-copy .h2 + p { margin-top: 24px; }
.about-copy .btn { margin-top: 32px; }
.traits { display: grid; gap: 16px; }
.trait {
  display: flex; gap: 16px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: var(--bg);
}
.trait h3 { font-size: 16px; line-height: 24px; }
.trait p { font-size: 14px; line-height: 20px; margin-top: 4px; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  transition: border-color 500ms var(--ease);
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 24px; cursor: pointer; list-style: none;
  font-size: 18px; line-height: 28px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform 700ms var(--ease); color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq summary:focus-visible { border-radius: 16px; }
.faq details p { padding: 0 24px 24px; }

/* ---------- Contact ---------- */
.contact { background: var(--dark); color: var(--on-dark); }
.contact p { color: var(--on-dark-muted); }
.contact .h2 { color: var(--on-dark); }
.contact .eyebrow { color: var(--accent); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }
.contact-copy > p { margin-top: 24px; font-size: 18px; line-height: 28px; }
.alt-contact { display: flex; flex-direction: column; gap: 12px; margin-top: 40px; }
.alt-contact a {
  display: flex; align-items: center; gap: 16px; text-decoration: none;
  padding: 16px; border-radius: 16px; border: 1px solid var(--dark-line);
  transition: background-color 500ms var(--ease), border-color 500ms var(--ease), transform 500ms var(--ease);
}
.alt-contact a:hover { background: var(--dark-2); border-color: var(--line-strong); transform: translateY(-2px); }
.alt-contact a:active { transform: scale(0.98); }
.alt-contact .card-ic { background: var(--dark-2); color: var(--on-dark); }
.alt-contact strong { display: block; font-weight: 600; color: var(--on-dark); }
.alt-contact small { display: block; font-size: 14px; line-height: 20px; color: var(--on-dark-muted); }

.form-card { background: var(--surface); color: var(--ink); border-radius: 24px; padding: 32px; }
.lead-form { display: flex; flex-direction: column; gap: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fld label { display: block; font-size: 14px; line-height: 20px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.fld .opt { font-weight: 400; color: var(--muted); }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg);
  font-size: 16px; line-height: 24px;
  transition: border-color 500ms var(--ease), background-color 500ms var(--ease);
}
.fld textarea { resize: vertical; min-height: 128px; }
.fld input::placeholder, .fld textarea::placeholder { color: #6F6E6A; }
.fld input:hover, .fld select:hover, .fld textarea:hover { border-color: var(--line-strong); }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--ink); background: var(--surface); box-shadow: 0 0 0 2px rgba(198, 244, 50, 0.25); }
.fld .err { display: none; margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--danger); }
.fld.invalid input, .fld.invalid textarea, .fld.invalid select { border-color: var(--danger); }
.fld.invalid .err { display: block; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ts-slot:empty { display: none; }
.status { display: none; font-size: 14px; line-height: 20px; color: #FCA5A5; background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.35); padding: 12px; border-radius: 8px; }
.status.show { display: block; }
.lead-form .submit { align-self: flex-start; }
.fine { font-size: 12px; line-height: 16px; color: var(--muted); }
.fine a { color: var(--ink); }
.form-success { text-align: left; padding: 16px 0; }
.form-success .fs-mark {
  width: 40px; height: 40px; border-radius: 9999px; display: grid; place-items: center;
  background: rgba(134, 239, 172, 0.12); color: var(--ok); margin-bottom: 16px;
}
.form-success h3 { font-size: 24px; line-height: 32px; }
.form-success p { margin-top: 8px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: var(--on-dark-muted); border-top: 1px solid var(--dark-line); padding: 48px 0 32px; }
.footer .brand { color: var(--on-dark); }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-sub { margin-top: 8px; font-size: 14px; line-height: 20px; max-width: 320px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { font-size: 14px; line-height: 20px; text-decoration: none; transition: color 500ms var(--ease); }
.footer-links a:hover { color: var(--on-dark); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--dark-line); font-size: 12px; line-height: 16px; }

/* ---------- Scroll reveal (JS only) ---------- */
html.js .reveal {
  opacity: 0; transform: translateY(64px); filter: blur(12px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease);
}
html.js .reveal.in { opacity: 1; transform: none; filter: none; }

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

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about-grid, .contact-grid, .live-grid { grid-template-columns: 1fr; gap: 48px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { width: 100%; justify-content: space-between; padding: 8px 8px 8px 16px; }
  .nav-links, .nav-cta { display: none; }
  .burger { display: block; }
  .container { padding: 0 16px; }
  .section, .tagline { padding: 64px 0; }
  .hero { padding: 112px 0 80px; }
  .hero-title { font-size: 36px; line-height: 40px; }
  .hero-scroll { display: none; }
  .tagline-text br { display: none; }
  .hero-sub, .problem-close, .about-copy p, .contact-copy > p { font-size: 16px; line-height: 24px; }
  .problem-head .h2 { font-size: 30px; line-height: 36px; }
  .leaks { grid-template-columns: 1fr; }
  .joint { width: 2px; height: 40px; justify-self: center; }
  .joint::before { left: 0; right: auto; top: 4px; bottom: 4px; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--line-strong) 0 35%, transparent 35% 65%, var(--line-strong) 65% 100%); }
  .joint::after { left: 0; right: auto; top: 0; bottom: 0; width: 2px; height: auto; transform: scaleY(0); }
  .leaks.joined .joint::after { transform: scaleY(1); }
  .h2 { font-size: 30px; line-height: 36px; }
  .tagline-text { font-size: 36px; line-height: 40px; }
  .cards, .row { grid-template-columns: 1fr; }
  .card, .step, .chart-card { padding: 24px; }
  .chart-value { font-size: 36px; }
  .chart-stats { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 24px 16px; }
  .faq summary { font-size: 16px; line-height: 24px; padding: 16px; }
  .faq details p { padding: 0 16px 16px; }
}

/* ---------- Legal and 404 pages ---------- */
.legal { padding-top: 160px; }
.legal h2 { font-size: 20px; line-height: 28px; margin: 40px 0 8px; }
.legal p { margin-top: 12px; }
.legal a { color: var(--ink); }
.legal .btn { margin-top: 40px; }
.notfound { min-height: 100vh; display: grid; place-items: center; padding: 96px 0; }

/* ---------- Easter eggs (assets/eggs.js) ---------- */
/* Rainbow mode: --bg is registered as a colour so it can be animated, and every
   surface is mixed from it, so the whole page cycles through the rainbow together. */
@property --bg { syntax: '<color>'; inherits: true; initial-value: #181818; }
html.egg-lime {
  color-scheme: light;
  --bg: #C6F432;
  --surface: color-mix(in srgb, var(--bg) 88%, #000);
  --ink: #111110;
  --muted: rgba(17, 17, 16, 0.72);
  --line: rgba(17, 17, 16, 0.16);
  --line-strong: rgba(17, 17, 16, 0.32);
  --accent: #111110;
  --accent-hover: #2A2A28;
  --on-accent: #FFFFFF;
  --dark: #111110;
  --dark-2: #1F1F1F;
  --dark-line: #2A2A28;
  animation: egg-rainbow 7s linear infinite;
}
@keyframes egg-rainbow {
  0%, 100% { --bg: #C6F432; }
  14% { --bg: #4DE8D2; }
  28% { --bg: #5EB5FF; }
  42% { --bg: #B48CFF; }
  57% { --bg: #FF7AD9; }
  71% { --bg: #FF6B6B; }
  85% { --bg: #FFB84D; }
  92% { --bg: #FFE14D; }
}
/* The phone, the nav pill and the mobile menu keep their own dark palette. */
html.egg-lime .phone, html.egg-lime .nav, html.egg-lime .menu {
  color: #F5F5F2; --bg: #181818; --surface: #1F1F1F;
  --ink: #F5F5F2; --muted: #A3A29D; --line: #313131; --line-strong: #4A4A48;
  --accent: #C6F432; --on-accent: #111110;
}
html.egg-lime .hero-title-lead { background-image: linear-gradient(90deg, #111110, rgba(17, 17, 16, 0.6)); }
::view-transition-new(root) { animation: egg-wipe 900ms var(--ease) both; }
::view-transition-old(root) { animation: none; }
@keyframes egg-wipe { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(150% at 50% 50%); } }

.egg-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; width: calc(100% - 32px); max-width: 448px;
  padding: 16px; border-radius: 16px; background: #000; color: #F5F5F2; border: 1px solid #313131;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5); font-size: 14px; line-height: 20px;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
.egg-toast.show { opacity: 1; transform: translate(-50%, 0); }
.egg-toast strong { color: #C6F432; font-weight: 600; }
.egg-count { display: block; margin-top: 8px; font-size: 12px; line-height: 16px; color: #A3A29D; }
.egg-steps { display: block; margin-top: 8px; font-variant-numeric: tabular-nums; color: #A3A29D; }
.egg-doge { position: absolute; top: -160px; pointer-events: none; will-change: transform; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)); }
.egg-doge-says {
  position: absolute; top: -80px; font-family: 'Comic Sans MS', 'Comic Neue', 'Chalkboard SE', cursive;
  font-weight: 700; line-height: 1; white-space: nowrap; pointer-events: none; will-change: transform;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
