/* ============================================================
   Podologische Praxis Siebrecht & Röntgen — "Klinische Klarheit"
   ============================================================ */

:root {
    --primary: oklch(32% 0.07 240);
    --accent: oklch(72% 0.06 160);
    --bg: oklch(99% 0.002 240);
    --bg-alt: oklch(96% 0.004 240);
    --ink: oklch(22% 0.01 240);
    --ink-soft: oklch(42% 0.015 240);
    --on-primary: oklch(98% 0.004 240);
    --radius: 4px;
    --space-unit: 0.5rem;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.125rem);
    line-height: 1.6;
    text-wrap: pretty;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
img, video, iframe { max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--primary);
    line-height: 1.12;
    text-wrap: pretty;
    margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.5rem, 2rem + 3vw, 4.25rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 1.5rem + 1.6vw, 2.75rem); font-weight: 600; }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem); font-weight: 600; }

p { margin: 0 0 1.1em; max-width: 65ch; }

.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    background: var(--primary);
    color: var(--on-primary);
    padding: 0.8em 1.2em;
    z-index: 10000;
    border-radius: var(--radius);
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.wrap {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(1rem, 3vw, 2.5rem);
}
.col-5 { grid-column: span 5; }
.col-7 { grid-column: span 7; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9em 1.7em;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), background 220ms var(--ease-out);
    cursor: pointer;
    border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-ghost {
    background: transparent;
    border-color: color-mix(in oklch, var(--primary) 35%, transparent);
    color: var(--primary);
}
.btn-ghost:hover { background: color-mix(in oklch, var(--primary) 6%, transparent); }

.btn-outline-light {
    background: transparent;
    border-color: color-mix(in oklch, var(--on-primary) 55%, transparent);
    color: var(--on-primary);
}
.btn-outline-light:hover { background: color-mix(in oklch, var(--on-primary) 12%, transparent); }

/* Doctolib-Plugin-Button an die Palette angleichen (lädt nach dem Theme-CSS, gleiche Spezifität gewinnt). */
.wpx-doctolib-btn {
    background: var(--accent) !important;
    color: var(--primary) !important;
    border-radius: var(--radius) !important;
    box-shadow: none !important;
    font-family: var(--font-body) !important;
    padding: 0.9em 1.7em !important;
    transition: transform 220ms var(--ease-out), background 220ms var(--ease-out) !important;
}
.wpx-doctolib-btn:hover {
    background: color-mix(in oklch, var(--accent) 85%, var(--primary) 15%) !important;
    transform: translateY(-2px);
    color: var(--primary) !important;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 1px solid color-mix(in oklch, var(--primary) 40%, transparent);
    padding-bottom: 0.15em;
    transition: border-color 200ms var(--ease-out), gap 200ms var(--ease-out);
}
.link-arrow::after { content: '→'; transition: transform 200ms var(--ease-out); }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow-light { color: var(--on-primary); border-color: color-mix(in oklch, var(--on-primary) 50%, transparent); }

/* Kontaktformular-Plugin ([kontaktformular]) an die Palette angleichen (doppelte Spezifität nötig). */
.prose .wpscp-form,
.wpscp-form {
    background: var(--bg-alt);
    border-radius: var(--radius);
    box-shadow: none;
    border: 1px solid color-mix(in oklch, var(--primary) 10%, transparent);
}
.prose .wpscp-form__title,
.wpscp-form__title { font-family: var(--font-display); color: var(--primary); }
.prose .wpscp-form input,
.prose .wpscp-form textarea,
.wpscp-form input,
.wpscp-form textarea {
    border-radius: var(--radius);
    border-color: color-mix(in oklch, var(--primary) 25%, transparent);
    font-family: var(--font-body);
}
.prose .wpscp-form__btn,
.wpscp-form__btn {
    background: var(--primary);
    border-radius: var(--radius);
    font-family: var(--font-body);
    transition: transform 220ms var(--ease-out), background 220ms var(--ease-out);
}
.prose .wpscp-form__btn:hover,
.wpscp-form__btn:hover {
    filter: none;
    background: color-mix(in oklch, var(--primary) 85%, black 15%);
    transform: translateY(-2px);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 500;
    background: var(--bg);
    border-bottom: 1px solid color-mix(in oklch, var(--primary) 10%, transparent);
    transition: height 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
.header-inner {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 3rem);
    height: 96px;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    transition: height 260ms var(--ease-out);
}
.site-header.is-condensed .header-inner { height: 64px; }
.site-header.is-condensed { box-shadow: 0 6px 24px -12px color-mix(in oklch, var(--ink) 30%, transparent); }

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-shrink: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--primary);
}
.prsr-logo-svg {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    transition: width 260ms var(--ease-out), height 260ms var(--ease-out);
}
.site-header.is-condensed .prsr-logo-svg { width: 36px; height: 36px; }
.site-name { line-height: 1.15; max-width: 16ch; }

