/* ==========================================================================
   KälteQuelle Innsbruck – styles.css
   Ein Stylesheet, Vanilla-CSS, kein Framework.
   ========================================================================== */

:root {
  --color-primary: #003472;   /* dunkles Blau aus dem Original-Branding */
  --color-accent: #27AAE1;    /* helles Blau/Cyan-Akzent */
  --color-ink: #0a2540;
  --color-text: #26323d;
  --color-muted: #5b6b78;
  --color-bg: #ffffff;
  --color-bg-soft: #f4f8fb;
  --color-border: #e1e8ee;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: var(--font-body);
  --max-width: 1180px;
  --radius: 14px;
  --shadow-soft: 0 10px 30px rgba(10, 37, 64, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* Sicherheitsnetz gegen versehentlichen horizontalen Overflow am Handy */
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--color-primary); }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Bild-Deckel: Bilder dürfen nie größer als der Bildschirm werden ---- */
img { max-width: 100%; height: auto; display: block; }
.content-figure img,
.richtext img {
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  height: auto;
  margin-inline: auto;
  border-radius: var(--radius);
}
.portrait img {
  object-fit: contain;
  max-height: 70vh;
  width: auto;
}

/* ---- Skip Link (Barrierefreiheit) ---- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--color-primary); color: #fff; padding: 12px 18px;
  z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- Header / Overlay-Nav ---- */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background-color .25s ease, box-shadow .25s ease;
}
body:not(.has-tophero) .site-header {
  position: sticky;
  background: #fff;
  box-shadow: 0 2px 12px rgba(10,37,64,.08);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 38px; width: auto; }
.brand .brand-color { display: none; }
.brand .brand-negativ { display: block; }

/* Solide Header-Optik (dunkles Logo/Text): auf Nicht-Hero-Seiten sofort per CSS,
   auf Hero-Seiten erst nach dem Scrollen per JS-Klasse .is-solid.
   So gibt es auf Blog/Datenschutz/Impressum/404 keinen kurzen "falschen" Header
   mehr, bevor script.js geladen hat (kein Flash of unstyled header). */
body:not(.has-tophero) .brand .brand-color,
.site-header.is-solid .brand .brand-color { display: block; }
body:not(.has-tophero) .brand .brand-negativ,
.site-header.is-solid .brand .brand-negativ { display: none; }

/* Hamburger-Icon: 3 echte <span>-Elemente in einer Flex-Spalte statt fragiler
   ::before/::after-Positionierung - robust auf jedem Gerät/Zoom-Level. */
.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; flex: none;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.nav-toggle-bar {
  display: block; width: 24px; height: 2px; border-radius: 1px;
  background: #fff; transition: background-color .2s ease;
}
body:not(.has-tophero) .nav-toggle-bar,
.site-header.is-solid .nav-toggle-bar { background: var(--color-ink); }

.main-nav ul {
  list-style: none; display: flex; gap: 6px; margin: 0; padding: 0;
}
.main-nav a {
  display: inline-block; padding: 10px 16px; border-radius: 999px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: .96rem;
  transition: background-color .2s ease, color .2s ease;
}
body:not(.has-tophero) .main-nav a,
.site-header.is-solid .main-nav a { color: var(--color-ink); }
.main-nav a:hover, .main-nav a.is-current { background: rgba(255,255,255,.18); }
body:not(.has-tophero) .main-nav a:hover,
body:not(.has-tophero) .main-nav a.is-current,
.site-header.is-solid .main-nav a:hover,
.site-header.is-solid .main-nav a.is-current { background: var(--color-bg-soft); }
.main-nav a.btn-cta {
  background: var(--color-accent); color: var(--color-primary) !important;
}

