:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --ink: #121212;
  --muted: #55524b;
  --line: #dcd7cc;
  --lime: #c6f432;
  --violet: #5b3df5;
  --accent-text: #4a2fe0;
  --pink: #ff6fae;
  --warn-bg: #fff1e6;
  --warn-ink: #8a3a00;
  /* dark bands (top 5, marquee) stay dark in both themes so lime accents keep their contrast */
  --band: #121212;
  --band-ink: #f2f1ec;
  --band-line: transparent;
  --radius: 22px;
  --max: 1140px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e10;
    --surface: #17181c;
    --ink: #f2f1ec;
    --muted: #a8a69f;
    --line: #2a2b31;
    --accent-text: #c6f432;
    --warn-bg: #2a1a0e;
    --warn-ink: #ffb27a;
    --band: #1b1c21;
    --band-line: #2f3037;
  }
}

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

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; }

h1, h2, h3, .display {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0;
}
h1 { font-size: clamp(2.8rem, 8vw, 6.2rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 800; margin-bottom: 16px; }
h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- for-sale bar ---------- */
.sale-bar {
  display: block; text-align: center; padding: 9px 16px;
  background: var(--lime); color: #121212; text-decoration: none;
  font-weight: 600; font-size: .9rem;
}
.sale-bar span { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }
.sale-bar:hover span { text-decoration-thickness: 2px; }
.sale-link { color: var(--ink); font-weight: 700; white-space: nowrap; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.04em;
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--lime); color: #121212;
  display: grid; place-items: center; font-size: 1rem;
  transition: transform .5s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.08); }
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem;
  padding: 8px 14px; border-radius: 999px; transition: background .2s;
}
.nav a:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 56px; isolation: isolate; }
.blob {
  position: absolute; z-index: -1; border-radius: 50%;
  filter: blur(60px); opacity: .55;
  animation: drift 18s ease-in-out infinite alternate;
}
.blob.a { width: 420px; height: 420px; background: var(--lime); top: -80px; right: -60px; }
.blob.b { width: 320px; height: 320px; background: var(--violet); top: 180px; right: 260px; opacity: .3; animation-delay: -6s; }
.blob.c { width: 260px; height: 260px; background: var(--pink); top: 40px; left: -120px; opacity: .25; animation-delay: -12s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 30px) scale(1.1); }
  100% { transform: translate(30px, -20px) scale(.95); }
}

.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em;
  background: var(--surface); border: 1px solid var(--line);
  padding: 6px 14px 6px 8px; border-radius: 999px; margin-bottom: 24px;
}
.tag .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 var(--lime); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; white-space: nowrap; }
.hero h1 .line > span { display: inline-block; animation: rise .9s var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: .1s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .2s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }

.swap {
  display: inline-block; background: var(--lime); color: #121212;
  padding: 0 .18em; border-radius: .18em; transform: rotate(-1.5deg);
}
.swap.out { animation: swapOut .35s var(--ease) forwards; }
.swap.in { animation: swapIn .45s var(--ease) forwards; }
@keyframes swapOut { to { opacity: 0; transform: translateY(-30%) rotate(-1.5deg); } }
@keyframes swapIn { from { opacity: 0; transform: translateY(30%) rotate(-1.5deg); } to { opacity: 1; transform: rotate(-1.5deg); } }

.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 34em; margin: 28px 0 0; animation: fade 1s .35s both; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; animation: fade 1s .5s both; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--ink) 60%, transparent); }
.btn.ghost { border: 2px solid var(--ink); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; animation: fade 1s .65s both; }
.stat { border-top: 2px solid var(--ink); padding-top: 14px; }
.stat .num { font-family: "Bricolage Grotesque", sans-serif; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.stat p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }

