/* ==========================================================================
   ENERSON ELEKTRO - base.css
   Tokens · Reset · Typografie · Raster · Grundbausteine

   Gestaltungssystem Runde 2 (Freigabe 6.10.2026): 3 Flaechen, 2 Kupfer,
   3 Grau, 3 Glasstufen, 8 Schriftstufen, eine Satzkante. Alle Werte stammen
   aus der bestehenden Palette, es kommt keine neue Farbe dazu.
   ========================================================================== */

:root {
  /* --- Flaechen: drei Stufen ------------------------------------------- */
  --bg-0: #05070f;              /* Seite, Master; alle Fahrtbilder nutzen ihn */
  --bg-1: #0b0a25;              /* abgesetzte Sektion, Footer */
  --bg-2: #16214c;              /* selten: aktive Flaeche */
  --bg-0-rgb: 5, 7, 15;
  --bg-2-rgb: 22, 33, 76;
  --kugel-rgb: 38, 112, 237;     /* Gitterblau der Logo-Kugel, nur fuer ihren Lichtschein */
  --bg-hover: #0a0d1c;          /* Rasterzelle beim Darueberfahren */

  /* --- Kupfer: genau zwei ---------------------------------------------- */
  --copper:       #9c6038;      /* Flaechen, Linien, Knopfgrund. Weiss darauf 5.07:1 */
  --copper-light: #d17e47;      /* Text, Links, Glow, Fokus. 6.50:1 auf bg-0 */
  --copper-rgb:       156, 96, 56;
  --copper-light-rgb: 209, 126, 71;
  --copper-hover: color-mix(in oklab, var(--copper) 88%, white);
  --copper-deep:  #53331d;      /* nur Bildlaufleiste */

  /* --- Grau: genau drei ------------------------------------------------ */
  --ink-1: #e6e9f2;             /* Titel, Primaertext  16.6:1 */
  --ink-2: #a3adc0;             /* Fliesstext           8.9:1 */
  --ink-3: #828b9d;             /* Meta, Labels         5.9:1 */
  --white: #ffffff;             /* nur Schrift auf Kupferflaeche */

  /* --- Kontraststufen ueber laufendem Bild -----------------------------
     Auf der Fahrt der Startseite liegt Text ueber einem Film. Dort reichen
     die Seitenwerte nicht; diese Stufen sind gemessen (siehe reise.css) und
     werden nur dort und in Pillen ueber Bild verwendet. */
  --over-ink-2:    #bcc4d2;
  --over-ink-3:    #b9c0cc;
  --over-tag:      #c3cad6;
  --over-copper:   #de8f57;
  --over-copper-2: #e79a63;
  --over-copper-3: #f2a76f;
  --stage-top:     #0a0d1a;     /* Dienstflaeche, Verlauf oben */
  --stage-bottom:  #04050c;     /* Dienstflaeche, Verlauf unten */

  /* --- Linien ---------------------------------------------------------- */
  --line:        rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* --- Glas: drei Stufen ----------------------------------------------- */
  --glass-1-bg: rgba(255, 255, 255, 0.03);  --glass-1-line: rgba(255, 255, 255, 0.07); /* ruhend */
  --glass-2-bg: rgba(255, 255, 255, 0.06);  --glass-2-line: rgba(255, 255, 255, 0.12); /* interaktiv */
  --glass-3-bg: rgba(8, 9, 24, 0.86);       --glass-3-line: rgba(255, 255, 255, 0.14); /* ueber Bild */
  --glass-blur: 12px;

  /* --- Alte Namen zeigen auf die neuen Werte --------------------------- */
  --bg-master:        var(--bg-0);
  --bg-primary:       var(--bg-1);
  --bg-secondary:     var(--bg-2);
  --accent:           var(--copper);
  --accent-dark:      var(--copper-deep);
  --accent-glow:      var(--copper-light);
  --accent-text:      var(--copper-light);
  --accent-rgb:       var(--copper-rgb);
  --accent-glow-rgb:  var(--copper-light-rgb);
  --text-primary:     var(--ink-1);
  --text-secondary:   var(--ink-2);
  --text-muted:       var(--ink-3);
  --glass-bg:         var(--glass-1-bg);
  --glass-border:     var(--glass-1-line);

  /* --- Schriften ------------------------------------------------------- */
  --font-heading: 'Fira Sans', sans-serif;
  --font-body:    'Manrope', sans-serif;

  /* --- Typo: acht Stufen ----------------------------------------------- */
  --fs-1: 0.8125rem;                                       /* 13     Label, Meta */
  --fs-2: clamp(0.875rem, 0.84rem + 0.12vw, 0.9375rem);    /* 14-15  Klein, Listen */
  --fs-3: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);        /* 16-17  Fliesstext */
  --fs-4: clamp(1.125rem, 1.04rem + 0.36vw, 1.375rem);     /* 18-22  Lead, H4 */
  --fs-5: clamp(1.25rem, 1.08rem + 0.72vw, 1.75rem);       /* 20-28  H3 */
  --fs-6: clamp(1.75rem, 1.36rem + 1.68vw, 3rem);          /* 28-48  H2 */
  --fs-7: clamp(2.25rem, 1.5rem + 3.2vw, 4.75rem);         /* 36-76  H1 Unterseite */
  --fs-8: clamp(2.75rem, 1.4rem + 5.8vw, 7rem);            /* 44-112 Display */

  --lh-tight: 1.02;  --lh-head: 1.12;  --lh-body: 1.65;
  --track-display: -0.03em;  --track-head: -0.018em;  --track-label: 0.12em;

  /* --- Raster: eine Satzkante fuer Nav, Inhalt und Footer --------------- */
  --gutter:      clamp(20px, 5vw, 80px);
  --content-max: 1280px;
  --edge:        max(var(--gutter), calc((100vw - var(--content-max)) / 2));
  --col-gap:     clamp(16px, 2.2vw, 32px);
  --space-section: clamp(72px, 10vw, 152px);
  /* alte Namen, von der Startseite (Fahrt) und vom Hero weiter genutzt */
  --section-padding-y: clamp(60px, 10vw, 120px);
  --section-padding-x: var(--gutter);
  --container-max:     var(--content-max);

  /* --- Radien ---------------------------------------------------------- */
  --r-sm: 6px;  --r-md: 12px;  --r-lg: 20px;

  /* --- Ebenen ---------------------------------------------------------- */
  --z-base: 0;  --z-content: 10;  --z-canvas: 20;  --z-overlay: 40;
  --z-nav: 100; --z-modal: 200;   --z-toast: 300;

  /* --- Bewegung -------------------------------------------------------- */
  --duration-micro: 150ms;
  --duration-enter: 800ms;
  --duration-exit:  500ms;
  --ease-out: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  --ease-in:  cubic-bezier(0.550, 0.055, 0.675, 0.190);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Unten belegte Hoehe (Cookie-Hinweis oder Anrufleiste), von main.js */
  --cookie-h: 0px;
}


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

