/* Day One IT – Stylesheet
   Richtung "Leitstand": Farben aus der Maschinenhalle, Linien statt Karten.
   Schrift: Archivo (SIL OFL), selbst gehostet unter assets/fonts/ – keine externen Anbieter (DSGVO). */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Hell (Standard)
     Lichtgrau  ~ RAL 7035, Gehäusefarbe von Schaltschränken
     Signalgelb ~ RAL 1003, einzige Akzentfarbe: Stillstand / Handlung */
  --bg:            #F4F5F3;
  --surface:       #FFFFFF;
  --panel:         #DDE1DE;
  --text:          #1E2226;
  --text-muted:    #3E454B;
  --text-subtle:   #5A6268;
  --line:          #C3C8C5;
  --line-strong:   #1E2226;
  --signal:        #F5A800;
  --signal-hover:  #DC9700;
  --on-signal:     #1E2226;
  --link:          #1E2226;
  --focus:         #1E2226;
  --success:       #2F6B3A;
  --danger:        #B42318;
  --header-bg:     #F4F5F3;
  --ink:           #1E2226;  /* dunkle Flächen: Kontakt, Footer */
  --on-ink:        #E6E9E7;
  --on-ink-muted:  #A9B1B6;
  --img-bg:        #DDE1DE;
  --notice-bg:     #FFF4D6;
  --notice-border: #F5A800;
  --notice-text:   #5A3D00;
  --logo-accent:   #F5A800;  /* "IT" im Logo: Signalgelb wie die Buttons */
  color-scheme: light;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wide: 118%;
  --radius: 4px;
  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 4.25rem;
}

/* Dunkel: nur wenn der Besucher es über den Button wählt. Standard ist immer Hell. */
:root[data-theme="dark"] {
  --bg:            #15181B;
  --surface:       #1C2024;
  --panel:         #262B30;
  --text:          #E6E9E7;
  --text-muted:    #C4CACD;
  --text-subtle:   #98A1A7;
  --line:          #343B41;
  --line-strong:   #E6E9E7;
  --link:          #E6E9E7;
  --focus:         #F5A800;
  --success:       #7CC48A;
  --danger:        #F2877C;
  --header-bg:     #15181B;
  --ink:           #0D0F11;
  --logo-accent:   #F5A800;
  --img-bg:        #262B30;
  --notice-bg:     rgba(245, 168, 0, .12);
  --notice-border: #A87300;
  --notice-text:   #FFD77A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { margin: 0 0 .6em; font-stretch: var(--wide); }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 780; line-height: 1.02; letter-spacing: -.025em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 760; line-height: 1.08; letter-spacing: -.02em; }
h3 { font-size: 1.25rem; font-weight: 720; line-height: 1.25; letter-spacing: -.01em; }
h4 { font-size: 1rem; font-weight: 720; line-height: 1.3; margin: 1.75rem 0 .5rem; font-stretch: 100%; }
p { margin: 0 0 1em; }

a { color: var(--link); text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 4px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: var(--signal); color: var(--on-signal); padding: .6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 50rem; }

/* Buttons: wie Taster an der Anlage – flach, kantig, eindeutig */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-align: center;
  border-radius: var(--radius); border: 2px solid transparent; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary, .btn-small { background: var(--signal); color: var(--on-signal); border-color: var(--signal); }
.btn-primary:hover, .btn-small:hover { background: var(--signal-hover); border-color: var(--signal-hover); color: var(--on-signal); }
.btn-ghost, .btn-outline { color: var(--text); border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover, .btn-outline:hover { background: var(--text); color: var(--bg); }
.btn-small { min-height: 44px; padding: .55rem 1rem; font-size: .95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; margin-right: auto; }
/* Vorläufiges Textlogo, wird später durch das finale Logo ersetzt */
/* Gestaltung wie auf main: Systemschrift, fett, "IT" farbig abgesetzt */
.logo-text {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 750; font-stretch: 100%; font-size: 1.3rem; letter-spacing: -.025em;
  color: var(--text); white-space: nowrap;
}
.logo-text span { color: var(--logo-accent); }

.header-tools { display: flex; align-items: center; gap: .5rem; }
.icon-btn, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--text); cursor: pointer; text-decoration: none;
  font: inherit; font-size: .9rem; font-weight: 700;
  transition: border-color .15s ease;
}
.icon-btn:hover, .nav-toggle:hover { border-color: var(--line-strong); }
.icon-btn svg, .nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lang-switch { width: auto; padding: 0 .75rem; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.main-nav ul { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.main-nav a:not(.btn) { color: var(--text-muted); text-decoration: none; font-weight: 550; font-size: .97rem; padding: .5rem 0; }
.main-nav a:not(.btn):hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--signal); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav ul {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.25rem;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .main-nav ul.open { display: flex; }
  .main-nav li a:not(.btn) { display: block; padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .main-nav li .btn { margin-top: 1rem; width: 100%; }
}

/* Hero */
.hero { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--line); }
.hero-copy { max-width: 50rem; }
.hero h1 span { display: block; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--text-muted); max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 0; }
.hero-assurances {
  list-style: none; padding: 0; margin: 1.75rem 0 0;
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; color: var(--text-muted); font-size: .97rem;
}
.hero-assurances li { padding-left: .9rem; border-left: 3px solid var(--signal); line-height: 1.3; }

