/* Dental Studio Perfect: the two rooms of the studio (plum chairs, lime chairs, white walls), the teal of the
   logo, and a rubber dam as the signature of the home page. One light theme. Design notes: CONTENT_SOURCE.md. */

@font-face {
    font-family: 'Philosopher';
    src: url('/fonts/philosopher-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Gothic A1 draws the hyphen as wide as a digit: U+002D and U+2010 come from the system sans instead. */
@font-face {
    font-family: 'Gothic A1';
    src: url('/fonts/gothic-a1.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-002C, U+002E-007E, U+00A0-00FF, U+0400-045F, U+2011-2026, U+2030, U+2039-203A, U+20AC, U+2116, U+2122;
}

@font-face {
    font-family: 'Gothic A1';
    src: url('/fonts/gothic-a1-semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-002C, U+002E-007E, U+00A0-00FF, U+0400-045F, U+2011-2026, U+2030, U+2039-203A, U+20AC, U+2116, U+2122;
}

:root {
    --paper: #fbf9f6;
    --sheet: #ffffff;
    --ink: #24121f;
    --muted: #5e4a59;
    --line: #e7dfe4;
    --plum: #7f466c;
    --plum-deep: #4a1d3a;
    --plum-night: #2a1022;
    --plum-wash: #f4ebf0;
    --on-plum: #f7eef3;
    --on-plum-muted: #e2cfda;
    --lime: #a6bd41;
    --lime-light: #c3d66a;
    --lime-deep: #55701b;
    --lime-wash: #eef3dc;
    --teal: #03a7ca;
    --teal-deep: #00708a;
    --radius: 22px;
    --radius-s: 14px;
    --shadow: 0 1px 2px rgba(42, 16, 34, 0.06), 0 12px 32px -12px rgba(42, 16, 34, 0.22);
    --display: 'Philosopher', 'Gothic A1', Georgia, serif;
    --text: 'Gothic A1', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --lb-bg: rgba(26, 8, 21, 0.94);
    --lb-text: #f7eef3;
    --lb-accent: #c3d66a;
    --lb-accent-soft: rgba(195, 214, 106, 0.18);
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1.0625rem/1.65 var(--text);
    overflow-wrap: break-word;
}

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

a {
    color: var(--teal-deep);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--plum);
}

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

h1,
h2,
h3 {
    margin: 0 0 0.5em;
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.5rem, 1.5rem + 4.2vw, 4.6rem);
}

h2 {
    font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.9rem);
}

h3 {
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}

p {
    margin: 0 0 1em;
}

.wrap {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 36px);
}

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

.skip {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 0 0 10px 10px;
    background: var(--plum-deep);
    color: #fff;
}

.skip:focus {
    top: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--plum);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: '';
    width: 28px;
    height: 4px;
    border-radius: 4px;
    background: var(--lime);
}

.lead {
    max-width: 62ch;
    color: var(--muted);
    font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--plum);
    color: #fff;
    font: 600 1rem/1.2 var(--text);
    font-variant-numeric: lining-nums tabular-nums;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

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

.btn svg {
    flex: none;
}

.btn-lime {
    background: var(--lime);
    color: var(--plum-night);
}

.btn-lime:hover {
    background: var(--lime-light);
    color: var(--plum-night);
}

.btn-ghost {
    border-color: currentColor;
    background: transparent;
    color: var(--plum);
}

.btn-ghost:hover {
    background: var(--plum);
    border-color: var(--plum);
    color: #fff;
}

.on-dark .btn-ghost {
    color: var(--on-plum);
}

.on-dark .btn-ghost:hover {
    background: var(--on-plum);
    border-color: var(--on-plum);
    color: var(--plum-deep);
}

.more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    text-decoration: none;
}

.more::after {
    content: '→';
    transition: transform 0.2s ease;
}

.more:hover::after {
    transform: translateX(4px);
}

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

.top {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(127, 70, 108, 0.14);
    background: rgba(251, 249, 246, 0.9);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
}

.top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    min-height: 72px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.brand {
    display: block;
    margin-right: auto;
    line-height: 0;
}

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

.call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    order: 3;
    min-height: 44px;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--plum);
    color: #fff;
    font-weight: 600;
    font-variant-numeric: lining-nums tabular-nums;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.call:hover {
    background: var(--plum-deep);
    color: #fff;
}

