/* ============================================================
   hauser-kommunikation.de — Basis-Stylesheet
   Tokens & gemeinsame Komponenten (Header, Kontakt, Footer)
   Quelle: HK-Spec/02_DESIGN-TOKENS.md (Design-Referenz 1920 px)
   ============================================================ */

/* ---------- Fonts (self-hosted, kein CDN) ---------- */
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/roboto-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Headline-Schrift: Cormorant Garamond SemiBold (SIL OFL, self-hosted).
   Entscheidung 22.08.2026: Ersatz für Larken (kommerzielle Lizenz, siehe
   DELIVERY-NOTES/05_OPEN-QUESTIONS) — bewusst SemiBold 600 als Larken-Ersatz. */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-600-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design-Tokens ---------- */
:root {
  --hk-bg: #F8F2F2;
  --hk-black: #000000;
  --hk-blue: #0008C6;
  --hk-white: #FFFFFF;
  --hk-gray: #91989C;

  --font-text: 'Roboto', Arial, sans-serif;
  --font-head: 'Cormorant Garamond', Georgia, serif;

  /* Fluide Typo-Skala: 1920-px-Werte → Mobile-Werte (375) */
  --fs-h1: clamp(30px, 3.125vw, 60px);          /* Headline 60 → 30 */
  --fs-h2: clamp(30px, 3.125vw, 60px);
  --fs-h3: clamp(30px, 2.344vw, 45px);          /* Karten-/Teamtitel 45 → 30 */
  --fs-num: clamp(38px, 3.646vw, 70px);         /* Leistungs-Nummern 70 */
  --fs-list-title: clamp(24px, 1.5625vw, 30px); /* Leistungs-Listentitel 30 */
  --fs-body: clamp(16px, 0.9375vw, 18px); /* 18 @1920, fluid — Feedback 24.08. „Text zu groß"; ≤768 wieder 18 (Mobile-XD) */
  --fs-textlink: clamp(16px, 1.042vw, 20px);    /* „mehr …“ 20 → 16 */
  --fs-label: 14px;
  --fs-nav: 16px;

  --lh-head: 1.1;      /* 66/60 */
  --lh-body: 1.667;    /* 30/18 Absätze */
  --lh-list: 1.444;    /* 26/18 Listen */

  /* Raster: Content x=280…1640, breites Raster x=141…1779 (bei 1920) */
  --pad-content: clamp(24px, 14.583vw, 280px);
  --pad-wide: clamp(24px, 7.344vw, 141px);

  --transition: .3s ease-out;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--hk-bg);
  color: var(--hk-black);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600; /* Cormorant Garamond SemiBold */
  line-height: var(--lh-head);
  margin: 0;
}

h1, h2 { font-size: var(--fs-h1); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition);
}

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

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

/* ---------- Layout-Container ---------- */
.container {
  padding-inline: var(--pad-content);
}
.container--wide {
  padding-inline: var(--pad-wide);
}

/* Zweispalter 526 | 665 (Gap 169) im 1360er-Content */
.split {
  display: grid;
  grid-template-columns: minmax(0, 526fr) minmax(0, 665fr);
  column-gap: clamp(32px, 8.8vw, 169px);
  align-items: start;
}

/* ---------- Typo-Bausteine ---------- */
.label {
  font-size: var(--fs-label);
  line-height: 1.55;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--hk-blue);
}

.textlink {
  font-weight: 700;
  font-size: var(--fs-textlink);
  letter-spacing: .1em;
  color: var(--hk-blue);
}
.textlink:hover { color: var(--hk-black); }

.link-mail {
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--hk-blue);
}
.link-mail:hover { color: var(--hk-black); }

.headline-blue { color: var(--hk-blue); }

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 248px;
  min-height: 42px;
  padding: 8px 24px;
  background: var(--hk-black);
  color: var(--hk-white);
  font-family: var(--font-text);
  font-size: clamp(17px, 1.042vw, 20px); /* 20 @1920, fluid */
  line-height: 1;
  border: 0;
  cursor: pointer;
  transition: background-color var(--transition);
}
.btn:hover { background: var(--hk-blue); }

/* ---------- Pfeil-Link (Karten) ----------
   Hover lt. XD-Prototyp („Pfeil", hover→state-transition): die Linie fährt
   nach rechts in die Spitze ein, nur das „>" bleibt sichtbar. */
.arrow-link { display: inline-block; color: var(--hk-blue); }
.arrow-link svg { display: block; }
.arrow-link .arrow-stroke { stroke: currentColor; }
.arrow-link .arrow-line {
  transform-box: fill-box;
  transform-origin: right center;
  transition: transform var(--transition);
}
.arrow-link:hover .arrow-line,
.arrow-link:focus-visible .arrow-line { transform: scaleX(0); }