/* ---------- marquee ---------- */
.marquee {
  background: var(--band); color: var(--band-ink);
  border-block: 1px solid var(--band-line);
  overflow: hidden; white-space: nowrap; padding: 18px 0;
  transform: rotate(-1.2deg); margin: 24px -10px;
}
.marquee .track { display: inline-flex; gap: 48px; animation: scroll 32s linear infinite; padding-left: 48px; }
.marquee span { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 48px; }
.marquee span::after { content: "✦"; color: var(--lime); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { padding: 88px 0; }
.kicker { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-text); margin-bottom: 14px; display: block; }
.intro { color: var(--muted); font-size: 1.12rem; max-width: 40em; margin: 0 0 40px; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(2) { transition-delay: .07s; }
.stagger.in > *:nth-child(3) { transition-delay: .14s; }
.stagger.in > *:nth-child(4) { transition-delay: .21s; }
.stagger.in > *:nth-child(5) { transition-delay: .28s; }
.stagger.in > *:nth-child(6) { transition-delay: .35s; }
.stagger.in > *:nth-child(n+7) { transition-delay: .42s; }

/* formula */
.formula { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cap {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; overflow: hidden;
}
.cap .n { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 4.5rem; line-height: .8; color: transparent; -webkit-text-stroke: 1.5px var(--ink); opacity: .25; position: absolute; right: 18px; top: 18px; }
.cap p { color: var(--muted); margin: 0; }
.cap.min { background: var(--lime); color: #121212; border-color: transparent; }
.cap.min p { color: #2c3311; }
.cap.min .n { -webkit-text-stroke-color: #121212; }
.formula-note { margin-top: 20px; color: var(--muted); max-width: 46em; }

/* levers */
.levers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lever {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.lever:hover { transform: translateY(-6px) rotate(-.4deg); border-color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.lever img { width: 48px; height: 48px; margin-bottom: 18px; transition: transform .5s var(--ease); }
.lever:hover img { transform: rotate(-10deg) scale(1.1); }
.lever p { color: var(--muted); margin: 0; }

/* top 5 */
.top5 { background: var(--band); color: var(--band-ink); border: 1px solid var(--band-line); border-radius: 36px; margin: 0 12px; }
.top5 .kicker { color: var(--lime); }
.top5 .intro { color: color-mix(in srgb, var(--band-ink) 75%, transparent); }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rank {
  display: grid; grid-template-columns: 72px 1fr 120px; gap: 24px; align-items: center;
  padding: 24px 28px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--band-ink) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--band-ink) 12%, transparent);
  transition: background .3s, transform .35s var(--ease);
}
.rank:hover { background: color-mix(in srgb, var(--band-ink) 11%, transparent); transform: translateX(6px); }
.rank .pos { font-family: "Bricolage Grotesque", sans-serif; font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--lime); }
.rank h3 { font-size: 1.6rem; margin-bottom: 6px; }
.rank p { margin: 0; color: color-mix(in srgb, var(--band-ink) 75%, transparent); font-size: .97rem; }
.bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--band-ink) 12%, transparent); margin-top: 14px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lime), #8ef0c8); border-radius: inherit; transition: width 1.4s var(--ease); }
.rank .mult { text-align: right; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 2.4rem; letter-spacing: -0.04em; line-height: 1; }
.rank .mult small { display: block; font-family: "Inter", sans-serif; font-size: .75rem; font-weight: 600; letter-spacing: 0; color: color-mix(in srgb, var(--band-ink) 65%, transparent); margin-top: 4px; }
.honorable { margin-top: 28px; color: color-mix(in srgb, var(--band-ink) 75%, transparent); font-size: .95rem; }
.honorable strong { color: var(--band-ink); }
.top5 a { color: var(--lime); }

