/* Дентална клиника „Д-р Димова“ – carmine of the logo and porcelain.
   Light theme by default; [data-theme="dark"] (theme.js) is oxblood. Every colour is a custom property. */

@font-face {
    font-family: 'Alegreya';
    src: url('/fonts/alegreya.woff2') format('woff2');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Alegreya';
    src: url('/fonts/alegreya-italic.woff2') format('woff2');
    font-weight: 400 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Moderustic';
    src: url('/fonts/moderustic.woff2') format('woff2');
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --page: #fbf6f2;
    --surface: #ffffff;
    --sunk: #f5ece7;
    --blush: #f7e4e0;
    --ink: #2b1517;
    --muted: #644a4c;
    --line: #e8d8d2;
    --red: #b90b0d;
    --red-deep: #7a0608;
    --link: #a10a0c;
    --on-red: #ffffff;
    --hero-a: #c00e10;
    --hero-b: #6e0507;
    --hero-ink: #fff6f3;
    --hero-muted: #ffe0da;
    --card-shadow: 0 1px 2px rgba(80, 10, 12, .06), 0 12px 32px -12px rgba(80, 10, 12, .22);
    --foot: #2a0608;
    --foot-ink: #f6e7e3;
    --foot-muted: #e2c6c1;
    --foot-link: #ffb3aa;
    --header: rgba(251, 246, 242, .86);
    --radius: 22px;
    --display: 'Alegreya', 'Georgia', serif;
    --text: 'Moderustic', 'Segoe UI', system-ui, sans-serif;
    --lb-bg: rgba(26, 4, 6, .94);
    --lb-text: #fff6f3;
    --lb-accent: #ff8f85;
    --lb-accent-soft: rgba(255, 143, 133, .22);
    color-scheme: light;
}

[data-theme="dark"] {
    --page: #1d0709;
    --surface: #2a0d10;
    --sunk: #24090c;
    --blush: #3a1216;
    --ink: #f7ece9;
    --muted: #d9bfbb;
    --line: #4c2125;
    --red: #d81e23;
    --red-deep: #9c0b10;
    --link: #ff9b91;
    --hero-a: #8c080b;
    --hero-b: #300305;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .7);
    --foot: #120304;
    --header: rgba(29, 7, 9, .86);
    color-scheme: dark;
}

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

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

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

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

a {
    color: var(--link);
    text-underline-offset: .18em;
    text-decoration-thickness: 1px;
}

a:hover {
    text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
    font-family: var(--display);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.01em;
    margin: 0 0 .5em;
    text-wrap: balance;
}

h2 {
    font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem);
}

h3 {
    font-size: 1.4rem;
}

p {
    margin: 0 0 1em;
}

abbr[title] {
    text-decoration: none;
}

.wrap {
    width: min(100% - 2.5rem, 1200px);
    margin-inline: auto;
}

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

.nowrap {
    white-space: nowrap;
}

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--surface);
    color: var(--ink);
    border-radius: 10px;
}

.skip:focus {
    top: 1rem;
}

.on-dark {
    display: none !important;
}

[data-theme="dark"] .on-dark {
    display: block !important;
}

[data-theme="dark"] .on-light {
    display: none !important;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    min-height: 48px;
    padding: .7em 1.4em;
    border-radius: 999px;
    border: 2px solid transparent;
    background: var(--red);
    color: var(--on-red);
    font: 600 1rem/1.2 var(--text);
    text-decoration: none;
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -10px rgba(60, 0, 0, .55);
}

.hero .btn-light,
.callband .btn-light {
    background: #fff6f3;
    color: #8a0709;
}

.hero .btn-ghost {
    background: transparent;
    border-color: rgba(255, 246, 243, .75);
    color: #fff6f3;
}

.hero .btn-ghost:hover {
    background: rgba(255, 246, 243, .12);
}

