/* Prof. Dr Rumen Kastelov – the light box of the fracture clinic.
   Paper and theatre sage of the original header photo, radiograph film panels with bone-white lines,
   the blue of the original menu bar as the one accent. Sofia Sans Condensed + Noto Serif. */

@font-face {
    font-family: "Sofia Sans Condensed";
    src: url("/fonts/sofia-sans-condensed.woff2") format("woff2");
    font-weight: 1 1000;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Noto Serif";
    src: url("/fonts/noto-serif.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Noto Serif";
    src: url("/fonts/noto-serif-italic.woff2") format("woff2");
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
}

:root {
    --paper: #f6f5ef;
    --sheet: #ffffff;
    --ink: #15201b;
    --muted: #46534c;
    --line: #d6dccf;
    --sage: #aec5a4;
    --sage-soft: #e3eadc;
    --sage-deep: #5e623a;
    --theatre: #22372f;
    --theatre-2: #1a2b25;
    --film: #0a1513;
    --film-2: #11211d;
    --bone: #e9f1ec;
    --bone-dim: #b9cbc2;
    --accent: #1f6eb6;
    --accent-deep: #17578f;
    --accent-on-dark: #8fc3ee;
    --radius: 22px;
    --radius-s: 12px;
    --display: "Sofia Sans Condensed", "Arial Narrow", system-ui, sans-serif;
    --text: "Noto Serif", Georgia, "Times New Roman", serif;
    --wrap: 1200px;
    --shadow: 0 1px 2px rgba(10, 21, 19, 0.06), 0 12px 32px -12px rgba(10, 21, 19, 0.22);

    --lb-bg: rgba(7, 15, 13, 0.96);
    --lb-text: #e9f1ec;
    --lb-accent: #8fc3ee;
    --lb-accent-soft: rgba(143, 195, 238, 0.18);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--text);
    font-size: 1.0625rem;
    line-height: 1.65;
    font-variant-numeric: lining-nums;
    overflow-x: clip;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--accent-deep);
    text-decoration-thickness: 2px;
}

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

h1,
h2,
h3,
.display {
    font-family: var(--display);
    font-weight: 760;
    line-height: 1.02;
    letter-spacing: -0.015em;
    margin: 0 0 0.5em;
    text-wrap: balance;
}

h2 {
    font-size: clamp(2rem, 1.4rem + 2.4vw, 3.3rem);
}

h3 {
    font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
    font-weight: 700;
}

p {
    margin: 0 0 1em;
}

.wrap {
    width: min(100% - 32px, var(--wrap));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--ink);
    color: #fff;
    border-radius: 8px;
}

.skip:focus {
    top: 12px;
    color: #fff;
}

.eyebrow {
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sage-deep);
    margin-bottom: 0.6em;
}

.eyebrow-on-dark {
    color: var(--sage);
}

/* ---- header ---- */

.top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 245, 239, 0.86);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid rgba(21, 32, 27, 0.08);
}

.top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding-block: 10px;
}

.brand {
    display: block;
    flex: 0 0 auto;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(21, 32, 27, 0.1);
    overflow: hidden;
    background: #fff;
}

.brand img {
    width: 189px;
    height: auto;
}

.call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
}

.call:hover {
    background: var(--accent-deep);
    color: #fff;
    transform: translateY(-1px);
}

.call-label {
    font-weight: 500;
    opacity: 0.92;
}

.lang {
    display: flex;
    gap: 2px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.95rem;
}

.lang a,
.lang span {
    padding: 6px 9px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--muted);
}

.lang [aria-current] {
    background: var(--ink);
    color: var(--paper);
}

.lang a:hover {
    background: var(--sage-soft);
    color: var(--ink);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 4px;
    flex-basis: 100%;
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 600;
}

