/* ========================================================================
   SCROLLYTELLING LONGFORM · Johanna Heiß
   Kinematisches Reportage-Design — dunkel, parallax, chapters
   ======================================================================== */

:root {
  --bg: #0B0C10;
  --bg-2: #15171C;
  --fg: #F5F1E8;
  --fg-soft: #C7C2B4;
  --muted: #7F7A6D;
  --gold: #E0A44A;
  --gold-deep: #B77F2E;
  --blood: #D0412A;
  --glacier: #7FA7B7;
  --serif: "Fraunces", "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(1rem, 4vw, 3rem);
  --container: min(1200px, 100% - 2 * var(--pad));
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
::selection { background: var(--gold); color: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.wrap { max-width: var(--container); margin-inline: auto; }

/* ------- progress bar ------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.progress::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  transition: transform 0.12s linear;
}

/* ------- top nav ------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 70;
  padding: 1rem var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(to bottom, rgba(11,12,16,0.85), rgba(11,12,16,0));
  backdrop-filter: blur(4px);
}
.topbar-logo {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.topbar-chapter {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-soft);
  opacity: 0.85;
}
.topbar-right {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
.lang-toggle {
  display: inline-flex;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  border: 1px solid var(--fg);
}
.lang-toggle button {
  padding: 0.35rem 0.55rem;
  text-transform: uppercase;
  color: var(--fg);
  background: transparent;
}
.lang-toggle button + button { border-left: 1px solid var(--fg); }
.lang-toggle button.active { background: var(--fg); color: var(--bg); }

/* ------- chapter shell ------- */
.chapter {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(6rem, 10vh, 10rem) var(--pad) clamp(4rem, 8vh, 8rem);
  position: relative;
  overflow: hidden;
}
.chapter-inner { width: 100%; max-width: var(--container); margin-inline: auto; position: relative; z-index: 2; }

.chapter-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.chapter.is-on .chapter-num { opacity: 1; transform: translateY(0); }

.chapter-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem 0;
  max-width: 18ch;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease 0.15s, transform 1s ease 0.15s;
}
.chapter-title em { font-style: italic; color: var(--gold); }
.chapter-title .strong { font-weight: 700; }
.chapter.is-on .chapter-title { opacity: 1; transform: translateY(0); }

.chapter-body {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.6;
  color: var(--fg-soft);
  max-width: 40ch;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.1s ease 0.3s, transform 1.1s ease 0.3s;
}
.chapter-body p { margin: 0 0 1em 0; }
.chapter.is-on .chapter-body { opacity: 1; transform: translateY(0); }

/* ------- hero chapter ------- */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 6rem var(--pad);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(224,164,74,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.hero-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.5rem, 12vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0;
}
.hero-title em { font-style: italic; font-weight: 400; color: var(--gold); }
.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  color: var(--fg-soft);
  max-width: 40ch;
  margin: 2rem auto 0;
  line-height: 1.3;
}
.hero-scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  animation: fallin 3s ease-in-out infinite;
}
.hero-scroll::after {
  content: ""; width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}
@keyframes fallin {
  0% { opacity: 0.4; transform: translate(-50%, 0); }
  50% { opacity: 1; transform: translate(-50%, 8px); }
  100% { opacity: 0.4; transform: translate(-50%, 0); }
}

/* ------- split chapter (text + visual) ------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse { direction: rtl; }
  .split.reverse > * { direction: ltr; }
}

.visual {
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.visual-tirol {
  background:
    radial-gradient(ellipse 80% 60% at 30% 100%, #2D3E50 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 70% 100%, #1F2D3D 0%, transparent 60%),
    linear-gradient(to bottom, #070B14 0%, #15263A 40%, #3A4A5E 80%, #E0A44A 100%);
}
.visual-tirol::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 1000' preserveAspectRatio='none'><polygon fill='%230B0C10' points='0,1000 0,720 90,600 160,680 240,500 320,640 400,440 480,620 560,520 640,640 720,560 800,700 800,1000'/><polygon fill='%23161821' opacity='0.75' points='0,1000 0,820 120,740 200,800 300,680 400,780 500,700 620,820 720,740 800,820 800,1000'/></svg>") no-repeat bottom center / cover;
}
.visual-wien {
  background:
    radial-gradient(circle at 20% 80%, rgba(208,65,42,0.35) 0%, transparent 45%),
    radial-gradient(circle at 80% 40%, rgba(224,164,74,0.2) 0%, transparent 50%),
    linear-gradient(140deg, #0B0C10 0%, #1A1B25 60%, #2C1D1A 100%);
}
.visual-wien::after {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 1000' preserveAspectRatio='none'><g fill='%230B0C10'><rect x='0' y='720' width='80' height='280'/><rect x='90' y='660' width='70' height='340'/><rect x='170' y='780' width='60' height='220'/><rect x='240' y='700' width='100' height='300'/><polygon points='340,700 370,620 400,700'/><rect x='350' y='700' width='40' height='300'/><rect x='410' y='740' width='80' height='260'/><rect x='500' y='680' width='70' height='320'/><rect x='580' y='760' width='60' height='240'/><rect x='650' y='700' width='90' height='300'/><rect x='740' y='740' width='60' height='260'/></g></svg>") no-repeat bottom center / cover;
}
.visual-klima {
  background:
    radial-gradient(ellipse at center, rgba(127,167,183,0.35) 0%, transparent 60%),
    linear-gradient(160deg, #0B0C10 0%, #0F2A33 55%, #1C4150 100%);
}
.visual-klima::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 40px, rgba(127,167,183,0.06) 40px 41px);
}
.visual-handwerk {
  background:
    linear-gradient(135deg, #0B0C10 0%, #1B1410 50%, #3A1F10 100%);
}
.visual-handwerk::after {
  content: "›››";
  position: absolute;
  bottom: 1rem; right: 1.5rem;
  font-family: var(--serif);
  font-size: 8rem;
  color: var(--gold);
  line-height: 0.8;
  opacity: 0.6;
  font-style: italic;
}
.visual-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  background: rgba(11,12,16,0.75);
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--gold);
}

/* ------- pull quote chapter ------- */
.pullquote {
  min-height: 80vh;
  display: grid;
  place-items: center;
  padding: 6rem var(--pad);
  text-align: center;
  background: var(--bg);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pullquote blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  line-height: 1.18;
  max-width: 24ch;
  margin: 0 auto;
  color: var(--fg);
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}
.pullquote.is-on blockquote { opacity: 1; transform: translateY(0); }
.pullquote blockquote::before {
  content: "„";
  font-size: 6rem;
  line-height: 0;
  color: var(--gold);
  display: block;
  margin-bottom: 1.5rem;
}
.pullquote cite {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 2rem;
  color: var(--gold);
}

