/* ============================================================
   Hero aller öffentlichen Seiten („Terrain“)

   Volle Breite, eine große Überschrift und ein Satz.
   Dahinter das lebende Gebirge aus static/js/site_hero_terrain.js
   (WebGL auf dem Canvas). Ohne WebGL oder bis die Szene bereit ist,
   zeigt der Farbverlauf samt Glühen darunter dasselbe Bild in Ruhe.
   Markup: partials/public_page_hero.html. Die Startseite
   (templates/landing.html) nutzt die kompakte Variante „--home“: Gebirge
   mit Leitsätzen – siehe Abschnitt weiter unten.
   ============================================================ */

/* Schriften selbst gehostet – keine Anfrage an Google (DSGVO).
   Lizenzen: static/fonts/inter-tight/OFL.txt, static/fonts/instrument-serif/OFL.txt */
@font-face {
  font-family: 'Ouhud Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/inter-tight/latin-600-normal.woff2') format('woff2');
  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: 'Ouhud Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/inter-tight/latin-ext-600-normal.woff2') format('woff2');
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Ouhud Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/instrument-serif/latin-400-italic.woff2') format('woff2');
  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: 'Ouhud Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/instrument-serif/latin-ext-400-italic.woff2') format('woff2');
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Bühne ---------- */
.site-hero {
  --site-hero-pad: clamp(1.25rem, 5vw, 4.5rem);
  --site-hero-teal: #64e2ce;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  display: grid;
  align-content: end;
  min-height: clamp(30rem, 64svh, 46rem);
  padding: 5.5rem var(--site-hero-pad) clamp(2.5rem, 6vh, 4rem);
  color: #fff;
  /* Rückfall und Startbild: dieselbe Verlaufsform zeichnet auch die Szene. */
  background: radial-gradient(120% 90% at 72% 18%, #0d2460 0%, #071a3f 42%, #040b1f 100%);
}

.site-hero__scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.4s cubic-bezier(.2, .7, .2, 1), transform 1.8s cubic-bezier(.2, .7, .2, 1);
}
.site-hero__scene.is-ready { opacity: 1; transform: none; }

/* Glühen hinter dem Gipfel – sichtbar, solange die Szene nicht läuft. */
.site-hero__glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  translate: -50% -50%;
}
.site-hero__glow--blue {
  left: 72%;
  top: 14%;
  width: min(72vw, 860px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(79, 134, 255, .55) 0%, rgba(79, 134, 255, .16) 32%, transparent 62%);
  animation: site-hero-glow 9s ease-in-out infinite;
}
.site-hero__glow--teal {
  left: 74%;
  top: 18%;
  width: min(34vw, 380px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(100, 226, 206, .35), transparent 60%);
  animation: site-hero-glow 11s ease-in-out -4s infinite;
}
@keyframes site-hero-glow {
  0%, 100% { opacity: .85; }
  50% { opacity: 1; }
}

/* Abdunkeln links und unten, damit der Text sicher lesbar bleibt. */
.site-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 11, 31, .72) 0%, rgba(4, 11, 31, .35) 38%, rgba(4, 11, 31, 0) 62%),
    linear-gradient(180deg, rgba(4, 11, 31, .35) 0%, rgba(4, 11, 31, 0) 28%, rgba(4, 11, 31, 0) 60%, rgba(4, 11, 31, .78) 100%);
}
.site-hero__grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ---------- Text ---------- */
.site-hero__inner {
  position: relative;
  z-index: 4;
  max-width: 1180px;
  min-width: 0;
}
.site-hero__topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.25rem;
  margin-bottom: 1.25rem;
  animation: site-hero-fade-up .8s cubic-bezier(.19, 1, .22, 1) .2s both;
}
.site-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  margin: 0 0 1.3rem;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
  animation: site-hero-fade-up .9s cubic-bezier(.19, 1, .22, 1) .3s both;
}
.site-hero__kicker::before {
  content: "";
  flex: none;
  width: 2rem;
  height: 1px;
  background: var(--site-hero-teal);
  opacity: .85;
}
.site-hero__title {
  margin: 0;
  font-family: 'Ouhud Display', 'Inter Tight', var(--font-sans, sans-serif);
  font-weight: 600;
  font-size: clamp(2.7rem, 7.1vw, 7.2rem);
  line-height: .94;
  /* Leicht eng, aber nicht enger: Bei -.045em klebten „rr“ und „ri“
     in „Karriere“ aneinander. */
  letter-spacing: -.028em;
  text-wrap: balance;
  /* Lange Titel trennen nur am weichen Trennzeichen (Software­entwicklung). */
  hyphens: manual;
}
.site-hero--long .site-hero__title { font-size: clamp(2.4rem, 6.2vw, 6.2rem); }
.site-hero--xlong .site-hero__title { font-size: clamp(2rem, 4.6vw, 4.6rem); line-height: 1.02; }
.site-hero__w {
  display: inline-block;
  /* Maske: Das Wort steigt von unten herein; Unterlängen bleiben sichtbar. */
  clip-path: inset(-12% -4% -28% -4%);
}
.site-hero__wi {
  display: inline-block;
  transform: translateY(112%);
  animation: site-hero-word-up 1s cubic-bezier(.19, 1, .22, 1) forwards;
  animation-delay: calc(90ms + var(--i, 0) * 70ms);
}
.site-hero__title em {
  font-family: 'Ouhud Serif', 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.06em;
  letter-spacing: -.01em;
  padding-inline-end: .03em;
  color: var(--site-hero-teal);
}
.site-hero__dot {
  display: inline-block;
  color: var(--site-hero-teal);
  animation: site-hero-pop .5s cubic-bezier(.2, 1.4, .4, 1) .55s both;
}
.site-hero__lead {
  max-width: 40rem;
  margin: 1.6rem 0 0;
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  font-weight: 500;
  line-height: 1.55;
  /* Deckend weiß statt Grau: Der Satz muss auf jeder Seite gut lesbar sein. */
  color: rgba(255, 255, 255, .95);
  text-shadow: 0 1px 2px rgba(4, 11, 31, .45);
  animation: site-hero-fade-up .9s cubic-bezier(.19, 1, .22, 1) .5s both;
}

