/* ════════════════════════════════════════════════════════════════
   LOGIKATO · sections.css
   Sektions-spezifische Styles. Baut auf style.css (Tokens, Typo,
   Layout-Primitives) und hud.css (Cockpit-Overlay) auf.
   
   Reihenfolge:
     1 · Hero-Content-Layer
     2 · Shared Section-Header
     3 · Leistungen (Service-Cards)
     4 · Showroom (Project-Cards)
     5 · Ansatz (Stats)
     6 · Preise (Package-Panels)
     7 · Kontakt (Riesen-Reticle)
     8 · Footer
     9 · Mobile Responsive
   ════════════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════════════════════════════
   1 · HERO — Content-Layer über HUD und WebGL-Background
   ════════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;

  /* CSS-Fallback wenn hero-hud.js (WebGL) nicht lädt — dunkles Blaugrau */
  background: linear-gradient(180deg, #0a1628 0%, #131a2a 60%, #060812 100%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Content über HUD-Layer per Brief ("zentriert über dem HUD") */
.hero__content {
  position: relative;
  z-index: 30;
  text-align: center;
  max-width: 920px;
  padding-block: clamp(var(--sp-8), 12vh, 8rem);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(var(--sp-5), 3vh, var(--sp-7));
}

.hero__eyebrow {
  /* erbt von .eyebrow — hier nur Mikro-Tuning falls nötig */
}

.hero__headline {
  text-wrap: balance;
  max-width: 18ch;            /* zwingt Umbruch nach ~3 Wörtern pro Zeile */
}

.hero__lead {
  margin-inline: auto;
  color: var(--bone-dim);
}

.hero__actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  justify-content: center;
}


/* ════════════════════════════════════════════════════════════════
   2 · SECTION-HEADER — shared für alle Inhalts-Sektionen
   ════════════════════════════════════════════════════════════════ */

.section__header {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: clamp(var(--sp-7), 6vh, var(--sp-9));
  max-width: 720px;
}

.section__header h2 {
  text-wrap: balance;
}


/* ════════════════════════════════════════════════════════════════
   3 · LEISTUNGEN — Service-Cards
   Border-Glow + Bottom-Scan-Linie auf Hover.
   ════════════════════════════════════════════════════════════════ */

.services {
  background: var(--ink);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}

.service-card {
  position: relative;
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  background: var(--ink-raised);
  border: 1px solid var(--hairline);
  overflow: hidden;
  isolation: isolate;

  display: flex;
  flex-direction: column;
  gap: var(--sp-4);

  transition: border-color var(--dur-base) var(--ease-mecha);
}

/* Dekorative Riesennummer im Hintergrund (01/02/03) */
.service-card__num {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-5);
  z-index: 0;

  font-family: var(--font-display);
  font-size: clamp(5rem, 9vw, 8rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--primary);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
}

.service-card__title {
  position: relative;
  z-index: 1;
  font-size: var(--fs-h3);
  font-family: var(--font-display);
  font-weight: 500;
  text-wrap: balance;
}

.service-card__body {
  position: relative;
  z-index: 1;
  color: var(--bone-dim);
  max-width: 36ch;
}

/* Bottom-Scan-Linie — fährt links nach rechts auf Hover */
.service-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);

  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-slow) var(--ease-out-expo);
  z-index: 2;
  pointer-events: none;
}

.service-card:hover,
.service-card:focus-within {
  border-color: var(--primary);
}

.service-card:hover::after,
.service-card:focus-within::after {
  transform: scaleX(1);
}


/* ════════════════════════════════════════════════════════════════
   4 · SHOWROOM — Projekt-Cards + Synapsen-Canvas
   
   Hinweis: scroll.js wird Z-Achsen-Animationen und Datenbahn-Trails
   per ScrollTrigger draufsetzen. Hier nur statisches Grundlayout.
   ════════════════════════════════════════════════════════════════ */