.nav a {
    padding: 6px 11px;
    white-space: nowrap;
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.nav a:hover {
    background: var(--sage-soft);
    color: var(--ink);
}

.nav a[aria-current="page"] {
    background: var(--theatre);
    color: #fff;
}

.menu-toggle {
    display: none;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border: 1px solid rgba(21, 32, 27, 0.2);
    border-radius: 999px;
    background: var(--sheet);
    color: var(--ink);
    font: 700 1rem/1 var(--display);
    cursor: pointer;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.menu-bars {
    position: relative;
}

.menu-bars::before,
.menu-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.menu-bars::before {
    top: -5px;
}

.menu-bars::after {
    top: 5px;
}

@media (min-width: 1080px) and (max-width: 1379px) {
    .call-label {
        display: none;
    }
}

@media (min-width: 1080px) {
    .top-row {
        flex-wrap: nowrap;
        gap: 10px 14px;
    }

    .nav {
        flex-basis: auto;
        order: 2;
        flex-wrap: nowrap;
    }

    .call {
        order: 3;
        margin-left: auto;
    }

    .lang {
        order: 4;
    }
}

@media (max-width: 1079px) {
    .js-menu .menu-toggle {
        display: inline-flex;
    }

    .js-menu .nav {
        display: none;
    }

    .js-menu .nav.is-open {
        display: flex;
        flex-direction: column;
        padding: 6px 0 10px;
    }

    .js-menu .nav.is-open a {
        padding: 10px 14px;
    }
}

@media (max-width: 560px) {
    .brand img {
        width: 150px;
    }

    .call-label {
        display: none;
    }

    .call {
        padding: 8px 13px;
    }

    .call {
        order: 5;
        flex-basis: 100%;
        justify-content: center;
        margin-left: 0;
        font-size: 1.15rem;
    }

    .lang {
        margin-left: auto;
    }
}

/* ---- buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
    line-height: 1.15;
    text-decoration: none;
    cursor: pointer;
    font-variant-numeric: lining-nums;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    background: var(--accent-deep);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -10px rgba(31, 110, 182, 0.7);
}

.btn-quiet {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 2px var(--ink);
}

.btn-quiet:hover {
    background: var(--ink);
    color: var(--paper);
    box-shadow: inset 0 0 0 2px var(--ink);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 24px;
}

/* ---- hero ---- */

.hero {
    position: relative;
    padding: clamp(28px, 5vw, 72px) 0 clamp(40px, 6vw, 88px);
    background:
        radial-gradient(60rem 30rem at 85% 0%, rgba(174, 197, 164, 0.55), transparent 70%),
        radial-gradient(40rem 26rem at 0% 100%, rgba(174, 197, 164, 0.28), transparent 70%),
        var(--paper);
    overflow: clip;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
}

.hero h1 {
    font-size: clamp(3.3rem, 1.6rem + 7vw, 7.6rem);
    font-weight: 820;
    line-height: 0.9;
    letter-spacing: -0.03em;
    margin-bottom: 0.32em;
}

.h1-small {
    display: block;
    font-size: 0.36em;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--sage-deep);
    margin-bottom: 0.18em;
}

.lead {
    font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
    line-height: 1.5;
    max-width: 34ch;
}

.hero-note {
    color: var(--muted);
    max-width: 52ch;
    font-size: 1rem;
}

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

/* the light box with the radiograph */

.film-box {
    width: 100%;
    max-width: 480px;
    justify-self: center;
    margin: 0;
    padding: 14px;
    border-radius: calc(var(--radius) + 8px);
    background: linear-gradient(160deg, #1d302a, var(--film) 60%);
    color: var(--bone);
    box-shadow: 0 30px 60px -30px rgba(10, 21, 19, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.film {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(233, 241, 236, 0.12);
}

.xray {
    display: block;
    width: 100%;
    height: auto;
}

.xray-bone path,
.xray-bone ellipse {
    fill: none;
    stroke: var(--bone-dim);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-opacity: 0.42;
    filter: blur(0.6px);
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.xray-implant path,
.xray-implant circle {
    stroke: #ffffff;
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.xr-cup,
.xr-liner {
    fill: none;
    stroke-width: 9 !important;
}

.xr-liner {
    stroke: #cfe3da !important;
    stroke-width: 6 !important;
    stroke-opacity: 0.8;
}

.xr-porous {
    fill: none;
    stroke-width: 3 !important;
    stroke-dasharray: 0.006 0.012 !important;
    stroke-opacity: 0.8;
}

.xr-head,
.xr-stem {
    fill: rgba(255, 255, 255, 0.9);
}

.xray-marks line {
    stroke: var(--accent-on-dark);
    stroke-width: 1.5;
}

.xray-marks circle {
    fill: var(--film);
    stroke: var(--accent-on-dark);
    stroke-width: 2;
}

.xray-marks text {
    fill: var(--bone);
    font: 700 15px/1 var(--display);
    text-anchor: middle;
}

.film-box figcaption {
    padding: 16px 10px 6px;
}

.xray-parts {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 8px 18px;
    font-size: 0.93rem;
    line-height: 1.45;
    color: var(--bone);
}

.xray-parts li {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 2px 8px;
    align-items: start;
}

.xray-parts strong {
    font-family: var(--display);
    font-size: 1.08rem;
    letter-spacing: 0.01em;
}

.xray-n {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--accent-on-dark);
    font: 700 0.85rem/1 var(--display);
}

.xray-more {
    display: inline-block;
    color: var(--accent-on-dark);
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.08rem;
}

.xray-more:hover {
    color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
    .xray-bone path,
    .xray-bone ellipse {
        stroke-dashoffset: 1;
        animation: xr-draw 1.6s cubic-bezier(0.6, 0, 0.3, 1) forwards;
    }

    .xray-bone :nth-child(2) { animation-delay: 0.15s; }
    .xray-bone :nth-child(3) { animation-delay: 0.3s; }
    .xray-bone :nth-child(4) { animation-delay: 0.4s; }
    .xray-bone :nth-child(5) { animation-delay: 0.5s; }
    .xray-bone :nth-child(6) { animation-delay: 0.25s; }
    .xray-bone :nth-child(7) { animation-delay: 0.45s; }

    .xray-implant path,
    .xray-implant circle {
        stroke-dashoffset: 1;
        fill-opacity: 0;
        animation:
            xr-draw 1.1s cubic-bezier(0.6, 0, 0.3, 1) forwards,
            xr-fill 0.6s ease forwards;
    }

    .xr-cup { animation-delay: 1.2s, 1.2s !important; }
    .xr-porous { animation-delay: 1.5s, 1.5s !important; }
    .xr-liner { animation-delay: 1.7s, 1.7s !important; }
    .xr-head { animation-delay: 2s, 2.8s !important; }
    .xr-stem { animation-delay: 2.3s, 3.2s !important; }

    .xr-porous {
        stroke-dashoffset: 0 !important;
        opacity: 0;
        animation: xr-show 0.6s ease 1.6s forwards !important;
    }

    .xray-marks g {
        opacity: 0;
        transform-box: fill-box;
        animation: xr-show 0.5s ease forwards;
    }

    .xray-marks g:nth-child(1) { animation-delay: 3.4s; }
    .xray-marks g:nth-child(2) { animation-delay: 3.55s; }
    .xray-marks g:nth-child(3) { animation-delay: 3.7s; }
    .xray-marks g:nth-child(4) { animation-delay: 3.85s; }

    .film {
        position: relative;
    }

    .film::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, transparent 0%, rgba(143, 195, 238, 0.22) 48%, rgba(233, 241, 236, 0.4) 50%, transparent 52%);
        background-size: 100% 220%;
        background-position: 0 -120%;
        animation: xr-scan 2.4s ease-in-out 0.2s 1 both;
        pointer-events: none;
    }
}

@keyframes xr-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes xr-fill {
    to { fill-opacity: 1; }
}

@keyframes xr-show {
    to { opacity: 1; }
}

@keyframes xr-scan {
    from { background-position: 0 -120%; }
    to { background-position: 0 220%; }
}

/* ---- bands ---- */

.band {
    padding: clamp(56px, 8vw, 112px) 0;
}

.band-sage {
    background: linear-gradient(180deg, var(--sage-soft), #d5e1cc);
}

.band-film {
    background:
        radial-gradient(50rem 24rem at 80% 0%, rgba(44, 74, 65, 0.9), transparent 70%),
        var(--film);
    color: var(--bone);
}

.band-film h2,
.band-film h3 {
    color: #fff;
}

.band-film a:not(.btn) {
    color: var(--accent-on-dark);
}

.band-film a:not(.btn):hover {
    color: #fff;
}

.section-head {
    max-width: 760px;
    margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head p:last-child {
    margin-bottom: 0;
}

.section-head-row {
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px 24px;
}

.section-head-row h2 {
    margin-bottom: 0;
}

.section-head-row > a {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.15rem;
}

/* consultation band */

.consult-band {
    position: relative;
    padding: clamp(48px, 7vw, 96px) 0;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 64px),
        linear-gradient(120deg, var(--theatre) 0%, var(--theatre-2) 60%, #13201b 100%);
    color: var(--bone);
}

.consult-band h2 {
    color: #fff;
    margin-bottom: 0.2em;
}

.consult-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px clamp(24px, 4vw, 56px);
    align-items: end;
}

.big-when {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.3em;
    margin: 0;
    font-family: var(--display);
    font-weight: 820;
    line-height: 0.9;
    letter-spacing: -0.02em;
    font-size: clamp(3rem, 1.6rem + 5vw, 6rem);
    color: var(--sage);
}

.big-when span:last-child {
    color: #fff;
}

.consult-where a,
.consult-band a:not(.big-phone) {
    color: var(--accent-on-dark);
}

.consult-where a:hover {
    color: #fff;
}

.consult-book-label {
    margin-bottom: 4px;
    color: var(--bone-dim);
    font-size: 0.95rem;
}

.big-phone {
    display: block;
    width: fit-content;
    font-family: var(--display);
    font-weight: 780;
    font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: 0.005em;
    color: #fff;
    text-decoration: none;
    border-bottom: 3px solid var(--accent-on-dark);
}

.big-phone:hover {
    color: var(--accent-on-dark);
}

.big-phone-2 {
    margin-top: 10px;
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    border-bottom-width: 2px;
}

.band .big-phone,
.card .big-phone {
    color: var(--ink);
    border-color: var(--accent);
}

.band .big-phone:hover,
.card .big-phone:hover {
    color: var(--accent);
}

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

/* numbered trail of the patient guides */

.trail {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 16px;
    counter-reset: trail;
}

.trail a {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    padding: 26px 24px 28px;
    border-radius: var(--radius);
    background: var(--sheet);
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--sage);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.trail a:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 2px 4px rgba(10, 21, 19, 0.06), 0 24px 40px -18px rgba(10, 21, 19, 0.35);
}

.trail strong {
    font-family: var(--display);
    font-size: 1.5rem;
    line-height: 1.08;
    font-weight: 740;
}

.trail span:last-child {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.5;
}

.trail-n {
    font-family: var(--display);
    font-weight: 820;
    font-size: 3.4rem;
    line-height: 0.85;
    color: var(--sage);
    letter-spacing: -0.03em;
}

.trail .trail-n {
    color: #6a8a5e;
}

.trail a:hover .trail-n {
    color: var(--accent);
}

/* duo: photo + card */

.duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
}

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

.portrait {
    margin: 0;
}

.portrait img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.work-card {
    padding: clamp(24px, 3.4vw, 40px);
    border-radius: var(--radius);
    background: var(--sheet);
    box-shadow: var(--shadow);
}

.facts {
    margin: 22px 0 0;
    display: grid;
    gap: 12px;
}

.facts div {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.facts dt {
    font-family: var(--display);
    font-weight: 700;
    color: var(--sage-deep);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.92rem;
    padding-top: 2px;
}

.facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 420px) {
    .facts div {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }
}

/* certificates */

.certs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.certs-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 300px);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 18px;
    scrollbar-color: var(--sage) transparent;
}

