/* ============================================================
   efacon – Scroll-Effekte (assets/js/effects.js)
   ============================================================ */

/* --- Kacheln klappen beim Einblenden auf (deutlich sichtbar) ------ */
.efacon-grid, .services-grid, .foerder-wrap, .leistungen-grid { perspective: 900px; }
.efacon-grid .reveal, .services-grid .reveal, .foerder-wrap .reveal, .leistungen-grid .reveal {
  transform: rotateY(-80deg) rotateX(6deg) translateX(-40px) scale(0.92);
  transform-origin: 0% 50%;
  transition: opacity 0.6s ease, transform 1.05s cubic-bezier(.16,.84,.3,1);
  transform-style: preserve-3d; backface-visibility: hidden;
}
.efacon-grid .reveal.visible, .services-grid .reveal.visible, .foerder-wrap .reveal.visible, .leistungen-grid .reveal.visible { transform: none; }
.efacon-grid .reveal.visible:hover, .services-grid .reveal.visible:hover, .leistungen-grid .reveal.visible:hover { transform: translateY(-2px); transition-duration: .25s; }
/* gestaffelt: jede Kachel etwas später als die vorige */
.efacon-grid .reveal:nth-child(2), .services-grid .reveal:nth-child(2), .leistungen-grid .reveal:nth-child(2) { transition-delay: .12s; }
.efacon-grid .reveal:nth-child(3), .services-grid .reveal:nth-child(3), .leistungen-grid .reveal:nth-child(3) { transition-delay: .24s; }
.efacon-grid .reveal:nth-child(4), .services-grid .reveal:nth-child(4), .leistungen-grid .reveal:nth-child(4) { transition-delay: .36s; }
.efacon-grid .reveal:nth-child(5), .services-grid .reveal:nth-child(5) { transition-delay: .48s; }
.efacon-grid .reveal:nth-child(6), .services-grid .reveal:nth-child(6) { transition-delay: .60s; }
.foerder-wrap .reveal:nth-child(2) { transition-delay: .18s; }
@media (prefers-reduced-motion: reduce) {
  .efacon-grid .reveal, .services-grid .reveal, .foerder-wrap .reveal, .leistungen-grid .reveal { transform: none; transition: none; }
}

/* --- Euro auf Wellenbahn (Förderungen) ------------------------- */
#foerderung { position: relative; overflow: hidden; }
#foerderung .container { position: relative; z-index: 1; }
.euro-path { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; mix-blend-mode: screen;
  opacity: 0; transition: opacity .4s ease; }
.euro-path path { fill: none; stroke: rgba(157,211,30,0.14); stroke-width: 1.5; stroke-dasharray: 6 10; }
.euro-glyph text { font-family: var(--serif); font-weight: 700; font-size: 150px; fill: rgba(157,211,30,0.10);
  stroke: rgba(157,211,30,0.6); stroke-width: 1.5; paint-order: stroke; text-anchor: middle; dominant-baseline: central;
  filter: drop-shadow(0 0 24px rgba(157,211,30,0.35)); }
.euro-trail circle { fill: var(--accent); }
.euro-trail:nth-of-type(1) circle { opacity: .35; r: 6; }
.euro-trail:nth-of-type(2) circle { opacity: .22; r: 4.5; }
.euro-trail:nth-of-type(3) circle { opacity: .12; r: 3; }
@media (max-width: 880px) { .euro-glyph text { font-size: 84px; } }

/* --- "Über uns": Relief, Lichtkegel, Schwarm, Schlagworte ------- */
.about-stage { position: relative; --about-t: 0; --spot-x: 68%; --spot-rot: -14deg; }
/* Höhe des Foto-Rahmens absichern: alle Kinder liegen absolut, der Rahmen selbst
   bekommt seine Höhe über das Seitenverhältnis – als Rückfall ein Platzhalter,
   damit er auch dort nicht auf 0 fällt, wo aspect-ratio nicht greift (ältere Safari). */