.hero :focus-visible,
.callband :focus-visible,
.foot :focus-visible,
.page-hero :focus-visible {
    outline-color: #fff6f3;
}

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

.top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
}

.top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem 1.25rem;
    padding-block: .7rem;
}

.brand {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
}

.brand img {
    width: auto;
    height: 34px;
    max-width: 100%;
    object-fit: contain;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem;
    margin-left: auto;
}

.nav a {
    padding: .5rem .85rem;
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
}

.nav a:hover {
    background: var(--blush);
}

.nav a[aria-current] {
    background: var(--red);
    color: var(--on-red);
}

.top-tools {
    order: 3;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.call {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 44px;
    padding: .45rem 1rem;
    border-radius: 999px;
    background: var(--red);
    color: var(--on-red);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.call:hover {
    background: var(--red-deep);
}

.lang {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    font-size: .9rem;
    font-weight: 600;
}

.lang > * {
    padding: .55rem .7rem;
    min-width: 44px;
    text-align: center;
    color: var(--ink);
    text-decoration: none;
}

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

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.icon-btn[hidden] {
    display: none;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.theme-moon {
    fill: currentColor !important;
    stroke: none !important;
}

.theme .theme-sun {
    display: none;
}

[data-theme="dark"] .theme .theme-sun {
    display: block;
}

[data-theme="dark"] .theme .theme-moon {
    display: none;
}

@media (min-width: 1100px) {
    .top-row {
        flex-wrap: nowrap;
    }

    .brand {
        flex: 0 1 340px;
    }

    .brand img {
        height: auto;
        width: 100%;
    }
}

@media (max-width: 1099px) {
    .brand {
        flex: 1 1 260px;
    }

    .brand img {
        height: auto;
        width: min(100%, 360px);
    }

    .nav {
        order: 4;
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 859px) {
    .top-tools {
        width: 100%;
    }

    .top-tools .call {
        margin-right: auto;
    }

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

    .has-menu .nav.open {
        display: grid;
        gap: .25rem;
        padding-bottom: .5rem;
    }

    .has-menu .nav.open a {
        padding: .8rem 1rem;
        font-size: 1.1rem;
        background: var(--sunk);
    }

    .has-menu .nav.open a[aria-current] {
        background: var(--red);
    }
}

@media (max-width: 440px) {
    .top-tools {
        flex-wrap: wrap;
        gap: .35rem;
    }

    .call {
        gap: .35rem;
        padding: .45rem .75rem;
        font-size: .95rem;
    }

    .lang > * {
        min-width: 38px;
        padding: .55rem .45rem;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 380px) {
    .call svg {
        display: none;
    }

    .call {
        font-size: .9rem;
    }
}

@media (min-width: 860px) {
    .menu-btn {
        display: none !important;
    }
}

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

.hero,
.page-hero {
    position: relative;
    overflow: clip;
    background:
        radial-gradient(120% 90% at 85% 10%, rgba(255, 255, 255, .14), transparent 55%),
        linear-gradient(150deg, var(--hero-a), var(--hero-b));
    color: var(--hero-ink);
}

.hero-rings span {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 246, 243, .16);
    pointer-events: none;
}

.hero-rings span:nth-child(1) {
    width: 70vmax;
    aspect-ratio: 1;
    right: -28vmax;
    top: -30vmax;
}

.hero-rings span:nth-child(2) {
    width: 46vmax;
    aspect-ratio: 1;
    right: -16vmax;
    top: -18vmax;
    border-width: 36px;
    border-color: rgba(255, 246, 243, .06);
}

.hero-rings span:nth-child(3) {
    width: 22vmax;
    aspect-ratio: 1;
    left: -8vmax;
    bottom: -10vmax;
    background: rgba(255, 246, 243, .05);
    border: 0;
}

.hero-grid {
    position: relative;
    display: grid;
    gap: 2.5rem;
    align-items: center;
    padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(3rem, 7vw, 6rem);
}

@media (min-width: 960px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    }
}

.eyebrow {
    font: 700 .82rem/1.3 var(--text);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--hero-muted);
    margin-bottom: 1rem;
}

.eyebrow-red {
    color: var(--link);
}

.hero h1 {
    font-style: italic;
    font-weight: 800;
    font-size: clamp(2.7rem, 1.4rem + 6vw, 6rem);
    line-height: .98;
    letter-spacing: -.02em;
    margin-bottom: .4em;
    animation: rise .9s cubic-bezier(.2, .7, .2, 1) both;
}

.hero .lead {
    font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem);
    max-width: 36em;
    color: var(--hero-ink);
    animation: rise .9s .12s cubic-bezier(.2, .7, .2, 1) both;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1.75rem 0 1.5rem;
    animation: rise .9s .24s cubic-bezier(.2, .7, .2, 1) both;
}

.hero-note {
    max-width: 34em;
    font-size: .95rem;
    color: var(--hero-muted);
    border-left: 3px solid rgba(255, 246, 243, .5);
    padding-left: .9rem;
}

.hero-week {
    animation: lift 1s .3s cubic-bezier(.2, .7, .2, 1) both;
}

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

@keyframes lift {
    from {
        opacity: 0;
        transform: translateY(32px) scale(.97);
    }
}

/* ---- the week board ---- */

.week {
    background: var(--surface);
    color: var(--ink);
    border-radius: calc(var(--radius) + 6px);
    padding: clamp(1.1rem, 3vw, 1.8rem);
    box-shadow: 0 30px 60px -30px rgba(30, 0, 0, .65);
    container-type: inline-size;
}

.week-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
    margin-bottom: 1rem;
}

