/* Alpenglow: the last light on a high peak. Logo orange kept, purple retired to dusk.
   Layout idea: one fixed 3D mountain, with quiet text panels passing over it as you climb. */
:root {
  --night: #0b0812;
  --dusk: #1d1124;
  --ember: #ff6f2c;
  --gold: #ffb778;
  --bone: #f4ece1;
  --mist: #b9aeb4;
  --line: rgba(244, 236, 225, .22);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --accent: "Instrument Serif", Georgia, serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --gut: clamp(20px, 4.5vw, 72px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--bone); background: var(--night);
  font: 400 clamp(1rem, .95rem + .25vw, 1.15rem)/1.55 var(--display);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
h1, h2, p, dl, dd, figure, blockquote, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
em { font: italic 400 1.08em/1 var(--accent); letter-spacing: -.01em; color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.mono { font: 400 .78rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.mono span { color: var(--mist); margin-left: .9em; }

#world { position: fixed; inset: 0; width: 100%; height: 100%; height: 100lvh; display: block; z-index: 0; }
.no-webgl #world { display: none; }
.no-webgl body {
  background: radial-gradient(60vmax 40vmax at 50% 20%, #ff6f2c55, transparent 70%),
              linear-gradient(#0b0812, #2a1230 60%, #0b0812) fixed;
}
#scrim {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
  transition: opacity .5s, background .5s;
  background: linear-gradient(90deg, rgba(11,8,18,.78), rgba(11,8,18,.32) 46%, transparent 66%);
}
#scrim[data-side="right"] { background: linear-gradient(270deg, rgba(11,8,18,.78), rgba(11,8,18,.32) 46%, transparent 66%); }
#scrim[data-side="both"] { background: rgba(11,8,18,.52); }
#scrim.on { opacity: 1; }

main { position: relative; z-index: 1; }

/* Intro */
#intro {
  position: fixed; inset: 0; z-index: 50; background: var(--night);
  display: grid; place-content: center; justify-items: center; gap: 18px;
  transition: opacity .9s ease, visibility .9s;
}
#intro svg { width: 76px; fill: var(--ember); animation: breathe 1.3s ease-in-out infinite alternate; }
#intro span { font: 400 .72rem var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--mist); }
#intro.done { opacity: 0; visibility: hidden; }
@keyframes breathe { from { opacity: .45; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* Top bar */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; padding: 18px var(--gut);
  background: linear-gradient(rgba(11,8,18,.92), rgba(11,8,18,.6) 62%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.05rem; letter-spacing: -.01em; }
.brand svg { width: 30px; fill: var(--ember); }
.brand b { font-weight: 700; }
.brand span { font-stretch: 112%; font-weight: 300; }
.bar nav { display: flex; gap: clamp(18px, 2.6vw, 40px); font-size: .92rem; }
.bar nav a { text-decoration: none; opacity: .82; position: relative; padding: 4px 0; }
.bar nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s; }
.bar nav a:hover { opacity: 1; }
.bar nav a:hover::after { transform: scaleX(1); }
.bar-end { display: flex; align-items: center; gap: 16px; }
.ghosty { all: unset; cursor: pointer; font: 400 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mist); }
.ghosty:hover, .ghosty[aria-pressed="true"] { color: var(--gold); }
.ghosty:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Buttons */
.btn {
  appearance: none; border: 1px solid var(--bone); border-radius: 2px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  background: var(--bone); color: var(--night); text-decoration: none;
  font: 600 .98rem var(--display); font-stretch: 108%; letter-spacing: -.005em;
  transition: background .3s, color .3s, border-color .3s, transform .3s;
}
.btn:hover { background: var(--ember); border-color: var(--ember); color: #190a02; transform: translateY(-2px); }
.btn-line { background: rgba(11,8,18,.3); color: var(--bone); border-color: var(--line); backdrop-filter: blur(6px); }
.btn-line:hover { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .86rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Altimeter: a slim rail in the page margin, so it never sits on content */
.hud { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 15; display: flex; flex-direction: column; align-items: center; gap: 14px; pointer-events: none; }
.alt { writing-mode: vertical-rl; font: 500 .78rem/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .02em; text-shadow: 0 0 10px rgba(11,8,18,.8); min-height: 4.6em; }
.alt small { font-size: .85em; margin-top: .4em; color: var(--mist); }
.camp { display: none; }
#ticks { display: flex; flex-direction: column-reverse; gap: 1px; pointer-events: auto; }
#ticks button { all: unset; cursor: pointer; display: block; width: 24px; height: 14px; position: relative; }
#ticks button::after { content: ""; position: absolute; right: 6px; top: 6px; width: 8px; height: 2px; background: var(--line); transition: width .3s, background .3s; }
#ticks button.past::after { background: var(--ember); }
#ticks button.now::after { background: var(--gold); width: 16px; }
#ticks button:hover::after { width: 16px; }
#ticks button:focus-visible { outline: 1px solid var(--gold); }

/* Hero */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 110px var(--gut) clamp(34px, 6vh, 64px); position: relative;
}
.hero .eyebrow { margin-bottom: 14px; }
h1 {
  font-weight: 500; font-stretch: 118%; font-size: clamp(3.5rem, 12.2vw, 12.5rem);
  line-height: .9; letter-spacing: -.045em; margin: 0 0 clamp(20px, 3.4vh, 36px) -.04em;
}
h1 em { font-size: 1.14em; letter-spacing: -.025em; padding-right: .08em; }
.ln { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.ln > span { display: block; }
.js .ln > span { transform: translateY(105%); }
.live .ln > span { transform: none; transition: transform 1.3s cubic-bezier(.16, 1, .3, 1); }
.live .ln:nth-child(2) > span { transition-delay: .13s; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 22px 48px; }
.lede { max-width: 46ch; font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); line-height: 1.45; text-shadow: 0 1px 18px rgba(11,8,18,.8); }

/* Shared section type */
h2 { font-weight: 500; font-stretch: 112%; font-size: clamp(2rem, 4.4vw, 4.2rem); line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }

.manifesto {
  min-height: 130svh; display: flex; flex-direction: column; justify-content: center; gap: 26px;
  padding: 0 var(--gut); max-width: 1180px;
}
.manifesto h2 { font-size: clamp(2.3rem, 6vw, 6rem); text-shadow: 0 2px 30px rgba(11,8,18,.6); }

/* Camps */
.camp-panel { min-height: 135svh; display: flex; align-items: center; padding: 0 var(--gut); }
.camp-panel.right { justify-content: flex-end; }
.panel { width: min(100%, 470px); display: grid; gap: 14px; }
.panel h2 { font-size: clamp(1.9rem, 3.5vw, 3.4rem); }
.panel > p:not(.mono) { color: var(--bone); max-width: 38ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; color: var(--mist); }

/* Ad Lab */
.lab {
  min-height: 130svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  align-items: center; gap: clamp(30px, 6vw, 90px); padding: 110px var(--gut);
}
.lab-copy { display: grid; gap: 18px; max-width: 590px; }
form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { font: 400 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mist); }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 11px 13px; color: var(--bone); border-radius: 2px;
  background: rgba(11,8,18,.6); border: 1px solid var(--line); font: 400 1rem var(--display);
  transition: border-color .25s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(-45deg, transparent 50%, var(--gold) 50%); background-size: 6px 6px; background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-repeat: no-repeat; padding-right: 34px; }
select option { background: var(--dusk); }
input::placeholder { color: #8c8189; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
textarea { resize: vertical; }

.phone-stage { perspective: 1400px; display: grid; justify-items: center; gap: 16px; }
.phone {
  --rx: 0deg; --ry: -14deg;
  width: min(300px, 74vw, 38svh); aspect-ratio: 9 / 18.6; padding: 9px; border-radius: 38px; background: #17111c;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .18s ease-out;
  box-shadow: 0 0 0 1px rgba(255,183,120,.35), 24px 40px 90px rgba(0,0,0,.65), 0 0 80px rgba(255,111,44,.22);
}
.screen { height: 100%; border-radius: 30px; overflow: hidden; background: #fbf7f1; color: #17101a; display: flex; flex-direction: column; }
.ad-head { display: flex; align-items: center; gap: 9px; padding: 24px 13px 10px; }
.ad-head i { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--night); color: var(--gold); font: 700 .9rem var(--display); }
.ad-head b { display: block; font-size: .84rem; line-height: 1.1; max-width: 190px; overflow-wrap: anywhere; }
.ad-head small { font-size: .68rem; color: #766a70; }
.ad-art { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--dusk); }
.ad-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-art p {
  position: absolute; left: 15px; right: 15px; bottom: 16px; color: #fff; font-weight: 600; font-stretch: 106%;
  font-size: clamp(1.15rem, 1.4rem, 1.5rem); line-height: 1.08; letter-spacing: -.02em; text-shadow: 0 2px 16px rgba(0,0,0,.55);
}
.ad-cta { display: flex; justify-content: space-between; padding: 14px 15px 22px; font-weight: 600; font-size: .9rem; }
.ad-cta i { font-style: normal; color: var(--ember); }
.ad-note { text-align: center; max-width: 34ch; }
.phone.pop { animation: pop .75s cubic-bezier(.16, 1, .3, 1); }
@keyframes pop { 0% { transform: rotateY(-200deg) scale(.9); } 100% { transform: rotateX(var(--rx)) rotateY(var(--ry)); } }

/* Results */
.reports { min-height: 130svh; display: grid; align-content: center; gap: clamp(26px, 5vh, 52px); padding: 110px var(--gut); }
.reports .eyebrow { margin-bottom: -14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stats > div { padding: 18px 16px 0 0; display: flex; flex-direction: column; gap: 4px; }
.stats dd { font-weight: 500; font-stretch: 120%; font-size: clamp(2.5rem, 6.8vw, 7rem); line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.stats dt { color: var(--mist); font-size: .95rem; }

/* Summit */
.summit { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 30px; padding: 104px var(--gut) 24px; }
.summit-card { width: min(100%, 540px); display: grid; gap: 18px; padding: clamp(22px, 2.6vw, 36px); background: rgba(11,8,18,.72); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 3px; }
.summit-card h2 { font-size: clamp(2.1rem, 3.6vw, 3.5rem); overflow-wrap: anywhere; }
.reach { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .92rem; color: var(--mist); }
.reach a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.reach a:hover { color: var(--gold); }
footer { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 26px; margin-top: auto; font-size: .82rem; color: var(--mist); }
.social { display: flex; gap: 18px; }
.social a { text-underline-offset: 3px; }

/* AI layer */
.dot { display: inline-block; width: 7px; height: 7px; margin-right: .7em; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 0 rgba(255,111,44,.6); animation: ping 1.8s infinite; vertical-align: 1px; }
@keyframes ping { to { box-shadow: 0 0 0 9px rgba(255,111,44,0); } }
.console { position: absolute; right: calc(var(--gut) + 8px); bottom: clamp(128px, 19vh, 170px); width: 280px; padding: 13px 15px; background: rgba(11,8,18,.56); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 3px; display: grid; gap: 8px; }
.console ol { min-height: 5.6em; font: 400 .74rem/1.6 var(--mono); color: var(--mist); }
.console li:last-child { color: var(--bone); }
.console li:last-child::after { content: ""; display: inline-block; width: .5em; height: 1em; margin-left: 3px; background: var(--gold); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ai-line { color: var(--gold); text-transform: none; letter-spacing: .02em; margin-top: 4px; min-height: 1.4em; }
.ai-line span { color: var(--bone); margin-left: .3em; }
.stalls { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.6vw, 36px); }
.stalls li { border-top: 1px solid var(--line); padding-top: 12px; font-size: .98rem; text-shadow: 0 1px 14px rgba(11,8,18,.9); }
.stalls b { display: block; font-weight: 600; font-size: 1.1rem; color: var(--gold); margin-bottom: 4px; }

.loop { min-height: 125svh; display: grid; align-content: center; gap: clamp(24px, 5vh, 46px); padding: 110px calc(var(--gut) + 8px) 110px var(--gut); }
.loop .eyebrow { margin-bottom: -14px; }
.loop h2 { max-width: 20ch; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.steps::after { content: ""; position: absolute; top: -3px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px 3px var(--ember); animation: run 7s linear infinite; }
@keyframes run { to { left: calc(100% - 7px); } }
.steps li { counter-increment: s; padding: 20px 22px 0 0; display: flex; flex-direction: column; gap: 8px; }
.steps li::before { content: "0" counter(s); font: 400 .78rem var(--mono); color: var(--gold); }
.steps b { font-weight: 500; font-stretch: 112%; font-size: clamp(1.5rem, 2.4vw, 2.2rem); letter-spacing: -.03em; line-height: 1; }
.steps p { font-size: .98rem; }
.steps small { color: var(--mist); text-transform: none; letter-spacing: .02em; }

.plate-wrap { padding: 8vh calc(var(--gut) + 8px) 8vh var(--gut); }
.plate { max-width: 1180px; margin: 0 auto; padding: clamp(22px, 3.6vw, 52px); display: grid; gap: clamp(18px, 3vh, 30px); background: rgba(11,8,18,.76); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 3px; }
.versus { width: 100%; border-collapse: collapse; font-size: .98rem; }
.versus th, .versus td { text-align: left; padding: 13px 16px 13px 0; border-top: 1px solid var(--line); vertical-align: top; }
.versus thead th { border-top: 0; font: 400 .74rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mist); }
.versus thead th:last-child { color: var(--gold); }
.versus tbody th { font-weight: 600; width: 16%; }
.versus td:nth-child(2) { color: var(--mist); width: 34%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.calc { grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(24px, 5vw, 70px); }
.calc > div { display: grid; gap: 16px; }
.slider { display: grid; gap: 4px; }
.slider label { display: flex; justify-content: space-between; align-items: baseline; }
.slider output { font: 500 1rem var(--mono); color: var(--bone); text-transform: none; font-variant-numeric: tabular-nums; }
input[type="range"] { appearance: none; min-height: 28px; padding: 0; background: none; border: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--line); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--line); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--ember); border: 3px solid var(--bone); }
input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--ember); border: 3px solid var(--bone); }
input[type="range"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.calc-out { display: grid; gap: 14px; }
.calc-out > div { border-top: 1px solid var(--line); padding-top: 10px; }
.calc-out dt { color: var(--mist); font-size: .92rem; }
.calc-out dd { font-weight: 500; font-stretch: 118%; font-size: clamp(2rem, 3.8vw, 3.4rem); line-height: 1.05; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.note { font-size: .82rem; color: var(--mist); }

.faq { grid-template-columns: .7fr 1.3fr; gap: clamp(20px, 4vw, 60px); align-items: start; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; font-weight: 500; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 1.2rem/1 var(--mono); color: var(--gold); transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 34px 16px 0; color: var(--mist); max-width: 62ch; }

/* Reveal: text starts legible, then settles */
.js .reveal { opacity: .3; transform: translateY(22px); transition: opacity .9s, transform 1s cubic-bezier(.16, 1, .3, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* Cursor */
#cursor { position: fixed; left: 0; top: 0; z-index: 40; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid var(--gold); border-radius: 50%; pointer-events: none; opacity: 0; transition: width .25s, height .25s, margin .25s, background .25s, opacity .3s; }
#cursor.on { opacity: .75; }
#cursor.hot { width: 62px; height: 62px; margin: -31px 0 0 -31px; background: rgba(255,111,44,.16); }

@media (max-width: 1100px) {
  .console { display: none; }
  #sound { display: none; }
}
@media (max-width: 900px) {
  .stalls, .calc, .faq { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 8px 0; }
  .steps::before, .steps::after { display: none; }
  .steps li { border-top: 1px solid var(--line); padding-top: 12px; padding-bottom: 12px; }
  .loop { padding-inline: var(--gut); }
  .plate-wrap { padding-inline: var(--gut); }
  .versus thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .versus tr { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
  .versus th, .versus td { border: 0; padding: 0; width: auto !important; }
  .versus tbody th { grid-column: 1 / -1; }
  .bar { padding-block: 14px; }
  .bar nav, #sound { display: none; }
  #ticks { display: none; }
  .hud { top: 70px; right: var(--gut); transform: none; }
  .alt { writing-mode: horizontal-tb; min-height: 0; font-size: .74rem; }
  .alt small { margin: 0 0 0 .3em; }
  /* The 3D object floats in the top half, so text sits low */
  .camp-panel { align-items: flex-end; min-height: 125svh; padding-bottom: 22svh; }
  .camp-panel.right { justify-content: flex-start; }
  .panel { padding-bottom: 8px; }
  #scrim, #scrim[data-side="right"] { background: linear-gradient(0deg, rgba(11,8,18,.88), rgba(11,8,18,.34) 50%, transparent 66%); }
  #scrim[data-side="both"] { background: rgba(11,8,18,.62); }
  h1 { font-size: clamp(3.5rem, 19.5vw, 9rem); }
  .phone { width: min(300px, 74vw); }
  .lab { grid-template-columns: 1fr; padding-block: 90px 70px; }
  .phone { --ry: -8deg; }
  .stats { grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .stats > div { padding-bottom: 14px; }
  .reports { padding-block: 90px 80px; }
  /* Logo sits in the upper part of the screen, form follows */
  .summit { justify-content: flex-end; padding-top: 58svh; padding-bottom: 66px; }
  .summit-card { width: 100%; }
}
@media (max-width: 460px) {
  .field-row { grid-template-columns: 1fr; }
  .btn { flex: 1 1 auto; }
  .btn-small { flex: none; }
}
@media (hover: none), (pointer: coarse) { #cursor { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .ln > span, .js .reveal { transform: none; opacity: 1; transition: none; }
  #intro svg, .dot, .steps::after { animation: none; }
  .phone { transition: none; }
  .phone.pop { animation: none; }
}