.lang {
    display: flex;
    order: 4;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.lang a,
.lang span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 36px;
    padding: 0 8px;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
}

.lang span {
    background: var(--plum-wash);
    color: var(--plum-deep);
}

.lang a:hover {
    color: var(--plum);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    order: 2;
    gap: 2px;
}

.nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.97rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav a:hover {
    background: var(--plum-wash);
    color: var(--plum-deep);
}

.nav a[aria-current] {
    color: var(--plum-deep);
}

.nav a[aria-current]::after {
    content: '';
    position: absolute;
    right: 12px;
    bottom: 6px;
    left: 12px;
    height: 3px;
    border-radius: 3px;
    background: var(--lime);
}

.menu-toggle {
    display: none;
    order: 5;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--sheet);
    cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    border-radius: 2px;
    background: var(--plum-deep);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.menu-toggle span {
    position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
}

.menu-toggle span::before {
    top: -6px;
}

.menu-toggle span::after {
    top: 6px;
}

.menu-toggle[aria-expanded='true'] span {
    background: transparent;
}

.menu-toggle[aria-expanded='true'] span::before {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded='true'] span::after {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1099px) {
    .nav {
        order: 6;
        flex-basis: 100%;
        justify-content: center;
    }

    .has-menu .menu-toggle:not([hidden]) {
        display: block;
    }

    .has-menu .nav {
        display: none;
        flex-direction: column;
        padding: 6px 0 12px;
    }

    .has-menu .nav.is-open {
        display: flex;
    }

    .has-menu .nav a {
        justify-content: center;
        font-size: 1.05rem;
    }
}

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

    .call {
        padding: 8px 14px;
        font-size: 0.92rem;
    }

    .call svg {
        display: none;
    }

    .lang a,
    .lang span {
        min-width: 34px;
        padding: 0 6px;
    }
}

@media (max-width: 420px) {
    .top-row {
        gap: 8px 6px;
    }

    .brand img {
        height: 40px;
    }

    .call {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .lang {
        padding: 2px;
    }

    .lang a,
    .lang span {
        min-width: 30px;
        padding: 0 4px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 380px) {
    .brand img {
        height: 34px;
    }

    .call {
        padding: 8px 9px;
        font-size: 0.76rem;
    }
}

/* ---- home hero: the plum room ---- */

.hero {
    position: relative;
    overflow: clip;
    background:
        radial-gradient(60% 70% at 85% 30%, rgba(166, 189, 65, 0.22), transparent 70%),
        radial-gradient(50% 60% at 10% 100%, rgba(3, 167, 202, 0.16), transparent 70%),
        linear-gradient(160deg, var(--plum) 0%, var(--plum-deep) 52%, var(--plum-night) 100%);
    color: var(--on-plum);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: clamp(20px, 4vw, 56px);
    padding-top: clamp(40px, 7vw, 96px);
    padding-bottom: clamp(48px, 7vw, 96px);
}

.hero .eyebrow {
    color: var(--lime-light);
}

.hero h1 {
    margin-bottom: 22px;
    color: #fff;
}

.hero h1 em {
    color: var(--lime-light);
    font-style: normal;
}

.hero .lead {
    color: var(--on-plum-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0 0;
}

/* The three doctors side by side, the middle one raised, on the lime of the wall rail; names on the photos. */
.hero-team {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(8px, 1.4vw, 16px);
    margin: 0 14px 14px 0;
    padding: 28px 0 0;
    list-style: none;
}

.hero-team::before {
    content: '';
    position: absolute;
    right: -14px;
    bottom: -14px;
    left: 18px;
    height: 50%;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--lime-light), var(--lime) 55%, var(--lime-deep));
}

.hero-team li {
    position: relative;
}

.hero-team li:nth-child(2) {
    transform: translateY(-28px);
}

.hero-team a {
    position: relative;
    display: block;
    color: #fff;
    text-decoration: none;
}

.hero-team img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 5;
    border-radius: var(--radius-s);
    object-fit: cover;
    box-shadow: 0 24px 48px -20px rgba(16, 4, 12, 0.7);
    transition: transform 0.3s ease;
}

.hero-team span {
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    padding: 6px 10px;
    border-radius: var(--radius-s);
    background: rgba(42, 16, 34, 0.88);
    font-size: 0.86rem;
    line-height: 1.3;
}