.week-title {
    font-size: clamp(1.6rem, 1.2rem + 3cqi, 2.2rem);
    font-style: italic;
    margin: 0;
}

.week-status {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    padding: .35rem .8rem;
    border-radius: 999px;
    background: var(--sunk);
    font-size: .92rem;
    font-weight: 600;
}

.week-status[hidden] {
    display: none;
}

.week-dot {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: var(--muted);
}

.week-status.is-open .week-dot {
    background: #1f8a4c;
    box-shadow: 0 0 0 4px rgba(31, 138, 76, .22);
    animation: pulse 2s infinite;
}

.week-status.is-closed .week-dot {
    background: var(--red);
}

@keyframes pulse {
    50% {
        box-shadow: 0 0 0 7px rgba(31, 138, 76, 0);
    }
}

.week-days {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .35rem;
}

.week-day {
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr) 7.6rem;
    align-items: center;
    gap: .75rem;
    padding: .35rem .5rem;
    border-radius: 12px;
}

.week-day.is-today {
    background: var(--blush);
}

.week-name {
    font-weight: 700;
}

.week-day.is-today .week-name {
    color: var(--link);
}

.week-track {
    position: relative;
    height: 14px;
    border-radius: 999px;
    background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 11)), var(--sunk);
}

.week-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--a) * 100%);
    width: calc((var(--b) - var(--a)) * 100%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--red), var(--red-deep));
    transform-origin: left;
}

@supports (animation-timeline: view()) {
    .week-bar {
        animation: grow linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 60%;
    }
}

@keyframes grow {
    from {
        transform: scaleX(0);
    }
}

.week-now {
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: calc(var(--at) * 100%);
    width: 3px;
    margin-left: -1px;
    border-radius: 2px;
    background: var(--ink);
}

.week-time {
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-size: .95rem;
    white-space: nowrap;
}

.week-none {
    color: var(--muted);
}

.week-scale {
    position: relative;
    height: 1.4rem;
    margin: .35rem calc(7.6rem + 1.25rem) 0 calc(2.6rem + 1.25rem);
    font-size: .75rem;
    color: var(--muted);
}

.week-scale span {
    position: absolute;
    left: calc(var(--at) * 100%);
    transform: translateX(-50%);
}

