/* ==========================================================================
   Dr. Philipp Gretler – Ordination für Innere Medizin, Hohenems
   Design system: Markenfarben Blau #1d70b8, Limette #95c11f, Ink #164262
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-500.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-700.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/inter-800.woff2") format("woff2");
}

@font-face {
  font-family: "Inter Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-display-700.woff2") format("woff2");
}

@font-face {
  font-family: "Inter Display";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/inter-display-800.woff2") format("woff2");
}

@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 105.27%;
  ascent-override: 92.02%;
  descent-override: 22.91%;
  line-gap-override: 0.00%;
}

/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;
  --blue: #1d70b8;
  --green: #95c11f;
  /* Foreground green (text, icons, focus ring): darker than --green so light-theme
     text meets WCAG 1.4.3 (4.74:1 on --bg). --green stays for backgrounds. */
  --green-ink: #57790e;
  --ink: #164262;

  --bg: #f5f8f7;
  --bg-alt: #eaf1f2;
  --surface: #ffffff;
  --surface-2: #f0f5f6;
  --text: #164262;
  --text-strong: #0f2f49;
  --muted: #4a6479;
  --line: rgba(22, 66, 98, 0.14);
  --line-strong: rgba(22, 66, 98, 0.28);
  --link: #155f9f;
  --accent: #95c11f;
  --accent-ink: #164262;
  --header-bg: rgba(245, 248, 247, 0.82);
  --shadow-sm: 0 1px 2px rgba(15, 47, 73, 0.06), 0 6px 18px rgba(15, 47, 73, 0.07);
  --shadow-md: 0 2px 4px rgba(15, 47, 73, 0.06), 0 18px 44px rgba(15, 47, 73, 0.12);
  --shadow-lg: 0 30px 70px rgba(9, 31, 49, 0.22);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.75rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --header-h: 74px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c2740;
  --bg-alt: #0a2035;
  --surface: #123755;
  --surface-2: #174360;
  --text: #eaf2f8;
  --text-strong: #ffffff;
  --muted: #b0c7d9;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);
  --link: #8cc4f0;
  --green-ink: #95c11f;
  /* Lighter blue for dark theme: the :focus-visible outline needs 3:1 (1.4.11)
     against --bg #0c2740; the light-theme value only reaches 2.94:1 there. */
  --blue-ink: #8cc4f0;
  --header-bg: rgba(12, 39, 64, 0.85);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 44px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Inter Fallback", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: clamp(1rem, 0.97rem + 0.18vw, 1.075rem);
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "cv11";
  -webkit-font-smoothing: antialiased;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  color: var(--text-strong);
  font-family: "Inter Display", "Inter", "Inter Fallback", sans-serif;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 1.4rem + 4.4vw, 4.6rem);
}

h2 {
  font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3.1rem);
}

h3 {
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.55rem);
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1.1em;
}

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

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.15em;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

strong {
  font-weight: 600;
  color: var(--text-strong);
}

:focus-visible {
  outline: 3px solid var(--blue-ink, var(--blue));
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--green);
  color: #10283c;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* --------------------------------------------------------------------------
   4. Layout helpers
   -------------------------------------------------------------------------- */

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - (var(--gutter) * 2), 880px);
  margin-inline: auto;
}

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.section--alt {
  background: var(--bg-alt);
}

.stack > * + * {
  margin-top: 1rem;
}

/* Kleine Hilfsklassen – ersetzen Inline-Styles (CSP verbietet style-Attribute) */
.mt-1 {
  margin-top: 0.75rem;
}

.mt-2 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.4rem;
}

.muted {
  color: var(--muted);
}