.primary-nav { margin-left: auto; }
.primary-menu {
    list-style: none;
    display: flex;
    gap: clamp(1.1rem, 2vw, 2rem);
    margin: 0;
    padding: 0;
}
.primary-menu a {
    font-weight: 500;
    font-size: 0.98rem;
    color: var(--ink-soft);
    transition: color 180ms var(--ease-out);
    position: relative;
    padding-bottom: 2px;
}
.primary-menu a:hover { color: var(--primary); }
.primary-menu a::after {
    content: '';
    position: absolute;
    left: 0; right: 100%;
    bottom: -2px;
    height: 2px;
    background: var(--accent);
    transition: right 220ms var(--ease-out);
}
.primary-menu a:hover::after { right: 0; }

.header-cta { display: flex; align-items: center; gap: 1.1rem; flex-shrink: 0; }
.header-phone { font-weight: 600; color: var(--primary); white-space: nowrap; }

/* Burger */
.burger {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    flex-shrink: 0;
    cursor: pointer;
}
.burger-box { display: inline-block; position: relative; width: 26px; height: 20px; }
.burger-inner,
.burger-inner::before,
.burger-inner::after {
    position: absolute;
    left: 0;
    width: 26px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out), top 220ms var(--ease-out);
}
.burger-inner { top: 9px; }
.burger-inner::before { content: ''; top: -8px; }
.burger-inner::after { content: ''; top: 8px; }
.burger[aria-expanded="true"] .burger-inner { background: transparent; }
.burger[aria-expanded="true"] .burger-inner::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger-inner::after { top: 0; transform: rotate(-45deg); }

/* ---------- Mobile drawer (Geschwister von <header>, nicht Kind!) ---------- */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(86vw, 380px);
    background: var(--bg);
    z-index: 900;
    transform: translateX(100%);
    transition: transform 320ms var(--ease-out);
    overflow-y: auto;
    box-shadow: -12px 0 32px -16px color-mix(in oklch, var(--ink) 35%, transparent);
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer-inner { padding: clamp(1.5rem, 6vw, 2.5rem); display: flex; flex-direction: column; gap: 2rem; }
.drawer-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--primary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.mobile-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.4rem; }
.mobile-menu a { font-family: var(--font-display); font-size: 1.4rem; color: var(--primary); font-weight: 600; }
.drawer-contact { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.drawer-phone { font-weight: 600; color: var(--primary); font-size: 1.1rem; }

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: color-mix(in oklch, var(--ink) 55%, transparent);
    z-index: 800;
    opacity: 0;
    pointer-events: none;
    transition: opacity 320ms var(--ease-out);
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 6vw, 5.5rem) 0; }
.hero-text { max-width: 44rem; }
.hero-lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 50ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.6rem; align-items: center; }
.hero-image-wrap { margin-top: clamp(2.5rem, 5vw, 4rem); }
.hero-image { width: 100%; height: clamp(320px, 46vw, 560px); object-fit: cover; border-radius: 8px; }

/* ---------- Full-bleed bands ---------- */
.band {
    padding-block: clamp(4.5rem, 9vw, 8.5rem);
    color: var(--on-primary);
}
.band-primary { background: var(--primary); }
.band-accent { background: var(--accent); color: var(--primary); }
.band h2 { color: inherit; max-width: 20ch; }
.band-accent h2 { color: var(--primary); }
.band-text { color: color-mix(in oklch, var(--on-primary) 85%, transparent); max-width: 60ch; }
.band-accent .band-text { color: color-mix(in oklch, var(--primary) 78%, transparent); }
.band-kontakt .kontakt-address address {
    font-style: normal;
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
    display: block;
}
.band-kontakt .kontakt-address { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }

/* Section-Rhythmus: alternierend links-/rechtsbündiger Sektionsanfang */
.section-start-left .section-head,
.section-start-left > .wrap > h2 { text-align: left; margin-left: 0; }
.section-start-right .section-head,
.section-start-right > .wrap > h2 { text-align: right; margin-left: auto; }
.band.section-start-left { text-align: left; }

/* ---------- Leistungen ---------- */
.section-leistungen { padding-block: clamp(4.5rem, 9vw, 9rem); }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-lead { color: var(--ink-soft); }