.site-hero--subpage { min-height: clamp(30rem, 58svh, 42rem); }
.site-hero--subpage .site-hero__title { font-size: clamp(3rem, 7vw, 6.5rem); overflow-wrap: anywhere; }
.site-hero--subpage.site-hero--long .site-hero__title { font-size: clamp(2.5rem, 5.6vw, 5.5rem); }
.site-hero--subpage .site-hero__lead { max-width: 48rem; }
.site-hero__extra { position: relative; z-index: 4; max-width: 48rem; margin-top: 1.5rem; animation: site-hero-fade-up .9s cubic-bezier(.19, 1, .22, 1) .65s both; }

/* The landing page's broad letter-spacing reset comes later in the cascade. */
body.landing-dark .site-hero__kicker { letter-spacing: .16em; }
body.landing-dark .site-hero__title { letter-spacing: -.028em; }
body.landing-dark .site-hero__title em { letter-spacing: -.01em; }

/* ---------- Bewegung ---------- */
@keyframes site-hero-word-up { to { transform: translateY(0); } }
@keyframes site-hero-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes site-hero-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes site-hero-pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }

/* ---------- Arabisch (rechts nach links) ---------- */
[dir="rtl"] .site-hero {
  background: radial-gradient(120% 90% at 28% 18%, #0d2460 0%, #071a3f 42%, #040b1f 100%);
}
[dir="rtl"] .site-hero__glow--blue { left: 28%; }
[dir="rtl"] .site-hero__glow--teal { left: 26%; }
[dir="rtl"] .site-hero__shade {
  background:
    linear-gradient(270deg, rgba(4, 11, 31, .72) 0%, rgba(4, 11, 31, .35) 38%, rgba(4, 11, 31, 0) 62%),
    linear-gradient(180deg, rgba(4, 11, 31, .35) 0%, rgba(4, 11, 31, 0) 28%, rgba(4, 11, 31, 0) 60%, rgba(4, 11, 31, .78) 100%);
}
/* Arabische Glyphen haben höhere Ober- und Unterlängen; die enge
   Zeilenhöhe der lateinischen Überschrift würde sie abschneiden. */
[dir="rtl"] .site-hero__title { font-family: var(--font-sans, sans-serif); line-height: 1.18; }
[dir="rtl"] .site-hero__title em { font-family: inherit; font-style: normal; }

/* ---------- Handy ---------- */
@media (max-width: 760px) {
  .site-hero { min-height: 27rem; padding-top: 4.5rem; }
  .site-hero--subpage { min-height: 27rem; }
  .site-hero--subpage .site-hero__title { font-size: clamp(2.5rem, 10vw, 4rem); }
  .site-hero--subpage.site-hero--long .site-hero__title { font-size: clamp(1.8rem, 8.8vw, 3.4rem); }
  .site-hero__title { font-size: clamp(2.5rem, 11.5vw, 4rem); }
  .site-hero--long .site-hero__title { font-size: clamp(2.1rem, 9.6vw, 3.4rem); }
  .site-hero--xlong .site-hero__title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .site-hero__glow--blue { left: 82%; top: 22%; width: 120vw; }
  .site-hero__glow--teal { left: 84%; top: 24%; width: 55vw; }
  [dir="rtl"] .site-hero__glow--blue { left: 18%; }
  [dir="rtl"] .site-hero__glow--teal { left: 16%; }
}
@media (max-width: 380px) {
  .site-hero--subpage.site-hero--long .site-hero__dot { display: none; }
}

/* ---------- Weniger Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .site-hero__wi { transform: none; animation: none; }
  .site-hero__topline,
  .site-hero__kicker,
  .site-hero__dot,
  .site-hero__lead,
  .site-hero__glow { animation: none; }
  .site-hero__scene { transition: none; transform: none; }
}

/* ============================================================
   Startseite („--home“): das Gebirge-Motiv wie auf den Unterseiten,
   zweizeilige Überschrift (Zeile 2 mit kursivem Akzentwort).
   Im Arabischen spiegelt sich alles.
   ============================================================ */
.site-hero--home .site-hero__inner { max-width: none; }
.site-hero--home .site-hero__line { display: block; }
.site-hero--home .site-hero__title {
  font-size: clamp(2.3rem, 6.2vw, 6.6rem);
  line-height: .98;
  overflow-wrap: anywhere;
}
[dir="rtl"] .site-hero--home .site-hero__title { font-size: clamp(2.1rem, 4.8vw, 5.4rem); line-height: 1.18; }
/* Japanisch/Chinesisch: Die Serifenschrift hat keine CJK-Zeichen. */
:lang(ja) .site-hero__title em,
:lang(zh) .site-hero__title em { font-style: normal; }
.site-hero--home .site-hero__lead {
  max-width: 38rem;
  font-size: clamp(1rem, 1.15vw, 1.3rem);
  text-wrap: pretty;
}
@media (max-width: 760px) {
  .site-hero--home { min-height: 0; padding: 4.5rem 1.25rem 2.25rem; }
  .site-hero--home .site-hero__title { font-size: clamp(1.9rem, 8.4vw, 3rem); }
  [dir="rtl"] .site-hero--home .site-hero__title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
}

/* CRM-Live-Vorschau direkt unter dem Hero: heller Grund mit feinem Raster
   (wie die Vorlage), das nach unten ausblendet. Der Hero bleibt dunkel; der
   Übergang ist eine saubere Kante ohne Leuchtlinie. */
.o-hero-showcase,
.o-hero-showcase * { box-sizing: border-box; }
.o-hero-showcase {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3.5rem, 6vw, 6rem) 1.5rem clamp(4rem, 7vw, 7rem);
  color: #0f172a;
  background:
    radial-gradient(60% 50% at 50% 0, rgba(59, 130, 246, .12) 0%, rgba(59, 130, 246, 0) 100%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}
.o-hero-showcase::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(30, 64, 175, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 64, 175, .09) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 25%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 25%, #000 25%, transparent 78%);
}
.o-showcase-shell { position: relative; z-index: 1; width: min(1180px, 100%); margin: auto; }
.o-showcase-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}
.o-showcase-eyebrow {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0 0 1rem;
  color: #1e40af;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}
body.landing-dark .o-showcase-eyebrow { letter-spacing: .16em; }
.o-showcase-eyebrow span { flex: none; width: 2rem; height: 2px; background: currentColor; }
.o-showcase-heading h2 {
  margin: 0;
  color: #0f172a;
  font-family: 'Ouhud Display', 'Inter Tight', var(--font-sans, sans-serif);
  font-size: clamp(2.2rem, 4.4vw, 3.9rem);
  font-weight: 600;
  line-height: 1;
}
body.landing-dark .o-showcase-heading h2 { letter-spacing: -.028em; }
.o-showcase-demo {
  flex: 0 0 auto;
  padding: .5rem .9rem;
  border: 1px solid rgba(30, 64, 175, .25);
  border-radius: 999px;
  color: #1e40af;
  background: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}
body.landing-dark .o-showcase-demo { letter-spacing: .14em; }
.o-showcase-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; margin-top: 1.3rem; }
.o-showcase-metrics > div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .7rem;
  min-width: 0;
  padding: 1.15rem .8rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}
.o-showcase-metrics strong {
  color: #1e40af;
  font-family: 'Ouhud Display', 'Inter Tight', var(--font-sans, sans-serif);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
}
.o-showcase-metrics span { color: #475569; font-size: .8rem; font-weight: 600; }
@media (max-width: 680px) {
  .o-hero-showcase { padding: 3.5rem 1rem; }
  .o-showcase-heading { align-items: start; }
  .o-showcase-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 380px) {
  .o-showcase-metrics > div { flex-direction: column; align-items: center; gap: .25rem; }
}