.week-urgent {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem 1rem;
    margin: 1rem 0 .4rem;
    padding: .9rem 1.1rem;
    border-radius: 16px;
    background: var(--red);
    color: var(--on-red);
    font-weight: 600;
}

.week-urgent a {
    color: var(--on-red);
    font-family: var(--display);
    font-size: clamp(1.3rem, 1rem + 3cqi, 1.75rem);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.week-urgent a:hover {
    text-decoration: underline;
}

.week-urgent :focus-visible {
    outline-color: var(--on-red);
}

.week-note {
    margin: .4rem 0 0;
    font-size: .9rem;
    color: var(--muted);
}

@container (max-width: 400px) {
    .week-day {
        grid-template-columns: 2.2rem minmax(0, 1fr) 6.4rem;
        gap: .5rem;
        padding-inline: .3rem;
    }

    .week-time {
        font-size: .85rem;
    }

    .week-scale {
        margin-inline: calc(2.2rem + .8rem) calc(6.4rem + .8rem);
    }
}

/* ---- the aesthetics essay ---- */

.essay {
    padding-block: clamp(3.5rem, 8vw, 7rem);
}

.essay-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 900px) {
    .essay-grid {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
        gap: 4rem;
    }

    .essay-head {
        position: sticky;
        top: 7rem;
        align-self: start;
    }
}

.essay-head h2 {
    font-size: clamp(2.4rem, 1.4rem + 4vw, 4.6rem);
    font-style: italic;
    line-height: 1;
}

.prose {
    max-width: 44rem;
}

.prose h2 {
    font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
    margin-top: 1.6em;
}

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

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

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

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

.dropcap::first-letter {
    float: left;
    font: italic 800 4.4em/.8 var(--display);
    margin: .06em .1em 0 0;
    color: var(--red);
}

.pull {
    margin: 1.8rem 0;
    padding: 1.2rem 0 1.2rem 1.4rem;
    border-left: 5px solid var(--red);
    font: italic 700 clamp(1.5rem, 1.1rem + 1.8vw, 2.3rem)/1.15 var(--display);
}

/* ---- services on the home page: a bento ---- */

.services-home {
    padding-block: clamp(3rem, 7vw, 6rem);
    background: var(--sunk);
}

.section-head {
    max-width: 52rem;
    margin-bottom: 2rem;
}

.section-head p {
    color: var(--muted);
}

.section-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem 2rem;
    max-width: none;
}

.more {
    font-weight: 600;
}

.bento {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
}

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

@media (min-width: 1000px) {
    .bento {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .bento-1,
    .bento-4 {
        grid-column: span 2;
    }

    .bento-9 {
        grid-column: span 2;
    }
}

.bento-item {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform .25s ease;
}

.bento-item:hover {
    transform: translateY(-4px);
}

.bento-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: start;
    gap: .35rem 1rem;
    padding: 1.4rem 1.4rem 1rem;
    color: inherit;
    text-decoration: none;
    flex: 1;
}

.bento-link img {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 240px;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: .6rem;
}

.bento-1 .bento-link img,
.bento-4 .bento-link img {
    max-width: 240px;
}

.bento-link img {
    grid-row: 1;
}

.bento-num {
    grid-column: 2;
    grid-row: 2;
    font: italic 800 1.1rem/1 var(--display);
    color: var(--link);
}

.bento-name {
    grid-column: 1;
    grid-row: 2;
    font: 800 1.5rem/1.1 var(--display);
}

.bento-link:hover .bento-name {
    color: var(--link);
}

.bento-short {
    grid-column: 1 / -1;
    grid-row: 3;
    color: var(--muted);
    font-size: .98rem;
}