@media (max-width: 560px) {
    .hero-team span {
        right: 6px;
        bottom: 6px;
        left: 6px;
        padding: 4px 8px;
        border-radius: 10px;
        font-size: 0.74rem;
    }
}

.hero-team a:hover img {
    transform: translateY(-4px);
}

.hero-team a:hover span {
    background: var(--plum-deep);
    color: var(--lime-light);
}

.dam {
    display: block;
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 0 auto;
    overflow: visible;
}

.dam-shadow {
    fill: rgba(16, 4, 12, 0.35);
    filter: blur(10px);
}

.dam-dot {
    fill: rgba(42, 16, 34, 0.2);
}

.dam-rim {
    fill: none;
    stroke: rgba(42, 16, 34, 0.25);
    stroke-width: 1.5;
}

.dam-hole,
.dam-dot,
.dam-rim {
    transform-box: fill-box;
    transform-origin: center;
}

.dam-tooth .dam-clamp,
.dam-tooth .dam-clamp-jaw {
    fill: none;
    stroke: #cfd6dc;
    stroke-width: 4;
    stroke-linecap: round;
}

.dam-tooth .dam-clamp-jaw {
    stroke-width: 6;
}

.dam-frame {
    fill: none;
    stroke: #eef0f2;
    stroke-width: 12;
    stroke-linecap: round;
    filter: drop-shadow(0 4px 6px rgba(16, 4, 12, 0.35));
}

.dam-pins circle {
    fill: #cfd6dc;
    stroke: #eef0f2;
    stroke-width: 3;
}

/* The lime rail of the studio's wall, under the hero. */
.rail {
    height: 14px;
    background: linear-gradient(90deg, var(--lime-deep), var(--lime) 30%, var(--lime-light) 70%, var(--lime));
}

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

    .hero-team {
        max-width: 560px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .dam-frame {
        stroke-dasharray: 1;
        animation: dam-draw 1.1s cubic-bezier(0.6, 0, 0.2, 1) both;
    }

    .dam-sheet {
        transform-origin: 260px 270px;
        animation: dam-stretch 1s cubic-bezier(0.3, 1.5, 0.5, 1) 0.45s both;
    }

    .dam-pins circle {
        animation: fade-in 0.4s ease 0.9s both;
    }

    .dam-dot {
        animation: pop 0.35s ease calc(1.2s + var(--i) * 0.05s) both;
    }

    .dam-hole,
    .dam-rim {
        animation: pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1) calc(1.75s + var(--i) * 0.12s) both;
    }

    .dam-tooth {
        animation: rise 0.8s cubic-bezier(0.2, 1.3, 0.4, 1) 2.2s both;
    }

    .hero-copy > * {
        animation: copy-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
    .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
    .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
    .hero-copy > :nth-child(5) { animation-delay: 0.32s; }

    /* dam.js holds the opening of the dam until its section comes into view. */
    .dam-panel.is-waiting .dam * {
        animation-play-state: paused;
    }
}

@keyframes dam-draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

@keyframes dam-stretch {
    from { opacity: 0; transform: scale(0.7, 0.62); }
    to { opacity: 1; transform: none; }
}

@keyframes pop {
    from { transform: scale(0); }
    to { transform: none; }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(46px); }
    to { opacity: 1; transform: none; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes copy-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

/* ---- inner page hero ---- */

.page-hero {
    position: relative;
    overflow: clip;
    padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 5vw, 60px);
    background:
        radial-gradient(40% 90% at 100% 0%, rgba(166, 189, 65, 0.28), transparent 70%),
        linear-gradient(180deg, var(--plum-wash), var(--paper));
}

.page-hero::after {
    content: '';
    position: absolute;
    right: clamp(-80px, -4vw, -20px);
    bottom: -120px;
    width: clamp(220px, 30vw, 420px);
    aspect-ratio: 1;
    border: 14px solid rgba(127, 70, 108, 0.1);
    border-radius: 50%;
    box-shadow: inset 0 0 0 26px rgba(166, 189, 65, 0.12);
    pointer-events: none;
}

.page-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 18ch;
    color: var(--plum-deep);
}

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

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