.certs-strip li {
    scroll-snap-align: start;
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 22px;
}

.cert {
    position: relative;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: var(--sheet);
    color: var(--ink);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.cert-scan {
    display: grid;
    place-items: center;
    height: 232px;
    padding: 16px;
    background: #e8ece4;
}

.cert-scan img {
    max-height: 200px;
    width: auto;
    object-fit: contain;
    box-shadow: 0 6px 16px -8px rgba(10, 21, 19, 0.5);
    transition: transform 0.3s;
}

.cert-scan:hover img {
    transform: scale(1.04);
}

.cert figcaption {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px 20px;
    font-size: 0.95rem;
    line-height: 1.45;
}

.cert strong {
    font-family: var(--display);
    font-size: 1.2rem;
    line-height: 1.12;
    font-weight: 720;
}

.cert-year {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--accent);
}

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

/* media teasers */

.media-teasers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 16px;
}

.media-teasers a {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--sheet);
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.25s;
}

.media-teasers a:hover {
    transform: translateY(-3px);
}

.media-teasers img {
    border-radius: var(--radius-s);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: 6px;
}

.media-teasers strong {
    font-family: var(--display);
    font-size: 1.35rem;
    line-height: 1.12;
    font-weight: 720;
}

.m-date {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--sage-deep);
}