.bento-subs {
    list-style: none;
    margin: 0;
    padding: 0 1.4rem 1.3rem;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.bento-subs a,
.chips a {
    display: inline-block;
    padding: .45rem .9rem;
    border-radius: 999px;
    background: var(--blush);
    color: var(--ink);
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
}

.bento-subs a:hover,
.chips a:hover {
    background: var(--red);
    color: var(--on-red);
}

/* the services without a picture are red tiles */
.bento-item:not(.has-img) {
    background: linear-gradient(150deg, var(--hero-a), var(--hero-b));
    color: var(--hero-ink);
}

.bento-item:not(.has-img) .bento-link {
    align-content: end;
    min-height: 13rem;
}

.bento-item:not(.has-img) .bento-num {
    grid-column: 1;
    grid-row: 1;
    font-size: 4rem;
    color: rgba(255, 246, 243, .55);
}

.bento-item:not(.has-img) .bento-name,
.bento-item:not(.has-img) .bento-link:hover .bento-name {
    color: var(--hero-ink);
}

.bento-item:not(.has-img) .bento-short {
    color: var(--hero-muted);
}

.bento-item:not(.has-img) :focus-visible {
    outline-color: #fff6f3;
}

@media (min-width: 1000px) {
    .bento-1 .bento-link,
    .bento-4 .bento-link {
        grid-template-columns: 240px minmax(0, 1fr) auto;
        align-items: start;
    }

    .bento-1 .bento-link img,
    .bento-4 .bento-link img {
        grid-column: 1;
        grid-row: 1 / span 2;
        margin: 0;
    }

    .bento-1 .bento-name,
    .bento-4 .bento-name {
        grid-column: 2;
        grid-row: 1;
    }

    .bento-1 .bento-num,
    .bento-4 .bento-num {
        grid-column: 3;
        grid-row: 1;
    }

    .bento-1 .bento-short,
    .bento-4 .bento-short {
        grid-column: 2 / -1;
        grid-row: 2;
    }

    .bento-9 .bento-link {
        min-height: 0;
    }
}

/* ---- large figures ---- */

.figures {
    padding-block: clamp(3rem, 7vw, 6rem);
}

.figures-lead {
    color: var(--muted);
    max-width: 44rem;
}

.figure-row {
    list-style: none;
    margin: 2rem 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 820px) {
    .figure-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.figure-row li {
    display: grid;
    gap: .6rem;
    align-content: start;
    padding: 1.6rem;
    border-top: 4px solid var(--red);
    background: var(--surface);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--card-shadow);
    container-type: inline-size;
}

.fig-num,
.fig-word {
    font: italic 800 min(clamp(3rem, 2rem + 4vw, 4.6rem), 26cqi)/1 var(--display);
    color: var(--link);
    white-space: nowrap;
}

.fig-word {
    font-size: min(clamp(2.4rem, 1.6rem + 3vw, 3.6rem), 17cqi);
}

.fig-num small {
    font-size: .6em;
    color: var(--muted);
}

.figures-note {
    max-width: 48rem;
}

/* ---- the photo strip ---- */

.strip-section {
    padding-block: clamp(3rem, 7vw, 6rem) 0;
    background: linear-gradient(var(--sunk), var(--page));
}

.strip {
    list-style: none;
    margin: 0;
    padding: 0 max(1.25rem, (100% - 1200px) / 2) 1.5rem;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(78vw, 420px);
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

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

.strip img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
}

.strip a:hover img {
    filter: brightness(1.05) saturate(1.05);
}

/* ---- the doctor ---- */

.doctor {
    padding-block: clamp(3rem, 7vw, 6rem);
}

.doctor-grid {
    display: grid;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 760px) {
    .doctor-grid {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 3.5rem;
    }
}

.doctor-photo {
    align-self: start;
    margin: 0;
    position: relative;
    width: max-content;
    max-width: 100%;
}

.doctor-photo::before {
    content: '';
    position: absolute;
    inset: -14px -14px 14px 14px;
    border-radius: 50% 50% var(--radius) var(--radius) / 40% 40% var(--radius) var(--radius);
    background: var(--red);
}

.doctor-photo img {
    position: relative;
    border-radius: 50% 50% var(--radius) var(--radius) / 40% 40% var(--radius) var(--radius);
}

.links-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    font-weight: 600;
}