/* Breadcrumbs on the sub-pages of the articles and the cases. */
.crumbs ol {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.crumbs li + li::before {
    content: '/';
    margin: 0 10px;
    color: var(--lime-deep);
}

.crumbs a {
    color: var(--plum);
    text-decoration: none;
}

.crumbs a:hover {
    text-decoration: underline;
}

/* ---- sections ---- */

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

.band-tight {
    padding: clamp(36px, 5vw, 64px) 0;
}

.band-white {
    background: var(--sheet);
}

.band-wash {
    background: var(--lime-wash);
}

.band-plum {
    background: linear-gradient(160deg, var(--plum-deep), var(--plum-night));
    color: var(--on-plum);
}

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

.band-plum .eyebrow {
    color: var(--lime-light);
}

.band-plum .lead,
.band-plum p {
    color: var(--on-plum-muted);
}

.band-plum a:not(.btn) {
    color: var(--lime-light);
}

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

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px 32px;
    margin-bottom: clamp(26px, 4vw, 44px);
}

.section-head h2 {
    max-width: 20ch;
    margin: 0;
}

.section-head p {
    max-width: 52ch;
    margin: 0;
    color: var(--muted);
}

/* The route strip: where the studio is and how to get there. */
.route {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    gap: clamp(20px, 3vw, 40px);
    align-items: center;
}

.route-address {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.1rem);
    line-height: 1.15;
    color: var(--plum-deep);
}

.route-address small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-family: var(--text);
    font-size: 1rem;
}

.route-line {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.route-line li {
    position: relative;
    padding: 18px 18px 16px;
    border-radius: var(--radius-s);
    background: var(--sheet);
    box-shadow: var(--shadow);
}

.route-line strong {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.route-stops {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    font-weight: 600;
    font-variant-numeric: lining-nums;
    white-space: nowrap;
}

.stop-bus {
    background: var(--plum);
    color: #fff;
}

.stop-trolley {
    background: var(--teal-deep);
    color: #fff;
}

.stop-poly {
    background: var(--lime);
    color: var(--plum-night);
}

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

    .route-line li:last-child {
        grid-column: 1 / -1;
    }
}

/* Services as a bento. */
.bento {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bento li {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 150px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--sheet);
    overflow: clip;
}

.bento li::before {
    content: attr(data-n);
    margin-bottom: auto;
    padding-bottom: 14px;
    color: var(--plum);
    font-family: var(--display);
    font-size: 0.95rem;
    opacity: 0.7;
}

.bento h3 {
    margin: 0;
    font-size: clamp(1.2rem, 0.95rem + 0.75vw, 1.6rem);
    color: var(--plum-deep);
}

.bento p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.bento .tile-wide {
    grid-column: span 2;
}

.bento .tile-plum {
    border-color: transparent;
    background: linear-gradient(150deg, var(--plum), var(--plum-deep));
}

.bento .tile-plum::before,
.bento .tile-plum h3 {
    color: #fff;
}

.bento .tile-plum p {
    color: var(--on-plum-muted);
}

.bento .tile-lime {
    border-color: transparent;
    background: var(--lime);
}

.bento .tile-lime::before,
.bento .tile-lime h3,
.bento .tile-lime p {
    color: var(--plum-night);
}

.bento .tile-lime a {
    color: var(--plum-night);
}

.bento .tile-photo {
    padding: 0;
    min-height: 220px;
    background: var(--plum-deep);
}

.bento .tile-photo::before {
    content: none;
}

.bento .tile-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

@media (max-width: 520px) {
    .bento {
        gap: 10px;
    }

    .bento li {
        min-height: 0;
        padding: 14px 16px 16px;
        border-radius: var(--radius-s);
    }

    .bento li::before {
        padding-bottom: 10px;
    }

    .bento h3 {
        font-size: 1.05rem;
        hyphens: auto;
    }

}

/* The doctors. */
.doctors {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2.4vw, 28px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.doctor {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: var(--sheet);
    box-shadow: var(--shadow);
    overflow: clip;
}

.doctor-photo {
    position: relative;
    flex: none;
    aspect-ratio: 4 / 3;
    background: var(--plum-wash);
}

.doctor-photo img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 62%;
}

.doctor-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px 22px 24px;
}

