:root {
  --paper: #EFEBE3;
  --paper-2: #E6E1D6;
  --ink: #16191A;
  --ink-2: #4A4F4C;
  --mute: #8A8D86;
  --rule: rgba(22, 25, 26, .14);
  --green: #177B39;
  --green-hi: #1FA34E;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter Tight', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-weight: 400; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; }
em { font-style: italic; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--green); color: var(--paper); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }

#scene { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; display: block; } /* lvh: no resize when the phone URL bar hides */
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .09;
  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='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 33%{transform:translate(-3%,2%)} 66%{transform:translate(2%,-3%)} 100%{transform:translate(0,0)} }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px; padding: 22px var(--pad);
  mix-blend-mode: multiply;
}
.brand { font-family: var(--sans); font-weight: 600; letter-spacing: .18em; font-size: 14px; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand b { color: var(--green); font-weight: 700; }
.brand-mark { width: 14px; height: 14px; border: 1.5px solid var(--ink); position: relative; }
.brand-mark::after { content: ''; position: absolute; left: -1.5px; right: -1.5px; top: 5px; height: 1.5px; background: var(--ink); }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { font-size: 13px; text-decoration: none; color: var(--ink-2); position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--green); transition: right .5s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav-meta { color: var(--mute); }

main, .foot { position: relative; z-index: 2; }
main { overflow-x: clip; }
.eyebrow { color: var(--green); margin-bottom: 22px; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.4vw, 104px); line-height: .95; letter-spacing: -.02em; }
.h2 em { color: var(--green); }

/* HERO */
.hero { min-height: 100vh; min-height: 100svh; padding: 18vh var(--pad) 6vh; display: flex; flex-direction: column; position: relative; pointer-events: none; }
.hero a, .hero aside { pointer-events: auto; }
.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(58px, 10.5vw, 188px); line-height: .86; letter-spacing: -.035em; max-width: 12ch; }
.hero-title em { color: var(--green); }
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: inline-block; transform: translateY(105%); transition: transform 1.4s var(--ease); }
.is-ready .line > span { transform: none; }
.is-ready .line:nth-child(2) > span { transition-delay: .12s; }
.is-ready .line:nth-child(3) > span { transition-delay: .24s; }
.hero-foot { margin-top: auto; display: flex; align-items: flex-end; gap: 48px; flex-wrap: wrap; }
.lede { text-shadow: 0 0 14px var(--paper), 0 0 4px var(--paper); max-width: 40ch; font-size: clamp(15px, 1.25vw, 18px); color: var(--ink-2); }
.lede strong { color: var(--ink); font-weight: 600; }
.cta {
  display: inline-flex; align-items: center; gap: 18px; text-decoration: none;
  padding: 16px 18px 16px 24px; border: 1px solid var(--ink); font-size: 14px; font-weight: 500;
  background: var(--paper); position: relative; overflow: hidden; isolation: isolate;
}
.cta::before { content: ''; position: absolute; inset: 0; background: var(--ink); transform: translateY(101%); transition: transform .6s var(--ease); z-index: -1; }
.cta:hover { color: var(--paper); }
.cta:hover::before { transform: none; }
.cta i { font-style: normal; width: 28px; height: 28px; display: grid; place-items: center; background: var(--green); color: var(--paper); transition: transform .6s var(--ease); }
.cta:hover i { transform: translateY(3px); }

.ticker {
  position: absolute; right: var(--pad); top: 22vh; width: min(340px, 30vw);
  background: rgba(239, 235, 227, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--rule); padding: 16px 18px;
}
.ticker-head { display: flex; align-items: center; gap: 10px; color: var(--ink); padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green-hi); box-shadow: 0 0 0 0 rgba(31,163,78,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(31,163,78,0); } 100% { box-shadow: 0 0 0 0 rgba(31,163,78,0); } }
.ticker-list { list-style: none; height: 168px; overflow: hidden; font-size: 10.5px; text-transform: none; letter-spacing: .02em; }
.ticker-list li { display: grid; grid-template-columns: 62px 1fr 14px; gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--rule); color: var(--ink-2); animation: tick-in .7s var(--ease) both; }
.ticker-list li time { color: var(--mute); }
.ticker-list li b { color: var(--green); font-weight: 500; text-align: right; }
.ticker-list li:first-child { color: var(--ink); }
@keyframes tick-in { from { opacity: 0; transform: translateY(-12px); } }
.coords { position: absolute; right: var(--pad); bottom: 6vh; display: flex; gap: 12px; color: var(--mute); writing-mode: vertical-rl; transform: rotate(180deg); }