.showroom {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

/* Synapsen-Canvas füllt den Background — gerendert von synapses.js */
.showroom__synapses {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.showroom .container {
  position: relative;
  z-index: 1;
}

.showroom__stage {
  display: flex;
  flex-direction: column;
  gap: var(--sp-9);
  align-items: center;
}

.project-card {
  position: relative;
  width: 100%;
  max-width: 920px;
  padding: var(--sp-6);
  background: var(--ink-raised);
  border: 1px solid var(--hairline);
  display: grid;
  gap: var(--sp-5);

  /* will-change preempts paint-promotion für scroll.js Z-Transforms */
  will-change: transform, opacity;
}

/* Visual-Platzhalter — dunkles Rechteck mit HUD-Grid-Overlay */
.project-card__visual {
  aspect-ratio: 16 / 10;
  background-color: var(--ink);
  border: 1px solid var(--hairline);

  /* CSS-Grid-Overlay — 32px-Raster wie ein technisches Linienraster */
  background-image:
    linear-gradient(rgba(232, 230, 240, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 230, 240, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center center;

  display: grid;
  place-items: center;
  color: var(--bone-mute);
  text-align: center;
}

.project-card__meta {
  display: flex;
  justify-content: space-between;
  color: var(--bone-dim);
}

.project-card__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-family: var(--font-display);
  font-weight: 500;
  text-wrap: balance;
}

.project-card__body {
  color: var(--bone-dim);
  max-width: 56ch;
}

/* Scroll-Fortschrittsanzeige unter den Cards */
.showroom__progress {
  position: relative;
  height: 1px;
  margin-top: var(--sp-8);
  background: var(--hairline);
  overflow: hidden;
}

.showroom__progress-track {
  position: absolute;
  inset: 0;
  background: var(--hairline);
}

.showroom__progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
  will-change: width;
}


/* ════════════════════════════════════════════════════════════════
   5 · ANSATZ — Stats-Panel mit diagonaler HUD-Rasterung
   ════════════════════════════════════════════════════════════════ */

.approach {
  position: relative;
  background: var(--ink-raised);
  overflow: hidden;
  isolation: isolate;
}

/* Subtile diagonale Hatch-Lines im Hintergrund */
.approach::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background-image: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 60px,
    rgba(232, 230, 240, 0.02) 60px,
    rgba(232, 230, 240, 0.02) 61px
  );
}

.approach .container {
  position: relative;
  z-index: 1;
}

.approach__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding-right: var(--sp-5);
  border-left: 1px solid var(--hairline);
  padding-left: var(--sp-5);
}

.stat:first-child {
  border-left: none;
  padding-left: 0;
}

.stat__num {
  font-size: clamp(4rem, 9vw, 7.5rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}

.stat__num small {
  font-size: 0.32em;
  color: var(--primary);
  margin-left: 0.05em;
  letter-spacing: 0;
  font-weight: 400;
}

.stat__label {
  color: var(--bone-dim);
  margin-top: var(--sp-2);
}

.stat__body {
  color: var(--bone-mute);
  max-width: 28ch;
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
}


/* ════════════════════════════════════════════════════════════════
   6 · PREISE — Terminal-Package-Panels
   Featured-Variante mit Coral. Scan-Linie fährt top → bottom.
   ════════════════════════════════════════════════════════════════ */

.pricing {
  background: var(--ink);
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  align-items: stretch;
}

.package {
  position: relative;
  padding: var(--sp-7) var(--sp-5) var(--sp-6);
  background: var(--ink-raised);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  overflow: hidden;
  isolation: isolate;

  transition: border-color var(--dur-base) var(--ease-mecha);
}

.package--featured {
  border-color: var(--alert);
  transform: scale(1.02);
}

/* "EMPFOHLEN" Badge oben rechts */
.package__badge {
  position: absolute;
  top: 0;
  right: var(--sp-5);

  padding: var(--sp-1) var(--sp-3);
  background: var(--alert);
  color: var(--ink);
  font-size: var(--fs-mono-xs);
  letter-spacing: var(--ls-mono-wide);
  text-transform: uppercase;
  font-weight: 600;
  z-index: 3;
}

.package__head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.package__name {
  color: var(--bone-dim);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono-wide);
}

.package--featured .package__name {
  color: var(--alert);
}

.package__price {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--bone);
}

.package__price small {
  font-size: 0.45em;
  font-weight: 300;
  color: var(--bone-dim);
  margin-left: 0.1em;
}

.package__sub {
  color: var(--bone-mute);
}

/* Feature-Liste mit › Prefix */
.package__features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}

.package__features li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  color: var(--bone-dim);
  font-size: var(--fs-sm);
  line-height: 1.4;
}

.package__features .mono {
  color: var(--primary);
  font-size: var(--fs-mono);
  flex-shrink: 0;
}

.package--featured .package__features .mono {
  color: var(--alert);
}