.doctor-role {
    margin: 0 0 6px;
    color: var(--lime-deep);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.doctor h2,
.doctor h3 {
    margin-bottom: 10px;
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}

.doctor h2 a,
.doctor h3 a {
    color: var(--plum-deep);
    text-decoration: none;
}

.doctor h2 a::after,
.doctor h3 a::after {
    content: ' →';
    color: var(--lime-deep);
}

.doctor h2 a:hover,
.doctor h3 a:hover {
    color: var(--plum);
    text-decoration: underline;
}

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

.doctor .doctor-phone {
    margin-top: auto;
    margin-bottom: 0;
}

.doctor-phone a {
    font-weight: 600;
    font-variant-numeric: lining-nums tabular-nums;
}

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

    .doctor {
        display: grid;
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    }

    .doctor-photo {
        aspect-ratio: auto;
        min-height: 100%;
    }
}

@media (max-width: 520px) {
    .doctor {
        display: flex;
    }

    .doctor-photo {
        aspect-ratio: 4 / 3;
        min-height: 0;
    }
}

/* The numbered reasons for the rubber dam. */
.dam-why {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(24px, 4vw, 60px);
    align-items: start;
}

.dam-why-art {
    position: sticky;
    top: 100px;
}

/* The drawn dam on a piece of the plum hero; the photo of the real one overlaps its corner. */
.dam-panel {
    padding: clamp(20px, 4vw, 40px) clamp(20px, 4vw, 40px) clamp(64px, 9vw, 96px);
    border-radius: var(--radius);
    background:
        radial-gradient(60% 70% at 85% 20%, rgba(166, 189, 65, 0.22), transparent 70%),
        linear-gradient(160deg, var(--plum) 0%, var(--plum-deep) 55%, var(--plum-night) 100%);
}

.dam-panel .dam {
    max-width: 380px;
}

.dam-why-photo {
    position: relative;
    width: 64%;
    margin: clamp(-56px, -7vw, -40px) 0 0 auto;
    margin-right: -10px;
}

.dam-why-photo a {
    display: block;
}

.dam-why-photo img {
    display: block;
    width: 100%;
    border: 6px solid var(--lime-wash);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.dam-why-photo figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

.trail {
    counter-reset: trail;
    margin: 0;
    padding: 0;
    list-style: none;
}

.trail li {
    position: relative;
    counter-increment: trail;
    padding: 0 0 22px 66px;
}

.trail li::before {
    content: counter(trail, decimal-leading-zero);
    position: absolute;
    top: -4px;
    left: 0;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--plum);
    color: #fff;
    font-family: var(--display);
    font-size: 1.05rem;
}

.trail li::after {
    content: '';
    position: absolute;
    top: 46px;
    bottom: 2px;
    left: 22px;
    width: 2px;
    background: repeating-linear-gradient(180deg, var(--lime-deep) 0 6px, transparent 6px 12px);
}

.trail li:last-child::after {
    content: none;
}

.trail strong {
    display: block;
    margin-bottom: 4px;
    color: var(--plum-deep);
    font-size: 1.08rem;
}

.trail p {
    margin: 0;
    color: var(--muted);
}

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

    .dam-why-art {
        position: static;
        max-width: 520px;
    }

    .dam-why-photo {
        margin-right: 0;
    }
}

/* A sideways strip of photos. */
.strip {
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 4px clamp(16px, 4vw, 36px) 18px;
    overflow-x: auto;
    list-style: none;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: clamp(16px, 4vw, 36px);
    scrollbar-color: rgba(127, 70, 108, 0.45) transparent;
    scrollbar-width: thin;
}

.strip li {
    position: relative;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.strip a {
    display: block;
    border-radius: var(--radius-s);
    overflow: clip;
}

.strip img {
    display: block;
    width: auto;
    height: clamp(220px, 34vw, 380px);
    transition: transform 0.4s ease;
}

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

/* Cards that open the sub-pages of the articles and the cases: the title's link covers the whole card. */
.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cards li {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--sheet);
    border: 1px solid var(--line);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cards li:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.cards h2 a::after,
.cards h3 a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.cards .card-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    margin: 0 0 18px;
    border-radius: var(--radius-s);
    object-fit: cover;
}

.cards .card-meta {
    margin: auto 0 0;
    padding-top: 6px;
    color: var(--lime-deep);
    font-size: 0.85rem;
    font-weight: 600;
}

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