/* ---- inner pages ---- */

.page-hero {
    padding: clamp(36px, 6vw, 84px) 0 clamp(30px, 4vw, 56px);
    background:
        radial-gradient(50rem 22rem at 90% 0%, rgba(174, 197, 164, 0.5), transparent 70%),
        var(--paper);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    font-size: clamp(2.6rem, 1.5rem + 4.4vw, 5.2rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.025em;
    max-width: 20ch;
}

.page-hero .lead {
    max-width: 60ch;
    margin-bottom: 0;
}

.crumbs {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 14px;
}

.crumbs a {
    color: var(--sage-deep);
}

.page-band {
    padding: clamp(40px, 6vw, 80px) 0;
}

.card {
    padding: clamp(22px, 3vw, 36px);
    border-radius: var(--radius);
    background: var(--sheet);
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem);
}

.card-film {
    background: linear-gradient(160deg, var(--film-2), var(--film));
    color: var(--bone);
}

.card-film h2,
.card-film h3 {
    color: #fff;
}

.card-film a:not(.btn) {
    color: var(--accent-on-dark);
}

.card-film a:not(.btn):hover {
    color: #fff;
}

.card-film .big-phone {
    color: #fff;
    border-color: var(--accent-on-dark);
}

.card-film .big-phone:hover {
    color: var(--accent-on-dark);
}

