/* ================================================================
   Trionit H3 GmbH — Onepager
   Gestaltungsidee: Werkstoffe des Fachs. Das Grün-Gelb des
   Schutzleiters (PE) als Signaturband, das Blau des Neutralleiters
   als Akzent, ein Typenschild als Hero-Element.
   Keine externen Ressourcen (DSGVO-konform, keine Google Fonts).
   ================================================================ */

:root {
  /* Farben */
  --ink:        #16181C;
  --ink-2:      #2A2E35;
  --paper:      #F4F4F1;
  --paper-2:    #E7E7E2;
  --line:       #D2D2CC;
  --grey:       #6E727A;

  --blue:       #1F49C4;   /* Neutralleiter */
  --blue-dark:  #16359A;
  --pe-green:   #3E8F2E;   /* Schutzleiter */
  --pe-yellow:  #E3CE1B;

  /* Typografie — Systemstack, keine externen Fonts */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1120px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
ul { list-style: none; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--pe-yellow); color: var(--ink); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.25rem; z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Signaturband: Schutzleiter ---------- */
.pe-band {
  height: 9px;
  background: repeating-linear-gradient(
    -45deg,
    var(--pe-green) 0 14px,
    var(--pe-yellow) 14px 28px
  );
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 244, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 0.9rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo {
  height: 34px; width: auto;
  transition: opacity 0.2s var(--ease);
}
.brand:hover .brand-logo { opacity: 0.7; }

.nav { display: flex; gap: 1.75rem; }
.nav a {
  font-size: 0.9rem; font-weight: 600; color: var(--ink);
  text-decoration: none; padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.nav a:hover { border-bottom-color: var(--blue); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 8vw, 6rem); }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}

.eyebrow {
  font-family: var(--mono); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--grey); margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.1rem);
  line-height: 1.03; letter-spacing: -0.025em; font-weight: 800;
}
.hl {
  background: linear-gradient(transparent 62%, var(--pe-yellow) 62%);
  padding-inline: 0.08em;
}

.lead {
  margin-top: 1.4rem; max-width: 42ch;
  font-size: 1.05rem; color: var(--ink-2);
}

.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; font-size: 0.95rem;
  padding: 0.8rem 1.5rem; border-radius: 2px;
  border: 2px solid var(--ink); cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--blue); border-color: var(--blue); color: #fff; transform: translateY(-2px); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Typenschild ---------- */
.plate {
  background: linear-gradient(160deg, #FBFBF9, #E4E4DE);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 1px 0 #fff inset, 0 12px 28px rgba(22, 24, 28, 0.09);
  overflow: hidden;
}
.plate-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ink); color: var(--paper);
  padding: 0.7rem 1rem;
}
.plate-logo { height: 26px; width: auto; }
.plate-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pe-green); box-shadow: 0 0 0 3px rgba(62, 143, 46, 0.25);
}
.plate-body { padding: 0.4rem 1rem 0.9rem; }
.plate-body > div {
  display: grid; grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem; padding-block: 0.7rem;
  border-bottom: 1px dashed var(--line);
}
.plate-body > div:last-child { border-bottom: none; }
.plate-body dt {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--grey); padding-top: 0.15rem;
}
.plate-body dd { font-size: 0.92rem; font-weight: 600; }
.plate-foot { display: flex; gap: 0.5rem; padding: 0 1rem 1rem; }
.plate-foot span {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid var(--line); background: #EDEDE8;
}

/* ---------- Blöcke ---------- */
.block { padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.block-alt { background: var(--paper-2); border-block: 1px solid var(--line); }

.label {
  font-family: var(--mono); font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--blue); margin-bottom: 0.6rem;
}
.block h2, .split h2, .contact-info h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  line-height: 1.15; letter-spacing: -0.02em; font-weight: 800;
  max-width: 22ch;
}