.cards .card-kicker {
    margin: 0 0 12px;
    color: var(--lime-deep);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cards h2,
.cards h3 {
    font-size: 1.25rem;
}

.cards h2 a,
.cards h3 a {
    color: var(--plum-deep);
    text-decoration: none;
}

.cards h2 a:hover,
.cards h3 a:hover {
    color: var(--plum);
    text-decoration: underline;
}

.cards p {
    color: var(--muted);
    font-size: 0.95rem;
}

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

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

/* The call band, lime. */
.call-band {
    position: relative;
    overflow: clip;
    padding: clamp(44px, 6vw, 80px) 0;
    background: var(--lime);
    color: var(--plum-night);
}

.call-band::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -6%;
    width: clamp(260px, 36vw, 520px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 65%);
    pointer-events: none;
}

.call-band h2 {
    position: relative;
    max-width: 22ch;
    color: var(--plum-night);
}

.call-band p {
    position: relative;
    max-width: 60ch;
}

.phones {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.phones li {
    container-type: inline-size;
}

.phones a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 100%;
    padding: 18px 20px;
    border-radius: var(--radius-s);
    background: var(--plum-deep);
    color: var(--on-plum-muted);
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.phones a:hover {
    background: var(--plum-night);
    color: var(--on-plum-muted);
    transform: translateY(-2px);
}

.phones span {
    font-size: 0.92rem;
}

.phones strong {
    color: #fff;
    font-family: var(--display);
    font-size: clamp(1.05rem, 9.5cqi, 1.9rem);
    font-variant-numeric: lining-nums;
    line-height: 1.1;
    white-space: nowrap;
}

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

/* ---- services page ---- */

.service-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: svc;
}

.service-list li {
    counter-increment: svc;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    border-radius: var(--radius-s);
    background: var(--sheet);
    border: 1px solid var(--line);
    font-weight: 600;
    color: var(--plum-deep);
}

.service-list li::before {
    content: counter(svc);
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--lime-wash);
    color: var(--lime-deep);
    font-family: var(--display);
}

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

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

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

.split figure {
    margin: 0;
}

.split img {
    display: block;
    width: 100%;
    border-radius: var(--radius);
}

.split figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.nzok {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: clamp(22px, 3vw, 34px);
    border-radius: var(--radius);
    background: var(--lime);
    color: var(--plum-night);
}

.nzok-mark {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--plum-deep);
    color: #fff;
    font-family: var(--display);
    font-size: 1.2rem;
}

.nzok h2 {
    margin-bottom: 6px;
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
}

.nzok p {
    margin: 0;
}

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

/* ---- team page ---- */

.profile {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    gap: clamp(24px, 4vw, 60px);
    align-items: start;
}

.profile + .profile {
    margin-top: clamp(56px, 8vw, 100px);
    padding-top: clamp(56px, 8vw, 100px);
    border-top: 1px solid var(--line);
}

.profile-photo {
    position: sticky;
    top: 100px;
    margin: 0;
}

.profile-photo a {
    display: block;
}

.profile-photo img {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.profile-photo figcaption {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.profile h2 {
    margin-top: 1.2em;
    color: var(--plum-deep);
    font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
}

.profile .doctor-role {
    font-size: 0.85rem;
}

.profile-phone {
    display: inline-flex;
    margin-bottom: 20px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.tags li {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--plum-wash);
    color: var(--plum-deep);
    font-size: 0.9rem;
    font-weight: 600;
}

.courses {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    border-left: 3px solid var(--lime);
}

.courses li {
    position: relative;
    padding: 0 0 14px 22px;
}

.courses li::before {
    content: '';
    position: absolute;
    top: 9px;
    left: -8px;
    width: 13px;
    height: 13px;
    border: 3px solid var(--lime);
    border-radius: 50%;
    background: var(--paper);
}

.courses time,
.courses .when {
    display: block;
    color: var(--lime-deep);
    font-size: 0.88rem;
    font-weight: 600;
}

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

    .profile-photo {
        position: static;
        max-width: 420px;
    }

    .profile-photo img {
        aspect-ratio: 4 / 3;
        object-fit: cover;
        object-position: 50% 60%;
    }
}

/* ---- documents: a carousel. The strip is swiped, scrolled or moved with the keyboard, and every scan
   opens at full size. /js/carousel.js adds the arrows and the markers and the scrollbar is then hidden;
   without the script the scrollbar stays. ---- */

.docs {
    margin-top: clamp(28px, 4vw, 44px);
}

.docs h3 {
    margin: 0;
    color: var(--plum-deep);
}

.doc-list {
    display: flex;
    gap: clamp(14px, 2vw, 22px);
    margin: 0 -4px;
    padding: 4px 4px 16px;
    overflow-x: auto;
    list-style: none;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    scrollbar-color: rgba(127, 70, 108, 0.45) transparent;
    scrollbar-width: thin;
}

.doc-list:focus-visible {
    outline-offset: -3px;
}

.doc-list > li {
    flex: 0 0 min(76%, 300px);
    scroll-snap-align: start;
}

.doc-list figure {
    margin: 0;
}

.doc-list a {
    display: block;
}

.doc-list img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: contain;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--sheet);
}