/* article (patient guides) */

.article-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}

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

.prose {
    max-width: 780px;
}

.prose h2 {
    font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem);
    margin-top: 1.6em;
    padding-top: 0.6em;
    border-top: 3px solid var(--sage);
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin-top: 1.4em;
    margin-bottom: 0.35em;
}

.prose ul,
.prose ol {
    padding-left: 1.3em;
    margin: 0 0 1.2em;
}

.prose li {
    margin-bottom: 0.45em;
}

.prose li::marker {
    color: var(--sage-deep);
}

.prose figure {
    margin: 1.6em 0;
}

.prose figure a {
    display: inline-block;
    border-radius: var(--radius-s);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
}

.prose figcaption,
.steps figcaption {
    margin-top: 8px;
    font-size: 0.92rem;
    color: var(--muted);
}

.note {
    margin: 1.4em 0;
    padding: 18px 22px;
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-s) var(--radius-s) 0;
    background: #e9f0f7;
}

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

.risks {
    display: grid;
    gap: 12px;
    margin: 1.2em 0;
    padding: 0;
    list-style: none;
}

.risks li {
    padding: 16px 18px;
    border-radius: var(--radius-s);
    background: var(--sheet);
    box-shadow: 0 0 0 1px var(--line);
}

.risks strong {
    display: block;
    font-family: var(--display);
    font-size: 1.2rem;
    line-height: 1.15;
    margin-bottom: 4px;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 14px;
    margin: 1.4em 0;
}

