/*
  Plain-PHP One-Page — Dark, ruhig, leicht mystisch
  - Keine Navigation/Headers/Footers
  - Einziges Bild: Logo (zentral, Glow)
*/

:root {
  /* Farben */
  --bg-0: #06080c;
  --bg-1: #0b121a;
  --bg-2: #101b26;
  --surface: #0e151d;
  --text: #d6dde6;        /* etwas geringerer Kontrast */
  --muted: #8c9fac;       /* abgeschwächte Sekundärfarbe */
  --accent: #7fc0ff;
  --accent-2: #8de6b8;
  --glow: rgba(127, 192, 255, 0.4);

  /* Typo & Rhythmus */
  --ff: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --fs-0: clamp(14px, 3vw, 15px);
  --fs-1: clamp(16px, 3.5vw, 18px);
  --fs-2: clamp(20px, 5vw, 26px);
  --fs-3: clamp(24px, 6vw, 36px);
  --fs-4: clamp(28px, 7vw, 44px);

  /* Spacing */
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --radius: 12px;
  --container: 1200px;
  --text-block: 500px; /* EIN Stellhebel: maximale Breite des Textblocks */
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff);
  font-size: var(--fs-0);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg-0);
  /* Nacht-Himmel: Layered Gradients */
  background-image:
    radial-gradient(1200px 700px at 50% -10%, #0b1722 0%, transparent 70%),
    radial-gradient(900px 600px at 80% 20%, rgba(40, 80, 110, 0.25), transparent 60%),
    radial-gradient(700px 500px at 15% 10%, rgba(35, 70, 95, 0.20), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
}

/* Sterne + dezentes Noise (nur CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(#ffffff 0.6px, transparent 0.7px),
    radial-gradient(#ffffff 0.6px, transparent 0.7px);
  background-size: 3px 3px, 4px 4px;
  background-position: 0 0, 1px 1px;
  opacity: 0.05;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(0deg, rgba(255,255,255,0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 100% 3px, 3px 100%;
  mix-blend-mode: overlay;
  opacity: 0.07;
  z-index: 0;
}

.page { position: relative; isolation: isolate; }
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.bg::before,
.bg::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 45vh;
  bottom: -2vh;
  background: linear-gradient(180deg, rgba(127,192,255,0.07), rgba(14,21,29,0.0) 70%),
              linear-gradient(180deg, rgba(12, 22, 32, 0.95), rgba(6,8,12,1));
}
.bg::before { clip-path: polygon(0% 70%, 10% 62%, 18% 67%, 26% 60%, 35% 65%, 45% 55%, 56% 64%, 66% 57%, 74% 61%, 83% 58%, 92% 62%, 100% 56%, 100% 100%, 0% 100%); filter: blur(2px); }
.bg::after { clip-path: polygon(0% 78%, 8% 72%, 15% 77%, 24% 70%, 33% 75%, 44% 68%, 54% 74%, 64% 69%, 72% 73%, 81% 70%, 91% 74%, 100% 68%, 100% 100%, 0% 100%); opacity: .9; }


.wrap {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  display: grid;
  gap: var(--space-6);
  padding: 0 0 var(--space-7);
}

.center-group {
  min-height: 100svh; /* immer zentriert im Viewport */
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: var(--space-6);
}

.col { min-width: 0; }
.col--text { max-width: var(--text-block); }
.col--logo { display: grid; place-items: center; }
.col--form { }

@media (min-width: 980px) {
  .center-group {
    grid-template-columns: 1.2fr 1fr; /* links Text, rechts Logo */
  }
  .col--text { justify-self: start; }
}

.title { font-size: var(--fs-4); line-height: 1.1; margin: 0 0 -20px 0; padding: 0; text-align: justify; text-align-last: justify; text-justify: inter-word; }
.title::after { content: ""; display: inline-block; width: 100%; }

/* Pre-Header unter dem Titel: kleiner, weniger Kontrast, Blocksatz */
.preheader {
  margin: -30px 0 0 0;
  padding: 0;
  color: color-mix(in srgb, var(--muted) 40%, transparent);
  font-size: var(--fs-3);
  letter-spacing: 0.01em;
  text-align: justify;
  text-align-last: justify;
  text-justify: inter-word;
}
.preheader::after { content: ""; display: inline-block; width: 100%; }

/* Variante: leicht größerer Pre-Header */
.preheader--lead {
  font-size: clamp(18px, 4vw, 22px);
}

.copy { color: var(--muted); font-size: var(--fs-1); margin-top: var(--space-4); text-align: justify; text-justify: inter-word; }
/* Blocksatz inkl. letzter Zeile für Absätze im Copy-Block */
.copy p { margin: 0; text-align: justify; text-align-last: justify; text-justify: inter-word; }
.copy .dot { color: var(--text); font-weight: 700; letter-spacing: 6px; }

/* Abstand zwischen Textabsatz und Kontaktformular (Accordion) */
.copy + .accordion { margin-top: 50px; }