.doc-list p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.doc-list strong {
    display: block;
    margin-bottom: 2px;
    color: var(--ink);
}

.doc-note {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.875rem;
}

@media (prefers-reduced-motion: no-preference) {
    .doc-list,
    .strip {
        scroll-behavior: smooth;
    }
}

/* The controls that /js/carousel.js adds: arrows beside the heading, one marker per document below. */

.has-carousel-controls {
    position: relative;
}

.has-carousel-controls > :first-child {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 14px;
    padding-right: 110px;
}

.has-carousel-controls > .doc-list {
    padding-bottom: 4px;
    scrollbar-width: none;
}

.has-carousel-controls > .doc-list::-webkit-scrollbar {
    display: none;
}

.carousel-nav {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 10px;
}

.carousel-arrow {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a1d3a' 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, opacity 0.2s ease;
}

.carousel-prev {
    rotate: 180deg;
}

.carousel-arrow:hover {
    border-color: var(--plum);
    background-color: var(--plum-wash);
}

.carousel-arrow[aria-disabled='true'] {
    opacity: 0.35;
    cursor: default;
}

.carousel-markers {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 10px;
}

.carousel-marker {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.carousel-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(127, 70, 108, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, background-color 0.2s ease;
}

.carousel-marker[aria-current='true']::before {
    width: 18px;
    border-radius: 4px;
    background: var(--plum);
}

/* ---- cases page ---- */

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

.case-grid figure {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--sheet);
}

.case-grid a {
    display: grid;
    place-items: center;
    flex: 1;
    min-height: 180px;
}

.case-grid img {
    display: block;
    max-height: 300px;
    width: auto;
    border-radius: 8px;
}

.case-grid figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

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

.surgery > li {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(16px, 3vw, 40px);
    padding: clamp(22px, 3vw, 34px) 0;
    border-top: 1px solid var(--line);
}

.surgery h2 {
    color: var(--plum-deep);
    font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
}

.surgery .fig-note {
    color: var(--muted);
    font-size: 0.92rem;
}

.figs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.figs figure {
    margin: 0;
}

.figs a {
    display: block;
    border-radius: 10px;
    overflow: clip;
    background: #111;
}

.figs img {
    display: block;
    width: auto;
    height: 150px;
}

.figs figcaption {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.85rem;
}

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

    .figs img {
        height: 120px;
    }
}

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

.case-steps figure {
    margin: 0;
    padding: 12px;
    border-radius: var(--radius-s);
    background: var(--sheet);
    border: 1px solid var(--line);
    height: 100%;
}

.case-steps a {
    display: grid;
    place-items: center;
    min-height: 170px;
    border-radius: 8px;
    background: #111;
    overflow: clip;
}

.case-steps img {
    display: block;
    max-height: 200px;
    width: auto;
}

.case-steps figcaption {
    margin-top: 10px;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--muted);
}

.case-steps figcaption strong {
    color: var(--plum-deep);
}

/* ---- gallery ---- */

.gallery {
    columns: 3 280px;
    column-gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gallery li {
    break-inside: avoid;
    margin-bottom: 14px;
}

.gallery a {
    display: block;
    border-radius: var(--radius-s);
    overflow: clip;
}

.gallery img {
    display: block;
    width: 100%;
    transition: transform 0.4s ease;
}

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

/* ---- articles ---- */

.toc {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.toc a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--sheet);
    border: 1px solid var(--line);
    color: var(--plum-deep);
    font-weight: 600;
    text-decoration: none;
}

.toc a:hover {
    border-color: var(--plum);
    color: var(--plum);
}