.service-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(1.25rem, 3vw, 2rem);
}
.service-card {
    background: var(--bg-alt);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 260ms var(--ease-out), transform 260ms var(--ease-out);
}
.service-card:hover {
    box-shadow: 0 18px 34px -22px color-mix(in oklch, var(--ink) 45%, transparent);
    transform: translateY(-4px);
}
.service-card-media { aspect-ratio: 4/3; overflow: hidden; }
.service-card-media img { width: 100%; height: 100%; object-fit: cover; }
.service-card-body { padding: clamp(1.3rem, 2.5vw, 1.8rem); display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.service-card-excerpt { color: var(--ink-soft); flex: 1; }
.service-card-excerpt p { margin: 0; }
.service-card-link { font-weight: 600; color: var(--primary); align-self: flex-start; border-bottom: 1px solid color-mix(in oklch, var(--primary) 35%, transparent); }

/* ---------- Slider: strukturell andere Sektion (Horizontal-Scroll, kein Grid) ---------- */
.section-slider { padding-block: clamp(4.5rem, 9vw, 8rem); background: var(--bg-alt); overflow: hidden; }
.section-slider .wrap h2 { margin-bottom: clamp(2rem, 4vw, 3rem); }
.slider-track {
    display: flex;
    gap: clamp(1rem, 2.5vw, 1.75rem);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-inline: clamp(1.25rem, 4vw, 3rem);
    padding-bottom: 1rem;
    scrollbar-width: thin;
}
.slide-item {
    flex: 0 0 min(78vw, 420px);
    scroll-snap-align: start;
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
}
.slide-image { width: 100%; height: 260px; object-fit: cover; }
.slide-caption { padding: 1.2rem 1.4rem 1.5rem; }
.slide-caption h3 { margin-bottom: 0.3em; }
.slide-caption p { color: var(--ink-soft); margin: 0; }

/* ---------- About-Teaser (5/7-Split, asymmetrisch) ---------- */
.section-about { padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.section-about .wrap { align-items: center; }
.about-image img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; }
.about-text { max-width: 46ch; }

/* ---------- Prose / generische Seiten ---------- */
.page-hero { padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2rem, 4vw, 3rem); }
.page-hero h1 { max-width: 22ch; }
.page-hero-lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 55ch; }
.prose-section { padding-block: 0 clamp(4rem, 8vw, 7rem); }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.5em; }
.prose iframe { border: 0; width: 100%; aspect-ratio: 16/10; border-radius: var(--radius); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid color-mix(in oklch, var(--primary) 10%, transparent); padding-block: clamp(3rem, 6vw, 5rem) 2rem; }
.footer-inner {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 3rem);
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem 1.5rem;
}
.footer-brand { grid-column: span 5; display: flex; flex-direction: column; gap: 1rem; }
.footer-logo-link .prsr-logo-svg { width: 32px; height: 32px; }
.footer-address { font-style: normal; color: var(--ink-soft); line-height: 1.7; }
.footer-address a { color: var(--primary); font-weight: 600; }
.footer-nav { grid-column: span 4; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-menu a { color: var(--ink-soft); transition: color 180ms var(--ease-out); }
.footer-menu a:hover { color: var(--primary); }
.footer-legal { grid-column: span 3; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-legal a { color: var(--ink-soft); }
.footer-legal a:hover { color: var(--primary); }
.footer-copy { grid-column: 1 / -1; margin-top: 2rem; color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Scroll-Reveal: AUSSCHLIESSLICH transform, nie opacity:0 als Startzustand ---------- */
.reveal {
    transform: translateY(28px);
    transition: transform 620ms var(--ease-out);
    will-change: transform;
}
.reveal.is-visible { transform: translateY(0); }
.reveal-group > * {
    transform: translateY(28px);
    transition: transform 620ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 60ms);
}
.reveal-group.is-visible > * { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal, .reveal-group > *, .btn, .service-card, .primary-menu a::after, .mobile-drawer, .drawer-backdrop, .burger-inner, .burger-inner::before, .burger-inner::after {
        transition: none !important;
        transform: none !important;
    }
}

/* ---------- Counter ---------- */
.counter { font-family: var(--font-display); font-variant-numeric: tabular-nums; }

/* ============================================================
   Breakpoints
   ============================================================ */
@media (max-width: 900px) {
    .primary-nav, .header-cta { display: none; }
    .burger { display: inline-flex; align-items: center; justify-content: center; }

    .grid-12, .service-grid, .footer-inner { display: block; }
    .col-5, .col-7, .service-card, .footer-brand, .footer-nav, .footer-legal { grid-column: auto; }
    .service-card { margin-bottom: clamp(1.25rem, 3vw, 2rem); }
    .footer-brand, .footer-nav, .footer-legal { margin-bottom: 1.8rem; }

    .section-about .wrap.grid-12 { display: flex; flex-direction: column; }
    .band-kontakt .wrap.grid-12 { display: flex; flex-direction: column; gap: 2rem; }

    .section-start-left .section-head,
    .section-start-left > .wrap > h2,
    .section-start-right .section-head,
    .section-start-right > .wrap > h2 {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    .header-inner, .site-header.is-condensed .header-inner { height: 72px; }
    .hero-ctas { flex-direction: column; align-items: stretch; }
    .hero-ctas .btn, .hero-ctas .wpx-doctolib-btn { text-align: center; }
    .about-image img { aspect-ratio: 4/3; }
}
