/* ============================================================================
   Marketing Hero "Channel-Constellation" — Welle 2026-05
   ----------------------------------------------------------------------------
   Above-the-Fold Critical-CSS. Lädt VOR marketing-page.css.
   ----------------------------------------------------------------------------
   Layout:
     - .mkt-hero               section wrapper, padding + bg
     - .mkt-hero-bg            decoration (mesh + grid, aria-hidden)
     - .mkt-hero-container     2-col grid (Desktop), stack (Mobile)
     - .mkt-hero-text          left col (eyebrow, h1, sub, ctas)
     - .mkt-hero-stage         right col (constellation)
     - .mkt-brand-mark         center M-logo card (pulse)
     - .mkt-channel            4 channel-cards positioned around center
     - .mkt-flow-lines         SVG (data-flow lines + animated dots)
     - .mkt-counter            bottom-center reach-counter
   ============================================================================ */

/* ─── Hero Section Wrapper ───────────────────────────────────────────────── */
.mkt-hero {
  position: relative;
  padding: 5.5rem 0 4rem;
  background: #FAFBFD;
  overflow: hidden;
}
body.is-dark-bg .mkt-hero {
  background: #0A1B33;
}

.mkt-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.mkt-hero-bg-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(20, 152, 213, 0.10), transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(62, 182, 240, 0.07), transparent 50%);
}
.mkt-hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(10, 27, 51, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 27, 51, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}
body.is-dark-bg .mkt-hero-bg-mesh {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(62, 182, 240, 0.15), transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(20, 152, 213, 0.10), transparent 50%);
}
body.is-dark-bg .mkt-hero-bg-grid {
  background-image:
    linear-gradient(rgba(240, 244, 250, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 244, 250, 0.04) 1px, transparent 1px);
}

/* ─── Liquid Flow Field Canvas (Welle 2026-05-28) ────────────────────────────
   Curl-Noise Datenströme in Channel-Farben. Liegt über mesh+grid (z-index 2),
   unter dem Hero-Container (z-index 3). JS: mkt-hero-flowfield.js.
   Fade-in nach JS-Init (.is-flowing) verhindert harten Pop beim ersten Frame. */
.mkt-hero-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.mkt-hero-flow.is-flowing {
  opacity: 1;
}
/* reduced-motion: keine Strömung — Canvas weg, mesh+grid bleiben als ruhiger BG */
@media (prefers-reduced-motion: reduce) {
  .mkt-hero-flow {
    display: none;
  }
}

/* Text-Scrim: weicher Glow hinter dem Headline-Block dämpft die Flow-Trails dort,
   damit der Text immer clean lesbar bleibt (v.a. Mobile, wo Text über den
   Strömungen stackt). Liegt im z-3-Container über dem Canvas (z-2), unter dem
   Text-Inhalt. Light = heller Glow, Dark = dunkler Glow. */
.mkt-hero-text {
  position: relative;
}
.mkt-hero-text::before {
  content: "";
  position: absolute;
  inset: -8% -6% -10% -14%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 78% 64% at 32% 42%,
    rgba(250, 251, 253, 0.78), rgba(250, 251, 253, 0) 72%);
}
body.is-dark-bg .mkt-hero-text::before {
  background: radial-gradient(ellipse 78% 64% at 32% 42%,
    rgba(10, 27, 51, 0.80), rgba(10, 27, 51, 0) 72%);
}