html {
  /* 100 % statt 16px: die Schriftgroesse des Browsers (Textzoom) gilt. */
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* kein scroll-behavior: smooth (Pruefung 7.10.): beim Neuladen mitten in
     der Fahrt spielte Chrome sonst die ganze Fahrt in 0,8 s ab. Weiche
     Spruenge macht main.js selbst. */
  /* clip statt hidden: kein eigener Scrollcontainer, sticky bleibt intakt */
  overflow-x: clip;
}

body {
  background-color: var(--bg-0);
  color: var(--ink-1);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  min-height: 100dvh;
}

ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img, video, canvas, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea {
  font: inherit; color: inherit; background: none; border: none; outline: none;
}
button { cursor: pointer; }
table { border-collapse: collapse; }


/* --------------------------------------------------------------------------
   SKIP LINK
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: 0;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background-color: var(--copper);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transform: translateY(-120%);
  transition: transform 0.2s ease-out;
}
.skip-link:focus, .skip-link:focus-visible { transform: translateY(0); }


/* --------------------------------------------------------------------------
   INTERAKTION
   -------------------------------------------------------------------------- */
a, button, [role="button"], input, select, textarea, label { touch-action: manipulation; }
a, button, [role="button"], label[for] { cursor: pointer; }

/* Fokusring: heller Ring plus dunkler Hof, auf jedem Grund sichtbar
   (auf hellem Bild der dunkle, auf dunklem Grund der helle). */
:focus-visible {
  outline: 2px solid var(--copper-light);
  outline-offset: 3px;
  border-radius: 2px;
  box-shadow: 0 0 0 6px rgba(var(--bg-0-rgb), 0.75);
}


/* --------------------------------------------------------------------------
   TYPOGRAFIE
   Keine automatische Silbentrennung in Ueberschriften, Einleitungen und
   Labels: getrennt wird nur an &shy;, die der Generator an Wortfugen langer
   Woerter setzt. overflow-wrap bleibt als letzte Sicherung gegen Ueberlauf
   auf 320 px, greift aber erst, wenn ein Wort gar nicht passt.
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--ink-1);
}
h1, h2, h3, h4, .lead, .label {
  -webkit-hyphens: manual;
  hyphens: manual;
  overflow-wrap: break-word;
}
h1, h2, h3, h4 { text-wrap: balance; }
p, li, .lead { text-wrap: pretty; }

h1 { font-size: var(--fs-7); line-height: var(--lh-tight); letter-spacing: var(--track-display); }
h2 { font-size: var(--fs-6); line-height: var(--lh-head);  letter-spacing: var(--track-head); }
h3 { font-size: var(--fs-5); line-height: 1.2; letter-spacing: -0.01em; font-weight: 500; }
h4 { font-size: var(--fs-4); line-height: 1.3; font-weight: 500; }

p {
  font-family: var(--font-body);
  font-size: var(--fs-3);
  line-height: var(--lh-body);
  color: var(--ink-2);
}
strong, b { font-weight: 600; color: var(--ink-1); }
em, i { font-style: italic; }
small { font-size: var(--fs-1); color: var(--ink-3); }

.lead { font-size: var(--fs-4); line-height: 1.55; color: var(--ink-2); }

.label {
  font-family: var(--font-body);
  font-size: var(--fs-1);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-3);
}


/* --------------------------------------------------------------------------
   RASTER
   Eine Satzkante (--edge) fuer Navigation, Inhalt und Footer. Die Sektion
   traegt nur den Abstand nach oben und unten, der Container die Kante.
   -------------------------------------------------------------------------- */
.section { padding-block: var(--section-padding-y); }
.container { width: 100%; padding-inline: var(--edge); }

.rd-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.rd-section { padding-block: var(--space-section); }
.rd-section--alt { background: var(--bg-1); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* --------------------------------------------------------------------------
   GLAS (Stufe 2, fuer Karten auf der Startseite)
   -------------------------------------------------------------------------- */
.glass {
  background: var(--glass-2-bg);
  border: 1px solid var(--glass-2-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}


/* --------------------------------------------------------------------------
   AUSWAHL UND BILDLAUFLEISTE
   -------------------------------------------------------------------------- */
::selection { background-color: var(--copper); color: var(--ink-1); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--copper-deep); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--copper); }


/* --------------------------------------------------------------------------
   REDUZIERTE BEWEGUNG
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Nicht umbrechen (in Titeln gesetzt von trennen() in build/core.py) */
.nw { white-space: nowrap; }