.stat {
    padding: 18px 20px;
    border-radius: var(--radius-s);
    background: var(--theatre);
    color: var(--bone);
}

.stat b {
    display: block;
    font-family: var(--display);
    font-size: 2.6rem;
    line-height: 1;
    font-weight: 820;
    color: #fff;
    margin-bottom: 6px;
}

.aside {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 16px;
}

.aside .card {
    padding: 22px;
}

.aside h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5em;
}

.toc {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1.35;
}

.toc li + li {
    margin-top: 8px;
}

@media (max-width: 960px) {
    .aside {
        position: static;
    }
}

/* rehab steps */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 16px;
    margin: 1.2em 0 1.6em;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps > li {
    counter-increment: step;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: var(--radius-s);
    background: var(--sheet);
    box-shadow: 0 0 0 1px var(--line);
}

.steps > li::before {
    content: counter(step, decimal-leading-zero);
    font-family: var(--display);
    font-weight: 820;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--accent);
}

.steps figure {
    margin: 0;
}

.steps figure a {
    display: grid;
    place-items: center;
    padding: 8px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line);
}

.steps img {
    max-height: 220px;
    width: auto;
}

.steps p {
    margin: 0;
    font-size: 0.98rem;
}

.pic-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 1em 0 1.4em;
    padding: 0;
    list-style: none;
}

.pic-row a {
    display: grid;
    place-items: center;
    padding: 8px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line);
}

.pic-row img {
    max-height: 200px;
    width: auto;
}

.dodont {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 1em 0 1.6em;
}

.dodont div {
    padding: 16px 18px;
    border-radius: var(--radius-s);
}

.dodont .no {
    background: #f7e9e6;
    box-shadow: inset 4px 0 0 #a63a2a;
}

.dodont .yes {
    background: #e6f0e1;
    box-shadow: inset 4px 0 0 #3d7a3a;
}

.dodont b {
    display: block;
    font-family: var(--display);
    font-size: 1.15rem;
    letter-spacing: 0.06em;
}

.dodont .no b {
    color: #8c2c1f;
}

.dodont .yes b {
    color: #2f6a2d;
}

/* guides index */

.guide-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
}

.guide-list a {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--sheet);
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.25s;
}

.guide-list a:hover {
    transform: translateY(-3px);
}

.guide-list img {
    border-radius: var(--radius-s);
    background: #fff;
    width: 100%;
    max-height: 170px;
    object-fit: contain;
}

.guide-list strong {
    display: block;
    font-family: var(--display);
    font-size: 1.7rem;
    line-height: 1.05;
    margin-bottom: 8px;
}

.guide-list span {
    color: var(--muted);
}

@media (max-width: 640px) {
    .guide-list a {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* media page: a timeline */

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 74px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(var(--sage), var(--sage-deep));
}

.timeline > li {
    position: relative;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 0 34px;
    padding-bottom: 34px;
}

.timeline > li::before {
    content: "";
    position: absolute;
    left: 68px;
    top: 10px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--paper);
    border: 3px solid var(--accent);
}

.t-year {
    font-family: var(--display);
    font-weight: 820;
    font-size: 1.6rem;
    line-height: 1.1;
    color: var(--sage-deep);
}

.t-item {
    padding: 22px 24px;
    border-radius: var(--radius);
    background: var(--sheet);
    box-shadow: var(--shadow);
}

.t-item h2 {
    font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem);
    margin-bottom: 0.35em;
}

