/* =====================================================================
   Privatpraxis für Kardiologie Flensburg — Prof. Dr. med. Christoph Garlichs
   Design system: "clean clinical trust" — calm teal/blue, airy, fast.
   Single stylesheet, no external fonts, cookie-free.
   ===================================================================== */

:root {
  /* Brand — calm medical teal/blue */
  --brand-700: #0b5563;
  --brand-600: #0e7490;
  --brand-500: #0891b2;
  --brand-400: #2aa7c4;
  --brand-050: #ecf6f9;

  /* Neutrals */
  --ink:    #0f2a36;   /* headings */
  --body:   #45606b;   /* body copy */
  --muted:  #6b828c;   /* secondary text */
  --bg:     #ffffff;
  --bg-soft:#f4f9fb;
  --panel:  #eef6f9;
  --line:   #d9e7ec;
  --card:   #ffffff;

  /* Accent — heart/pulse, used very sparingly */
  --accent: #e11d48;

  /* Effects */
  --ring: 0 0 0 3px rgba(8,145,178,.35);
  --shadow-sm: 0 1px 2px rgba(15,42,54,.06), 0 1px 3px rgba(15,42,54,.05);
  --shadow-md: 0 6px 20px -8px rgba(15,42,54,.18), 0 2px 6px rgba(15,42,54,.06);
  --shadow-lg: 0 24px 60px -24px rgba(11,85,99,.35);

  --radius:   18px;
  --radius-sm:12px;
  --radius-lg:26px;

  --container: 1140px;
  --gutter: clamp(1.1rem, 4vw, 2.2rem);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;

  --header-h: 74px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { color: var(--ink); line-height: 1.14; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.1rem, 1.35rem + 3.4vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.4rem); font-weight: 750; letter-spacing: -0.025em; }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.32rem); font-weight: 700; }