/* tips */
.tip-group { margin-top: 56px; }
.tip-group:first-of-type { margin-top: 0; }
.tip-group > h3 { font-size: 1.7rem; display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.tip-group > h3 .pill { font-family: "Inter", sans-serif; font-size: .78rem; letter-spacing: 0; font-weight: 700; background: var(--lime); color: #121212; padding: 4px 10px; border-radius: 99px; }
.tips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tip {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; transition: border-color .3s, transform .3s var(--ease);
}
.tip:hover { border-color: var(--violet); transform: translateY(-3px); }
.tip h4 { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.2rem; letter-spacing: -0.02em; margin: 0 0 8px; }
.tip p { color: var(--muted); margin: 0; font-size: .97rem; }
.tip p + p { margin-top: 8px; }

/* timeline checklist */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step .when { display: inline-block; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; background: var(--ink); color: var(--bg); padding: 4px 10px; border-radius: 99px; margin-bottom: 14px; }
.step ul { margin: 0; padding: 0; list-style: none; }
.step li { padding: 8px 0 8px 28px; position: relative; color: var(--muted); border-top: 1px dashed var(--line); }
.step li:first-child { border-top: 0; }
.step li::before { content: ""; position: absolute; left: 0; top: 14px; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--ink); }

/* callout */
.callout { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius); padding: 28px 32px; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.callout .big { font-size: 2rem; line-height: 1; }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

/* cta band */
.cta {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
  background: var(--lime); color: #121212; border-radius: 36px; padding: 48px;
  position: relative; overflow: hidden;
}
.cta h2 { margin-bottom: 12px; }
.cta p { margin: 0; color: #2c3311; font-size: 1.1rem; }
.cta .btn.primary { background: #121212; color: #c6f432; justify-self: end; }
.cta .ring { position: absolute; width: 340px; height: 340px; border: 2px solid #12121222; border-radius: 50%; right: -100px; top: -140px; animation: spin 30s linear infinite; border-style: dashed; }
@keyframes spin { to { transform: rotate(360deg); } }

/* countries */
.compare { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
tbody tr { transition: background .2s; }
tbody tr:hover { background: color-mix(in srgb, var(--lime) 18%, transparent); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 700; white-space: nowrap; }

.cc {
  display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px;
  border-radius: 6px; background: var(--ink); color: var(--bg);
  font-size: .72rem; font-weight: 800; letter-spacing: .05em; margin-right: 8px; vertical-align: 2px;
}
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.toc a { text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; transition: background .2s, color .2s, border-color .2s; }
.toc a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.countries { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.country { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; scroll-margin-top: 90px; transition: border-color .3s, box-shadow .3s; }
.country:target { border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 25%, transparent); }
.country h3 { display: flex; align-items: center; font-size: 1.5rem; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.chip { font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--lime) 55%, transparent); color: var(--ink); }
.country ul, .card ul { margin: 0; padding-left: 18px; color: var(--muted); }
.country li + li, .card li + li { margin-top: 6px; }

/* business */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; }
.card:hover { transform: translateY(-5px); border-color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.card p { color: var(--muted); margin: 0; }
.card .label { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); display: block; margin-bottom: 10px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.big-list { list-style: none; padding: 0; margin: 0; counter-reset: b; }
.big-list li { counter-increment: b; display: grid; grid-template-columns: 54px 1fr; gap: 14px; padding: 20px 0; border-top: 1px solid var(--line); }
.big-list li::before { content: counter(b, decimal-leading-zero); font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.6rem; color: var(--accent-text); line-height: 1.1; }
.big-list strong { display: block; font-size: 1.08rem; margin-bottom: 4px; }
.big-list span { color: var(--muted); }
.sticky { position: sticky; top: 100px; }

/* faq */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--ink); font-family: "Inter", sans-serif; font-weight: 600;
  transition: rotate .3s var(--ease), background .3s, color .3s;
}
.faq details[open] summary::after { rotate: 45deg; background: var(--ink); color: var(--bg); }
.faq summary:hover { color: var(--accent-text); }
.faq details p { margin: 0 0 20px; color: var(--muted); max-width: 40em; animation: fade .4s var(--ease); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; margin-top: 40px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer p { margin: 0; max-width: 44em; }
.site-footer .logo { font-size: 1.1rem; }

/* progress bar */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: var(--violet); transform-origin: 0 50%; transform: scaleX(0); z-index: 60; }

@media (max-width: 900px) {
  .formula, .levers, .timeline, .cards { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .sticky { position: static; }
  .cta { grid-template-columns: 1fr; padding: 36px 28px; }
  .cta .btn.primary { justify-self: start; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  section { padding: 64px 0; }
  .nav a { padding: 6px 10px; font-size: .85rem; }
  .logo .word { display: none; }
  .formula, .levers, .timeline, .cards, .tips, .countries { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .rank { grid-template-columns: 48px 1fr; gap: 14px; padding: 20px; }
  .rank .pos { font-size: 2.4rem; }
  .rank .mult { grid-column: 2; text-align: left; font-size: 1.8rem; }
  .top5 { margin: 0; border-radius: 28px; }
  .callout { grid-template-columns: 1fr; }
}

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