.about-stage::before { content: ''; display: block; padding-top: 133.333%; }
.about-stage { height: auto; aspect-ratio: auto; contain: paint; }
.about-stage { width: 100%; }
@media (max-width: 880px) { .about-stage { max-width: 420px; margin: 0 auto; } }
.hero-tagline .textlink { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.about-media { position: absolute; inset: 0; }
.about-media .about-original { display: block; width: 100%; height: 100%; object-fit: cover; }
.about-relief { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.relief-ready .about-relief { display: block; }
.relief-ready .about-original { visibility: hidden; }
/* Das Foto liegt zunächst im Halbdunkel und wird vom Licht erst "gefunden" */
.has-about-fx .about-media {
  filter: brightness(calc(0.55 + 0.45 * var(--about-t))) saturate(calc(0.8 + 0.2 * var(--about-t)));
  transition: filter .2s linear;
}
.about-spot { position: absolute; inset: 0; pointer-events: none; display: none; overflow: hidden; }
.has-about-fx .about-spot { display: block; }
/* Kegel von oben rechts, zielt auf den Kopf, folgt der Maus */
.about-spot::before {
  content: ''; position: absolute; left: var(--spot-x); top: -16%; width: 160%; height: 160%;
  transform: translateX(-50%) rotate(var(--spot-rot)); transform-origin: 50% 0;
  background: conic-gradient(from 168deg at 50% 0%,
    transparent 0deg, rgba(255,255,230,0.0) 2deg, rgba(255,255,230,0.20) 9deg,
    rgba(200,240,140,0.24) 12deg, rgba(255,255,230,0.20) 15deg, rgba(255,255,230,0.0) 22deg, transparent 24deg);
  mix-blend-mode: screen; opacity: var(--about-t); filter: blur(6px);
}
.about-spot::after {
  content: ''; position: absolute; left: 41%; top: 20%; width: 56%; height: 44%; transform: translate(-50%, -40%);
  background: radial-gradient(ellipse at center, rgba(255,255,235,0.26), rgba(200,240,140,0.10) 45%, transparent 70%);
  mix-blend-mode: screen; opacity: var(--about-t); filter: blur(8px);
}
/* zwei weitere, schmalere Strahlen links und rechts des Hauptkegels */
.about-spot .beam {
  position: absolute; top: -16%; width: 160%; height: 160%; transform-origin: 50% 0;
  background: conic-gradient(from 170deg at 50% 0%,
    transparent 0deg, rgba(255,255,230,0.0) 3deg, rgba(255,255,230,0.14) 8deg,
    rgba(200,240,140,0.17) 10deg, rgba(255,255,230,0.14) 12deg, rgba(255,255,230,0.0) 17deg, transparent 20deg);
  mix-blend-mode: screen; opacity: var(--about-t); filter: blur(7px);
}
.about-spot .beam-l { left: calc(var(--spot-x) - 24%); transform: translateX(-50%) rotate(calc(var(--spot-rot) + 15deg)); }
.about-spot .beam-r { left: calc(var(--spot-x) + 20%); transform: translateX(-50%) rotate(calc(var(--spot-rot) - 13deg)); }
.about-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
.has-about-fx .about-fx { display: block; }
/* Schlagworte */
.about-words { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.about-words span {
  position: absolute; font-family: var(--serif); font-weight: 600; font-size: clamp(12px, 1.1vw, 15px);
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent-soft);
  text-shadow: 0 0 14px rgba(157,211,30,0.7); white-space: nowrap; opacity: 0;
  animation: word-rise 6s ease-out forwards;
}
@keyframes word-rise {
  0% { opacity: 0; transform: translateY(0) scale(.9); }
  12% { opacity: .9; }
  70% { opacity: .5; }
  100% { opacity: 0; transform: translateY(-34vh) translateY(60px) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) { .about-words { display: none; } }

/* --- Hinweis unter den Förderkarten ---------------------------- */
.foerder-more { margin-top: 28px; padding: 26px 30px; border: 1px dashed rgba(157,211,30,0.35); border-radius: var(--radius-lg);
  background: rgba(157,211,30,0.04); }
.foerder-more p { margin: 0 0 16px; color: var(--text-muted); font-size: 16px; }
.foerder-more p b { color: var(--text); }
.foerder-more-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.foerder-more small { display: block; margin-top: 12px; color: var(--text-muted); font-size: 12px; }

/* --- Leistungen auf einen Blick (aus der Übersichtsgrafik) ----- */
.leistungen .section-head { margin-bottom: 36px; }
.leistungen-claim { font-style: italic; }
.leistungen-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; perspective: 1200px; }
.leistung-card {
  display: block; position: relative; color: inherit;
  background: var(--bg-1); border: 1px solid var(--line); border-left: 6px solid var(--lc, var(--accent));
  border-radius: var(--radius); padding: 26px 28px; transition: all 0.25s ease;
}
.leistung-card h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 22px; letter-spacing: .5px; text-transform: uppercase; color: var(--lc, var(--accent)); }
.leistung-card p { margin: 0; color: var(--text-muted); font-size: 16px; }
.leistung-card:hover { border-color: var(--lc, var(--accent)); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.leistungen-foot { margin-top: 28px; display: grid; gap: 18px; }
.leistungen-badge {
  text-align: center; font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.4vw, 28px);
  padding: 18px 24px; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(157,211,30,0.16), rgba(157,211,30,0.05)); border: 1px solid rgba(157,211,30,0.35);
}
.leistungen-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 26px 30px; border-radius: var(--radius-lg); background: var(--bg-1); border: 1px solid var(--line);
}
.leistungen-cta h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 24px; }
.leistungen-cta p { margin: 0; color: var(--text-muted); }
.leistungen-cta p b { color: var(--text); }
@media (max-width: 760px) { .leistungen-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .leistungen-grid .reveal { transform: none; transition: none; } }

/* Navigation: sechs Punkte, keiner bricht um */
.main-nav a { white-space: nowrap; }