/* ---- call band ---- */

.callband {
    background: linear-gradient(120deg, var(--hero-b), var(--hero-a));
    color: var(--hero-ink);
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.callband-grid {
    display: grid;
    gap: 1.5rem 3rem;
    align-items: center;
}

@media (min-width: 860px) {
    .callband-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
    }
}

.callband h2 {
    font-style: italic;
}

.callband p {
    max-width: 40rem;
}

.callband a {
    color: var(--hero-ink);
}

.callband-actions {
    display: grid;
    gap: .6rem;
    justify-items: start;
    container-type: inline-size;
    min-width: 0;
}

.big-phone {
    font: 800 min(clamp(2.2rem, 1.4rem + 3.5vw, 3.6rem), 14cqi)/1 var(--display);
    text-decoration: none;
    white-space: nowrap;
}

.callband .big-phone:hover {
    text-decoration: underline;
}

.callband-actions p {
    margin: 0;
}

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

.page-hero {
    padding-block: clamp(2rem, 5vw, 3.8rem) clamp(2.4rem, 6vw, 4.4rem);
}

.page-hero .wrap {
    position: relative;
}

.hero-rings-small span:nth-child(1) {
    width: 40vmax;
    right: -14vmax;
    top: -22vmax;
}

.hero-rings-small span:nth-child(2) {
    width: 24vmax;
    right: -6vmax;
    top: -10vmax;
    border-width: 22px;
}

.page-hero h1 {
    font-size: clamp(2.3rem, 1.4rem + 4.2vw, 4.4rem);
    max-width: 18em;
    animation: rise .8s cubic-bezier(.2, .7, .2, 1) both;
}

.page-hero .lead {
    font-size: clamp(1.08rem, 1rem + .4vw, 1.3rem);
    max-width: 40em;
    margin: 0;
    color: var(--hero-ink);
}

.page-hero a {
    color: var(--hero-ink);
}

.crumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .5rem;
    margin: 0 0 1.2rem;
    padding: 0;
    font-size: .92rem;
    color: var(--hero-muted);
}

.crumbs li + li::before {
    content: '/';
    margin-right: .5rem;
    opacity: .7;
}

.crumbs a {
    color: var(--hero-ink);
}

.crumbs [aria-current] {
    color: var(--hero-muted);
}

