/* ============================================================
   JETLAG — Basis: Fonts, Reset, Fluid-System, Utilities
   ============================================================ */

/* Display: Raleway (Circoloco-Duktus) — Variable 100–900, latin + latin-ext.
   Archivo-Variable.woff2 bleibt als Rollback auf Platte. */
@font-face {
  font-family: "Raleway";
  src: url("../assets/fonts/Raleway-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Raleway";
  src: url("../assets/fonts/Raleway-Variable-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "B612 Mono";
  src: url("../assets/fonts/B612Mono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "B612 Mono";
  src: url("../assets/fonts/B612Mono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--color-dark);   /* nur beim Overscroll sichtbar */
  scrollbar-gutter: stable;
  /* Flugzeug-Cursor: SVG für Retina-Schärfe, PNG-Fallback (Safari rastert keine SVG-Cursor) */
  cursor: url("../assets/img/cursor-plane.svg") 1 1, url("../assets/img/cursor-plane.png") 1 1, auto;
}

body {
  background: var(--color-light);
  color: var(--color-dark);
  /* UI-Stimme: Raleway (Circoloco-Duktus), Medium für Uppercase-Lesbarkeit */
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--size-font);
  line-height: var(--lh-body);
  text-transform: uppercase;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; text-transform: inherit; color: inherit; background: none; border: 0; cursor: url("../assets/img/cursor-plane-red.svg") 1 1, url("../assets/img/cursor-plane-red.png") 1 1, pointer; }
a { color: inherit; text-decoration: none; cursor: url("../assets/img/cursor-plane-red.svg") 1 1, url("../assets/img/cursor-plane-red.png") 1 1, pointer; }
ul, ol { list-style: none; }

/* Anti-Flicker: page-transition.js blendet ein. <noscript> hebt es wieder auf. */
.page-content { opacity: 0; visibility: hidden; }

/* ---- Instrumente bleiben Monospace ----
   Split-Flap, Solari-Tafeln, Uhren und Codes brauchen feste Zeichenbreite —
   und der Cockpit-Kontrast zur Raleway-UI ist gewollt. */
.board_head, .board_flight, .board_loc, .board_date, .board_time, .board_status,
.board_gate, .board_desc,
.hud_edge, .hud_clocks, .clock_time, .clock_city, .clock_status, .night_line, .dualclock_label,
.card_count, .menu_link_gate, .nav_link_gate, .events_meta_idx, .home-events_idx, .nextup_row,
.sealed_code, .sealed_note,
.pass_head, .pass_meta, .pass_price,
.stat_label, .stat_note,
.stagescene_meta, .stagescene_progress, .pipeline_idx, .factline,
.flightpath_idx, .flightpath_alt, .flightpath_phase,
.artline_text, .triptych_idx, .converge_label, .converge_head, .groundops_title, .specs,
.pointlist_idx {
  font-family: var(--font-mono);
  font-weight: 400;
}

/* ---- Typografie ---- */
h1, h2, .display {
  font-family: var(--font-display);
  font-stretch: var(--font-display-stretch);
  font-weight: 900;
  line-height: var(--lh-heading);
  letter-spacing: .01em;
  font-feature-settings: "lnum" 1;
  text-transform: uppercase;
}
/* EINE Headline-Größe für Seiten- und Sektionstitel (noart-Prinzip):
   der einzige Größensprung ist Tag (.75em) → Headline (3em). */
h1, h2, .heading-lg { font-size: var(--text-h2); }
p { font-size: var(--text-body); }

.text-large { font-size: var(--text-body-large); line-height: var(--lh-body); }
.text-tag { font-size: var(--text-tag); }
.text-tag-small { font-size: var(--text-tag-small); }
.text-bold { font-weight: 700; }
.text-dim { opacity: var(--opacity-muted); }
.text-justify { text-align: justify; }
.text-right { text-align: right; }
.text-brand { color: var(--color-brand); }
.text-signal { color: var(--color-signal); }
.text-caution { color: var(--color-caution); }

/* Optisches Leading-Trim (Technik aus der noart-Analyse) */
:is(h1, h2, .display) { display: flow-root; }
:is(h1, h2, .display)::before { content: ""; display: table; margin-bottom: calc(-.5lh + .38em); }
:is(h1, h2, .display)::after  { content: ""; display: table; margin-bottom: calc(-.5lh + .37em); }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--size-container); margin-inline: auto; }
.padding-global { width: 100%; padding-inline: var(--padding-global); position: relative; }
.padding-section { width: 100%; padding-block: var(--padding-section); }
/* Konvention: Folgesektion GLEICHER Hintergrundfarbe bekommt is-top-0
   (ein gemeinsamer Zwischenraum); nach einem Farbwechsel volles Padding. */
.padding-section.is-top-0 { padding-top: 0; }
/* Derzeit ungenutzt — frei für kompakte Einzelmodul-Inseln. */
.padding-section.is-tight { padding-block: 6em; }

.grid { display: grid; grid-auto-columns: 1fr; gap: var(--space-md); }
.grid.is-2 { grid-template-columns: 1fr 1fr; }
.grid.is-3 { grid-template-columns: 1fr 1fr 1fr; }
/* Tag-neben-Headline-Raster: Tag oben verankern statt vertikal zentrieren */
.grid.is-top { align-items: start; }
@media (max-width: 767px) {
  .grid.is-2, .grid.is-3 { grid-template-columns: 1fr; row-gap: 2rem; }
}

/* Sektionskopf (noart-Muster): Tag links, Text-Link rechts, eine Mittellinie.
   Abstand zum Inhalt kommt vom Eltern-Gap (.flex-col is-gap-md), nicht von hier. */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-md);
}