p  { margin: 0; }
img, svg, iframe { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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: 12px; top: -60px; z-index: 200;
  background: var(--brand-600); color: #fff; padding: .6rem 1rem;
  border-radius: 10px; font-weight: 600; transition: top .18s ease;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.button {
  --btn-bg: var(--brand-600);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .82rem 1.4rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.1;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  background: var(--btn-bg);
  color: var(--btn-fg);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  box-shadow: var(--shadow-sm);
}
.button:hover  { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.button:active { transform: translateY(0); }
.button--primary { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color:#fff; }
.button--secondary { background: var(--brand-050); color: var(--brand-700); border-color: #cfe6ec; box-shadow:none; }
.button--secondary:hover { background:#e0f0f4; }
.button--ghost {
  background: rgba(255,255,255,.14); color:#fff;
  border-color: rgba(255,255,255,.6);
  backdrop-filter: blur(6px); box-shadow:none;
}
.button--ghost:hover { background: rgba(255,255,255,.24); }
.button--full { width: 100%; }
.button--small { padding: .55rem 1rem; font-size: .92rem; }
.button svg { width: 1.1em; height: 1.1em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.site-header.is-stuck { border-color: var(--line); box-shadow: 0 4px 20px -14px rgba(15,42,54,.5); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand__mark { width: 40px; height: 40px; flex: 0 0 auto; }
.brand__copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand__copy strong { font-size: 1.02rem; color: var(--ink); font-weight: 750; letter-spacing: -0.01em; }
.brand__copy small  { font-size: .78rem; color: var(--muted); font-weight: 500; }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; position: relative; }
.site-nav a:not(.button)::after {
  content:""; position:absolute; left:0; right:100%; bottom:-6px; height:2px;
  background: var(--brand-500); border-radius: 2px; transition: right .22s ease;
}
.site-nav a:not(.button):hover::after,
.site-nav a[aria-current="page"]::after { right: 0; }
.site-nav__secondary { color: var(--muted) !important; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; cursor: pointer; padding: 0;
  position: relative; box-shadow: var(--shadow-sm);
}
.nav-toggle span:not(.sr-only) {
  position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .22s ease, opacity .18s ease, top .22s ease;
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero__wash {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(6,42,53,.10) 0%, rgba(6,42,53,.02) 35%, rgba(255,255,255,0) 55%),
    linear-gradient(105deg, rgba(9,60,73,.86) 0%, rgba(11,85,99,.62) 42%, rgba(11,85,99,.12) 72%, rgba(11,85,99,0) 100%);
}
.hero__content { position: relative; padding-block: clamp(3.2rem, 8vw, 7rem) clamp(3rem, 7vw, 6rem); }
.hero__panel { max-width: 640px; color: #fff; }
.eyebrow {
  display: inline-block; font-weight: 600; font-size: .92rem; letter-spacing: .01em;
  color: #dff1f5; margin-bottom: 1.1rem; line-height: 1.5;
  padding: .5rem .9rem; border-radius: 12px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(4px);
}
.hero h1 { color:#fff; text-wrap: balance; }
.hero__lead { color: #eaf6f9; font-size: clamp(1.05rem, 1rem + 0.5vw, 1.28rem); margin-top: 1.1rem; max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.9rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.2rem, 7vw, 6rem) 0; }
.section--panel { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section--tight { padding-block: clamp(2.4rem, 5vw, 4rem); }

[id] { scroll-margin-top: calc(var(--header-h) + 18px); }

.section-kicker {
  text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700;
  color: var(--brand-600); margin-bottom: .7rem;
}
.section-heading { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-heading h2 { text-wrap: balance; }
.section-lead { color: var(--body); font-size: 1.1rem; margin-top: .9rem; max-width: 44rem; }

/* Intro block */
.intro { max-width: 52rem; }
.intro h2 { margin-bottom: 1rem; text-wrap: balance; }
.feature-list { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.7rem; }
.feature-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  color: var(--brand-700); background: var(--brand-050); border: 1px solid #cfe6ec;
}
.feature-pill::before {
  content:""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-500); flex: 0 0 auto;
}
.intro__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.9rem; }

/* ---------- Card grids ---------- */
.card-grid { display: grid; gap: 1.3rem; }
.card-grid--services { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid--profile  { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.service-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #c7e1e8; }
.service-card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-050), #dcf0f4);
  color: var(--brand-600); margin-bottom: 1.1rem; border: 1px solid #cfe6ec;
}
.service-card__icon svg { width: 26px; height: 26px; }
.service-card h3 { margin-bottom: .6rem; }
.service-card p { color: var(--body); font-size: .99rem; }

.section-cta { margin-top: 2.2rem; }

/* Profile / Werdegang cards */
.profile-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.6rem; box-shadow: var(--shadow-sm);
}
.profile-card h3 { margin-bottom: 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.profile-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.profile-card li { position: relative; padding-left: 1.5rem; font-size: .97rem; color: var(--body); }
.profile-card li::before {
  content:""; position: absolute; left: 0; top: .58em; width: 7px; height: 7px;
  border-radius: 50%; background: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-050);
}
.profile-card li strong { color: var(--ink); font-weight: 700; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 1.4rem; grid-template-columns: 1.15fr .85fr; align-items: start; }
.panel-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.6rem; box-shadow: var(--shadow-sm);
}
.form-card h3 { margin-bottom: .35rem; }
.card-intro { color: var(--muted); margin-bottom: 1.4rem; font-size: .97rem; }

.contact-form { display: grid; gap: 1.05rem; }
.field-row { display: grid; gap: 1.05rem; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: .4rem; }
.field > span { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field input, .field textarea {
  width: 100%; padding: .8rem .9rem; font: inherit; color: var(--ink);
  background: #fbfdfe; border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input::placeholder { color: #9fb2ba; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-400); background:#fff; box-shadow: var(--ring);
}

.choice-group { border: 0; padding: 0; margin: 0; display: grid; gap: .55rem; }
.choice-group legend { font-weight: 600; font-size: .9rem; color: var(--ink); padding: 0; margin-bottom: .1rem; }
.choice-grid { display: grid; gap: .6rem; grid-template-columns: repeat(3, 1fr); }
.choice {
  position: relative; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: .7rem .5rem; border: 1.5px solid var(--line);
  border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--body);
  background: #fbfdfe; transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.choice:hover { border-color: var(--brand-400); }
.choice:has(input:checked) { border-color: var(--brand-500); background: var(--brand-050); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-500); }
.choice:has(input:focus-visible) { box-shadow: var(--ring); }

.contact-form__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: 0; padding: .8rem 1rem; border-radius: 12px; font-weight: 600; font-size: .95rem; }
.form-status[data-state="ok"]    { background: #e7f6ec; color: #15803d; border: 1px solid #b6e2c4; }
.form-status[data-state="error"] { background: #fdeceb; color: #b42318; border: 1px solid #f3c5c0; }
.form-status[data-state="sending"] { background: var(--brand-050); color: var(--brand-700); border: 1px solid #cfe6ec; }

.contact-sidebar { display: grid; gap: 1.4rem; }
.contact-card h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.contact-card p  { color: var(--muted); margin-bottom: 1.1rem; }
.contact-lines { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: .7rem; }
.contact-lines li { display: flex; gap: .7rem; align-items: flex-start; color: var(--body); font-size: .97rem; }
.contact-lines svg { width: 20px; height: 20px; color: var(--brand-500); flex: 0 0 auto; margin-top: .15rem; }
.contact-lines a { color: var(--ink); text-decoration: none; font-weight: 600; }
.contact-lines a:hover { color: var(--brand-600); }

/* Privacy-friendly click-to-load map */
.map-card { padding: 0; overflow: hidden; }
.map-embed { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg,#e4eff2,#d3e7ec); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .8rem; text-align: center;
  padding: 1.6rem; color: var(--brand-700);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.5), transparent 60%),
    repeating-linear-gradient(45deg, rgba(11,85,99,.05) 0 12px, transparent 12px 24px),
    linear-gradient(135deg,#e6f1f4,#d6e9ee);
}
.map-consent svg { width: 34px; height: 34px; color: var(--brand-500); }
.map-consent p { color: var(--body); font-size: .9rem; max-width: 32ch; margin: 0 auto; }
.map-consent .button { margin-top: .2rem; }
.map-note { padding: .8rem 1.1rem; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); }
.map-note a { color: var(--brand-600); }

/* ---------- Page hero (subpages) ---------- */
.page-hero { background: linear-gradient(135deg, var(--brand-700), var(--brand-500)); color: #fff; }
.page-hero .container { padding-block: clamp(2.8rem, 7vw, 4.6rem); }
.page-hero__panel { max-width: 44rem; }
.page-hero h1 { color: #fff; margin-top: .4rem; }
.page-hero .section-kicker { color: #cdeef5; }
.page-hero .section-lead { color: #e6f5f8; }
.breadcrumbs { font-size: .86rem; margin-bottom: 1rem; color: #cdeef5; }
.breadcrumbs a { color: #eaf7fa; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- Legal copy ---------- */
.page-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow-sm); max-width: 60rem;
}
.legal-copy { color: var(--body); }
.legal-copy h2 { font-size: 1.25rem; margin: 2rem 0 .7rem; color: var(--ink); }
.legal-copy h2:first-child { margin-top: 0; }
.legal-copy p { margin-bottom: .5rem; }
.legal-copy p + p { margin-top: 0; }
.legal-copy ul { margin: .3rem 0 1rem; padding-left: 1.2rem; }
.legal-copy li { margin-bottom: .3rem; }
.legal-copy .lead-block { margin-bottom: 1.4rem; }
.legal-copy strong { color: var(--ink); }
.legal-copy a { word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: #0c2a34; color: #cddce1; padding: clamp(2.6rem,5vw,3.6rem) 0 2rem; }
.footer__brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.footer__brand .brand__mark { width: 38px; height: 38px; }
.footer__brand strong { color: #fff; font-size: 1.02rem; }
.footer__brand small { color: #9fb9c1; display: block; font-weight: 500; }
.footer__grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr auto; align-items: start; }
.footer__heading { color: #fff; font-weight: 700; font-size: .95rem; margin-bottom: .9rem; text-transform: uppercase; letter-spacing: .08em; }
.footer__about { font-size: .92rem; color: #a9c2c9; max-width: 34ch; }
.footer__links, .social-links { display: grid; gap: .55rem; }
.site-footer a { color: #cddce1; text-decoration: none; font-size: .95rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer__qr { text-align: center; }
.footer__qr img { width: 128px; height: 128px; border-radius: 12px; background:#fff; padding: 6px; margin-inline: auto; }
.footer__qr p { font-size: .82rem; color: #9fb9c1; margin-top: .5rem; }
.footer__meta {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; justify-content: space-between;
  font-size: .85rem; color: #9fb9c1;
}
.footer__meta a { color: #9fb9c1; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__qr { grid-column: span 2; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: .3rem;
    background: #fff; padding: 1rem var(--gutter) 1.4rem;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    transform: translateY(-140%); transition: transform .28s ease; visibility: hidden;
  }
  .site-nav.is-open { transform: translateY(0); visibility: visible; }
  .site-nav a:not(.button) { padding: .7rem .2rem; border-bottom: 1px solid var(--line); }
  .site-nav a:not(.button)::after { display: none; }
  .site-nav .button { margin-top: .6rem; }
  .brand__copy strong { font-size: .95rem; }
}

@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; }
  .hero__actions .button, .intro__actions .button { flex: 1 1 auto; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__qr { grid-column: auto; text-align: left; }
  .footer__qr img { margin-inline: 0; }
}

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