/* ─── Hero Container (Mobile-First) ──────────────────────────────────────── */
.mkt-hero-container {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── LEFT: Text Block ───────────────────────────────────────────────────── */
.mkt-hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.mkt-hero-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: rgba(10, 27, 51, 0.55);
  text-decoration: none;
  transition: color 0.2s ease;
  align-self: flex-start;
  margin-bottom: 0.25rem;
}
.mkt-hero-back:hover { color: #1498D5; }
body.is-dark-bg .mkt-hero-back { color: rgba(240, 244, 250, 0.55); }
body.is-dark-bg .mkt-hero-back:hover { color: #3EB6F0; }

.mkt-hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #1498D5;
}

.mkt-hero-h1 {
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  line-height: 1.05;
  font-weight: 800;
  color: #0A1B33;
  letter-spacing: -0.035em;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}
html[lang="th"] .mkt-hero-h1 { line-height: 1.15; }
body.is-dark-bg .mkt-hero-h1 { color: #F0F4FA; }

.mkt-hero-h1-line { display: block; }
.mkt-hero-h1-line-2 { color: #1498D5; }
body.is-dark-bg .mkt-hero-h1-line-2 { color: #3EB6F0; }

/* Rotierendes Kanal-Wort — alle 5 Kanäle übereinander gestapelt (inline-grid),
   das aktive fadet/slidet ein. Container-Breite = breitestes Wort → kein Shift. */
.mkt-hero-rotate {
  display: inline-grid;
  vertical-align: bottom;
  text-align: left;
}
.mkt-hero-rotate-word {
  grid-area: 1 / 1;
  color: var(--ch);
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  white-space: nowrap;
}
.mkt-hero-rotate-word.is-active {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .mkt-hero-rotate-word { transition: none; }
}

.mkt-hero-tag {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0A1B33;
  letter-spacing: -0.005em;
  margin: 0.4rem 0 0;
}
body.is-dark-bg .mkt-hero-tag { color: #F0F4FA; }

.mkt-hero-sub {
  font-size: 0.98rem;
  line-height: 1.6;
  color: #4b5563;
  max-width: 50ch;
  margin: 0;
  white-space: pre-line;
}
body.is-dark-bg .mkt-hero-sub { color: rgba(240, 244, 250, 0.72); }

.mkt-hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* ─── RIGHT: Constellation Stage ─────────────────────────────────────────── */
.mkt-hero-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  min-height: 380px;
}

/* ─── Pulsing halo behind brand-mark ─────────────────────────────────────── */
.mkt-hero-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60%;
  height: 60%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center,
    rgba(20, 152, 213, 0.25) 0%,
    rgba(20, 152, 213, 0.08) 40%,
    transparent 70%);
  filter: blur(40px);
  z-index: 1;
  animation: mkt-halo-pulse 3.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
body.is-dark-bg .mkt-hero-halo {
  background: radial-gradient(circle at center,
    rgba(62, 182, 240, 0.30) 0%,
    rgba(62, 182, 240, 0.12) 40%,
    transparent 70%);
}
@keyframes mkt-halo-pulse {
  0%, 100% { opacity: 0.65; transform: translate(-50%, -50%) scale(0.9); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.1); }
}

/* ─── SVG Data-Flow Lines (absolute centered, square) ────────────────────── */
.mkt-flow-lines {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
}
.mkt-flow-line {
  /* animated stroke-dashoffset for flow direction */
  animation: mkt-line-flow 2.4s linear infinite;
}
@keyframes mkt-line-flow {
  to { stroke-dashoffset: -18; }
}
.mkt-flow-dot {
  /* GSAP-tweens the cy/cx attribute. CSS hides until GSAP starts. */
  opacity: 0;
  will-change: cx, cy, opacity;
}

/* ─── Center Brand-Mark (M-logo card) ────────────────────────────────────── */
.mkt-brand-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  animation: mkt-mark-breathe 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes mkt-mark-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.03); }
}
/* Liquid-Glass-Card (2026): frosted + Brand-Glow + Tiefe. Der Flow-Field-
   Hintergrund scheint verschwommen durch → das Business wirkt wie ein
   leuchtendes Glas-Kraftzentrum. */
.mkt-brand-mark-inner {
  position: relative;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow:
    0 0 0 1px rgba(20, 152, 213, 0.12),
    0 10px 30px -6px rgba(20, 152, 213, 0.35),
    0 18px 50px -10px rgba(10, 27, 51, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
body.is-dark-bg .mkt-brand-mark-inner {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 0 1px rgba(62, 182, 240, 0.18),
    0 10px 34px -6px rgba(62, 182, 240, 0.45),
    0 18px 50px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Glow-Kern — "Energie-/Kraftzentrum", in dem alle Kanäle zusammenfließen */
.mkt-core {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.mkt-core-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #ffffff, #5ABFE5 45%, #1498D5 100%);
  box-shadow: 0 0 14px 2px rgba(20, 152, 213, 0.75), 0 0 30px 6px rgba(20, 152, 213, 0.4);
  animation: mkt-core-pulse 3.2s ease-in-out infinite;
}
body.is-dark-bg .mkt-core-dot {
  background: radial-gradient(circle at 50% 38%, #ffffff, #5ABFE5 45%, #3EB6F0 100%);
  box-shadow: 0 0 16px 3px rgba(62, 182, 240, 0.85), 0 0 36px 8px rgba(62, 182, 240, 0.45);
}
.mkt-core-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(20, 152, 213, 0.6);
  animation: mkt-core-ring 3.2s ease-out infinite;
}
body.is-dark-bg .mkt-core-ring {
  border-color: rgba(62, 182, 240, 0.6);
}
.mkt-core-ring:nth-child(2) { animation-delay: 1.6s; }
@keyframes mkt-core-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.14); }
}
@keyframes mkt-core-ring {
  0%   { transform: scale(0.5); opacity: 0.85; }
  100% { transform: scale(2.6); opacity: 0; }
}
/* Rotierender Energie-Orbit (Radar-Sweep) um den Kern — Hightech-Akzent */
.mkt-core-orbit {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(20, 152, 213, 0.55) 70deg, transparent 150deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  animation: mkt-core-orbit 3.6s linear infinite;
}
body.is-dark-bg .mkt-core-orbit {
  background: conic-gradient(from 0deg, transparent 0deg, rgba(62, 182, 240, 0.65) 70deg, transparent 150deg);
}
@keyframes mkt-core-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .mkt-core-dot, .mkt-core-ring, .mkt-core-orbit { animation: none; }
  .mkt-core-ring:nth-child(3) { display: none; }
  .mkt-core-ring { opacity: 0.35; }
  .mkt-core-orbit { opacity: 0.4; }
}
.mkt-brand-mark-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(10, 27, 51, 0.55);
}
body.is-dark-bg .mkt-brand-mark-label {
  color: rgba(240, 244, 250, 0.65);
}

