/* ============================================================
   Inframanager Landingpage
   Farbtokens 1:1 aus frontend/src/style.css (Hue 248.51).
   Nichts hier erfindet Farbe - die Seite erbt die App-CI.
   ============================================================ */

:root {
  /* Brand (aus der App) */
  --brand-25:  oklch(0.9560 0.0204 248.51);
  --brand-50:  oklch(0.9320 0.0307 248.51);
  --brand-75:  oklch(0.9080 0.0404 248.51);
  --brand-100: oklch(0.8840 0.0496 248.51);
  --brand-200: oklch(0.7880 0.0809 248.51);
  --brand-300: oklch(0.6920 0.1032 248.51);
  --brand-400: oklch(0.5960 0.1165 248.51);
  --brand-500: oklch(0.5000 0.1210 248.51);
  --brand-600: oklch(0.4200 0.1102 248.51);
  --brand-700: oklch(0.3400 0.0905 248.51);
  --brand-800: oklch(0.2600 0.0720 248.51);
  --brand-850: oklch(0.2200 0.0635 248.51);
  --brand-900: oklch(0.1800 0.0568 248.51);
  --brand-950: oklch(0.1400 0.0549 248.51);
  --brand-975: oklch(0.1200 0.0511 248.51);

  /* Surface (aus der App) */
  --surface-25:  oklch(0.9560 0.0061 248.51);
  --surface-50:  oklch(0.9320 0.0092 248.51);
  --surface-75:  oklch(0.9080 0.0121 248.51);
  --surface-100: oklch(0.8840 0.0149 248.51);
  --surface-200: oklch(0.7880 0.0243 248.51);
  --surface-300: oklch(0.6920 0.0309 248.51);
  --surface-400: oklch(0.5960 0.0350 248.51);
  --surface-600: oklch(0.4200 0.0354 248.51);
  --surface-700: oklch(0.3400 0.0326 248.51);
  --surface-800: oklch(0.2600 0.0279 248.51);
  --surface-975: oklch(0.1200 0.0153 248.51);

  /* Akzent: der Goldton, den die App bereits fuehrt (--accent-accent) */
  --gold:      oklch(0.7373 0.1177 79.70);
  --gold-soft: oklch(0.8300 0.0900 79.70);
  --gold-deep: oklch(0.5600 0.1000 79.70);

  /* Fehlerklassen A-E, exakt wie in der App */
  --fk-a: oklch(0.5960 0.1728 24.86);
  --fk-b: oklch(0.5960 0.1119 50.81);
  --fk-c: oklch(0.7373 0.1177 79.70);
  --fk-d: oklch(0.5960 0.1165 248.51);
  --fk-e: oklch(0.5960 0.1261 147.17);

  /* Dunklere Varianten fuer Chips: weisser Text auf -400 erreicht 4.5:1 nicht */
  --fk-a-strong: oklch(0.5000 0.1794 24.86);
  --fk-b-strong: oklch(0.5000 0.1162 50.81);
  --fk-d-strong: oklch(0.5000 0.1210 248.51);
  --fk-e-strong: oklch(0.5000 0.1310 147.17);

  --shadow-hue: oklch(0.14 0.0549 248.51);

  --radius: 0.625rem;
  --radius-lg: calc(var(--radius) + 4px);
  --radius-sm: calc(var(--radius) - 4px);

  --page: 78rem;
  --gutter: 1.5rem;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--surface-25);
  color: var(--surface-975);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
}
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }

/* ---------- Browser-Oberflaechen aus der Palette ---------- */
::selection { background: var(--brand-200); color: var(--brand-975); }
:root { accent-color: var(--brand-600); caret-color: var(--brand-600); scrollbar-color: var(--surface-300) transparent; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--gold); }
a { color: var(--brand-600); text-underline-offset: 0.2em; text-decoration-thickness: from-font; }

/* ---------- Grundbausteine ---------- */
.container { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.3rem + 2.7vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 1.15rem + 1.7vw, 2.5rem); }
h3 { font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem); letter-spacing: -0.02em; }
p  { text-wrap: pretty; }

.lead { font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.3rem); line-height: 1.55; max-width: 62ch; }

