:root {
  --bg: #e8e5df;
  --bg-deep: #d9d5cd;
  --ink: #151413;
  --muted: #67635c;
  --line: rgba(21, 20, 19, 0.12);
  --clay: #c4502b;
  --glass: rgba(240, 237, 232, 0.72);
  --gutter: clamp(16px, 4vw, 48px);
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--clay); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- stage ---------- */
.stage {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 80% at 50% 30%, #f1efea 0%, var(--bg) 55%, var(--bg-deep) 100%);
}
#scene {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; opacity: 0; transition: opacity 1.2s ease;
  touch-action: pan-y;
}
.ready #scene { opacity: 1; }

.grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* No-WebGL fallback: a still-life rendered in CSS */
.fallback {
  position: absolute; left: 50%; bottom: 18vh; transform: translateX(-50%);
  display: none; gap: 0.06em; align-items: flex-end;
  font: 600 clamp(84px, 22vw, 280px)/0.8 var(--sans); letter-spacing: -0.02em;
}
.no-webgl .fallback { display: flex; }
.no-webgl #scene { display: none; }
.fb-letter {
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 26px 22px rgba(40, 32, 22, 0.22)) drop-shadow(0 4px 4px rgba(40, 32, 22, 0.25));
}
.fb-i { background-image: linear-gradient(160deg, #3a3a3a, #0c0c0c 55%, #2a2a2a); }
.fb-s { background-image: linear-gradient(170deg, #fafafa 0%, #9c9c9c 35%, #f2f2f2 52%, #6f6f6f 70%, #d8d8d8 100%); }
.fb-h { background-image: linear-gradient(160deg, #e2704a, #b8441f 60%, #8f3214); }
.fb-e { background-image: linear-gradient(160deg, #ffffff, #ebe6de 60%, #cfc8bc); }

/* ---------- loader ---------- */
.loader {
  position: fixed; left: var(--gutter); bottom: var(--gutter); z-index: 30;
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  transition: opacity 0.6s ease;
}
.loader-bar { width: 96px; height: 1px; background: var(--line); overflow: hidden; }
#loader-fill { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.4s ease; }
.ready .loader, .no-webgl .loader { opacity: 0; pointer-events: none; }

/* ---------- chrome ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top) + 18px) var(--gutter) 18px;
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.mark {
  font: 600 15px/1 var(--sans); letter-spacing: 0.02em; text-decoration: none;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: var(--glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.top nav {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.top nav a {
  font-size: 13px; font-weight: 500; text-decoration: none; padding: 7px 13px; border-radius: 999px;
}
.top nav a:hover { background: rgba(21, 20, 19, 0.06); color: var(--ink); }

/* ---------- content ---------- */
main { position: relative; z-index: 10; pointer-events: none; }
main a, main button, main input, main textarea, main label, .panel-inner { pointer-events: auto; }

.eyebrow {
  margin: 0 0 18px; font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.eyebrow .dot { margin: 0 0.4em; }

.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 104px) var(--gutter) calc(env(safe-area-inset-bottom) + 28px);
}
.hero-copy { max-width: 760px; pointer-events: auto; }
h1 {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 5.4vw, 76px); line-height: 0.98; letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 em { font-style: italic; color: var(--muted); }

.hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hint {
  margin: 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  transition: opacity 0.8s ease;
}
.no-webgl .hint, .reduced .hint { display: none; }
.chip {
  white-space: nowrap; flex: none;
  font: 500 13px/1 var(--sans); color: var(--ink); cursor: pointer;
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.chip:hover { border-color: var(--ink); }

.panel {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 96px var(--gutter);
}
.panel-inner {
  width: 100%; max-width: 560px;
  padding: clamp(24px, 3.4vw, 44px);
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 30px 60px -30px rgba(50, 40, 30, 0.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1);
}
h2 {
  margin: 0 0 28px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 4.4vw, 56px); line-height: 1; letter-spacing: -0.01em;
}
h3 { margin: 0 0 4px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
h3 a { text-decoration: none; }
h3 a::after { content: " \2197"; font-weight: 400; color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; }
.item {
  display: grid; grid-template-columns: 34px 1fr; gap: 6px;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.item:first-child { border-top: 0; padding-top: 4px; }
.item p { margin: 6px 0 0; color: #34312d; }
.idx { font-size: 12px; font-weight: 500; color: var(--muted); padding-top: 5px; font-variant-numeric: tabular-nums; }
.meta { font-size: 13px; color: var(--muted) !important; margin-top: 0 !important; }
.press { font-size: 13px; color: var(--muted) !important; }
.facts { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.facts li {
  font-size: 12px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.35);
}

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -23px; top: 7px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--ink);
}
.timeline li:first-child::before { background: var(--clay); border-color: var(--clay); }
.timeline time { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline p { margin: 4px 0 0; color: #34312d; }
.timeline strong { color: var(--ink); font-weight: 600; }

.lede { margin: -12px 0 24px; color: #34312d; }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  font: 16px/1.4 var(--sans); color: var(--ink); width: 100%;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.55);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: rgba(255, 255, 255, 0.8); }
.field [aria-invalid="true"] { border-color: var(--clay); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.send {
  font: 500 15px/1 var(--sans); color: var(--bg); background: var(--ink); cursor: pointer;
  padding: 14px 22px; border: 0; border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.send:hover { background: #000; transform: translateY(-1px); }
.send[disabled] { opacity: 0.55; cursor: progress; transform: none; }
.status { margin: 0; font-size: 14px; color: var(--muted); }
.status.ok { color: #2f6b3a; }
.status.err { color: var(--clay); }

.links { list-style: none; display: flex; gap: 22px; padding: 22px 0 0; margin: 26px 0 0; border-top: 1px solid var(--line); }
.links a { font-weight: 500; text-decoration: none; }
.links a::after { content: " \2197"; color: var(--muted); }

.foot {
  position: relative; z-index: 10;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px var(--gutter) calc(env(safe-area-inset-bottom) + 28px);
  font-size: 12px; color: var(--muted);
}
.foot p { margin: 0; }

@media (max-width: 720px) {
  .top nav { gap: 0; }
  .top nav a { padding: 7px 9px; font-size: 12.5px; }
  .hero { padding-top: calc(env(safe-area-inset-top) + 92px); }
  .panel { padding: 72px 16px; align-items: flex-end; }
  .panel-inner { border-radius: 18px; background: rgba(240, 237, 232, 0.82); }
  .item { grid-template-columns: 26px 1fr; }
  .links { gap: 18px; }
}

@media (prefers-reduced-transparency: reduce) {
  .panel-inner, .top nav, .mark, .chip { background: #efece7; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
