:root {
  --ink: #161312;
  --ink-2: #221c19;
  --cream: #faf8f5;
  --muted: #b9aea4;
  --line: rgba(250, 248, 245, 0.14);
  --orange: #ea580c;
  --orange-2: #fb923c;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: radial-gradient(120% 90% at 70% 10%, #3a2318 0%, var(--ink) 60%);
  background-color: var(--ink);
  color: var(--cream);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- top bar ---------- */
.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 48px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
  font: 700 19px/1 var(--display);
  letter-spacing: -0.01em;
}
.brand img { border-radius: 8px; }

.steps {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(22, 19, 18, 0.55);
  backdrop-filter: blur(10px);
}
.steps a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  transition: color 0.25s, background-color 0.25s;
}
.steps a:hover { color: var(--cream); }
.steps a.on { color: var(--ink); background: var(--cream); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font: 600 16px/1 var(--body);
  text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(234, 88, 12, 0.8);
  transition: transform 0.2s, background-color 0.2s;
}
.btn:hover { background: #f06a1f; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:focus-visible, .steps a:focus-visible, .brand:focus-visible {
  outline: 2px solid var(--orange-2);
  outline-offset: 3px;
}
.btn-ghost {
  background: rgba(250, 248, 245, 0.06);
  border: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(250, 248, 245, 0.12); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- panels ---------- */
main { position: relative; z-index: 2; }

.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px clamp(16px, 6vw, 96px);
}
.panel.right { justify-content: flex-end; }
.panel + .panel:not(.finale) { min-height: 130vh; }

.copy { max-width: 560px; }

.eyebrow, .num {
  margin: 0 0 18px;
  color: var(--orange-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 8.4vw, 116px); }
h1 em, .big em { font-style: normal; color: var(--orange-2); }
h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.04; }
h2.big { font-size: clamp(44px, 7vw, 96px); line-height: 0.98; }

.lead {
  max-width: 470px;
  margin: 0 0 32px;
  color: #ddd3ca;
  font-size: clamp(17px, 1.4vw, 20px);
  text-wrap: pretty;
}
.card p:not(.num) { margin: 0 0 12px; color: #d8cec5; text-wrap: pretty; }
.card .note {
  display: inline-block;
  margin-top: 8px !important;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(234, 88, 12, 0.14);
  color: #fdba8c !important;
  font-size: 14px;
}

.card {
  max-width: 470px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(34, 28, 25, 0.82), rgba(22, 19, 18, 0.7));
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.card.in { opacity: 1; transform: none; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero .copy { padding-top: 4vh; }
.scroll-hint {
  position: absolute;
  left: clamp(16px, 6vw, 96px);
  bottom: 32px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.scroll-hint span {
  width: 22px; height: 34px;
  border: 1.5px solid var(--muted);
  border-radius: 12px;
  position: relative;
}
.scroll-hint span::after {
  content: "";
  position: absolute;
  left: 50%; top: 7px;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--orange-2);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(9px); opacity: 0; } }

/* ---------- finale ---------- */
.finale {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-bottom: 40px;
  min-height: 140vh;
}
.finale .copy { max-width: 820px; margin: auto 0; }
.finale .actions { justify-content: center; }

.facts {
  list-style: none;
  margin: 8px auto 36px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 640px;
}
.facts li {
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(22, 19, 18, 0.6);
  backdrop-filter: blur(10px);
}
.facts strong {
  display: block;
  font: 800 clamp(26px, 3vw, 36px)/1 var(--display);
  letter-spacing: -0.03em;
  color: var(--orange-2);
}
.facts span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }

.foot {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(22, 19, 18, 0.78);
  backdrop-filter: blur(12px);
  text-align: left;
  font-size: 14px;
  color: var(--muted);
}
.foot strong { display: block; color: var(--cream); font-family: var(--display); font-size: 17px; margin-bottom: 4px; }
.foot span { display: block; max-width: 440px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.foot a { color: var(--cream); text-decoration: none; border-bottom: 1px solid var(--line); }
.foot a:hover { border-color: var(--orange-2); }

/* ---------- loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity 0.8s, visibility 0.8s;
}
.loader span {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--orange);
  animation: spin 1.1s cubic-bezier(.6,0,.4,1) infinite;
}
@keyframes spin { to { transform: rotate(180deg); } }
.loaded .loader { opacity: 0; visibility: hidden; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .steps { display: none; }
  .panel, .panel.right { align-items: flex-end; justify-content: flex-start; padding: 96px 16px 32px; }
  .hero { align-items: flex-end; }
  .hero .copy { padding-bottom: 72px; }
  .card { padding: 22px; border-radius: 20px; }
  .scroll-hint { left: 16px; bottom: 20px; }
  .facts { grid-template-columns: 1fr; max-width: 320px; }
  .finale { align-items: stretch; }
  .finale .copy { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; opacity: 1; transform: none; }
  .scroll-hint span::after { animation: none; }
}