/* ---- Fullscreen Hero ---- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  color: #fff; overflow: hidden;
  background: var(--color-ink) center/cover no-repeat;
}
.hero--page { min-height: 62vh; min-height: 62svh; }
.hero video, .hero .hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(3,20,45,.55) 0%, rgba(3,20,45,.72) 100%);
}
.hero-content {
  position: relative; z-index: 2; width: 100%;
  padding: 140px 0 90px;
  text-align: center;
}
.hero-content .kicker {
  text-transform: uppercase; letter-spacing: .12em; font-weight: 700;
  font-size: .85rem; color: var(--color-accent); margin-bottom: 14px; display: block;
}
.hero-content h1 { color: #fff; max-width: 900px; margin-inline: auto; }
.hero-content .lede { font-size: 1.15rem; max-width: 720px; margin: 18px auto 30px; color: rgba(255,255,255,.92); }
.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.7); border-radius: 20px; z-index: 2;
}
.hero-scroll::before {
  content: ""; position: absolute; top: 6px; left: 50%; width: 4px; height: 8px;
  background: #fff; border-radius: 2px; transform: translateX(-50%);
  animation: scrolldown 1.8s infinite;
}
@media (prefers-reduced-motion: reduce) { .hero-scroll::before { animation: none; } }
@keyframes scrolldown { 0% { opacity:1; top:6px; } 70% { opacity:0; top:20px; } 100% { opacity:0; top:6px; } }

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px;
  font-weight: 700; text-decoration: none; text-align: center;
  background: var(--color-primary); color: #fff; border: 2px solid var(--color-primary);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn--accent { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-primary); }
.btn--outline { background: transparent; color: #fff; }
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- Sections ---- */
section { padding: 72px 0; }
.section-soft { background: var(--color-bg-soft); }
.section-dark { background: var(--color-primary); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.section-head .kicker {
  text-transform: uppercase; letter-spacing: .1em; font-weight: 700;
  font-size: .82rem; color: var(--color-accent); display: block; margin-bottom: 10px;
}

/* ---- split: Bild + Text ---- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.split.flip .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }

/* ---- feature / benefit cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; }
.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow-soft);
  border-top: 4px solid var(--color-accent);
}
.card h3 { margin-bottom: 10px; }
.card img { border-radius: 10px; margin-bottom: 16px; }
.card--price {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; background: var(--color-bg-soft);
}
.card--price .price-tag {
  font-size: 2.6rem; font-weight: 800; color: var(--color-primary); line-height: 1;
  margin-bottom: 14px;
}

/* ---- checks list (Legacy, ggf. an anderer Stelle genutzt) ---- */
.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px;
  background: var(--color-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---- benefit tags (Vorteile & Nutzen, als Chip-Wolke) ---- */
.benefit-tags { display: flex; flex-wrap: wrap; gap: 10px 12px; justify-content: center; margin: 0; }
.benefit-tags .tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--color-border); border-radius: 999px;
  padding: 9px 18px 9px 14px; font-weight: 600; font-size: .92rem; color: var(--color-primary);
  box-shadow: var(--shadow-soft);
}
.benefit-tags .tag::before {
  content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--color-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") no-repeat center / 70%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") no-repeat center / 70%;
  background-color: var(--color-primary);
}

/* ---- Blog ---- */
.blog-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.blog-card { text-decoration: none; color: inherit; display: block; transition: transform .15s ease, box-shadow .15s ease; }
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(10,37,64,.14); }
.blog-card img { border-radius: 10px; margin-bottom: 14px; aspect-ratio: 3/2; object-fit: cover; }
.blog-date { display: inline-block; font-size: .82rem; font-weight: 700; color: var(--color-accent); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.blog-card h3 { margin-bottom: 8px; }
.blog-card p { color: var(--color-muted); margin-bottom: 0; }
.richtext h2 { margin-top: 1.5em; }

/* ---- icon badge (Telefon/Mail/Standort – funktioniert auf hellem UND dunklem Hintergrund) ---- */
.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--color-accent);
}
.icon-badge img { width: 20px; height: 20px; }
.site-footer .icon-badge { background: rgba(255,255,255,.14); }