/* Karten */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem; margin-top: 2.5rem;
}
.card {
  background: #fff; border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 2px; padding: 1.6rem 1.4rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(22,24,28,0.08); }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { font-size: 0.94rem; color: var(--ink-2); }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.split-text p + p { margin-top: 1rem; }
.split-text p { color: var(--ink-2); }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem; align-items: start; }
.contact-note { margin-top: 1rem; color: var(--ink-2); max-width: 38ch; }

.contact-list { margin-top: 2rem; border-top: 1px solid var(--line); }
.contact-list > div { padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
.contact-list dt {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--grey); margin-bottom: 0.25rem;
}
.contact-list dd { font-size: 0.95rem; }

/* Formular */
.form {
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  padding: 1.75rem; display: grid; gap: 1.1rem;
}
.field { display: grid; gap: 0.35rem; }
.field label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-2);
}
.field input, .field textarea {
  font: inherit; font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line); border-radius: 2px;
  background: var(--paper); color: var(--ink);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.field input:focus, .field textarea:focus {
  border-color: var(--blue); background: #fff; outline-offset: 1px;
}
.field textarea { resize: vertical; min-height: 7rem; }

.field.invalid input, .field.invalid textarea { border-color: #B3261E; background: #FDF4F3; }

.err { font-size: 0.8rem; color: #B3261E; min-height: 1.1em; }

.field-check {
  grid-template-columns: auto 1fr;
  align-items: start; gap: 0.65rem;
}
.field-check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--blue); }
.field-check label {
  font-family: var(--sans); font-size: 0.85rem;
  text-transform: none; letter-spacing: 0; line-height: 1.5; color: var(--ink-2);
}
.field-check .err { grid-column: 1 / -1; }
.field-check.invalid input { outline: 2px solid #B3261E; outline-offset: 2px; }

.honigtopf {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

.hint { font-size: 0.8rem; color: var(--grey); }

.btn-submit { width: 100%; }
.btn-submit.loading .btn-label::after {
  content: ' …';
}

.form-status { font-size: 0.9rem; min-height: 1.2em; font-weight: 600; }
.form-status.ok { color: var(--pe-green); }
.form-status.fail { color: #B3261E; }

/* ---------- Rechtliches ---------- */
.legal { padding-block: clamp(3rem, 7vw, 4.5rem); background: var(--paper-2); }
.legal-item { border-bottom: 1px solid var(--line); }
.legal-item:first-of-type { border-top: 1px solid var(--line); }

.legal-item summary {
  cursor: pointer; list-style: none;
  padding-block: 1.15rem;
  display: flex; align-items: center; justify-content: space-between;
}
.legal-item summary::-webkit-details-marker { display: none; }
.legal-item summary h2 {
  font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; max-width: none;
}
.legal-item summary::after {
  content: '+'; font-family: var(--mono); font-size: 1.4rem;
  color: var(--blue); line-height: 1; transition: transform 0.2s var(--ease);
}
.legal-item[open] summary::after { content: '–'; }

.legal-body { padding-bottom: 2rem; max-width: 78ch; font-size: 0.92rem; }
.legal-body h3 {
  font-size: 0.92rem; font-weight: 800; margin-top: 1.5rem; margin-bottom: 0.4rem;
}
.legal-body p { margin-bottom: 0.7rem; color: var(--ink-2); }
.legal-body ul { margin: 0 0 0.9rem 1.1rem; list-style: disc; color: var(--ink-2); }
.legal-body li { margin-bottom: 0.25rem; }
.legal-body strong { color: var(--ink); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding-block: 1.75rem; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem; font-size: 0.85rem;
}
.footer-brand { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-logo { height: 40px; width: auto; opacity: 0.9; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--paper); text-decoration: none; border-bottom: 1px solid transparent; }
.footer-links a:hover { border-bottom-color: var(--pe-yellow); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .block h2, .split h2, .contact-info h2 { max-width: none; }
}

@media (max-width: 560px) {
  .nav { gap: 1rem; }
  .nav a { font-size: 0.82rem; }
  .brand-logo { height: 28px; }
  .footer-logo { height: 34px; }
  .plate-body > div { grid-template-columns: 1fr; gap: 0.1rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