/* Gleis-Motiv: zwei Schienen mit Schwellen - das Zeichen der Marke als Trennlinie */
.rails {
  --rail: var(--surface-200);
  height: 14px;
  position: relative;
}
.rails::before,
.rails::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--rail);
}
.rails::before { top: 3px; }
.rails::after  { bottom: 3px; }
.rails span {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, var(--rail) 0 1px, transparent 1px 18px);
}
.on-dark .rails { --rail: color-mix(in oklab, var(--brand-300) 45%, transparent); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--brand-600);
  --btn-fg: var(--brand-50);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 0.975rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
  box-shadow: 0 1px 2px color-mix(in oklab, var(--shadow-hue) 16%, transparent);
}
.btn:hover { background: color-mix(in oklab, var(--btn-bg) 88%, black); transform: translateY(-1px); box-shadow: 0 6px 16px color-mix(in oklab, var(--shadow-hue) 20%, transparent); }
.btn:active { transform: translateY(0); }

.btn-gold { --btn-bg: var(--gold); --btn-fg: oklch(0.2000 0.0450 79.70); }
.btn-gold:hover { background: color-mix(in oklab, var(--gold) 90%, white); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--brand-700);
  border-color: var(--surface-300);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--surface-50); border-color: var(--surface-400); box-shadow: none; }

.on-dark .btn-ghost { --btn-fg: var(--brand-50); border-color: color-mix(in oklab, var(--brand-200) 62%, transparent); }
.on-dark .btn-ghost:hover { background: color-mix(in oklab, var(--brand-100) 12%, transparent); border-color: var(--brand-300); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--surface-25) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-100);
}
.site-header .bar { display: flex; align-items: center; gap: 2rem; height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; color: var(--surface-975); text-decoration: none; }
.brand img { width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; }
.site-nav { display: flex; gap: 1.75rem; margin-left: auto; }
.site-nav a { color: var(--surface-700); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.site-nav a:hover { color: var(--brand-600); }
.header-cta { display: inline-flex; gap: 0.6rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 80% -10%, oklch(0.3400 0.0905 248.51 / 0.55), transparent 60%),
    linear-gradient(170deg, var(--brand-900) 0%, var(--brand-950) 55%, var(--brand-975) 100%);
  color: var(--brand-50);
  padding-block: clamp(3rem, 1.5rem + 5vw, 5rem) clamp(4rem, 2rem + 7vw, 6.5rem);
}
/* Gleisfeld im Anschnitt - perspektivische Schwellen, das Motiv des Logos in gross */
.hero::after {
  content: '';
  position: absolute;
  left: -10%; right: -10%; bottom: -2px;
  height: 46%;
  background-image: repeating-linear-gradient(80deg, color-mix(in oklab, var(--brand-100) 13%, transparent) 0 1px, transparent 1px 46px);
  mask-image: linear-gradient(to top, black, transparent 88%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: clamp(2.5rem, 1rem + 5vw, 4.5rem); align-items: center; }
@media (min-width: 62rem) { .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); } }

.hero h1 { color: white; }
.hero .lead { margin-top: 1.25rem; color: var(--brand-100); }
.hero-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero-proof {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-size: 0.86rem;
  color: var(--brand-100);
  padding: 0;
}
.hero-proof li { list-style: none; display: flex; align-items: center; gap: 0.5rem; }
.hero-proof svg { width: 1.05rem; height: 1.05rem; color: var(--gold); flex: none; }

/* ---------- Bildrahmen fuer die App-Screenshots ----------
   Echte Aufnahmen aus der laufenden Anwendung (Beispieldaten, neutrale Firmen- und
   Personennamen). Der Rahmen setzt nur die Browserzeile darueber - das Bild selbst
   wird nicht beschnitten, damit nichts Wichtiges wegfaellt. */
.shot {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-25);
  border: 1px solid var(--surface-200);
  box-shadow: 0 24px 60px -20px color-mix(in oklab, var(--shadow-hue) 50%, transparent),
              0 4px 12px color-mix(in oklab, var(--shadow-hue) 18%, transparent);
}
.shot-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.85rem;
  background: var(--surface-75);
  border-bottom: 1px solid var(--surface-200);
}
.shot-chrome i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--surface-300); }
.shot-chrome .url {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: var(--surface-700);
  background: var(--surface-25);
  border: 1px solid var(--surface-200);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
}
.shot img { width: 100%; height: auto; display: block; }