/* ---- Anchor sections (Anwendungsbereiche) ---- */
.anchor-block { scroll-margin-top: 100px; }
.anchor-jump { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.anchor-jump a {
  background: var(--color-accent); color: var(--color-primary); font-weight: 700;
  padding: 12px 22px; border-radius: 999px; text-decoration: none;
}
.anchor-jump a:hover { background: var(--color-primary); color: #fff; }
.quote-block {
  border-left: 4px solid var(--color-accent); padding-left: 20px; font-style: italic;
  font-size: 1.15rem; margin: 24px 0;
}
.quote-block cite { display: block; font-style: normal; margin-top: 8px; color: var(--color-muted); font-size: .95rem; }

/* ---- disclaimer ---- */
.disclaimer {
  background: var(--color-bg-soft); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 22px 26px; font-size: .92rem; color: var(--color-muted);
}

/* ---- Team ---- */
.team-block { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; }
.team-block .portrait img { border-radius: var(--radius); }

/* ---- Contact / Calendly ---- */
.calendly-shell { max-width: 900px; margin: 0 auto; }
.calendly-inline-widget { min-width: 300px; height: 700px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.consent-gate {
  border: 2px dashed var(--color-border); border-radius: var(--radius);
  padding: 48px 24px; text-align: center; background: var(--color-bg-soft);
}
.consent-gate p { max-width: 520px; margin-inline: auto; }
.contact-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.contact-meta .item {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-soft);
}
.contact-meta .item a, .contact-meta .item span { font-weight: 600; color: var(--color-ink); }

/* ---- Footer ---- */
.site-footer { background: #072130; color: #cbd8e3; padding: 64px 0 30px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; margin-bottom: 44px; align-items: start; }
.footer-brand p { margin-top: 18px; color: #a9bacb; font-size: .94rem; }
.footer-grid .stack { display: flex; flex-direction: column; gap: 14px; }
.footer-grid .item { display: flex; align-items: center; gap: 14px; }
.footer-logo { height: 74px; width: auto; display: block; }
.footer-legal { display: flex; gap: 10px 28px; flex-wrap: wrap; align-items: center; border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; font-size: .86rem; color: #8ea0b3; }
.footer-legal a { color: #cbd8e3; }
.footer-legal a:hover { text-decoration: underline; }

/* ---- Legal pages ---- */
.legal h1 { margin-bottom: .3em; }
.legal h2 { margin-top: 1.6em; }
.legal address { font-style: normal; }

/* ---- Consent banner ---- */
#consent-banner {
  position: fixed; inset: auto 0 0 0; z-index: 1000;
  background: #fff; border-top: 1px solid var(--color-border);
  box-shadow: 0 -6px 24px rgba(10,37,64,.14);
  padding: 22px 0;
}
#consent-banner .container { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
#consent-banner p { margin: 0; max-width: 640px; font-size: .92rem; color: var(--color-muted); }
#consent-banner .actions { display: flex; gap: 12px; flex-wrap: wrap; }
#consent-banner[hidden] { display: none; }

/* ---- 404 ---- */
.error-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; }

/* ---- Utility ---- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .main-nav { position: fixed; inset: 0; background: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
    transform: translateY(-100%); transition: transform .25s ease; z-index: 90; }
  .main-nav ul { flex-direction: column; text-align: center; gap: 10px; }
  .main-nav a { font-size: 1.2rem; }
  body.nav-open .main-nav { transform: translateY(0); }
  body.nav-open { overflow: hidden; }
  .nav-toggle { display: flex; z-index: 95; }
  .split, .team-block, .contact-meta, .footer-grid { grid-template-columns: 1fr; }
  .split-media { order: 0 !important; }
  .cards { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  /* Ursache des bisher unzuverlässigen Abstands gefunden: .hero zentriert
     seinen Inhalt vertikal (align-items:center). Bei den kürzeren
     Unterseiten-Heros (.hero--page, 62vh) frisst diese Zentrierung einen
     Teil jedes zusätzlichen padding-top wieder auf (die Box wird nach oben
     hinausgeschoben und vom overflow:hidden abgeschnitten) - deshalb hat
     das Erhöhen der Zahl allein nichts sichtbar veraendert. Fix: Inhalt auf
     Mobile oben ausrichten, dann wirkt padding-top direkt und zuverlässig. */
  .hero { align-items: flex-start; }
  .hero-content { padding: 270px 0 70px; }
  .hero-content .kicker { display: none; }
}

/* Mehr Sicherheitsabstand am Handy: großzügigerer Seitenrand, etwas kleinere
   Überschriften/Buttons, damit nichts an den Bildschirmrand stößt. */
@media (max-width: 600px) {
  /* Longhand statt Shorthand: .hero-content traegt zusaetzlich die Klasse
     "container" - eine Shorthand "padding: 0 26px" wuerde hier den
     padding-top/-bottom von .hero-content (Abstand unter dem Logo) wieder
     auf 0 zuruecksetzen, da beide Selektoren dieselbe Spezifitaet haben und
     diese Regel spaeter im Code steht. Das war die eigentliche Ursache dafuer,
     dass der Mobile-Abstand unter dem Header nie wirklich ankam. */
  .container { padding-left: 26px; padding-right: 26px; }
  .hero-content .kicker { font-size: .78rem; }
  .btn-row { padding: 0 4px; }
  .btn { padding: 13px 22px; }

  /* Vorteile & Nutzen: auf schmalen Screens als saubere, gleich breite
     Liste statt ungleichmäßig umbrechender Chip-Wolke. */
  .benefit-tags { flex-direction: column; align-items: stretch; gap: 10px; }
  .benefit-tags .tag { width: 100%; justify-content: flex-start; }
}

@media (max-width: 480px) {
  section { padding: 52px 0; }
  h1 { font-size: clamp(1.7rem, 8vw, 2.1rem); }
  .hero-content h1 { line-height: 1.25; }
  .hero-content .lede { font-size: 1rem; }
}