.band {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.band-sunk {
    background: var(--sunk);
}

.band + .band:not(.band-sunk) {
    padding-top: 0;
}

.two-col {
    display: grid;
    gap: 2rem 3.5rem;
}

@media (min-width: 900px) {
    .two-col {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
        align-items: start;
    }
}

.aside-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.aside-card h2 {
    font-size: 1.5rem;
}

.figure {
    margin: 0 0 1.5rem;
    width: fit-content;
    max-width: 100%;
}

.figure img {
    border-radius: 14px;
    background: #fff;
}

.figure figcaption,
.pair-title {
    margin-top: .5rem;
    font-size: .92rem;
    color: var(--muted);
}

.figure-float {
    float: right;
    margin: .3rem 0 1rem 1.5rem;
}

@media (max-width: 560px) {
    .figure-float {
        float: none;
        margin: 0 0 1.2rem;
    }
}

.clear {
    clear: both;
}

.pair-block {
    margin: 1.6rem 0 2rem;
}

.pair {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 0;
}

.pair figure {
    margin: 0;
    position: relative;
    flex: 0 1 auto;
}

.pair img {
    border-radius: 14px;
}

.pair figcaption {
    position: absolute;
    left: .5rem;
    top: .5rem;
    padding: .15rem .6rem;
    border-radius: 999px;
    background: rgba(32, 5, 7, .82);
    color: #fff6f3;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pair-long figure {
    max-width: 260px;
}

.pair.pair-long figcaption,
.pair.pair-long figure:last-child figcaption {
    position: static;
    margin-top: .45rem;
    padding: 0;
    background: none;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.pair figure:last-child figcaption {
    background: var(--red);
    color: var(--on-red);
}

.steps {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem;
    display: grid;
    gap: 1rem;
    counter-reset: step;
}

.steps > li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.steps > li > a img {
    width: 150px;
    border-radius: 12px;
    background: #fff;
}

.steps > li.no-img {
    grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 480px) {
    .steps > li > a img {
        width: 110px;
    }
}

.tick-list {
    list-style: none;
    padding: 0 !important;
}

.tick-list li {
    position: relative;
    padding-left: 1.8rem;
}

.tick-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .45em;
    width: .8rem;
    height: .8rem;
    border-radius: 50%;
    border: 3px solid var(--red);
}

.note-box {
    padding: 1.2rem 1.4rem;
    border-radius: var(--radius);
    background: var(--blush);
    margin: 1.5rem 0;
}

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

.subs,
.others {
    padding-block: clamp(2.5rem, 6vw, 4rem);
}

.subs {
    background: var(--sunk);
}

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

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform .25s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.card > a {
    display: grid;
    gap: .4rem;
    padding: 1.3rem;
    height: 100%;
    color: inherit;
    text-decoration: none;
    align-content: start;
}

.card img {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: .4rem;
}

.card-name {
    font: 800 1.35rem/1.15 var(--display);
}

.card > a:hover .card-name {
    color: var(--link);
}

.card-short {
    color: var(--muted);
    font-size: .97rem;
}

.card-subs {
    list-style: none;
    margin: 0;
    padding: 0 1.3rem 1.3rem;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.card-subs a {
    font-size: .9rem;
    font-weight: 600;
}

.chips {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.chips a[aria-current] {
    background: var(--red);
    color: var(--on-red);
}

.chips .chip-all {
    background: transparent;
    border: 2px solid var(--line);
}

.h-small {
    font-size: 1.4rem;
    margin-top: 1rem;
}

.others h2 {
    font-size: 1.8rem;
}

/* ---- about, gallery, certificates ---- */

.team {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1.5rem;
}

.person {
    display: grid;
    gap: 1.5rem;
    padding: clamp(1.3rem, 3vw, 2rem);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

@media (min-width: 720px) {
    .person {
        grid-template-columns: auto minmax(0, 1fr);
    }
}

.person h3 {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    margin-bottom: .2em;
}

.person .role {
    color: var(--link);
    font-weight: 700;
    margin-bottom: 1rem;
}

.person-mark {
    display: grid;
    place-items: center;
    width: 120px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--blush);
    color: var(--link);
    font: italic 800 2.6rem/1 var(--display);
}

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

.gallery figure {
    margin: 0;
    position: relative;
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 16px;
    transition: transform .3s ease;
}

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

.gallery-wide {
    grid-column: 1 / -1;
}

@media (min-width: 900px) {
    .gallery .span-2 {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery .span-2 img {
        height: 100%;
    }
}

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

.doc {
    margin: 0;
    padding: .9rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    height: 100%;
    display: grid;
    gap: .7rem;
    align-content: start;
}

.docs > li {
    min-width: 0;
}

.doc a {
    display: grid;
    place-items: center;
    height: 270px;
    background: #f4efea;
    border-radius: 14px;
    padding: .8rem;
    overflow: hidden;
}

.doc img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 246px;
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .45);
}

.doc figcaption {
    font-size: .95rem;
}

.doc figcaption strong {
    display: block;
    font-family: var(--display);
    font-size: 1.15rem;
}

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

.contact-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 960px) {
    .contact-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }
}

.contact-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: clamp(1.3rem, 3vw, 2rem);
    container-type: inline-size;
}