/* ─── Channel-Cards (positioned around center) ───────────────────────────── */
.mkt-channel {
  position: absolute;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.65rem 0.5rem 0.55rem;
  width: 72px;
  background: #ffffff;
  border: 1px solid rgba(10, 27, 51, 0.08);
  border-radius: 14px;
  box-shadow:
    0 4px 12px rgba(10, 27, 51, 0.08),
    0 10px 24px -4px rgba(10, 27, 51, 0.10);
  color: var(--ch-color, #1498D5);
  animation: mkt-channel-float 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
body.is-dark-bg .mkt-channel {
  background: #1d2c46;
  border-color: rgba(240, 244, 250, 0.10);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.30),
    0 10px 24px -4px rgba(0, 0, 0, 0.40);
}
/* Pentagon-Layout: 5 Channels bei 72° auseinander. Positionen approximieren
   die SVG-Endpunkte (Radius ~38% vom Stage-Center). Alle nutzen
   translate(-50%, -50%) damit Channel-Card-Center exakt auf dem Pentagon-Punkt
   sitzt. CSS `translate`-Property (separat von transform) macht float-Animation. */
.mkt-channel--line     { top: 36%;  left: 16%; transform: translate(-50%, -50%); animation-delay: 0s; }
.mkt-channel--tiktok   { top: 36%;  left: 84%; transform: translate(-50%, -50%); animation-delay: 0.6s; }
.mkt-channel--google   { top: 80%;  left: 70%; transform: translate(-50%, -50%); animation-delay: 1.2s; }
.mkt-channel--facebook { top: 80%;  left: 30%; transform: translate(-50%, -50%); animation-delay: 1.8s; }
.mkt-channel--instagram { top: 8%;  left: 50%; transform: translate(-50%, -50%); animation-delay: 2.4s; }

@keyframes mkt-channel-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -6px; }
}

.mkt-channel-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--ch-color, #1498D5) 12%, white);
  border-radius: 10px;
}
body.is-dark-bg .mkt-channel-icon {
  background: color-mix(in srgb, var(--ch-color, #1498D5) 20%, #1d2c46);
}
.mkt-channel-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(10, 27, 51, 0.65);
  letter-spacing: -0.005em;
}
body.is-dark-bg .mkt-channel-label {
  color: rgba(240, 244, 250, 0.65);
}

/* ─── Counter (bottom-center pill) ───────────────────────────────────────── */
.mkt-counter {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(160deg, #1498D5, #0F7BB2);
  color: #fff;
  border-radius: 999px;
  box-shadow:
    0 8px 24px -4px rgba(20, 152, 213, 0.35),
    0 16px 40px -8px rgba(10, 27, 51, 0.20);
  z-index: 6;
  white-space: nowrap;
}
.mkt-counter-value {
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.mkt-counter-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

/* ─── Desktop Layout (≥1024px) ───────────────────────────────────────────── */
@media (min-width: 1024px) {
  .mkt-hero {
    padding: 7rem 0 6rem;
  }
  .mkt-hero-container {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 3.5rem;
    align-items: center;
  }
  .mkt-hero-text { gap: 1.4rem; }
  .mkt-hero-h1 { font-size: clamp(2.8rem, 4.6vw, 4.2rem); }
  .mkt-hero-sub { font-size: 1.05rem; }
  .mkt-hero-stage {
    max-width: 540px;
    min-height: 480px;
  }
  .mkt-channel {
    width: 88px;
    padding: 0.75rem 0.55rem 0.65rem;
  }
  .mkt-channel-icon {
    width: 46px;
    height: 46px;
  }
  .mkt-channel-label {
    font-size: 0.68rem;
  }
  .mkt-brand-mark-inner {
    width: 96px;
    height: 96px;
    padding: 14px;
  }
}

/* ─── Reduced-Motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mkt-brand-mark,
  .mkt-hero-halo,
  .mkt-channel,
  .mkt-flow-line {
    animation: none !important;
  }
  .mkt-flow-dot { opacity: 0 !important; }
}