.synthetic {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--surface-600);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.on-dark .synthetic { color: color-mix(in oklab, var(--brand-100) 72%, transparent); }
.synthetic svg { width: 0.9rem; height: 0.9rem; flex: none; }

/* ---------- Sektionen ---------- */
.section { padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.section-head p { margin-top: 1rem; color: var(--surface-700); font-size: 1.05rem; }

/* Modulzeilen: abwechselnd, kein Kartenraster */
.module { display: grid; gap: clamp(1.75rem, 1rem + 3vw, 3.5rem); align-items: center; }
.module + .module { margin-top: clamp(3rem, 2rem + 4vw, 5.5rem); }
@media (min-width: 62rem) {
  .module { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
  .module:nth-child(even) .module-visual { order: -1; }
}
/* Goldene Schiene statt Beschriftung: markiert den Modulanfang, ohne die Ueberschrift zu doppeln */
.module h3::before {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 1.1rem;
}
.module p.teaser { margin-top: 0.9rem; color: var(--surface-700); font-size: 1.05rem; max-width: 46ch; }

.disclosure { margin-top: 1.4rem; }
.disclosure-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .42s var(--ease);
}
.module.is-open .disclosure-panel { grid-template-rows: 1fr; }
.disclosure-panel > div { overflow: hidden; }
.disclosure ul { margin: 0; padding: 0 0 0.35rem; list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.disclosure li { display: flex; gap: 0.7rem; font-size: 0.975rem; color: var(--surface-700); }
.disclosure li svg { width: 1.05rem; height: 1.05rem; color: var(--brand-500); flex: none; margin-top: 0.28rem; }

.module-actions { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
/* Kurzer Textlink statt des fuenffach wiederholten Knopfes - eine Primaeraktion
   pro Seite reicht, die Modulzeilen verweisen nur noch dorthin. */
.module-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--surface-700);
  text-decoration-color: var(--surface-300);
}
.module-link:hover { color: var(--brand-600); text-decoration-color: currentColor; }
.toggle {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: none; border: none; padding: 0.35rem 0;
  color: var(--brand-600); font-weight: 600; font-size: 0.95rem; cursor: pointer;
}
.toggle:hover { color: var(--brand-700); }
.toggle svg { width: 1rem; height: 1rem; transition: transform .35s var(--ease); }
.module.is-open .toggle svg { transform: rotate(180deg); }

/* ---------- Ausserdem enthalten ---------- */
.also {
  margin-top: clamp(3.5rem, 2rem + 4vw, 5.5rem);
  padding-top: 2.25rem;
  border-top: 1px solid var(--surface-100);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem;
}
.also h3 { font-size: 1rem; letter-spacing: -0.01em; margin-right: 0.5rem; }
.also span {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--surface-200);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--surface-700);
  background: white;
}
.also span svg { width: 0.95rem; height: 0.95rem; color: var(--brand-500); }

/* ---------- Kontakt ---------- */
.contact {
  background:
    radial-gradient(100% 90% at 15% 0%, oklch(0.3400 0.0905 248.51 / 0.5), transparent 62%),
    linear-gradient(200deg, var(--brand-950), var(--brand-975));
  color: var(--brand-50);
}
.contact h2 { color: white; }
.contact .section-head p { color: var(--brand-100); }
.contact-grid { display: grid; gap: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
@media (min-width: 62rem) { .contact-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); align-items: start; } }