.contact-card .big-phone {
    color: var(--link);
    font-size: min(clamp(2rem, 1.4rem + 3vw, 3rem), 13cqi);
}

.contact-list {
    margin: 1.5rem 0 0;
    display: grid;
    gap: 1rem;
}

.contact-list div {
    display: grid;
    gap: .15rem;
}

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

.contact-list dd {
    margin: 0;
}

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

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

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: .3rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: .8rem .9rem;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--page);
    color: var(--ink);
    font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--link);
    outline: none;
}

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

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

.contact-sent {
    padding: 1rem 1.2rem;
    border-radius: 14px;
    background: var(--blush);
    margin-bottom: 1rem;
}

.contact-sent strong {
    display: block;
}

.map-figure {
    margin: 0;
}

.map-figure img {
    border-radius: var(--radius);
}

.contact-week .week {
    box-shadow: var(--card-shadow);
}

/* ---- did you know ---- */

.facts {
    list-style: none;
    margin: 1.5rem 0 2rem;
    padding: 0;
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

.facts li {
    display: grid;
    gap: .3rem;
    align-content: start;
    padding: 1.1rem 1.2rem;
    background: var(--surface);
    border-radius: 18px;
    box-shadow: var(--card-shadow);
    container-type: inline-size;
}

.facts .fact-num {
    font: italic 800 min(2.2rem, 15cqi)/1.05 var(--display);
    color: var(--link);
}

.teeth-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 30rem;
    margin: 1rem 0 1.5rem;
}

.teeth-table th,
.teeth-table td {
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.teeth-table td {
    font-variant-numeric: tabular-nums;
}

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

.foot {
    background: var(--foot);
    color: var(--foot-ink);
    padding-top: clamp(2.5rem, 6vw, 4rem);
    font-size: .97rem;
}

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

.foot h2 {
    font-size: 1.25rem;
    color: var(--foot-ink);
    margin-bottom: .6rem;
}

.foot-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1fr);
}

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

@media (min-width: 1080px) {
    .foot-grid {
        grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    }
}

.foot-logo {
    width: min(100%, 320px);
    margin-bottom: 1rem;
}

.foot p,
.foot address {
    color: var(--foot-muted);
    font-style: normal;
}

.foot-hours {
    margin: 0 0 1rem;
    display: grid;
    gap: .4rem;
}

.foot-hours dt {
    color: var(--foot-muted);
}

.foot-hours dd {
    margin: 0;
    font-weight: 600;
}

.foot-urgent a {
    font-weight: 700;
    white-space: nowrap;
}

.foot-list {
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0;
    display: grid;
    gap: .35rem;
}

.foot-bottom {
    margin-top: 2.5rem;
    padding-block: 1.2rem 1.6rem;
    border-top: 1px solid rgba(255, 230, 225, .16);
}

.foot-bottom p {
    margin: 0;
    font-size: .9rem;
}

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

.not-found {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1.25rem;
    background: linear-gradient(150deg, var(--hero-a), var(--hero-b));
    color: var(--hero-ink);
}

.not-found > div {
    max-width: 38rem;
}

.not-found .nf-logo {
    background: #fff;
    padding: .9rem 1.1rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    width: min(100%, 420px);
}

.not-found h1 {
    font-style: italic;
    font-size: clamp(2.4rem, 1.6rem + 4vw, 4rem);
}

.not-found a {
    color: var(--hero-ink);
}

.not-found .btn {
    background: #fff6f3;
    color: #8a0709;
}

.not-found [lang="en"] {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 246, 243, .3);
}

.not-found h2 {
    font-size: 1.8rem;
}

/* ---- scroll reveals ---- */

@supports (animation-timeline: view()) {
    .bento-item,
    .card,
    .figure-row li,
    .person,
    .doc,
    .steps > li {
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 45%;
    }
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
}

@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;
    }
}