/* STRUKTUR (sticky exploded view) */
.struktur { height: 560vh; position: relative; pointer-events: none; }
.struktur-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 16vh var(--pad) 8vh; display: flex; flex-direction: column; justify-content: space-between; }
.struktur-intro .h2 { max-width: 11ch; }
.struktur-panel {
  align-self: flex-start; width: min(420px, 90vw);
  background: rgba(239, 235, 227, .8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-left: 2px solid var(--green); padding: 22px 26px;
  opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.struktur-panel.on { opacity: 1; transform: none; }
.panel-no { color: var(--green); font-size: 12px; }
.panel-title { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; margin: 8px 0 12px; }
.panel-text { color: var(--ink-2); font-size: 15px; min-height: 5.5em; }
.panel-bar { margin-top: 18px; height: 2px; background: var(--rule); }
.panel-bar span { display: block; height: 100%; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: left; }

.labels { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.label {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  white-space: nowrap; opacity: 0; transition: opacity .4s, color .4s; will-change: transform;
}
.label::before { content: ''; width: 46px; height: 1px; background: currentColor; opacity: .6; }
.label b { font-weight: 500; color: var(--mute); }
.label.active { color: var(--green); }
.label.active b { color: var(--green); }

/* 24H */
.tag, .prinzip, .standorte { background: var(--paper); }
.tag { padding: 18vh var(--pad) 14vh; border-top: 1px solid var(--rule); }
.tag-head { margin-bottom: 9vh; }
.clock { height: 1px; background: var(--rule); position: relative; margin-bottom: 0; }
.clock-line { position: absolute; left: 0; top: -1px; height: 3px; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: left; }
.day { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); }
.day li { padding: 26px 22px 34px 0; border-right: 1px solid var(--rule); opacity: .18; transition: opacity .8s var(--ease); }
.day li:nth-child(4n) { border-right: 0; }
.day li:nth-child(n+5) { border-top: 1px solid var(--rule); }
.day li.on { opacity: 1; }
.day time { display: block; font-family: var(--serif); font-size: clamp(40px, 4.2vw, 68px); line-height: 1; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.day li.on time { color: var(--green); }
.day p { font-size: 14.5px; color: var(--ink-2); max-width: 30ch; }

/* PRINCIPLES */
.prinzip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0 var(--pad) 16vh; }
.p-card { padding: 36px 32px 44px 0; border-top: 2px solid var(--ink); margin-right: 32px; }
.p-no { color: var(--green); }
.p-card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 2.8vw, 44px); line-height: 1.02; margin: 18px 0 14px; }
.p-card p { color: var(--ink-2); font-size: 15px; max-width: 34ch; }

/* LOCATIONS */
.standorte { padding: 14vh var(--pad) 18vh; border-top: 1px solid var(--rule); }
.orte { display: grid; grid-template-columns: 1fr 1fr; margin-top: 10vh; }
.ort { padding: 0 40px 0 0; }
.ort + .ort { padding: 0 0 0 40px; border-left: 1px solid var(--rule); }
.ort-coord { color: var(--mute); }
.ort-name { font-family: var(--serif); font-weight: 400; font-size: clamp(72px, 11vw, 190px); line-height: .9; letter-spacing: -.04em; margin: 14px 0 20px; }
.ort p { color: var(--ink-2); max-width: 38ch; }
.ort-link { display: inline-block; margin-top: 22px; color: var(--green); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }

/* FINALE */
.finale { background: var(--ink); color: var(--paper); padding: 20vh var(--pad) 18vh; position: relative; overflow: hidden; }
.finale .eyebrow { color: var(--green-hi); }
.finale-title { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 7.5vw, 128px); line-height: .92; letter-spacing: -.03em; position: relative; z-index: 1; }
.finale-title em { color: var(--green-hi); }
.finale-sub { margin-top: 40px; color: #B9BBB4; position: relative; z-index: 1; }
.finale-sub strong { color: var(--paper); font-weight: 600; }
.blueprint { position: absolute; right: -4%; bottom: 6%; width: min(760px, 70vw); color: rgba(239,235,227,.28); }
.bp { stroke-dasharray: 1600; stroke-dashoffset: 1600; transition: stroke-dashoffset 3.2s var(--ease); }
.bp.dim { opacity: .5; }
.finale.in .bp { stroke-dashoffset: 0; }

.foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px var(--pad); background: var(--ink); color: #8A8D86; border-top: 1px solid rgba(239,235,227,.1); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--paper); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-meta { margin-left: auto; }
  .ticker { position: relative; right: auto; top: auto; width: 100%; margin-top: 32px; }
  .hero { padding-top: 16vh; }
  .coords { display: none; }
  .day { grid-template-columns: 1fr 1fr; }
  .day li:nth-child(2n) { border-right: 0; }
  .day li:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .prinzip, .orte { grid-template-columns: 1fr; }
  .p-card { margin: 0 0 24px; }
  .ort + .ort { padding: 48px 0 0; border-left: 0; border-top: 1px solid var(--rule); margin-top: 48px; }
  .struktur-panel { align-self: stretch; width: auto; }
  .label span { display: none; }
  .label::before { width: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .line > span, .reveal, .bp { transition: none !important; transform: none; opacity: 1; stroke-dashoffset: 0; }
}