.t-item .m-date {
    display: block;
    margin-bottom: 8px;
}

.t-item > p:last-child {
    margin-bottom: 0;
}

.t-media {
    float: right;
    width: min(42%, 300px);
    margin: 0 0 12px 20px;
}

.t-media a {
    display: block;
    border-radius: var(--radius-s);
    overflow: hidden;
}

.t-item details {
    clear: both;
    margin-top: 14px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.t-item summary {
    cursor: pointer;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.12rem;
    color: var(--accent);
}

.t-item details[open] summary {
    margin-bottom: 12px;
}

.t-item blockquote {
    margin: 0 0 1em;
    padding-left: 16px;
    border-left: 3px solid var(--sage);
}

.qa dt {
    font-weight: 700;
    margin-top: 1em;
}

.qa dd {
    margin: 0.3em 0 0;
}

@media (max-width: 640px) {
    .timeline::before {
        left: 6px;
    }

    .timeline > li {
        grid-template-columns: minmax(0, 1fr);
        padding-left: 30px;
    }

    .timeline > li::before {
        left: 0;
    }

    .t-media {
        float: none;
        width: 100%;
        margin: 0 0 12px;
    }
}

/* gallery */

.gallery {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.gallery li {
    grid-column: span 2;
}

.gallery li:nth-child(1),
.gallery li:nth-child(2) {
    grid-column: span 3;
}

.gallery figure {
    position: relative;
    margin: 0;
    height: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--film);
}

.gallery a {
    display: block;
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.4s;
}

.gallery a:hover img {
    transform: scale(1.04);
}

.gallery figcaption {
    padding: 12px 16px 14px;
    color: var(--bone);
    font-size: 0.95rem;
    line-height: 1.4;
}

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

    .gallery li,
    .gallery li:nth-child(1),
    .gallery li:nth-child(2) {
        grid-column: auto;
    }
}

/* links */

.links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
    gap: 14px;
}

.links li > a,
.links li > div {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 14px;
    border-radius: var(--radius-s);
    background: var(--sheet);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 0 0 1px var(--line);
}

.links li > a:hover {
    box-shadow: 0 0 0 2px var(--accent);
}

.links img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex: 0 0 auto;
}

.links strong {
    display: block;
    font-family: var(--display);
    font-size: 1.15rem;
    line-height: 1.1;
}

.links span {
    font-size: 0.88rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

/* contact */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

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

.contact-form {
    display: grid;
    gap: 14px;
}

.contact-form label {
    display: block;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #aab6ae;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 3px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.contact-form ul {
    margin: 4px 0 0;
    padding-left: 1.1em;
    color: #8c2c1f;
    font-size: 0.92rem;
}

.contact-form .btn {
    justify-self: start;
}

.form-hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.contact-sent {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: var(--radius-s);
    background: #e6f0e1;
}

.contact-sent strong {
    display: block;
}

.plain-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ---- footer ---- */

.foot {
    background: var(--film);
    color: var(--bone);
    padding: clamp(48px, 6vw, 80px) 0 28px;
    font-size: 0.97rem;
}

.foot a {
    color: var(--accent-on-dark);
}

.foot a:hover {
    color: #fff;
}

.foot h2 {
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 0.8em;
}

.foot-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
    gap: 32px;
}

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

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

.logo-plate {
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 16px;
}

.logo-plate img {
    width: 260px;
}

.foot-name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 4px;
}

.foot address {
    font-style: normal;
}

.foot-phone {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.25rem;
}

.foot-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.foot-nav li + li {
    margin-top: 4px;
}

.foot-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 24px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(233, 241, 236, 0.14);
    color: var(--bone-dim);
    font-size: 0.88rem;
}

.foot-bottom p {
    margin: 0;
}

/* ---- 404 ---- */

.not-found {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 16px;
    text-align: center;
    background:
        radial-gradient(40rem 22rem at 50% 0%, rgba(174, 197, 164, 0.6), transparent 70%),
        var(--paper);
}