.btn--on-dark {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn--on-dark:hover {
  border-color: #fff;
  color: #fff;
}

.card-icon--accent {
  background: var(--green);
  color: #10283c;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* --------------------------------------------------------------------------
   5. Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.85rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-family: "Inter", "Inter Fallback", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: #fff;
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  flex: 0 0 auto;
}

.btn--accent {
  background: var(--green);
  color: var(--accent-ink);
}

.btn--accent:hover {
  color: #10283c;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn--light {
  background: #fff;
  color: var(--ink);
}

.btn--sm {
  min-height: 42px;
  padding: 0.5rem 1.1rem;
  font-size: 0.925rem;
}

/* Variante für dunkle Flächen (Hero, Seitentitel) */
.btn--on-dark {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn--on-dark:hover {
  border-color: #fff;
  color: #fff;
}

.btn--block {
  width: 100%;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  text-decoration: none;
}

.link-arrow::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   6. Header & navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

/* Observed by main.js to toggle .is-scrolled (absolute: takes no layout space) */
.scroll-sentinel {
  position: absolute;
  inset-block-start: 0;
  inline-size: 1px;
  block-size: 8px;
  pointer-events: none;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(15, 47, 73, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-strong);
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  width: 38px;
  height: 52px;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-family: "Inter Display", "Inter", "Inter Fallback", sans-serif;
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-sub {
  font-family: "Inter", "Inter Fallback", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.site-nav a:hover {
  background: var(--surface-2);
  color: var(--text-strong);
}

.site-nav a[aria-current="page"] {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-strong);
  font-weight: 600;
}

.site-nav a.nav-emph {
  background: var(--green);
  color: #10283c;
  font-weight: 700;
}

.site-nav a.nav-emph:hover {
  background: #a5cf28;
  color: #10283c;
}

/* The green pill is always emphasised, so the active page gets a ring. */
.site-nav a.nav-emph[aria-current="page"] {
  background: var(--green);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--green-ink);
}

.header-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.6rem;
}

.header-cta {
  white-space: nowrap;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 21px;
  height: 21px;
}

.theme-toggle .icon-moon {
  display: none;
}

.theme-toggle[aria-pressed="true"] .icon-sun {
  display: none;
}

.theme-toggle[aria-pressed="true"] .icon-moon {
  display: block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle span + span {
  margin-top: 5px;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Lives inside the sticky header: cap it to the viewport so every link stays
   reachable on short landscape screens while background scrolling is locked */
html.menu-open {
  overflow: hidden;
}

.mobile-nav {
  display: none;
  max-block-size: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 0.75rem var(--gutter) 1.5rem;
}

.mobile-nav ul {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-nav a {
  display: block;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible {
  background: var(--surface-2);
}

.mobile-nav a.nav-emph {
  background: var(--green);
  color: #10283c;
  text-align: center;
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #164262 0%, #123b5c 52%, #0e2f4c 100%);
  color: #eef4f9;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 8vw, 7rem);
}

[data-theme="dark"] .hero {
  background: linear-gradient(155deg, #0a2136 0%, #0c2b47 55%, #0e3352 100%);
}

.hero::before {
  content: "";
  position: absolute;
  top: -22%;
  right: -12%;
  width: min(760px, 80vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(149, 193, 31, 0.24), transparent 62%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: -10%;
  bottom: -32%;
  width: min(520px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(29, 112, 184, 0.32), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
  padding: 0.45rem 1rem 0.45rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  color: #d8e7f2;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-eyebrow .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(149, 193, 31, 0.2);
}

.hero h1 {
  color: #fff;
  max-width: 15ch;
}

.hero h1 .accent {
  color: var(--green);
}

.hero-lead {
  max-width: 52ch;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  color: #d3e2ed;
}

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

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 2.25rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  list-style: none;
  color: #c3d6e5;
  font-size: 0.94rem;
}

.hero-facts li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-facts svg {
  width: 18px;
  height: 18px;
  color: var(--green-ink);
  flex: 0 0 auto;
}

.hero-facts a {
  color: #e8f2f8;
}

.hero-portrait {
  position: relative;
}

.portrait-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #d9e4ea;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1080 / 1022;
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.portrait-badge {
  position: absolute;
  left: -0.5rem;
  bottom: 1.5rem;
  max-width: 15rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  color: #10283c;
  box-shadow: var(--shadow-md);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}

.portrait-badge span {
  display: block;
  color: #4a6479;
  font-size: 0.78rem;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   8. Section headers
   -------------------------------------------------------------------------- */

.section-head {
  display: grid;
  gap: 0.85rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
  max-width: 62ch;
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-index::before {
  content: "";
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--green);
}

.section-head p {
  color: var(--muted);
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.12rem);
}

/* --------------------------------------------------------------------------
   9. Cards & grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.5rem);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

/* 300px minimum resolves to 3 / 2 / 1 columns inside the 1200px container,
   so six cards never leave orphans in a 4-column row. */
.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: clamp(1.4rem, 2.6vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    border-color 0.22s var(--ease);
}

.card--link {
  color: inherit;
  text-decoration: none;
}

.card--link .link-arrow {
  margin-top: auto;
}

.card--link:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

/* German compounds ("Gefäßerkrankungen") are wider than a narrow card. */
.card h3 {
  margin-bottom: 0.2rem;
  overflow-wrap: break-word;
  hyphens: auto;
}

.card p {
  color: var(--muted);
  font-size: 0.97rem;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 0.35rem;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--blue);
}

[data-theme="dark"] .card-icon {
  color: var(--green-ink);
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card--feature {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
}

.card--numbered::before {
  content: attr(data-step);
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  color: var(--green-ink);
  font-family: "Inter Display", "Inter Fallback", sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0.55;
}

/* --------------------------------------------------------------------------
   10. Praxis / Kontakt
   -------------------------------------------------------------------------- */

.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 2.2vw, 1.5rem);
}

.info-card {
  padding: clamp(1.4rem, 2.6vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
}

.info-card h3 svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

[data-theme="dark"] .info-card h3 svg {
  color: var(--green-ink);
}

.info-card address {
  margin: 0.5rem 0 0;
  font-style: normal;
  line-height: 1.7;
}

.info-card .big-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: "Inter Display", "Inter Fallback", sans-serif;
  font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  text-decoration: none;
}

.info-card .big-link:hover {
  color: var(--blue);
}

/* Every postal address opens its location (Lageplan) in Google Maps */
.address-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.address-link:hover {
  color: var(--blue);
  text-decoration-thickness: 2px;
}

[data-theme="dark"] .address-link:hover {
  color: var(--green-ink);
}

.hours-time {
  margin: 0.4rem 0 0;
  font-family: "Inter Display", "Inter Fallback", sans-serif;
  font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

/* One time slot, many dates: a compact date grid instead of 8 identical rows. */
.date-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.date-chips li {
  padding: 0.45rem 0.25rem;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-strong);
  font-size: 0.93rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* --------------------------------------------------------------------------
   11. About
   -------------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.qual-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.qual-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.qual-list li svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 0.15rem;
  color: var(--blue);
}

[data-theme="dark"] .qual-list li svg {
  color: var(--green-ink);
}

/* --------------------------------------------------------------------------
   12. Services (accordion + list)
   -------------------------------------------------------------------------- */

.service-group {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.service-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem clamp(1rem, 2.4vw, 1.75rem);
  cursor: pointer;
  font-family: "Inter Display", "Inter Fallback", sans-serif;
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem);
  font-weight: 700;
  color: var(--text-strong);
  list-style: none;
}

.service-group summary::-webkit-details-marker {
  display: none;
}

.service-group summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-right: 2.5px solid var(--blue);
  border-bottom: 2.5px solid var(--blue);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.22s var(--ease);
}

[data-theme="dark"] .service-group summary::after {
  border-color: var(--green-ink);
}

.service-group[open] summary::after {
  transform: rotate(225deg) translate(-4px, -4px);
}

/* Hover changes colour only: a grey summary background merged with the grey
   list rows of an open group into one undifferentiated block */
.service-group summary:hover {
  color: var(--blue);
}

[data-theme="dark"] .service-group summary:hover {
  color: var(--green-ink);
}

/* Inset ring, otherwise the group's overflow:hidden clips the focus outline */
.service-group summary:focus-visible {
  outline-offset: -4px;
  border-radius: var(--radius);
}

.service-group[open] summary {
  border-bottom: 1px solid var(--line);
}

.service-group .group-body {
  scroll-margin-top: 5rem;
  padding: 1.25rem clamp(1rem, 2.4vw, 1.75rem) 1.5rem;
}

.service-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.98rem;
}

.service-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 0.6rem;
  border-radius: 50%;
  background: var(--green);
}

.service-list li strong {
  display: block;
}

.service-list li span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   13. Notfalltraining page
   -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  background: linear-gradient(150deg, #164262 0%, #123b5c 55%, #0e2f4c 100%);
  color: #e9f1f7;
}

[data-theme="dark"] .page-hero {
  background: linear-gradient(150deg, #0a2136 0%, #0c2b47 55%, #103759 100%);
}

.page-hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -8%;
  width: min(620px, 75vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(149, 193, 31, 0.22), transparent 65%);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-facts-card {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}

.hero-facts-card h2 {
  margin-bottom: 1.1rem;
  color: #fff;
  font-family: "Inter", "Inter Fallback", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-facts-card dl {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}

.hero-facts-card div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-facts-card div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.hero-facts-card dt {
  color: #a9c2d6;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-facts-card dd {
  margin: 0;
  color: #fff;
  font-family: "Inter Display", "Inter Fallback", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: right;
}

.hero-facts-card dd span {
  color: var(--green-ink);
}

.page-hero h1 {
  color: #fff;
  max-width: 18ch;
}

/* German compounds ("Datenschutzerklärung") exceed a 320–390px line at h1 size;
   hyphenate on phones, with overflow-wrap as the guaranteed fallback. */
@media (max-width: 560px) {
  h1 {
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

.page-hero p {
  max-width: 58ch;
  color: #d3e2ed;
  font-size: clamp(1.02rem, 0.98rem + 0.35vw, 1.2rem);
}

/* Keep the eyebrow pill identical to the homepage (".page-hero p" outranks it). */
.page-hero .hero-eyebrow {
  max-width: none;
  color: #d8e7f2;
  font-size: 0.82rem;
}

.page-hero .hero-actions {
  margin-top: 1.6rem;
}

.cross-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 1.25rem;
  border-radius: 18px;
  background: var(--green);
  color: #10283c;
}

.cross-mark svg {
  width: 28px;
  height: 28px;
}

.pulse-dot {
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(149, 193, 31, 0.7);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(1rem, 2.2vw, 1.5rem);
  counter-reset: step;
}

.step-card {
  position: relative;
  padding: clamp(1.4rem, 2.6vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-card::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 0.6rem;
  color: var(--green-ink);
  font-family: "Inter Display", "Inter Fallback", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.step-card h3 {
  margin-bottom: 0.35rem;
}

.step-card p {
  color: var(--muted);
  font-size: 0.96rem;
}

.price-table-wrap {
  overflow-x: auto;
  container-type: inline-size;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.price-table {
  --label-dauer: "Dauer";
  --label-preis: "Preis";
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.price-table caption {
  padding: 1.1rem 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: left;
}

.price-table th,
.price-table td {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--line);
}

.price-table thead th {
  border-top: 0;
  background: var(--surface-2);
  color: var(--text-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.price-table tbody th {
  font-weight: 600;
}

.price-table td:last-child {
  font-family: "Inter Display", "Inter Fallback", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--text-strong);
}

.price-table tr:hover td,
.price-table tr:hover th {
  background: var(--surface-2);
}

/* Narrow container: stack each row into a card so the price never scrolls offscreen */
@container (width < 520px) {
  .price-table,
  .price-table tbody,
  .price-table tr,
  .price-table th,
  .price-table td {
    display: block;
  }

  .price-table thead {
    display: none;
  }

  .price-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 0.25rem 1rem;
    padding: 0.95rem 1.1rem;
    border-top: 1px solid var(--line);
  }

  .price-table tbody th {
    grid-column: 1 / -1;
  }

  .price-table tbody th,
  .price-table td {
    padding: 0;
    border-top: 0;
  }

  /* A table-caption inside a display:block table shrinks to its content */
  .price-table caption {
    display: block;
    padding: 1rem 1.1rem;
  }

  .price-table td:last-child {
    text-align: end;
  }

  .price-table td::before {
    display: block;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .price-table td:nth-child(2)::before {
    content: var(--label-dauer);
  }

  .price-table td:nth-child(3)::before {
    content: var(--label-preis);
  }

  .price-table tr:hover td,
  .price-table tr:hover th {
    background: none;
  }
}

.note-list {
  display: grid;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.note-list li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.95rem;
}

.note-list li svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 0.2rem;
  color: var(--green-ink);
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.faq-list summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-strong);
  list-style: none;
  position: relative;
  padding-right: 3rem;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 0.6rem;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--blue);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

[data-theme="dark"] .faq-list summary::after {
  color: var(--green-ink);
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list details > p {
  margin: 0;
  padding: 0 1.25rem 1.15rem;
  color: var(--muted);
  font-size: 0.97rem;
}

/* --------------------------------------------------------------------------
   14. CTA band & emergency numbers
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5rem);
  background: var(--ink);
  color: #eaf3f9;
}

[data-theme="dark"] .cta-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(149, 193, 31, 0.22), transparent 55%);
  pointer-events: none;
}

.cta-band .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  align-items: center;
}

.cta-band h2 {
  color: #fff;
}

[data-theme="dark"] .cta-band h2 {
  color: var(--text-strong);
}

.cta-band p {
  color: #c9dbe8;
}

[data-theme="dark"] .cta-band p {
  color: var(--muted);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.emergency-numbers {
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
}

.emergency-numbers h3 {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

/* Whole tile is the tel: link — well above the 24px target minimum (WCAG 2.5.8)
   so the numbers can be hit reliably with a finger under stress */
.emergency-numbers .tel-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.emergency-numbers .tel-tiles li {
  margin: 0;
}

.emergency-numbers .tel-tiles a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.emergency-numbers .tel-tiles a:hover {
  border-color: var(--blue);
}

.emergency-numbers .tel-tiles strong {
  color: var(--text-strong);
  font-family: "Inter Display", "Inter Fallback", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   15. Legal pages
   -------------------------------------------------------------------------- */

.prose {
  max-width: 72ch;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.85rem);
}

.prose h3 {
  margin-top: 1.75rem;
  font-size: 1.12rem;
}

.prose ul {
  color: var(--muted);
}

.prose address {
  font-style: normal;
  line-height: 1.75;
}

.data-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  margin: 1rem 0 0;
}

.data-list dt {
  color: var(--muted);
}

.data-list dd {
  margin: 0;
  overflow-wrap: break-word;
}

/* Phones: label above value so long values keep a full line */
@media (max-width: 560px) {
  .data-list {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }

  .data-list dd + dt {
    margin-top: 0.6rem;
  }
}

/* --------------------------------------------------------------------------
   16. Training photo
   -------------------------------------------------------------------------- */

/* The source is a 1100×282 strip: next to the cards it fills the column
   height with object-fit instead of running as a thin full-width banner */
.training-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.2vw, 1.5rem);
  align-items: stretch;
}

.grid--2x2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.training-photo {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.training-photo picture {
  display: block;
  flex: 1;
  min-height: 0;
}

.training-photo img {
  width: 100%;
  height: 100%;
  min-height: 15rem;
  object-fit: cover;
  object-position: 52% 50%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.training-photo figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1020px) {
  .training-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .training-photo img {
    height: auto;
    min-height: 0;
    aspect-ratio: 2 / 1;
  }
}

@media (max-width: 560px) {
  .grid--2x2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: #0d2a45;
  color: #c4d6e4;
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

[data-theme="dark"] .site-footer {
  background: #081d31;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 2.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand img {
  width: 42px;
  height: 58px;
}

.footer-brand span {
  font-family: "Inter Display", "Inter Fallback", sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.site-footer h2 {
  margin-bottom: 0.9rem;
  color: var(--green-ink);
  font-family: "Inter", "Inter Fallback", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-footer ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: #d8e6f0;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Emergency numbers stay finger-sized in the footer too (WCAG 2.5.8) */
/* Label left, number right-aligned: the numbers line up as one column */
.footer-tel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 2.75rem;
  max-width: 16rem;
}

.footer-tel-number {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.site-footer .footer-tel {
  gap: 0;
}

.footer-address {
  font-style: normal;
  line-height: 1.75;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9db4c6;
  font-size: 0.88rem;
}

.footer-bottom p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   18. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1020px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-portrait {
    max-width: 420px;
  }

  .about-grid,
  .cta-band .container {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Brand, five links, theme toggle and phone pill need ~1100px on one line */
@media (max-width: 1100px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    display: block;
  }

  .mobile-nav[hidden] {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    overflow-wrap: anywhere;
  }

  .brand, .brand-text {
    min-width: 0;
  }

  .brand-text {
    white-space: normal;
  }

  :root {
    --header-h: 66px;
  }

  .brand-sub,
  .header-cta {
    display: none;
  }

  .hero-actions .btn,
  .cta-actions .btn {
    width: 100%;
  }

  .portrait-badge {
    position: static;
    max-width: none;
    margin-top: 1rem;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Give navigation controls room when the user enlarges text. */
@media (max-width: 380px) {
  .header-inner {
    gap: 0.75rem;
  }

  .brand {
    gap: 0.5rem;
  }

  .brand-mark {
    width: 30px;
    height: 42px;
  }

  .brand-text {
    font-size: 0.98rem;
    white-space: normal;
  }

  .header-actions {
    gap: 0.4rem;
  }
}

/* --------------------------------------------------------------------------
   19. Motion & print
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

}

@media (forced-colors: active) {
  .nav-toggle span {
    background: ButtonText;
    forced-color-adjust: none;
  }
}

@media print {
  .site-header,
  .cta-band,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
