/* Kinderarztpraxis — base stylesheet.
   Every colour, font and size comes from the CSS variables emitted out of
   content/theme.md (see <style id="theme"> in the page head). The light card
   tints are derived from --accent / --secondary with color-mix(), so changing
   those two brand colours in theme.md shifts the whole palette in step.
   Edit theme.md for look-and-feel; edit this file only for structural changes. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  font-size: var(--size-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); color: var(--heading); margin: 0; }
a { color: var(--accent); }
/* external links get a small "leaves the site" icon (inline SVG, explained
   in the Impressum). stroke:currentColor tints it to the link's own colour. */
.extlink-ico {
  display: inline-block; width: .8em; height: .8em; margin-right: .3em; vertical-align: -0.1em;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
img { max-width: 100%; height: auto; }
main:focus { outline: none; }
/* visible keyboard focus for interactive controls (WCAG 2.4.7). focus-visible
   keeps the ring for keyboard users without flashing it on mouse clicks. */
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ── keyframes (decorative hero motion) ─────────────────────────────────── */
@keyframes drift     { 0% { transform: translateX(0); } 100% { transform: translateX(26px); } }
@keyframes sunbob    { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-16px) scale(1.04); } }
@keyframes sunglow   { 0%,100% { box-shadow: 0 0 0 12px rgba(248,211,138,.30), 0 0 0 28px rgba(248,211,138,.14); }
                       50%     { box-shadow: 0 0 0 18px rgba(248,211,138,.40), 0 0 0 40px rgba(248,211,138,.20); } }
@keyframes wobble    { 0%,100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-12px); } }
@keyframes floatspin { 0%,100% { transform: translateY(0) rotate(-10deg); } 50% { transform: translateY(-18px) rotate(10deg); } }
@media (prefers-reduced-motion: reduce) {
  .hero-sun, .hero-cloud, .hero-shape { animation: none !important; }
}

/* ── skip link ──────────────────────────────────────────────────────────── */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 12px 0; z-index: 100; }
.skip-link:focus { left: 0; }

/* ── announcement banner ────────────────────────────────────────────────── */
.banner { background: var(--banner-bg); color: var(--banner-text); position: relative; z-index: 5; }
.banner[hidden] { display: none; }
.banner-inner { position: relative; max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 13px 52px 13px 24px; }
.banner-badge { flex: none; font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--banner-bg); background: var(--banner-text); padding: 5px 12px; border-radius: 20px; white-space: nowrap; }
.banner-text { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(15px, 1.8vw, 18px); line-height: 1.35; }
.banner-close { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: none; background: color-mix(in srgb, var(--banner-text) 12%, transparent); color: var(--banner-text); font-size: 19px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.banner-close:hover { background: color-mix(in srgb, var(--banner-text) 22%, transparent); }

/* mobile: long / multi-line notices otherwise crowd around a vertically-centred
   badge and collide with the close button. Stack the badge above the text and
   pin the close button to the top-right corner. */
@media (max-width: 560px) {
  .banner-inner { flex-direction: column; align-items: flex-start; gap: 9px; padding: 12px 50px 13px 20px; }
  .banner-close { top: 11px; transform: none; }
}

/* "modal" banner mode: the inline strip is only the no-JS fallback — hide it
   once <dialog> support is confirmed (.dialogs on <html>); the pop-up then
   carries the notice, opened on every visit by app.js. */
.dialogs .hinweis-inline { display: none; }
.hinweis-inline .banner-inner { padding-right: 24px; }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 64px) 24px clamp(56px, 7vw, 96px); }
.hero-sky { position: absolute; inset: 0; background: linear-gradient(180deg, #EAF5FB 0%, var(--bg) 78%); z-index: 0; }
.hero-sun { position: absolute; top: 150px; right: 12%; width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #FCE39A, #F6C95E); z-index: 1; pointer-events: none; animation: sunbob 6s ease-in-out infinite, sunglow 4.5s ease-in-out infinite; }
.hero-cloud { position: absolute; background: #fff; border-radius: 40px; z-index: 1; pointer-events: none; }
.hero-cloud-1 { top: 120px; left: 6%; width: 150px; height: 44px; opacity: .85; filter: blur(.3px); animation: drift 9s ease-in-out infinite alternate; }
.hero-cloud-2 { top: 96px; left: 13%; width: 86px; height: 32px; opacity: .7; animation: drift 11s ease-in-out infinite alternate; }
.hero-shape { position: absolute; z-index: 1; pointer-events: none; }
.hero-shape-rect { top: 322px; right: 21%; width: 116px; height: 116px; border-radius: 30px; background: color-mix(in srgb, var(--secondary) 20%, transparent); animation: wobble 7s ease-in-out infinite; }
.hero-shape-tri { top: 250px; right: 6%; width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 86px solid color-mix(in srgb, var(--accent) 18%, transparent); animation: floatspin 9s ease-in-out infinite; }
.hero-inner { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 72px); }
.hero-text { flex: 1 1 380px; min-width: 300px; }

.kicker { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); background: var(--surface); padding: 8px 16px; border-radius: 30px; box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 16%, transparent); white-space: nowrap; }
.kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero-title { font-weight: 700; font-size: clamp(40px, 6vw, var(--size-h1)); line-height: 1.04; letter-spacing: -.01em; margin: 22px 0 0; color: var(--heading); text-wrap: balance; }
.hero-team { font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 2.2vw, var(--size-lead)); line-height: 1.45; margin: 16px 0 0; color: var(--secondary); }