/* The links to the other sub-pages of a section, under the section's heading. */
.section-head + .toc {
    margin-top: 0;
}

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

.article h2 {
    margin-top: 1.4em;
    color: var(--plum);
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}

.article-meta {
    color: var(--lime-deep);
    font-size: 0.9rem;
    font-weight: 600;
}

.prose {
    max-width: 68ch;
}

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

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

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

.aside-figs {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.aside-figs figure {
    margin: 0;
}

.aside-figs a {
    display: block;
}

.aside-figs img {
    display: block;
    width: 100%;
    border-radius: var(--radius-s);
}

.aside-figs figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

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

    .aside-figs {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    }
}

/* ---- contact ---- */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 40px);
    align-items: start;
}

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

.panel h2 {
    color: var(--plum-deep);
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.contact-list {
    margin: 0;
}

.contact-list > div {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.contact-list dt {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-list dd {
    margin: 4px 0 0;
}

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

.contact-phones li {
    container-type: inline-size;
}

.contact-phones a {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 14px;
    padding: 14px 18px;
    border-radius: var(--radius-s);
    background: var(--plum-wash);
    color: var(--plum-deep);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.contact-phones a:hover {
    background: #ead9e3;
    color: var(--plum-deep);
}

.contact-phones span {
    font-weight: 600;
}

.contact-phones strong {
    font-family: var(--display);
    font-size: clamp(1.2rem, 8cqi, 1.6rem);
    font-variant-numeric: lining-nums;
    white-space: nowrap;
}

.photo-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.photo-pair figure {
    margin: 0;
}

.photo-pair a {
    display: block;
}

.photo-pair img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-s);
}

.photo-pair figcaption {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.86rem;
}

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

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

.contact-form > div {
    display: grid;
    gap: 6px;
}

.contact-form label {
    font-weight: 600;
    color: var(--plum-deep);
}

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

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--plum);
    outline: 3px solid rgba(127, 70, 108, 0.25);
    outline-offset: 0;
}

.contact-form textarea::placeholder {
    color: #7a6874;
}

.contact-form ul {
    margin: 0;
    padding-left: 1.2em;
    color: #9b1c3a;
    font-size: 0.92rem;
}

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

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

.contact-sent {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: var(--radius-s);
    background: var(--lime-wash);
    color: var(--ink);
}

.contact-sent strong {
    display: block;
}

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

.foot {
    padding: clamp(48px, 6vw, 80px) 0 0;
    background: var(--plum-night);
    color: var(--on-plum-muted);
    font-size: 0.97rem;
}

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

.foot h2 {
    margin-bottom: 14px;
    color: #fff;
    font-family: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

.foot a:hover {
    color: var(--lime-light);
}

.foot-logo {
    display: block;
    width: 168px;
    height: auto;
    margin-bottom: 16px;
}

.foot-nzok {
    color: var(--lime-light);
}

.foot address {
    font-style: normal;
}

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

.foot-phones li {
    margin-bottom: 10px;
}

.foot-phones span {
    display: block;
    font-size: 0.88rem;
}

.foot-phones a {
    font-weight: 600;
    font-variant-numeric: lining-nums tabular-nums;
    white-space: nowrap;
}

.foot-nav li {
    margin-bottom: 6px;
}

.foot-bottom {
    margin-top: 40px;
    padding-top: 20px;
    padding-bottom: 24px;
    border-top: 1px solid rgba(247, 238, 243, 0.14);
    font-size: 0.88rem;
}

.foot-bottom p {
    margin: 0;
}

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

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

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

.not-found {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 40px 16px;
    background:
        radial-gradient(50% 60% at 90% 10%, rgba(166, 189, 65, 0.3), transparent 70%),
        linear-gradient(180deg, var(--plum-wash), var(--paper));
}

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

.not-found img {
    display: block;
    width: 168px;
    height: auto;
    margin-bottom: 26px;
}

.not-found h1 {
    color: var(--plum-deep);
    font-size: clamp(2rem, 1.5rem + 2.4vw, 3.2rem);
}

.not-found h2 {
    margin-top: 36px;
    color: var(--plum-deep);
}

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

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reveal {
            animation: reveal-in linear both;
            animation-timeline: view();
            animation-range: entry 0% cover 28%;
        }
    }
}

@keyframes reveal-in {
    from { opacity: 0; transform: translateY(36px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !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;
    }
}