.flex-col { display: flex; flex-direction: column; gap: var(--space-sm); }
.flex-col.is-gap-md { gap: var(--space-md); }
.flex-col.is-gap-lg { gap: var(--space-lg); }
.flex-col.is-gap-xl { gap: var(--space-xl); }
.flex-col.is-start { align-items: flex-start; }

/* Fließtext: Uppercase-Grundschrift zurücknehmen + einheitliche Zeilenlänge.
   Maß 26em + lh 1.2 = noart-Dichte (deren 18px-Copy läuft auf ~440px).
   lh gewinnt gegen .text-large nur durch Kaskaden-Reihenfolge — .text-body
   muss NACH .text-large definiert bleiben. */
.text-body { text-transform: none; max-width: 26em; line-height: 1.2; font-weight: 400; }
.text-body p + p { margin-top: var(--space-md); }
.max-w-text { max-width: 26em; }
/* Zentrierte Inhalts-Spur — exakt die Breite der Startseiten-Tafeln.
   rem statt em: die Boards messen ihre 84em in der kleinen Tafel-Schrift
   (= 76 Root-em); em-basierte max-width auf Body-Schrift kappt fast nichts. */
.rail { width: 100%; max-width: 76rem; margin-inline: auto; }
/* Headline über einem Copy-Block: rechte Kante fluchtet mit dem 26em-Copy-Maß
   (9.75em × 3em-H2 = 26em × 1.125em-Copy) — Blocksatz aus reveal.js macht
   daraus einen bündigen Block. ≤991 fällt die Copy auf 1em (416px) und die
   Headline auf 2em → 13em hält die Kanten weiter bündig. */
.max-w-heading { max-width: 9.75em; }
@media (max-width: 991px) { .max-w-heading { max-width: 13em; } }
/* Copy-Block als Ganzes mittig in seiner Grid-Spalte (Innen-Ausrichtung bleibt
   linksbündig): Breite aufs Copy-Maß gekappt (29.25em × 16px = 26em × 18px),
   Rest-Raum symmetrisch via auto-Margins — Landet in der noart-Copy-Zone
   (~58–92 % Seitenbreite). ≤991 schrumpft die Copy auf 26em × 1em → mitziehen. */
.flex-col.is-center-block { width: 100%; max-width: 29.25em; margin-inline: auto; }
@media (max-width: 991px) { .flex-col.is-center-block { max-width: 26em; } }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ---- Tag-Chip (das Grundmodul) ---- */
.tag { display: inline-flex; align-items: center; gap: var(--space-2xs); white-space: nowrap; }
.tag_dot { width: var(--tag-dot); height: var(--tag-dot); background: currentColor; flex: none; }
.tag_dot.is-brand { background: var(--color-brand); }
.tag_dot.is-signal { background: var(--color-signal); }
.tag_text { font-size: var(--text-tag); }
.tag.is-grey { color: var(--color-grey); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; justify-content: center; align-items: center;
  gap: var(--space-2xs); white-space: nowrap; position: relative;
  padding: var(--padding-button); border-radius: var(--radius-small);
  /* kein CSS-Hover — Feedback kommt aus Cursor + Scramble (siehe Analyse) */
}
.btn_text { font-size: var(--text-tag); line-height: 1; }
.btn_icon { width: .5em; height: .5em; flex: none; }
.btn.is-primary { background: var(--color-brand); color: var(--color-light); border: var(--border-brand); }
.btn.is-dark { background: var(--color-dark); color: var(--color-light); border: var(--border-dark); }
.btn.is-outline { background: transparent; color: var(--color-dark); border: var(--border-dark); }
/* Text-Link-Variante (noart „Explore all ↳"): nur Label + Pfeil, kein Rahmen */
.btn.is-link { padding: 0; border: 0; background: none; border-radius: 0; color: inherit; }
.btn.is-outline-light { background: transparent; color: var(--color-light); border: 1px solid var(--color-light); }
.btn.is-disabled { opacity: var(--opacity-muted); pointer-events: none; }

/* ---- Eckwinkel-Marker (Leitmotiv) ---- */
.corner { position: absolute; width: var(--marker-size); height: var(--marker-size); pointer-events: none; }
.corner.is-tl { top: 0; left: 0; border-top: 1px solid currentColor; border-left: 1px solid currentColor; }
.corner.is-tr { top: 0; right: 0; border-top: 1px solid currentColor; border-right: 1px solid currentColor; }
.corner.is-bl { bottom: 0; left: 0; border-bottom: 1px solid currentColor; border-left: 1px solid currentColor; }
.corner.is-br { bottom: 0; right: 0; border-bottom: 1px solid currentColor; border-right: 1px solid currentColor; }

/* ---- Sektions-Varianten ---- */
.section-dark { background: var(--color-dark); color: var(--color-light); }
.section-dark .tag_dot { background: currentColor; }
.section-dark .btn.is-outline { color: var(--color-light); border-color: var(--color-light); }

/* ---- Utilities ---- */
.is-overflow-hidden { overflow: hidden; }
.blend-difference { color: var(--color-light); mix-blend-mode: difference; }
.isolate { isolation: isolate; }
.hide-desktop { display: none; }
@media (max-width: 991px) {
  .hide-tablet { display: none; }
  .hide-desktop { display: block; }
}
@media (max-width: 767px) {
  .hide-mobile { display: none; }
}

.divider { width: 100%; height: 1px; background: var(--color-border); }
.section-dark .divider { background: var(--color-light-20); }

/* Fokus sichtbar (Verbesserung ggü. Original) */
:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }

/* Reduced Motion: harte Abschaltung aller CSS-Transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
