/* =====================================================================
   ITR-Website – Stylesheet (Paket 01)
   CI-Farben kommen als CSS-Variablen aus dem Backend (settings).
   Keine externen Ressourcen (DSGVO): Systemschriften; eigene WOFF2-
   Dateien können unter /assets/fonts abgelegt und unten via
   @font-face eingebunden werden.
   ===================================================================== */

/* Optional: eigene Hausschrift einbinden (Dateien selbst hosten!)
@font-face {
  font-family: "ITRSans";
  src: url("/assets/fonts/itrsans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
*/

:root {
  --c-primary: #0F2D4A;
  --c-accent: #D7402B;
  --c-bg: #F5F7FA;
  --c-ink: #1C2733;
  --c-muted: #5A6B7C;
  --c-line: #DDE4EC;
  --c-surface: #FFFFFF;
  --font-display: "Segoe UI Variable Display", "Segoe UI", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Segoe UI Variable Text", "Segoe UI", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 45, 74, 0.08);
  --wrap: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-accent); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; color: var(--c-primary); letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); margin: 0.4rem 0 1rem; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin: 0 0 0.4rem;
}
.lead { font-size: 1.18rem; color: var(--c-ink); max-width: 62ch; }
.muted, .note { color: var(--c-muted); }
.note { font-size: 0.9rem; border-left: 3px solid var(--c-line); padding-left: 0.9rem; margin-top: 2rem; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--c-primary); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Topbar ---------- */
.topbar { background: var(--c-primary); color: #fff; font-size: 0.85rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 1.25rem; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; margin-left: 1.1rem; opacity: 0.9; }
.topbar a:hover { opacity: 1; text-decoration: underline; }
.topbar-hours { opacity: 0.85; }

/* ---------- Header / Navigation ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); color: var(--c-primary); font-size: 1.08rem; }
.brand-text small { color: var(--c-muted); font-size: 0.74rem; letter-spacing: 0.04em; }

.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.mainnav > ul > li { position: relative; }
.mainnav a {
  display: block; padding: 0.6rem 0.85rem; text-decoration: none;
  font-weight: 600; color: var(--c-ink); border-radius: 8px; font-size: 0.98rem;
}
.mainnav a:hover, .mainnav a[aria-current="page"] { background: var(--c-bg); color: var(--c-primary); }
.subnav {
  position: absolute; left: 0; top: 100%; min-width: 230px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 0.4rem !important;
  display: none !important; flex-direction: column;
}
.has-sub:hover .subnav, .has-sub:focus-within .subnav { display: flex !important; }
.subnav a { font-weight: 500; padding: 0.5rem 0.75rem; }

.nav-toggle { display: none; background: none; border: 1px solid var(--c-line); border-radius: 8px; padding: 0.55rem 0.6rem; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--c-primary); margin: 4px 0; transition: transform 0.2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255,255,255,0.10), transparent 60%),
    linear-gradient(150deg, var(--c-primary) 0%, color-mix(in srgb, var(--c-primary) 75%, #000) 100%);
  color: #fff;
  padding: 4.2rem 0 4.6rem;
  overflow: hidden;
}
.hero .eyebrow { color: color-mix(in srgb, var(--c-accent) 70%, #fff); }
.hero h1 { color: #fff; max-width: 18ch; }
.hero-home { padding: 5.5rem 0 6rem; }
.hero-text { font-size: 1.2rem; max-width: 60ch; opacity: 0.92; margin-bottom: 0; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: -2.6rem 0 0; position: relative; z-index: 2; }

/* Signatur: der "Service-Puls" – eine EKG-Linie als Symbol für Monitoring & Verlässlichkeit */
.hero-pulse {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background-repeat: repeat-x;
  background-size: 420px 56px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='56' viewBox='0 0 420 56'%3E%3Cpath d='M0 38 H120 L138 38 150 16 162 50 174 30 186 38 H420' fill='none' stroke='rgba(255,255,255,0.28)' stroke-width='2'/%3E%3C/svg%3E");
  animation: pulse-move 14s linear infinite;
  pointer-events: none;
}
@keyframes pulse-move { from { background-position-x: 0; } to { background-position-x: -420px; } }
@media (prefers-reduced-motion: reduce) {
  .hero-pulse { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Inhalt ---------- */
.content { padding: 2.5rem 1.25rem 3.5rem; }
.section { margin: 0 0 3.2rem; }
.section:last-child { margin-bottom: 0; }

.grid { display: grid; gap: 1.1rem; margin-top: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.3rem;
  box-shadow: 0 2px 8px rgba(15,45,74,0.04);
}
.card p { margin: 0; color: var(--c-muted); font-size: 0.97rem; }
.card-link { text-decoration: none; display: flex; flex-direction: column; gap: 0.4rem; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-line)); }
.card-more { margin-top: auto; padding-top: 0.7rem; color: var(--c-accent); font-weight: 600; font-size: 0.92rem; }

.check-list { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: 0.55rem; max-width: 70ch; }
.check-list li { padding-left: 1.9rem; position: relative; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.32em;
  width: 1.1em; height: 1.1em; border-radius: 50%;
  background: color-mix(in srgb, var(--c-accent) 14%, #fff);
  border: 1px solid color-mix(in srgb, var(--c-accent) 45%, #fff);
}
.check-list li::after {
  content: ""; position: absolute; left: 0.3em; top: 0.58em;
  width: 0.5em; height: 0.28em;
  border-left: 2px solid var(--c-accent); border-bottom: 2px solid var(--c-accent);
  transform: rotate(-45deg);
}

.quote {
  margin: 1.4rem 0 0; background: var(--c-surface);
  border: 1px solid var(--c-line); border-left: 4px solid var(--c-accent);
  border-radius: var(--radius); padding: 1.3rem 1.4rem;
}
.quote blockquote { margin: 0 0 0.7rem; font-size: 1.02rem; color: var(--c-ink); }
.quote figcaption { color: var(--c-muted); font-size: 0.88rem; font-weight: 600; }

.timeline { border-left: 2px solid var(--c-line); margin: 1.5rem 0 0 0.4rem; padding-left: 1.6rem; display: grid; gap: 1.4rem; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -2.16rem; top: 0.35rem;
  width: 0.85rem; height: 0.85rem; border-radius: 50%;
  background: var(--c-accent); border: 3px solid var(--c-bg);
}
.timeline-item p { margin: 0.2rem 0 0; color: var(--c-muted); }

.cta-box {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 1.5rem; margin-top: 2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.75rem 1.5rem; border-radius: 10px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
  font-family: var(--font-display); font-size: 0.98rem; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: color-mix(in srgb, var(--c-accent) 85%, #000); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }
.content .btn-ghost { border-color: var(--c-primary); color: var(--c-primary); }
.content .btn-ghost:hover { background: var(--c-primary); color: #fff; }
.btn-light { background: #fff; color: var(--c-primary); }
.btn-light:hover { background: var(--c-bg); color: var(--c-primary); }

/* ---------- CTA-Band ---------- */
.cta {
  background: linear-gradient(135deg, var(--c-primary), color-mix(in srgb, var(--c-primary) 70%, #000));
  color: #fff; text-align: center; padding: 3.4rem 0;
}
.cta h2 { color: #fff; }
.cta p { max-width: 56ch; margin: 0 auto 1.6rem; opacity: 0.9; }

/* ---------- Formular ---------- */
.contact-form { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.8rem; margin-top: 2.2rem; max-width: 680px; }
.form-row { margin-bottom: 1.1rem; }
.form-row label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.95rem; }
.form-row input[type="text"], .form-row input[type="email"], .form-row textarea {
  width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--c-line);
  border-radius: 9px; font: inherit; background: #fff;
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid color-mix(in srgb, var(--c-accent) 55%, #fff); border-color: var(--c-accent); }
.form-consent label { display: flex; gap: 0.6rem; font-weight: 400; font-size: 0.9rem; color: var(--c-muted); align-items: flex-start; }
.form-consent input { margin-top: 0.3rem; }
.hp-field { position: absolute; left: -9999px; }
.form-msg { padding: 0.8rem 1rem; border-radius: 9px; font-weight: 600; }
.form-msg-ok { background: #E5F4E9; color: #1C6B33; }
.form-msg-err { background: #FBE9E7; color: #A8321F; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-primary); color: rgba(255,255,255,0.85); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding-top: 3rem; padding-bottom: 2rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 0.8rem; }
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.1rem; padding-bottom: 1.3rem; font-size: 0.85rem; opacity: 0.75; }

/* ---------- Bot-Widget (Zwei-Klick-Consent) ---------- */
.bot-widget { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 90; }
.bot-toggle {
  background: var(--c-accent); color: #fff; border: none; cursor: pointer;
  border-radius: 999px; padding: 0.85rem 1.4rem; font-weight: 700; font-family: var(--font-display);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25); font-size: 0.95rem;
}
.bot-toggle:hover { background: color-mix(in srgb, var(--c-accent) 85%, #000); }
.bot-panel {
  position: fixed; right: 1.2rem; bottom: 5rem;
  width: min(380px, calc(100vw - 2.4rem)); height: min(540px, 70vh);
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.3); display: flex; flex-direction: column; overflow: hidden;
}
.bot-panel-head { display: flex; justify-content: space-between; align-items: center; background: var(--c-primary); color: #fff; padding: 0.7rem 1rem; }
.bot-close { background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.bot-consent { padding: 1.4rem; display: flex; flex-direction: column; gap: 1rem; font-size: 0.93rem; color: var(--c-muted); }
.bot-consent-link { font-size: 0.85rem; margin: 0; }
.bot-frame-holder { flex: 1; }
.bot-frame-holder iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Responsiv ---------- */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .topbar-hours { display: none; }
  .nav-toggle { display: block; }
  .mainnav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--c-surface); border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow); }
  .mainnav.open { display: block; }
  .mainnav ul { flex-direction: column; padding: 0.6rem 1rem 1rem; }
  .subnav { position: static; display: flex !important; box-shadow: none; border: none; padding-left: 1rem !important; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 3.6rem; }
  .hero-actions { margin-top: -1.8rem; }
}
