/* ===== Holzbau Dawen · Design-Tokens & Basis (Stand Handoff 21.08.2026) ===== */

/* ===== Self-hosted Fonts (DSGVO-konform, keine Drittanbieter-IPs) ===== */
/* Inter — Variable Font (alle Weights in einer Datei) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/inter-var.woff2') format('woff2-variations'),
       url('assets/fonts/inter-var.woff2') format('woff2');
}

/* JetBrains Mono — Variable Font */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-var.woff2') format('woff2-variations'),
       url('assets/fonts/jetbrains-mono-var.woff2') format('woff2');
}

/* Clash Display — 4 Weights (kein Variable Font verfügbar) */
@font-face {
  font-family: 'Clash Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/clash-display-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Clash Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/clash-display-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Clash Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/clash-display-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Clash Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/clash-display-700.woff2') format('woff2');
}

:root {
  /* Dawen CI — exakt aus Logofarben.pdf */
  --dawen-orange: #E65A0A;
  --dawen-orange-hover: #C84D08;
  --dawen-orange-soft: #FFF1E8;
  --dawen-grau: #EBEBEB;
  --dawen-schwarz: #000000;

  /* Abgedunkeltes CI-Orange fuer Text < 24px und weisse Schrift auf Orange.
     #E65A0A erreicht nur 3,60:1 — #BF4907 liegt bei 5,03:1 (WCAG AA).
     Flaechen, grosse Headline-Italics und Icons bleiben auf --dawen-orange. */
  --orange-text: #BF4907;
  --orange-text-hover: #A83E06;

  /* Erweiterte neutrale Skala (auf Dawen-Grau abgestimmt) */
  --ink: #0B0B0B;
  --ink-2: #1A1A1A;
  --ink-3: #2A2A2A;
  --line: #EBEBEB;
  --line-soft: #F2F2F2;
  --paper: #FAFAF7;
  --paper-2: #F5F5F0;
  --white: #FFFFFF;
  --text: #1A1A1A;
  --text-2: #555555;
  --text-3: #6E6E6E;

  /* Akzent (sparsam, für Status) */
  --accent-green: #1F6B4A;

  /* Typo — identischer Stack wie trafostationausholz.de (Familien-Look):
     Clash Display trägt auch den Fließtext, Inter ist Fallback. */
  --font-display: 'Clash Display', 'Inter', sans-serif;
  --font-sans: 'Clash Display', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Maße */
  --max: 1240px;
  --max-narrow: 880px;
  --gutter: 32px;
  --r-sm: 6px;
  --r: 12px;
  --r-lg: 20px;

  /* Schatten */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 8px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ===== Layout ===== */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 120px 0; }
/* Getönte Abschnitte — ersetzt wiederholte Inline-Styles */
.section--tint { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--tint-top { background: var(--paper-2); border-top: 1px solid var(--line); }
.section--paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--paper-top { background: var(--paper); border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .section { padding: 72px 0; }
  :root { --gutter: 20px; }
}

/* ===== Typografie ===== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}
.eyebrow--orange { color: var(--orange-text); }
.eyebrow--dot::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dawen-orange);
  margin-right: 10px; vertical-align: middle;
  transform: translateY(-1px);
}
h1, h2 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.05; font-weight: 500; }
h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2.6rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
h3 { font-size: 1.25rem; }
/* Italic-Akzent in Headlines — zentral, statt Inline-Styles pro Seite */
h1 .it, h2 .it, h3 .it {
  font-family: var(--font-display); font-weight: 500;
  font-style: italic; color: var(--dawen-orange);
}
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--text-2); line-height: 1.55; max-width: 60ch; }

/* Mono-Zahl (für Stats) */
.num { font-family: var(--font-mono); font-feature-settings: 'tnum'; letter-spacing: -0.02em; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 500;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s ease, background 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange-text); color: var(--white); }
.btn-primary:hover { background: var(--orange-text-hover); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-arrow::after {
  content: '→'; font-family: var(--font-sans); font-weight: 400;
  transition: transform 0.18s;
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* ===== Nav (flach, ohne Dropdowns — Design-Stand 21.08.2026) ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--line);
}
/* Blur liegt auf ::before, damit .nav KEIN Containing-Block fuer das
   position:fixed Mobile-Overlay wird (sonst bleibt es in der Leiste gefangen). */
.nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.nav-logo .logo-img { height: 30px; width: auto; display: block; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  position: relative;
  padding: 10px 14px; border-radius: 8px; font-size: 0.92rem; color: var(--text-2);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-2); }
.nav-links a.active { color: var(--ink); }
/* Unterstreichung absolut positioniert, damit der aktive Link die
   Zeilenhoehe nicht veraendert. */
.nav-links a.active::after {
  content: ''; display: block; height: 2px; background: var(--dawen-orange);
  position: absolute; left: 14px; right: 14px; bottom: 4px;
  margin-top: 0; border-radius: 2px;
}
.nav-cta { margin-left: 8px; }
.nav-burger { display: none; }

/* Schnell-Anruf neben dem Burger — nur Mobile (Anruf = Conversion Nr. 1 im Handwerk) */
.nav-tel { display: none; }
@media (max-width: 900px) {
  .nav-tel {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px; border: 1px solid var(--line);
    border-radius: 10px; font-size: 1.1rem; color: var(--ink);
    margin-left: auto; margin-right: 10px; /* rechtsbündig vor dem Burger */
  }
}