/* ---------- Zurück-nach-oben-Button ----------
   XD „Gruppe 38" (Rechteck 68 + Pfad 216), prototypisiert als
   tap→scroll: fixiert unten rechts, scrollt sanft nach oben. */
.to-top {
  position: fixed;
  right: var(--pad-content); /* rechte Kante fluchtet mit der Content-/Hero-Bildkante (XD: x1531+109 = 1640) */
  bottom: clamp(16px, 2.9vw, 56px);
  z-index: 40;
  width: clamp(64px, 5.68vw, 109px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: block;
}
.to-top svg { display: block; width: 100%; height: 100%; }
.to-top__box {
  fill: var(--hk-white);
  opacity: .658;
  transition: opacity var(--transition);
}
.to-top__chevron {
  stroke: var(--hk-black);
  transition: stroke var(--transition);
}
.to-top:hover .to-top__chevron { stroke: var(--hk-blue); }
.to-top:hover .to-top__box { opacity: .85; }
@media (max-width: 1024px) {
  .to-top { display: none; } /* nicht im Mobile-XD — bestehende Konvention */
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: relative;
  padding: 45px var(--pad-content) 0;
  min-height: 87px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.site-nav { padding-top: 13px; }
.site-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 35px;
}
.site-nav a {
  font-size: var(--fs-nav);
  letter-spacing: .05em;
  color: var(--hk-black);
}
.site-nav a:hover { color: var(--hk-blue); }
.site-nav a.is-active { font-weight: 700; }

.site-header__cta { margin-left: auto; }

/* Marke: Icon oben links + vertikale Wortmarke am linken Rand */
.brand {
  position: absolute;
  top: 45px;
  left: clamp(16px, 3.97vw, 76px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 60;
}
.brand__icon { width: 40.6px; height: 40.2px; }
.brand__icon .icon-bg { fill: #1D1D1B; transition: fill var(--transition); } /* Logo-Kachel lt. XD, bewusst kein Token (02_DESIGN-TOKENS) */
.brand__icon .icon-glyph { fill: var(--hk-white); }
.brand a:hover .icon-bg { fill: var(--hk-blue); }
.brand__link { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.brand__wordmark {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 25px;
  letter-spacing: .6em;
  color: var(--hk-black);
  white-space: nowrap;
}
.brand__wordmark--mobile { display: none; }

/* Burger */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle svg { display: block; }
.nav-toggle .burger-line { stroke: var(--hk-black); stroke-width: 2; transition: stroke var(--transition); }
.nav-toggle:hover .burger-line { stroke: var(--hk-blue); }

/* Mobile-Menü-Overlay (XD „Mobile Home – Menü offen“) */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, .85);
  z-index: 50;
  padding: 146px 25px 40px;
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li + li { margin-top: 40px; }
.mobile-menu a {
  font-size: 16px;
  letter-spacing: .05em;
  color: var(--hk-black);
}
.mobile-menu a:hover { color: var(--hk-blue); }
.mobile-menu a.is-active { font-weight: 700; }

body.menu-open { overflow: hidden; }

/* ============================================================
   Kontakt-Sektion (auf allen Seiten identisch)
   ============================================================ */
.kontakt { padding-top: clamp(56px, 7vw, 130px); }

.kontakt__title { margin-bottom: clamp(40px, 4vw, 79px); }

.kontakt__media { position: relative; }
.kontakt__media picture img { width: 100%; max-width: 526px; }

/* Blaue Ray-Diagonale, multipliziert. XD-Rohdaten: Pfad 219 bbox
   x−240…807 / y8488…9150 → Unterkante bündig mit dem Foto (281/8444, 526×706),
   Spitze links außerhalb des Viewports. */
.kontakt__ray {
  position: absolute;
  left: -99%;
  bottom: 0;
  width: 199%;
  max-width: none;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.kontakt__intro { margin-bottom: 43px; }

/* Formular */
.form__row { margin-bottom: 29px; }
.form__field {
  width: 100%;
  height: 70px;
  padding: 0 20px;
  background: transparent;
  border: 1px solid var(--hk-black);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  color: var(--hk-black);
  border-radius: 0;
  transition: border-color var(--transition);
}
textarea.form__field {
  height: 264px;
  padding-top: 20px;
  resize: vertical;
}
.form__field::placeholder { color: var(--hk-black); opacity: 1; }
.form__field:focus-visible { outline-offset: 0; }

/* Honeypot: für Menschen unsichtbar */
.form__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form__captcha { margin-bottom: 29px; min-height: 78px; }

.form__status { margin-top: 16px; }
.form__status[data-state="error"] { color: var(--hk-blue); font-weight: 700; }
.form__status[data-state="success"] { font-weight: 700; }

/* ============================================================
   Footer (dunkel, ohne Telefonnummer)
   ============================================================ */
.site-footer {
  margin-top: clamp(64px, 11.5vw, 221px);
  background: var(--hk-black);
  color: var(--hk-white);
  /* XD „Footer-dunke": h2-Textbox-Oberkante y49 = erste Em-Box (XD ohne
     Halbzeilen-Leading) → CSS-Boxtop 49 − Halbleading (65−30×1.211)/2 ≈ 35;
     unten: Unterzeile (Box 377…407) schließt bündig mit Footer-Kante 407 → 5 */
  padding: 35px var(--pad-wide) 5px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* XD-Spaltenstarts 138/696/1255 → Spaltenpitch 558px bei 1638px Rasterbreite
     ⇒ Trackbreite 522 + Gap 36 (36/1920 = 1.875vw) */
  column-gap: clamp(24px, 1.875vw, 36px);
}
.site-footer h2 {
  font-size: 30px; /* Headline 30 auf Desktop UND Mobile (XD) */
  line-height: 65px;
  /* Fließtext-Boxen (XD y146) beginnen 44px unter der 65px-h2-Box (44/1920 = 2.292vw) */
  margin: 0 0 clamp(16px, 2.292vw, 44px);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { line-height: var(--lh-list); }
.site-footer a { color: var(--hk-white); }
.site-footer a:hover { color: var(--hk-blue); }
.site-footer__grid p { line-height: var(--lh-list); } /* E-Mail-Zeile lh26 lt. XD */
.site-footer__claim { max-width: 390px; }

/* Spezifität > „.site-footer ul" (margin: 0), sonst greift margin-top nie */
.site-footer ul.social { display: flex; gap: 13.6px; margin-top: 28.2px; } /* Kreis-Oberkante XD y198.2 */
.social a { display: block; line-height: 0; }
.social svg { width: 38.6px; height: 38.6px; }
/* XD „Footer-dunke": Kreis-Kachel schwarz (auf Schwarz unsichtbar), Glyphe weiß;
   Hover: Kachel wird blau sichtbar (Pendant zu den *-blue.svg-Varianten) */
.social .icon-tile { fill: var(--hk-black); transition: fill var(--transition); }
.social .icon-glyph { fill: var(--hk-white); transition: fill var(--transition); }
.social a:hover .icon-tile { fill: var(--hk-blue); }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  /* XD-Unterzeile Box y377 (−5.6 Halbleading ≈ 371) − Nav-Spaltenende 299.5 ≈ 72 */
  margin-top: clamp(40px, 3.75vw, 72px);
  font-size: 16px;
  line-height: 30px; /* XD lineHeight 30 */
  letter-spacing: .1em;
}
.site-footer__bottom p { margin: 0; } /* kein 1em-Puffer im Flex-Container (XD: 407 Gesamthöhe) */
.site-footer__legal { display: flex; gap: 35px; }

/* ============================================================
   Scroll-Reveal (dezent, apple.com-Referenz)
   JS setzt .is-visible; ohne JS bleibt alles sichtbar.
   ============================================================ */
html.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Barrierefreiheit: reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee__track { animation: none !important; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ============================================================
   Breakpoints: ≤1024 Tablet/Burger, ≤768 einspaltig, ≤560 mobil
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --pad-content: 24px;
    --pad-wide: 24px;
  }

  .site-header {
    padding-top: 17px;
    align-items: center;
    min-height: 71px;
  }
  .site-nav, .site-header__cta { display: none; }
  .nav-toggle { display: block; }

  /* Mobile-Marke: Icon + zweizeilige Wortmarke (XD Mobile-Header) */
  .brand {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 19px;
  }
  .brand__link { flex-direction: row; gap: 19px; }
  .brand__icon { width: 37px; height: 37px; }
  .brand__wordmark { display: none; }
  .brand__wordmark--mobile {
    display: block;
    font-size: 15px;
    line-height: 1;
    letter-spacing: .4em;
    color: var(--hk-black);
  }

  .split { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
}

@media (max-width: 1024px) {
  /* Einspaltig: Ray-Prozente beziehen sich sonst auf die volle Zellbreite
     statt aufs Foto (max 526) — Media-Spalte ans Foto koppeln */
  .kontakt__media { max-width: 526px; }
}

@media (max-width: 768px) {
  :root { --fs-body: 18px; } /* Mobile-XD: Fließtext 18 */
  .site-footer { padding-bottom: 20px; } /* mobil Puffer statt XD-Desktop-Bündigkeit */
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .site-footer h2 { line-height: 1.4; margin-top: 16px; margin-bottom: 2px; }
  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 48px;
  }
  .btn { min-width: 158px; }
  .kontakt { border-top: 1px solid var(--hk-black); padding-top: 40px; }
}