.not-found > div {
    max-width: 560px;
}

.not-found .logo-plate {
    box-shadow: var(--shadow);
}

.not-found h1 {
    font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem);
    margin-top: 0.4em;
}

.not-found h2 {
    font-size: 1.8rem;
    margin-top: 1.4em;
}

/* ---- reveal on scroll ---- */

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .trail li,
        .media-teasers li,
        .timeline > li,
        .certs-grid li,
        .guide-list li {
            animation: rise linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 40%;
        }
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ---- lightbox: /js/lightbox.js opens a linked image enlarged over the page, in a <dialog> ----
   Paste this block into the site's css/site.css. The overlay is dark in every theme and brings its own
   colours and box sizing, so it does not depend on the rest of the stylesheet. To recolour it to the
   site, set these on .lightbox (or on :root): --lb-bg, --lb-text, --lb-accent (focus ring),
   --lb-accent-soft (hover). */

[data-lightbox] {
    cursor: zoom-in;
}

.lightbox,
.lightbox * {
    box-sizing: border-box;
}

html:has(.lightbox[open]) {
    overflow: hidden;
    scrollbar-gutter: stable;
}

.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 68px 12px 14px;
    border: 0;
    background: var(--lb-bg, rgba(12, 14, 16, 0.95));
    color: var(--lb-text, #f2f2f2);
    color-scheme: dark;
    overscroll-behavior: contain;
}

.lightbox[open] {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
}

.lightbox::backdrop {
    background: none;
}

.lightbox-stage {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.lightbox-stage img {
    display: block;
    max-width: none;
    border-radius: 4px;
    background: #fff;
}

.lightbox-caption {
    display: grid;
    place-items: center;
    min-height: 44px;
    max-width: none;
    margin: 0;
    padding: 0 56px;
    color: var(--lb-text, #f2f2f2);
    font-size: 0.92rem;
    line-height: 1.35;
    text-align: center;
}

.lightbox-button {
    position: absolute;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 20px no-repeat;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lightbox-button:hover {
    border-color: #ffffff;
    background-color: var(--lb-accent-soft, rgba(255, 255, 255, 0.16));
}

.lightbox-button:focus-visible {
    outline: 3px solid var(--lb-accent, #ffffff);
    outline-offset: 3px;
    border-radius: 50%;
}

.lightbox-button[hidden] {
    display: none;
}

.lightbox-close {
    top: 12px;
    right: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

.lightbox-prev,
.lightbox-next {
    bottom: 14px;
}

.lightbox-prev {
    left: 12px;
    rotate: 180deg;
}

.lightbox-next {
    right: 12px;
}

@media (min-width: 760px) {
    .lightbox {
        padding: 24px 84px 18px;
    }

    .lightbox-caption {
        padding: 0;
    }

    .lightbox-prev,
    .lightbox-next {
        top: calc(50% - 22px);
        bottom: auto;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next,
    .lightbox-close {
        right: 20px;
    }

    .lightbox-close {
        top: 20px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .lightbox[open] {
        animation: lightbox-in 0.2s ease;
    }
}

@keyframes lightbox-in {
    from {
        opacity: 0;
    }
}

/* ---- additions ---- */

.facts-on-dark div {
    border-top-color: rgba(233, 241, 236, 0.16);
}

.facts-on-dark dt {
    color: var(--sage);
}

.big-phone-line {
    margin-bottom: 10px;
}

.links li > a > span,
.links li > div > span {
    display: block;
}

.t-media-small {
    width: min(30%, 150px);
}

.note-plain {
    margin-top: 28px;
    color: var(--muted);
}

.prose .steps,
.prose .pic-row,
.prose .risks,
.prose .guide-list {
    padding-left: 0;
}

.prose .steps > li,
.prose .risks li {
    margin-bottom: 0;
}

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

.card .facts + h3 {
    margin-top: 1.4em;
}