/* nav CTA must stay white regardless of hover state */
.nav-links a.nav-cta,
.nav-links a.nav-cta:hover { color: var(--white); background: var(--ink); }
.nav-links a.nav-cta:hover { background: var(--ink-2); }
.nav-links a.nav-cta.active::after { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: 0; cursor: pointer;
    /* 44x44 px Mindestgroesse fuer Touch-Ziele (WCAG 2.5.8) */
    padding: 11px; min-width: 44px; min-height: 44px;
    align-items: center; justify-content: center;
  }
  .nav-burger span { width: 22px; height: 2px; background: var(--ink); display: block; }
}
/* ===== Mobile-Navigation — Vollbild-Overlay, eigenständig scrollbar ===== */
.nav-mobile {
  position: fixed; inset: 0; z-index: 200; background: var(--white);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.nav-mobile.open { opacity: 1; visibility: visible; transform: none; }
.nav-mobile__head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding: 0 var(--gutter); border-bottom: 1px solid var(--line);
}
.nav-mobile__head .logo-img { height: 30px; width: auto; display: block; }
.nav-mobile__close {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); cursor: pointer; position: relative; flex: 0 0 auto;
}
.nav-mobile__close::before, .nav-mobile__close::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 18px; height: 2px;
  background: var(--ink); border-radius: 2px; margin: -1px 0 0 -9px;
}
.nav-mobile__close::before { transform: rotate(45deg); }
.nav-mobile__close::after { transform: rotate(-45deg); }
.nav-mobile__body {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 6px var(--gutter) calc(48px + env(safe-area-inset-bottom, 0px));
}

/* Mobile-Nav: Top-Level-Links */
.nav-mobile .m-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 17px 4px; font-family: var(--font-display); font-weight: 500; font-size: 1.22rem;
  color: var(--ink); letter-spacing: -0.01em; border-bottom: 1px solid var(--line-soft);
}
.nav-mobile .m-link .m-tag {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange-text); white-space: nowrap;
}
.nav-mobile .m-link--ext .m-tag::after { content: ' \2197'; }
.nav-mobile .m-link--cta {
  margin-top: 18px; justify-content: center; background: var(--ink); color: var(--white);
  border-radius: 12px; border-bottom: 0; padding: 18px; font-size: 1.05rem;
}

/* ===== Footer ===== */
.footer { background: var(--ink); color: #A6A6A6; padding: 76px 0 36px; }
.footer-grid {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

.footer-brand__logo { height: 30px; width: auto; display: block; margin-bottom: 18px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 0.9rem; color: #969696; max-width: 32ch; line-height: 1.6; margin-bottom: 20px; }
.footer-contact { font-family: var(--font-mono); font-size: 0.82rem; color: #9a9a9a; line-height: 1.95; }
.footer-contact a { color: #c4c4c4; }
.footer-contact a:hover { color: var(--dawen-orange); }
.footer-social { display: flex; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.footer-social a { font-family: var(--font-mono); font-size: 0.8rem; color: #c4c4c4; }
.footer-social a:hover { color: var(--dawen-orange); }

/* Spaltentitel bewusst KEINE Headings — hält die Dokument-Outline sauber */
.footer .footer-col__title { color: var(--white); font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 18px; font-weight: 500; line-height: 1.4; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 11px; }
.footer a { color: #A6A6A6; transition: color 0.15s; font-size: 0.92rem; }
.footer a:hover { color: var(--dawen-orange); }
/* Mobil groessere Touch-Ziele fuer Footer-Links (statt 17 px Zeilenhoehe) */
@media (max-width: 900px) {
  .footer ul li { margin-bottom: 0; }
  .footer ul li a { display: block; padding: 14px 0; }
}

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; flex-wrap: wrap; gap: 14px;
  font-size: 0.8rem; color: #8C8C8C; font-family: var(--font-mono);
}
.footer-legal { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-legal a { color: #A6A6A6; font-size: 0.8rem; }
.footer-legal a:hover { color: var(--dawen-orange); }
.footer-legal a.active { color: var(--dawen-orange); }

/* ===== Pill / Chip ===== */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 500;
  background: var(--paper-2); color: var(--text-2);
  border: 1px solid var(--line);
}
.pill--orange { background: var(--dawen-orange-soft); color: var(--orange-text); border-color: rgba(230,90,10,0.2); }
.pill--dark { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Section-Header (Startseite + Sub-Pages — index.html laedt pages.css nicht) */
.sh { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; margin-bottom: 44px; align-items: end; }
.sh-r h2 { letter-spacing: -0.025em; }
.sh-r h2 .it { font-family: var(--font-display); font-weight: 500; font-style: italic; color: var(--dawen-orange); margin-right: 0.06em; }
.sh-r .lead { margin-top: 16px; max-width: 56ch; }
@media (max-width: 760px) { .sh { grid-template-columns: 1fr; gap: 18px; margin-bottom: 40px; } }

/* Skip link / a11y */
.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: -9999px; top: 0; z-index: 300; }
.skip-link:focus {
  left: 12px; top: 12px; width: auto; height: auto; padding: 12px 18px;
  background: var(--ink); color: var(--white); border-radius: var(--r-sm); clip: auto;
}

/* Entwurfszustand: <html data-mode="live"> blendet alle Redaktions-Platzhalter aus */
html[data-mode="live"] .draft-only { display: none !important; }

/* ===== Fokus-Sichtbarkeit (WCAG 2.4.7) ===== */
:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.footer :focus-visible,
.pcard:focus-visible,
.drohne-strip :focus-visible,
.dualcta__card :focus-visible,
.kg-link:focus-visible,
.mini-cta :focus-visible { outline-color: var(--white); }

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