/* Hero: Vorschau auf die Live-Demo (Farben wie im Grafana-Dashboard der Demo) */
.hero .container { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); }
@media (min-width: 1000px) {
  .hero .container { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); column-gap: clamp(4rem, 7vw, 7rem); align-items: center; }
  .hero h1 { font-size: clamp(2.3rem, 4.1vw, 3.6rem); }
}
.hero-demo {
  position: relative; display: block; max-width: 34rem; width: 100%;
  padding-bottom: .25rem; color: var(--text); text-decoration: none; cursor: pointer;
}
.hd-stage { position: relative; }
/* Play-Button auf dem Dashboard: zeigt, dass man hier etwas ausprobieren kann */
.hd-play {
  position: absolute; left: calc((100% - 6rem) / 2); top: 71%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .95rem .55rem .6rem;
  background: var(--signal); color: var(--on-signal); border-radius: 999px; font-weight: 700; font-size: .9rem;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, .55); transition: transform .2s ease;
  animation: hd-pulse 2.4s ease-out infinite;
}
.hd-play svg { width: 1.6rem; height: 1.6rem; flex: none; }
.hero-demo:hover .hd-play, .hero-demo:focus-visible .hd-play { transform: translate(-50%, -50%) scale(1.06); }
@keyframes hd-pulse { 0% { box-shadow: 0 8px 24px -6px rgba(0,0,0,.55), 0 0 0 0 rgba(245,168,0,.55); } 70%, 100% { box-shadow: 0 8px 24px -6px rgba(0,0,0,.55), 0 0 0 14px rgba(245,168,0,0); } }
.hd-dash {
  background: #111217; color: #CCCCDC; border: 1px solid #262A30; border-top: 3px solid var(--signal);
  border-radius: 2px; padding: .7rem .8rem .8rem; margin-right: 6rem;
  font-size: .8rem; line-height: 1.3; box-shadow: 0 18px 40px -24px rgba(17, 18, 23, .55);
  transition: transform .2s ease;
}
.hero-demo:hover .hd-dash, .hero-demo:focus-visible .hd-dash { transform: translateY(-3px); box-shadow: 0 24px 48px -22px rgba(17, 18, 23, .7); }
.hero-demo:hover .hd-dash .hd-row, .hero-demo:hover .hd-dash .hd-chart { opacity: .75; }
.hd-bar { display: flex; align-items: center; gap: .4rem; color: #8E8E9A; margin-bottom: .6rem; }
.hd-bar strong { color: #CCCCDC; font-weight: 500; }
.hd-logo { background: #1F2A3A; color: #CCCCDC; font-size: .65rem; font-weight: 700; padding: .1rem .3rem; border-radius: 2px; }
.hd-live { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #262A30; padding: .1rem .45rem; }
.hd-live i { width: 7px; height: 7px; border-radius: 50%; background: #73BF69; }
.hd-row {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem;
  background: #181B1F; border: 1px solid #262A30; padding: .45rem .6rem;
}
.hd-count { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hd-state { display: inline-grid; }
.hd-state b { grid-area: 1 / 1; font-weight: 500; padding: .15rem .6rem; text-align: center; }
.hd-state .run  { background: #73BF69; color: #0B1A08; animation: hd-run 8s infinite; }
.hd-state .stop { background: #F2495C; color: #FFFFFF; opacity: 0; animation: hd-stop 8s infinite; }
.hd-chart { display: block; width: 100%; height: 4.5rem; margin-top: .6rem; background: #181B1F; border: 1px solid #262A30; }
.hd-chart path { fill: none; vector-effect: non-scaling-stroke; }
.hd-chart .grid { stroke: rgba(204, 204, 220, .08); }
.hd-chart .soll { stroke: #FADE2A; stroke-width: 1.5; }
.hd-chart .ist  { stroke: #73BF69; stroke-width: 1.5; }
.hd-phone {
  position: absolute; right: 0; top: 1.25rem; width: 7.2rem; height: 10rem;
  background: #16181C; border: 3px solid #2B2F35; border-radius: 1.1rem; padding: 1.4rem .4rem 0;
  box-shadow: 0 18px 40px -20px rgba(17, 18, 23, .6);
}
.hd-phone::before { content: ""; position: absolute; top: .45rem; left: 50%; width: 2.2rem; height: .45rem; margin-left: -1.1rem; background: #000; border-radius: 1rem; }
.hd-notif {
  display: grid; gap: .1rem; background: rgba(230, 233, 231, .94); color: #1E2226; border-radius: .5rem;
  padding: .4rem .45rem; font-size: .66rem; line-height: 1.25; opacity: 0; transform: translateY(-.5rem);
  animation: hd-notif 8s infinite;
}
.hd-notif b { font-weight: 700; }
.hd-notif span { color: #5A6268; }
.hd-cta {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.25rem; padding: .7rem 1.1rem;
  background: var(--text); color: var(--bg); border-radius: var(--radius); font-weight: 700;
  transition: gap .2s ease;
}
.hero-demo:hover .hd-cta, .hero-demo:focus-visible .hd-cta { gap: .8rem; }
.hd-sub { display: block; margin-top: .35rem; color: var(--text-muted); font-size: .95rem; max-width: 24rem; }
@keyframes hd-run  { 0%, 45% { opacity: 1; } 50%, 92% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes hd-stop { 0%, 45% { opacity: 0; } 50%, 92% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes hd-notif {
  0%, 55% { opacity: 0; transform: translateY(-.5rem); }
  60%, 92% { opacity: 1; transform: none; }
  97%, 100% { opacity: 0; transform: translateY(-.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .hd-state .run, .hd-state .stop, .hd-notif { animation: none !important; }
  .hd-state .run { opacity: 0; }
  .hd-state .stop { opacity: 1; }
  .hd-notif { opacity: 1; transform: none; }
  .hd-play { animation: none !important; }
}

@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
  .hero-assurances { flex-direction: column; }
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 42rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p:last-child { color: var(--text-muted); }

/* Leistungen: zwei gleichrangige Spalten, getrennt durch eine Linie */
.services { display: grid; grid-template-columns: 1fr 1fr; border-top: 3px solid var(--line-strong); }
.service { display: flex; flex-direction: column; padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 3.5vw, 2.75rem) 0 0; }
.service + .service { padding-left: clamp(1.25rem, 3.5vw, 2.75rem); padding-right: 0; border-left: 1px solid var(--line); }
.service h3 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); margin: 0 0 .25rem; }
.service p { color: var(--text-muted); }
.service .btn { margin-top: auto; align-self: flex-start; }

.ticks { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .45rem; color: var(--text-muted); }
.ticks li { position: relative; padding-left: 1.4rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .75em; width: .8rem; height: 2px; background: var(--text); }

.examples { font-size: .97rem; color: var(--text-muted); background: var(--panel); border-radius: var(--radius); padding: .85rem 1rem; }
.examples span { font-weight: 700; color: var(--text); margin-right: .4rem; }
.examples span::after { content: ":"; }

.benefits { list-style: none; padding: 0; margin: 0 0 2rem; }
.benefits li { padding: .7rem 0; border-top: 1px solid var(--line); color: var(--text-muted); }
.benefits li:last-child { border-bottom: 1px solid var(--line); }
.benefits strong { color: var(--text); }
.services-note { margin: 2.5rem 0 0; color: var(--text-subtle); }

@media (max-width: 820px) {
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 1.75rem 0 2.5rem; border-left: 0; }
  .service + .service { border-top: 3px solid var(--line-strong); }
}

/* Ablauf: echte Reihenfolge, daher Nummern. Maßlinie über den kostenfreien Schritten. */
.steps-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 1.5rem; margin-bottom: .9rem; }
.steps-scale span {
  grid-column: 1 / 4; position: relative; text-align: center; font-weight: 700; font-size: .95rem;
  padding-bottom: .55rem; border-bottom: 2px solid var(--signal);
}
.steps-scale span::before, .steps-scale span::after { content: ""; position: absolute; bottom: -8px; width: 2px; height: 14px; background: var(--signal); }
.steps-scale span::before { left: 0; }
.steps-scale span::after { right: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
.steps li { border-top: 2px solid var(--line-strong); padding-top: 1rem; }
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 0; color: var(--text-muted); }
.step-no { display: block; font-size: 2.6rem; font-weight: 300; font-stretch: 125%; line-height: 1; margin-bottom: .75rem; color: var(--text-subtle); }
.steps li.free .step-no { color: var(--text); font-weight: 600; }
.badge { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.steps-note { margin: 2rem 0 0; font-weight: 650; }

@media (max-width: 1000px) {
  .steps-scale { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
  .badge { position: static; width: auto; height: auto; clip: auto; display: inline-block; margin-bottom: .4rem; font-size: .85rem; font-weight: 700; background: var(--signal); color: var(--on-signal); padding: .1rem .45rem; border-radius: var(--radius); }
}
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

/* Grundsätze */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 1.5rem; }
.principle { border-top: 1px solid var(--line-strong); padding-top: 1rem; }
.principle h3 { font-size: 1.1rem; }
.principle p { margin: 0; color: var(--text-muted); }
@media (max-width: 960px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .principles { grid-template-columns: 1fr; } }

/* Über uns */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-copy p { color: var(--text-muted); max-width: 34rem; }
.about-copy .btn { margin-top: .75rem; }
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.person { margin: 0; }
.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--img-bg); }
.person figcaption { padding-top: .85rem; }
.person strong { display: block; font-size: 1.05rem; }
.person span { display: block; color: var(--text-subtle); font-size: .95rem; line-height: 1.5; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .team { grid-template-columns: 1fr; } }

/* FAQ */
.faq { border-top: 2px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 3rem 1.1rem 0; position: relative;
  font-weight: 650; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: .25rem; top: 50%; width: 14px; height: 2px; background: var(--text);
  transition: transform .2s ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.faq details p { padding: 0 3rem 1.25rem 0; margin: 0; color: var(--text-muted); max-width: 42rem; }

/* Kontakt */
.contact { background: var(--ink); color: var(--on-ink); }
.contact h2 { color: #FFFFFF; }
.contact a { color: inherit; }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-copy p { color: var(--on-ink-muted); }
.contact-next { margin: 1.75rem 0 0; padding: 0; list-style: none; counter-reset: next; color: var(--on-ink-muted); display: grid; gap: .6rem; }
.contact-next li { counter-increment: next; display: grid; grid-template-columns: 1.75rem 1fr; }
.contact-next li::before { content: counter(next); font-weight: 700; color: var(--signal); }

.contact-form {
  background: var(--surface); color: var(--text);
  border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem);
  border-top: 6px solid var(--signal);
}
.contact-form a { color: var(--link); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin: 0 0 1.1rem; min-width: 0; }
.field label, .field legend { display: block; font-weight: 650; font-size: .95rem; margin-bottom: .35rem; }
.req { color: var(--danger); }
.optional { color: var(--text-subtle); font-weight: 400; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1.5px solid var(--line); border-bottom-color: var(--text-subtle); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-subtle); opacity: .85; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px var(--signal); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .9rem; margin: .35rem 0 0; }

fieldset.topic { border: 0; padding: 0; }
.topic-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: .55rem 1rem;
  border: 1.5px solid var(--line); border-radius: var(--radius); font-size: .95rem; font-weight: 550;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover span { border-color: var(--text); }
.chip input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip input:focus-visible + span { outline: 3px solid var(--signal); outline-offset: 2px; }
.topic.invalid .chip span { border-color: var(--danger); }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.privacy-note { font-size: .9rem; color: var(--text-subtle); }
.form-status { margin-top: 1rem; font-weight: 600; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--danger); }
.form-done { text-align: center; padding: 2rem 1rem; }
.form-done svg { width: 56px; height: 56px; margin: 0 auto 1rem; fill: none; stroke: var(--success); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-ink-muted); padding: 1.75rem 0; font-size: .95rem; border-top: 1px solid #343B41; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-inner ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--on-ink); text-decoration: none; display: inline-block; padding: .5rem 0; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--signal); }

/* Rechtsseiten */
.legal { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2.25rem; }
.legal h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.legal p, .legal li { color: var(--text-muted); }
.legal .notice { background: var(--notice-bg); border: 1px solid var(--notice-border); color: var(--notice-text); padding: 1rem 1.25rem; border-radius: var(--radius); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