.package__cta {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

/* Scan-Linie fährt top → bottom auf Hover */
.package::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.package:hover::before,
.package:focus-within::before {
  animation: package-scan 1.3s var(--ease-out-expo) forwards;
}

.package--featured::before {
  background: var(--alert);
  box-shadow: 0 0 8px var(--alert-glow);
}

@keyframes package-scan {
  0%   { top: 0;    opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}


/* ════════════════════════════════════════════════════════════════
   7 · KONTAKT — Epic Minimal
   Riesen-Reticle (70vw, opacity 0.04) rotiert langsam im Hintergrund.
   ════════════════════════════════════════════════════════════════ */

.contact {
  position: relative;
  min-height: 90vh;
  background: var(--ink-raised);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.contact__reticle {
  position: absolute;
  top: 50%;
  left: 50%;

  width: min(70vw, 900px);
  aspect-ratio: 1;

  color: var(--primary);
  opacity: 0.04;
  z-index: 0;
  pointer-events: none;
  transform-origin: center;

  /* Rotate inkl. center-Offset im Keyframe (sonst springt das Center weg) */
  animation: contact-rotate 90s linear infinite;
}

.contact__reticle svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes contact-rotate {
  from { transform: translate(-50%, -50%) rotate(0deg);   }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.contact__content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-6);
  padding-block: var(--sp-8);
}

.contact__email {
  color: var(--bone);
  font-size: clamp(2rem, 6.5vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  word-break: break-all;          /* lange Emails brechen auf Mobile sauber */

  transition:
    color       var(--dur-base) var(--ease-mecha),
    text-shadow var(--dur-base) var(--ease-mecha);
}

.contact__email:hover,
.contact__email:focus-visible {
  color: var(--primary);
  text-shadow: 0 0 32px var(--primary-glow);
}

.contact__note {
  color: var(--bone-mute);
}


/* ════════════════════════════════════════════════════════════════
   8 · FOOTER — Einzeilig, Akzent-Trennlinie oben
   ════════════════════════════════════════════════════════════════ */

.footer {
  position: relative;
  padding-block: var(--sp-6);
  background: var(--ink);
  border-top: 1px solid var(--hairline);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer__inner > small {
  color: var(--bone-mute);
}

.footer__nav {
  display: flex;
  gap: var(--sp-6);
}

.footer__nav a {
  color: var(--bone-dim);
  transition: color var(--dur-base) var(--ease-mecha);
}

.footer__nav a:hover,
.footer__nav a:focus-visible {
  color: var(--primary);
}


/* ════════════════════════════════════════════════════════════════
   9 · MOBILE RESPONSIVE — <768px
   Alle Grids fallen auf Single-Column. Hero-Type wird etwas zahmer.
   responsive.css wird später noch finetunen (Hero-Spezifika, etc.)
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Hero — Content-Padding und Type runter */
  .hero__content {
    padding-block: clamp(var(--sp-7), 18vh, 6rem);
    gap: var(--sp-5);
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Section-Header Margins runter */
  .section__header {
    margin-bottom: var(--sp-7);
  }

  /* Leistungen — Single-Column */
  .services__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  .service-card__num {
    font-size: 6rem;
    top: var(--sp-2);
    right: var(--sp-4);
  }

  /* Showroom — Cards-Pad runter */
  .project-card {
    padding: var(--sp-5) var(--sp-4);
  }

  /* Ansatz — Stats stapeln */
  .approach__stats {
    grid-template-columns: 1fr;
    gap: var(--sp-7);
  }

  .stat {
    border-left: none;
    border-top: 1px solid var(--hairline);
    padding-left: 0;
    padding-right: 0;
    padding-top: var(--sp-5);
  }

  .stat:first-child {
    border-top: none;
    padding-top: 0;
  }

  /* Preise — Single-Column, Featured nicht mehr skaliert */
  .pricing__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  .package--featured {
    transform: none;
    order: -1;                      /* BUSINESS nach oben rücken */
  }

  /* Footer — stapeln */
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
  }

  .footer__nav {
    gap: var(--sp-4);
  }
}


/* ════════════════════════════════════════════════════════════════
   10 · REDUCED MOTION — Rotations und Hover-Animationen aus
   ════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {

  .contact__reticle {
    animation: none;
    transform: translate(-50%, -50%);
  }

  .service-card::after,
  .package::before {
    transition: none;
    animation: none;
  }
}