/* ------- themes grid ------- */
.themes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.theme-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  align-items: baseline;
  transition: padding 0.3s;
}
@media (min-width: 800px) {
  .theme-row { grid-template-columns: 100px 1.2fr 2fr; gap: 2rem; padding: 2.5rem 0; }
  .theme-row:hover { padding-left: 1.2rem; }
}
.theme-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: var(--gold);
}
.theme-label {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.theme-label em { font-style: italic; color: var(--fg-soft); font-size: 0.7em; }
.theme-body {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--fg-soft);
  max-width: 48ch;
}

/* ------- archive cards (scroll reveal) ------- */
.archive-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.archive-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.2rem;
  padding: 1.8rem 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  align-items: baseline;
  transition: background 0.3s, padding 0.3s;
}
.archive-card:last-child { border-bottom: 1px solid rgba(255,255,255,0.12); }
.archive-card:hover { padding-left: 1rem; padding-right: 1rem; background: rgba(224,164,74,0.06); }
.ac-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  min-width: 100px;
}
.ac-main { min-width: 0; }
.ac-medium {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.ac-title {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.7vw, 1.6rem);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem 0;
}
.ac-title:hover { color: var(--gold); }
.ac-teaser {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--fg-soft);
  line-height: 1.45;
  margin: 0;
  max-width: 60ch;
}
.ac-arrow {
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--gold);
  white-space: nowrap;
  align-self: center;
}
@media (max-width: 700px) {
  .archive-card { grid-template-columns: 1fr; }
  .ac-arrow { display: none; }
}

/* ------- stations ------- */
.stations-l {
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.st-row-l {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (min-width: 800px) {
  .st-row-l {
    grid-template-columns: 200px 1.5fr 1fr auto;
    gap: 2rem;
    align-items: baseline;
  }
}
.st-row-l .y {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.st-row-l .r { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }
.st-row-l .p { font-family: var(--serif); font-style: italic; color: var(--fg-soft); }
.st-row-l .n { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }

/* ------- final / contact chapter ------- */
.final {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 6rem var(--pad);
  position: relative;
  background: radial-gradient(ellipse at center, rgba(224,164,74,0.1) 0%, transparent 65%);
}
.final h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 2rem 0;
  max-width: 14ch;
}
.final h2 em { font-style: italic; color: var(--gold); }

.final-links {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.final-links a {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.8rem 1.3rem;
  border: 1px solid var(--fg);
  transition: background 0.2s, color 0.2s;
}
.final-links a:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.final-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  color: var(--fg-soft);
  max-width: 36ch;
  margin: 0 auto 2rem;
  line-height: 1.4;
}

/* ------- footer ------- */
.foot-l {
  padding: 2rem var(--pad);
  background: #05060A;
  color: var(--muted);
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
@media (min-width: 700px) { .foot-l { grid-template-columns: auto 1fr auto; align-items: center; } }
.foot-l .fc { text-align: center; }
.foot-l .fr { text-align: right; }

/* ------- version switcher ------- */
.vswitch {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 80;
  display: flex;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(11,12,16,0.9);
  border: 1px solid var(--fg-soft);
  padding: 0.35rem;
  backdrop-filter: blur(8px);
}
.vswitch a {
  padding: 0.3rem 0.55rem;
  color: var(--fg-soft);
  transition: background 0.15s, color 0.15s;
}
.vswitch a:hover { color: var(--gold); }
.vswitch a.active { background: var(--gold); color: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  .hero-scroll { animation: none; }
  .chapter-num, .chapter-title, .chapter-body, .pullquote blockquote { opacity: 1 !important; transform: none !important; transition: none !important; }
}