.logo-wrap { display: grid; place-items: center; }
.logo {
  width: min(70vw, 320px);
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 0 18px var(--glow)) drop-shadow(0 0 6px rgba(141, 230, 184, 0.18));
}
/* Beschriftung unter dem Logo: gleiche Breite wie das Logo, dezenter Kontrast */
.logo-caption {
  width: min(70vw, 320px);
  max-width: 420px;
  margin-top: 8px;
  text-align: center;
  color: color-mix(in srgb, var(--muted) 30%, transparent);
  font-size: var(--fs-3);
  line-height: 1.2;
    letter-spacing: 0.2em;
}
.logo-caption a:hover, .logo-caption a:focus-visible { color: var(--text); border-bottom-color: rgba(127,192,255,0.12); }
.logo-caption a { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(127,192,255,0.12); }

.form {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: none; /* Rahmen erscheint über das Accordion-Panel beim Öffnen */
  border-radius: 14px;
  padding: var(--space-5);
  display: grid;
  gap: var(--space-4);
  color: #e9eff7; /* im Formular höhere Lesbarkeit */
}
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: #e9eff7; }
.field input[type="email"] {
  width: 100%;
  background: #0c131a;
  color: #e9eff7;
  border: 1px solid rgba(127,192,255,0.25);
  border-radius: 10px;
  padding: 12px 14px;
}
.field input[type="email"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field textarea {
  width: 100%;
  background: #0c131a;
  color: #e9eff7;
  border: 1px solid rgba(127,192,255,0.25);
  border-radius: 10px;
  padding: 12px 14px;
  resize: vertical;
}
.field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(127,192,255,0.35);
  color: var(--text);
  background: linear-gradient(180deg, rgba(16,27,38,0.9), rgba(8,12,18,0.9));
  text-decoration: none;
}
.btn:hover { background: linear-gradient(180deg, rgba(20,32,46,0.95), rgba(10,15,22,0.95)); }
.btn[disabled] { opacity: .7; cursor: not-allowed; }

.actions { display: flex; align-items: center; gap: var(--space-3); }
#form-status { color: var(--muted); min-height: 1.2em; }
.hint { color: var(--muted); font-size: .95rem; margin-top: -6px; }

/* Accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Accordion: Trigger + Panel (Formular) */
.accordion { display: grid; gap: var(--space-3); }
.accordion__trigger {
  appearance: none;
  border: none;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 85%, transparent);
  font: inherit;
  padding: 8px 2px;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px dashed rgba(127,192,255,0.15);
  transition: color 200ms ease, border-color 250ms ease, text-shadow 250ms ease;
}
.accordion__trigger:hover,
.accordion__trigger:focus-visible {
  color: var(--text);
  border-color: rgba(127,192,255,0.35);
  text-shadow: 0 0 6px rgba(127,192,255,0.12);
}
.accordion__panel {
  border: 1px solid rgba(127,192,255,0); /* startet unsichtbar */
  border-radius: 16px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 600ms ease, opacity 320ms ease, transform 320ms ease, border-color 600ms ease;
  will-change: max-height, opacity, transform, border-color;
}
.accordion.is-open .accordion__panel {
  border-color: rgba(127,192,255,0.18);
  max-height: 1200px; /* ausreichend für Inhalt; wird per JS dynamisch gesetzt */
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .accordion__panel { transition: none; }
  .accordion__trigger { transition: none; }
}

/* Immer präsente, sehr dezente Fußnote (fixiert, mittig unten) */
.footnote-fixed {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 50;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--muted) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid rgba(127,192,255,0.08);
  border-radius: 999px;
  padding: 6px 10px;
  text-align: center; /* Footer-Text zentriert */
  backdrop-filter: blur(4px);
  white-space: nowrap; /* Desktop: immer einzeilig */
}
.footnote-fixed a { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(127,192,255,0.12); }
.footnote-fixed .footnote__sep { margin: 0 6px; }

/* Smartphone: definierter Umbruch nach „Salalytic“, Separator ausblenden */
@media (max-width: 640px) {
  .footnote-fixed {
    white-space: normal;
    /* gleiche Seitenränder wie der Text-Container (.wrap) */
    width: min(100% - 2rem, var(--container));
    left: 50%;
    transform: translateX(-50%);
  }
  .footnote-fixed .footnote__right { display: block; margin-top: 2px; }
  .footnote-fixed .footnote__sep { display: none; }
}
.footnote-fixed a:hover, .footnote-fixed a:focus-visible { color: var(--text); border-bottom-color: rgba(127,192,255,0.35); }

/* Mobile-spezifische Anpassungen: Abstand oben 50px, Copy als Block,
   Logo kleiner und oberhalb des Textes */
@media (max-width: 979px) {
  .center-group { padding-top: 50px; grid-template-columns: 1fr; }
  .copy { display: block; }
  .col--logo { order: -1; }
  .logo { width: min(55vw, 200px); max-width: 240px; }
}
