/* ============================================================================
   Eyas — Base / Reset / Shared primitives
   Geteilt von allen Sektionen. Enthaelt: @font-face (Geist), Reset, Typo,
   Frost-Glas-Rezeptur, Buttons, Container, Reveal-Utilities, Atmosphaere.
   ========================================================================== */

/* ── Geist (lokal gebuendelt) ─────────────────────────────────────────────── */
@font-face { font-family:"Geist"; font-weight:400; font-style:normal; font-display:swap;
  src:url("/fonts/Geist-Regular.ttf") format("truetype"); }
@font-face { font-family:"Geist"; font-weight:500; font-style:normal; font-display:swap;
  src:url("/fonts/Geist-Medium.ttf") format("truetype"); }
@font-face { font-family:"Geist"; font-weight:600; font-style:normal; font-display:swap;
  src:url("/fonts/Geist-SemiBold.ttf") format("truetype"); }
@font-face { font-family:"Geist"; font-weight:700; font-style:normal; font-display:swap;
  src:url("/fonts/Geist-Bold.ttf") format("truetype"); }

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  min-height: 100dvh;
  background: var(--bg-base);
  color: var(--text-hi);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: var(--tracking-snug);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: rgba(175,200,228,0.28); color: var(--eyas-frost-white); }

/* ── Typografie-Primitive ─────────────────────────────────────────────────── */
.display {
  font-size: var(--fs-display); font-weight: 600; line-height: 0.96;
  letter-spacing: var(--tracking-tight); color: var(--text-hi);
}
h1, .h1 { font-size: var(--fs-h1); font-weight: 600; line-height: 1.04; letter-spacing: var(--tracking-tight); }
h2, .h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.08; letter-spacing: var(--tracking-tight); }
h3, .h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.2;  letter-spacing: var(--tracking-snug); }
.lead   { font-size: var(--fs-lead); font-weight: 400; line-height: 1.55; color: var(--text-mid); }
.muted  { color: var(--text-lo); }
.num    { font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* Eyebrow / Kicker — schmale Versalien-Marke ueber Headlines */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-eyebrow); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

/* Steel-Hervorhebung in Headlines — EINE Akzentfarbe, solid (keine Gradient-Schrift) */
.accent { color: var(--accent); }
.accent-bright { color: var(--accent-bright); }
.warm { color: var(--warm); }

/* ── Layout-Container ─────────────────────────────────────────────────────── */
.container      { width: 100%; max-width: var(--container);      margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { width: 100%; max-width: var(--container-wide); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-pad); }
.section--tight { padding-block: clamp(3.5rem, 7vh, 6rem); }

/* ── Frost-Glas (DESIGN.md §3) ────────────────────────────────────────────── */
.glass {
  position: relative;
  background:
    linear-gradient(180deg, rgba(13,21,37,0.34) 0%, rgba(9,15,28,0.50) 62%, rgba(7,12,24,0.62) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(186,216,250,0.07);
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 0 var(--glass-highlight),
    inset 0 1px 22px -12px rgba(176,214,255,0.30),
    0 14px 44px -14px rgba(0,0,0,0.58);
}
/* Feiner Eis-Rand (maskierter Gradient-Ring) — KEIN Seitenstreifen-Kitsch. */
.glass--frostedge::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; padding: 1px;
  background: linear-gradient(135deg,
    rgba(234,246,255,0.85) 0%, rgba(186,212,240,0.45) 24%,
    rgba(130,162,200,0.12) 50%, rgba(180,218,255,0.40) 76%, rgba(234,246,255,0.70) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; z-index: 5;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-fill);
  color: var(--text-hi);
  font-weight: 600; font-size: var(--fs-sm);
  padding: 14px 26px; min-height: 48px;
  transition: background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.btn:hover { background: var(--glass-fill-hi); border-color: var(--glass-border-hi); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.985); }
/* Licht-Sweep bei Hover (wie die App-Nav) */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, transparent 0%, rgba(216,238,255,0.30) 50%, transparent 100%);
  transform: translateX(-130%) skewX(-16deg); opacity: 0;
}
.btn:hover::before { animation: btn-sweep 0.85s var(--ease); }
@keyframes btn-sweep { 0%{transform:translateX(-130%) skewX(-16deg);opacity:0;} 18%{opacity:1;} 100%{transform:translateX(130%) skewX(-16deg);opacity:0;} }

.btn--primary {
  background: var(--aurora); border-color: transparent; color: var(--text-on-accent); font-weight: 600;
  box-shadow: 0 8px 30px -8px var(--glow-steel), inset 0 1px 0 rgba(255,255,255,0.4);
}
/* background/border hier erneut setzen: .btn:hover (Klasse+Pseudo) schlaegt
   .btn--primary (eine Klasse) und tauschte sonst die Aurora gegen Glas-Fill,
   waehrend die dunkle Textfarbe blieb -> schwarzer Text auf dunklem Grund. */
.btn--primary:hover {
  background: var(--aurora);
  border-color: transparent;
  filter: brightness(1.06);
  box-shadow: 0 12px 40px -8px var(--glow-steel);
}
.btn--ghost { background: transparent; }
.btn--lg { padding: 17px 34px; min-height: 56px; font-size: var(--fs-body); }
.btn__arrow { transition: transform var(--dur-base) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ── Pill / Tag ───────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 7px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--glass-border); background: var(--glass-fill);
  font-size: var(--fs-xs); font-weight: 500; color: var(--text-mid);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--glow-steel); }

/* ── Hairline / Divider ───────────────────────────────────────────────────── */
.hairline { height: 1px; border: 0; background: linear-gradient(90deg, transparent, rgba(186,212,240,0.22), transparent); }

/* ── Scroll-Reveal (wird via JS mit .is-in aktiviert) ─────────────────────── */
.reveal { opacity: 0; transform: translateY(28px);
  transition: opacity var(--dur-slower) var(--ease), transform var(--dur-slower) var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(24px);
  transition: opacity var(--dur-slower) var(--ease), transform var(--dur-slower) var(--ease); }
.reveal-stagger.is-in > * { opacity: 1; transform: none; }
.reveal-stagger.is-in > *:nth-child(2){ transition-delay: .07s; }
.reveal-stagger.is-in > *:nth-child(3){ transition-delay: .14s; }
.reveal-stagger.is-in > *:nth-child(4){ transition-delay: .21s; }
.reveal-stagger.is-in > *:nth-child(5){ transition-delay: .28s; }
.reveal-stagger.is-in > *:nth-child(6){ transition-delay: .35s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn:hover::before { animation: none; }
}

/* ── Bilingual: blendet die nicht-aktive Sprache aus ──────────────────────── */
html[lang="en"] [data-lang="de"], html[lang="de"] [data-lang="en"] { display: none !important; }

/* ── Globale Atmosphaere (fixed hinter allem) ─────────────────────────────── */
.atmos { position: fixed; inset: 0; z-index: var(--z-bg); pointer-events: none; overflow: hidden; }
.atmos__grain { position: absolute; inset: 0; opacity: 0.045; mix-blend-mode: overlay;
  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='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.atmos__vignette { position: absolute; inset: 0;
  background: radial-gradient(130% 100% at 50% 0%, transparent 55%, rgba(4,6,14,0.55) 100%); }

/* ── A11y ─────────────────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.skip-link { position:absolute; left:-999px; top:8px; z-index:var(--z-modal); padding:10px 16px; border-radius:var(--r-md); background:var(--bg-elev); color:var(--text-hi); }
.skip-link:focus { left:8px; }