.contact-card { margin-top: 30px; background: var(--surface); border-radius: var(--radius); padding: 26px 28px; box-shadow: 0 16px 44px color-mix(in srgb, var(--heading) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--surface)); max-width: 460px; }
.contact-addr { display: flex; align-items: flex-start; gap: 12px; }
.contact-pin { flex: none; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); display: grid; place-items: center; color: var(--accent); font-size: 17px; }
.contact-addr address { font-style: normal; font-size: 17px; line-height: 1.5; font-weight: 600; color: var(--heading); }
.contact-city { font-weight: 400; color: var(--muted); }
.contact-rule { height: 1px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); margin: 20px 0; }
.contact-list { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.contact-item { display: flex; align-items: baseline; gap: 14px; }
.contact-item dt { flex: none; width: 70px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--muted) 80%, var(--surface)); }
.contact-item dd { margin: 0; font-size: 18px; font-weight: 700; color: var(--heading); }
.contact-item a { color: var(--heading); text-decoration: none; white-space: nowrap; }
.contact-mail { color: var(--accent) !important; white-space: normal !important; }

/* ── sprechstunden ──────────────────────────────────────────────────────── */
.wrap { max-width: 1080px; margin: 0 auto; }
.wrap-narrow { max-width: 880px; margin: 0 auto; }
.sprech { background: var(--surface); padding: clamp(48px, 6vw, 84px) 24px; }
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; background: #FFF6E2; border: 1px solid #F6E2B0; border-radius: 22px; padding: 22px 26px; }
.notice-badge { display: inline-flex; align-items: center; gap: 9px; flex: none; font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #B57E12; background: #FBE6AE; padding: 9px 16px; border-radius: 30px; }
.notice-text { margin: 0; font-size: clamp(17px, 2vw, 20px); font-weight: 600; color: #6B5212; line-height: 1.4; }

.cards { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; }
.card { flex: 1 1 380px; min-width: 300px; border-radius: var(--radius); padding: 32px 30px; }
.card-akut { background: color-mix(in srgb, var(--secondary) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--secondary) 26%, var(--surface)); }
.card-termin { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--surface)); }
.card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.card-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 24px; flex: none; }
.card-akut .card-icon { background: var(--secondary); }
.card-termin .card-icon { background: var(--accent); }
.card-head h2 { font-weight: 700; font-size: clamp(21px, 5.2vw, var(--size-caption)); margin: 0; min-width: 0; flex: 1; overflow-wrap: break-word; hyphens: auto; }
.card-akut .card-head h2 { color: color-mix(in srgb, var(--secondary) 55%, var(--heading)); }
.card-termin .card-head h2 { color: color-mix(in srgb, var(--accent) 55%, var(--heading)); }
.help-btn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--surface); font-family: var(--font-display); font-weight: 700; font-size: 18px; cursor: pointer; display: none; place-items: center; box-shadow: 0 2px 10px color-mix(in srgb, var(--heading) 12%, transparent); }
.dialogs .help-btn { display: grid; }
.card-akut .help-btn { color: var(--secondary); }
.card-termin .help-btn { color: var(--accent); }
.card-akut .help-btn:hover { background: var(--secondary); color: #fff; }
.card-termin .help-btn:hover { background: var(--accent); color: #fff; }

.slots { display: flex; flex-direction: column; gap: 18px; }
.slot { background: var(--surface); border-radius: 18px; padding: 18px 20px; }
.slot-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.slot-time { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.card-akut .slot-time { color: color-mix(in srgb, var(--secondary) 55%, var(--heading)); }
.card-termin .slot-time { color: color-mix(in srgb, var(--accent) 55%, var(--heading)); }
.slot-badge { font-size: 14px; font-weight: 700; color: #fff; padding: 4px 12px; border-radius: 20px; white-space: nowrap; }
.card-akut .slot-badge { background: var(--secondary); }
.card-termin .slot-badge { background: var(--accent); }
.slot-sep { font-size: 15px; color: var(--muted); }
.slot-info { margin: 8px 0 0; font-size: 15px; color: var(--muted); }

/* ── öffnungszeiten chart ───────────────────────────────────────────────── */
.hours { background: color-mix(in srgb, var(--accent) 8%, var(--bg)); padding: clamp(48px, 6vw, 84px) 24px; }
.center { text-align: center; }
.hours h2 { font-weight: 700; font-size: clamp(28px, 4vw, var(--size-h2)); margin: 0 0 6px; color: color-mix(in srgb, var(--accent) 45%, var(--heading)); }
.sub { margin: 0 0 32px; color: var(--muted); font-size: 16px; }
.chart { background: var(--surface); border-radius: var(--radius); padding: 12px clamp(14px, 3vw, 30px); box-shadow: 0 16px 44px color-mix(in srgb, var(--heading) 8%, transparent); }
.chart-scale, .chart-row { display: flex; align-items: center; gap: clamp(10px, 2.6vw, 18px); }
.chart-scale { padding: 18px 6px 10px; }
.chart-day { flex: none; width: clamp(38px, 9vw, 60px); font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 4.2vw, 20px); color: var(--heading); }
.chart-ticks { flex: 1; display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--muted) 70%, var(--surface)); }
.chart-row { padding: 7px 6px; border-top: 1px solid color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.chart-track { position: relative; flex: 1; height: clamp(44px, 11vw, 50px); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border-radius: 14px; }
.bar { position: absolute; top: 5px; bottom: 5px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.bar span { font-family: var(--font-display); font-weight: 700; font-size: clamp(12px, 3.2vw, 15px); white-space: nowrap; }
.bar-am { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.bar-am span { color: color-mix(in srgb, var(--accent) 62%, var(--heading)); }
.bar-pm { background: color-mix(in srgb, var(--secondary) 26%, var(--surface)); }
.bar-pm span { color: color-mix(in srgb, var(--secondary) 62%, var(--heading)); }
.bar-closed { position: absolute; top: 0; bottom: 0; left: 60%; right: 6px; display: flex; align-items: center; justify-content: center; }
.bar-closed span { font-weight: 600; font-style: italic; font-size: clamp(10px, 2.6vw, 12px); color: color-mix(in srgb, var(--muted) 65%, var(--surface)); white-space: nowrap; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 22px; padding: 16px 6px 10px; margin-top: 6px; border-top: 1px solid color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.chart-legend > span { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); }
.swatch { width: 26px; height: 14px; border-radius: 5px; }
.swatch-am { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.swatch-pm { background: color-mix(in srgb, var(--secondary) 26%, var(--surface)); }

/* ── footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: var(--footer-bg); color: color-mix(in srgb, #fff 80%, var(--footer-bg)); padding: clamp(40px, 5vw, 60px) 24px 32px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px; }
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #fff; }
.footer-meta { margin-top: 8px; font-size: 15px; line-height: 1.6; color: color-mix(in srgb, #fff 66%, var(--footer-bg)); }
.footer-meta a { color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.footer-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.pill { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: #fff; text-decoration: none; background: rgba(255,255,255,.1); padding: 11px 22px; border-radius: 30px; border: none; cursor: pointer; }
.pill:hover { background: rgba(255,255,255,.2); }
.footer-copy { margin: 28px auto 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: color-mix(in srgb, #fff 55%, var(--footer-bg)); }
.footer-version { opacity: .85; white-space: nowrap; }

/* ── legal (inline + modal share these styles) ──────────────────────────── */
.legal-trigger { display: none; }
.dialogs .legal-inline { display: none; }
.dialogs .legal-link { display: none; }
.dialogs .legal-trigger { display: inline-flex; }
.legal-card { max-width: 820px; margin: 40px auto 0; background: var(--surface); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); color: var(--text); }
.modal .legal-card { margin: 0; padding: 0; }
.kicker-soft { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); padding: 7px 15px; border-radius: 24px; }
.legal-card h2, .modal-body h2 { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.15; margin: 16px 0 0; color: var(--heading); }
.legal-body { margin-top: 28px; counter-reset: ds; }
.legal-body h3 { font-weight: 700; font-size: var(--size-h3); margin: 28px 0 8px; color: var(--heading); position: relative; padding-left: 50px; min-height: 34px; display: flex; align-items: center; }
.legal-body h3::before { counter-increment: ds; content: counter(ds); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 16px; display: grid; place-items: center; }
.legal-body p { font-size: 15px; line-height: 1.6; margin: 10px 0 0; color: color-mix(in srgb, var(--text) 88%, var(--surface)); }
.legal-body h3 + p { margin-top: 0; }
.legal-body strong { color: var(--heading); }
.legal-signoff { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin: 28px 0 0; color: var(--heading); }

/* ── modals (<dialog>) ──────────────────────────────────────────────────── */
dialog.modal { border: none; border-radius: var(--radius); padding: 0; width: calc(100% - 32px); max-width: 820px; background: var(--surface); color: var(--text); box-shadow: 0 40px 100px rgba(0,0,0,.30); }
dialog.modal.modal-wide { max-width: 820px; }
dialog.modal { max-height: 86vh; overflow: auto; }
dialog.modal::backdrop { background: rgba(35,60,65,.55); backdrop-filter: blur(3px); }
.modal-body { position: relative; padding: clamp(28px, 5vw, 52px) clamp(22px, 4vw, 48px); }
.modal-close-form { margin: 0; }
.modal-close { position: absolute; top: 18px; right: 18px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: none; background: color-mix(in srgb, var(--accent) 8%, var(--bg)); color: var(--heading); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.modal-close:hover { background: color-mix(in srgb, var(--accent) 16%, var(--bg)); }
.modal-body > h2:first-child, .modal-body .kicker-soft + h2 { font-size: clamp(23px, 5vw, 28px); margin: 16px 0 14px; }
.help-text p { margin: 0 0 12px; font-size: 16px; line-height: 1.6; color: color-mix(in srgb, var(--text) 88%, var(--surface)); }
.help-text p:last-child { margin-bottom: 0; }

/* ── 404 ────────────────────────────────────────────────────────────────── */
.notfound { max-width: 640px; margin: 0 auto; padding: 120px 24px; text-align: center; }
.notfound h1 { font-size: clamp(28px, 5vw, var(--size-h2)); }