.contact-aside p { color: var(--brand-100); }
.contact-aside dl { margin-top: 2rem; display: grid; gap: 1.25rem; }
.contact-aside dt { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.contact-aside dd { margin: 0.3rem 0 0; color: white; font-size: 1.05rem; }
.contact-aside dd a { color: white; }

.form {
  background: color-mix(in oklab, var(--brand-100) 7%, transparent);
  border: 1px solid color-mix(in oklab, var(--brand-200) 22%, transparent);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  display: grid;
  gap: 1.1rem;
}
.field-pair { display: grid; gap: 1.1rem; }
@media (min-width: 34rem) { .field-pair { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--brand-100); margin-bottom: 0.4rem; }
.field .req { color: var(--gold); }
.field input, .field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: color-mix(in oklab, var(--brand-975) 55%, transparent);
  border: 1px solid color-mix(in oklab, var(--brand-200) 58%, transparent);
  border-radius: var(--radius);
  color: white;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: color-mix(in oklab, var(--brand-100) 55%, transparent); }
.field input:hover, .field textarea:hover { border-color: color-mix(in oklab, var(--brand-200) 78%, transparent); }
.field input:focus, .field textarea:focus { border-color: var(--gold); background: color-mix(in oklab, var(--brand-975) 70%, transparent); }
.field textarea { resize: vertical; min-height: 6.5rem; }

.consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.9rem; color: var(--brand-100); }
.consent input { margin-top: 0.25rem; width: 1rem; height: 1rem; flex: none; }
.consent a { color: white; }

.form .btn { justify-content: center; }
.form-note { font-size: 0.82rem; color: color-mix(in oklab, var(--brand-100) 75%, transparent); }

.form-status { font-size: 0.9rem; border-radius: var(--radius); padding: 0.7rem 0.9rem; display: none; }
.form-status.is-shown { display: block; }
.form-status[data-kind="info"]    { background: color-mix(in oklab, var(--gold) 16%, transparent); color: var(--gold-soft); border: 1px solid color-mix(in oklab, var(--gold) 38%, transparent); }
.form-status[data-kind="success"] { background: color-mix(in oklab, var(--fk-e) 20%, transparent); color: oklch(0.8600 0.0900 147.17); border: 1px solid color-mix(in oklab, var(--fk-e) 55%, transparent); }
.form-status[data-kind="error"]   { background: color-mix(in oklab, var(--fk-a) 20%, transparent); color: oklch(0.8600 0.0700 24.86); border: 1px solid color-mix(in oklab, var(--fk-a) 58%, transparent); }

/* Hinweis steht vor den Feldern, damit niemand erst nach dem Ausfuellen davon erfaehrt */
.form-notice {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--gold-soft);
  background: color-mix(in oklab, var(--gold) 13%, transparent);
  border: 1px solid color-mix(in oklab, var(--gold) 35%, transparent);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
}
.form-notice a { color: white; }

/* Ungueltige Felder sichtbar markieren - "markierte Pflichtfelder" muss stimmen */
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--fk-a);
  background: color-mix(in oklab, var(--fk-a) 12%, color-mix(in oklab, var(--brand-975) 55%, transparent));
}
.consent.is-invalid span { color: oklch(0.8600 0.0700 24.86); }

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn:disabled:hover { background: var(--btn-bg); transform: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-975); color: var(--brand-100); padding-block: 2.5rem; font-size: 0.9rem; }
.site-footer .bar { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.site-footer a { color: var(--brand-100); }
.site-footer a:hover { color: white; }
.site-footer nav { display: flex; gap: 1.25rem; }

/* ---------- Auftritt: ein orchestrierter Moment, nicht ueberall ---------- */
/* Genau ein Auftritt: das Hero-Fenster baut sich einmal auf und legt sich in seinen
   Schatten. Die Modulzeilen bekommen bewusst keinen Blanket-Fade. */
@media (prefers-reduced-motion: no-preference) {
  .hero .shot { animation: app-settle .9s var(--ease) both; }
}
@keyframes app-settle {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Kleine Viewports ---------- */
@media (max-width: 48rem) {
  .site-nav { display: none; }
  .header-cta { margin-left: auto; gap: 0.5rem; }
  .header-cta .btn { padding-inline: 0.9rem; font-size: 0.9rem; }
}
/* Schmale Telefone: eher den Markennamen opfern als eine der beiden Aktionen -
   das Zeichen traegt die Marke, Login und Testzugang muessen beide erreichbar bleiben. */
@media (max-width: 27rem) {
  .brand-name { display: none; }
  .header-cta .btn { padding-inline: 0.75rem; font-size: 0.85rem; }
}
