/* Upper Valley Endodontics: fern night and birch, the colours of the logo and of the office in the woods.
   Newsreader for display, Atkinson Hyperlegible Next for text. One light theme; dark forest bands. */

@font-face {
    font-family: "Newsreader";
    src: url("/fonts/newsreader.woff2") format("woff2");
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Newsreader";
    src: url("/fonts/newsreader-italic.woff2") format("woff2");
    font-weight: 300 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Atkinson Hyperlegible Next";
    src: url("/fonts/atkinson-hyperlegible-next.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --paper: #f6f3ec;
    --sheet: #ffffff;
    --ink: #17242c;
    --muted: #45555f;
    --slate: #38576c;
    --slate-deep: #23394a;
    --sage: #6f8f50;
    --sage-deep: #4b6a32;
    --sage-wash: #e7eedc;
    --forest: #0e2318;
    --forest-2: #163324;
    --forest-3: #21462f;
    --moss: #b8d394;
    --birch: #f1ece0;
    --on-dark: #eef2e8;
    --on-dark-muted: #c3cfbd;
    --line: rgba(56, 87, 108, 0.18);
    --line-dark: rgba(238, 242, 232, 0.16);
    --radius: 22px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(14, 35, 24, 0.06), 0 12px 32px -12px rgba(14, 35, 24, 0.22);
    --display: "Newsreader", "Iowan Old Style", Georgia, serif;
    --text: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
    --wrap: 1200px;
    --gutter: clamp(18px, 4vw, 40px);
    --lb-bg: rgba(8, 22, 14, 0.96);
    --lb-accent: #b8d394;
    --lb-accent-soft: rgba(184, 211, 148, 0.18);
    color-scheme: light;
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--text);
    font-size: clamp(1.02rem, 0.98rem + 0.2vw, 1.1rem);
    line-height: 1.62;
    overflow-x: hidden;
}

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

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

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

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

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

h1 {
    font-size: clamp(2.5rem, 1.6rem + 4.2vw, 5rem);
    letter-spacing: -0.025em;
}

h2 {
    font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3.2rem);
}

h3 {
    font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
    line-height: 1.2;
}

h1 em,
h2 em {
    font-style: italic;
    font-weight: 400;
    color: var(--sage-deep);
}

p {
    margin: 0 0 1em;
}

.wrap {
    width: min(100% - 2 * var(--gutter), var(--wrap));
    margin-inline: auto;
}

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

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

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

.eyebrow {
    font-family: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sage-deep);
    margin: 0 0 1rem;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55em;
    min-height: 48px;
    padding: 0.7em 1.35em;
    border-radius: 999px;
    border: 2px solid transparent;
    background: var(--sage-deep);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
    background: var(--forest-3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -12px rgba(14, 35, 24, 0.6);
}

.btn svg {
    flex: none;
}

.btn-light {
    background: var(--moss);
    color: var(--forest);
}

.btn-light:hover {
    background: #d4e6b9;
    color: var(--forest);
}

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

.btn-ghost:hover {
    background: var(--sage-wash);
    color: var(--forest);
}

.on-dark .btn-ghost,
.hero .btn-ghost,
.call-band .btn-ghost {
    color: var(--on-dark);
}

.on-dark .btn-ghost:hover,
.hero .btn-ghost:hover,
.call-band .btn-ghost:hover {
    background: rgba(238, 242, 232, 0.12);
    color: #fff;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 1.6rem 0 0;
}

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

.top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 243, 236, 0.9);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
}

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

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

.brand img {
    width: clamp(132px, 22vw, 170px);
    height: auto;
}

.top-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0.5em 1.05em;
    border-radius: 999px;
    background: var(--forest);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

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

.menu-btn {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0.45em 0.95em;
    border: 2px solid var(--slate);
    border-radius: 999px;
    background: transparent;
    color: var(--slate-deep);
    font: 700 0.95rem var(--text);
    cursor: pointer;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.menu-bars {
    position: relative;
}

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

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

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

.menu-open .menu-bars {
    background: transparent;
}

.menu-open .menu-bars::before {
    transform: translateY(6px) rotate(45deg);
}

.menu-open .menu-bars::after {
    transform: translateY(-6px) rotate(-45deg);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 4px;
    width: 100%;
    font-size: 0.97rem;
}

.nav a {
    padding: 0.4em 0.75em;
    border-radius: 999px;
    color: var(--slate-deep);
    font-weight: 600;
    text-decoration: none;
}

.nav a:hover {
    background: var(--sage-wash);
    color: var(--forest);
}

.nav a[aria-current] {
    background: var(--forest);
    color: #fff;
}

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

    .nav {
        width: auto;
        order: 2;
    }

    .top-call {
        order: 3;
    }

    .brand {
        margin-right: 8px;
    }

    .nav {
        margin-left: auto;
    }
}

@media (max-width: 1099px) {
    .has-menu .menu-btn {
        display: inline-flex;
    }

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

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

    .has-menu .nav a {
        padding: 0.7em 0.9em;
        font-size: 1.05rem;
    }
}

@media (max-width: 420px) {
    .top-call .call-label {
        display: none;
    }

    .top-call {
        padding-inline: 0.85em;
    }
}

/* ---- hero with the tooth ---- */

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--forest);
    color: var(--on-dark);
    padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 104px);
}

.hero-photo {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 40%;
    opacity: 0.42;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 70% at 78% 45%, rgba(111, 143, 80, 0.22), transparent 70%),
        linear-gradient(100deg, rgba(14, 35, 24, 0.97) 0%, rgba(14, 35, 24, 0.9) 42%, rgba(14, 35, 24, 0.55) 100%);
}

.hero-grid {
    display: grid;
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}

@media (min-width: 900px) {
    .hero-grid {
        grid-template-columns: 1.08fr 0.92fr;
    }
}

.hero h1 {
    color: #fff;
}

.hero h1 em {
    color: var(--moss);
}

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

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

.hero-note {
    margin: 1.4rem 0 0;
    font-size: 0.98rem;
    color: var(--on-dark-muted);
}

.hero-note a {
    color: #fff;
}

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

.hero-text > :nth-child(2) {
    animation-delay: 0.08s;
}

.hero-text > :nth-child(3) {
    animation-delay: 0.16s;
}

.hero-text > :nth-child(4) {
    animation-delay: 0.24s;
}

.hero-text > :nth-child(5) {
    animation-delay: 0.32s;
}

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

/* the tooth: inside the tooth, drawn in light lines */

.tooth {
    margin: 0;
    width: min(100%, 520px);
    justify-self: center;
}

.tooth svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.tooth figcaption {
    margin-top: 6px;
    font-family: var(--display);
    font-style: italic;
    font-size: 1.12rem;
    line-height: 1.4;
    color: var(--on-dark-muted);
    text-align: center;
}

.tooth figcaption a {
    color: var(--moss);
}

.t-outline,
.t-dej,
.t-pulp,
.t-ridge,
.t-lead {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.t-outline {
    stroke: #f4f1e8;
    stroke-width: 3;
}

.t-body {
    fill: rgba(244, 241, 232, 0.07);
}

.t-enamel {
    fill: rgba(244, 241, 232, 0.16);
}

.t-dej {
    stroke: rgba(244, 241, 232, 0.6);
    stroke-width: 1.6;
    stroke-dasharray: 5 6;
}

.t-pulp {
    stroke: var(--moss);
    stroke-width: 2.4;
}

.t-pulp-fill {
    fill: rgba(184, 211, 148, 0.34);
}

.t-ridge {
    stroke: var(--sage);
    stroke-width: 9;
}

.t-lead {
    stroke: rgba(238, 242, 232, 0.7);
    stroke-width: 1.4;
}

.t-dot {
    fill: var(--moss);
}

.t-label {
    font-family: var(--text);
    font-size: 22px;
    font-weight: 700;
    fill: #fff;
    letter-spacing: 0.02em;
}

.t-sub {
    font-family: var(--text);
    font-size: 17px;
    fill: var(--on-dark-muted);
}

.draw {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.6s cubic-bezier(0.6, 0.1, 0.25, 1) forwards;
}

.t-dej.draw {
    stroke-dasharray: none;
    animation: fade 0.8s ease 1.2s both;
}

.t-pulp.draw {
    animation-delay: 0.9s;
}

.t-ridge.draw {
    animation-duration: 1.3s;
    animation-delay: 1.6s;
}

.fill-in {
    animation: fade 1s ease both;
}

.t-pulp-fill.fill-in {
    animation-delay: 1.9s;
}

.t-body.fill-in,
.t-enamel.fill-in {
    animation-delay: 0.6s;
}

.label-in {
    animation: fade 0.6s ease both;
}

.label-in:nth-of-type(1) {
    animation-delay: 2.2s;
}

.label-in:nth-of-type(2) {
    animation-delay: 2.4s;
}

.label-in:nth-of-type(3) {
    animation-delay: 2.6s;
}

.label-in:nth-of-type(4) {
    animation-delay: 2.8s;
}

.label-in:nth-of-type(5) {
    animation-delay: 3s;
}

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

@keyframes fade {
    from {
        opacity: 0;
    }
}

/* ---- bands and sections ---- */

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

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

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

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

.on-dark {
    background: var(--forest-2);
    color: var(--on-dark);
}

.on-dark h2,
.on-dark h3 {
    color: #fff;
}

.on-dark h2 em {
    color: var(--moss);
}

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

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

.on-dark a {
    color: #fff;
}

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

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

/* the years the original names */

.years {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
    border-top: 1px solid var(--line);
}

.years li {
    position: relative;
    padding: 26px 22px 22px 0;
    border-bottom: 1px solid var(--line);
}

@media (min-width: 900px) {
    .years li {
        border-bottom: 0;
        padding-right: 28px;
    }

    .years li + li {
        padding-left: 28px;
        border-left: 1px solid var(--line);
    }
}

.year {
    display: block;
    font-family: var(--display);
    font-size: clamp(3rem, 2.2rem + 3vw, 4.8rem);
    font-weight: 300;
    line-height: 1;
    color: var(--sage-deep);
    letter-spacing: -0.03em;
    font-variant-numeric: lining-nums;
}

.years p {
    margin: 0.6em 0 0;
    color: var(--muted);
}

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .years li,
        .bento > *,
        .steps li,
        .reveal {
            animation: rise linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 55%;
        }
    }
}

/* how a visit works */

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
    counter-reset: step;
}

@media (min-width: 800px) {
    .steps {
        grid-template-columns: repeat(4, 1fr);
    }
}

.steps li {
    counter-increment: step;
    position: relative;
    padding: 26px 22px 24px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.steps li::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    margin-bottom: 14px;
    font-family: var(--display);
    font-size: 2.4rem;
    font-style: italic;
    line-height: 1;
    color: var(--sage-deep);
}

.steps h3 {
    font-size: 1.3rem;
}

.steps p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
}

/* services bento */

.bento {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

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

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

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

    .bento .tile-tall {
        grid-row: span 2;
    }
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 220px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--sheet);
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

a.tile:hover {
    color: var(--ink);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.h3 {
    font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
    line-height: 1.2;
}

.tile-link {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.tile-link:focus-visible {
    outline-offset: -4px;
}

.tile-photo a:not(.tile-link) {
    color: #fff;
}

.tile h2,
.tile h3 {
    margin-bottom: 0.35em;
    padding-right: 1.8em;
}

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

.tile .go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-weight: 700;
    color: var(--sage-deep);
}

a.tile:hover .go svg {
    transform: translateX(4px);
}

.go svg {
    transition: transform 0.2s ease;
}

.tile-photo {
    margin: 0;
    color: #fff;
    background: var(--forest);
    min-height: 360px;
}

.tile-photo img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.tile-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(14, 35, 24, 0.08) 0%, rgba(14, 35, 24, 0.55) 38%, rgba(14, 35, 24, 0.94) 72%);
}

a.tile-photo:hover img {
    transform: scale(1.04);
}

.tile-photo h2,
.tile-photo h3 {
    color: #fff;
}

.tile-photo p {
    color: #e3eadc;
}

.tile-photo .go {
    color: var(--moss);
}

a.tile-photo:hover {
    color: #fff;
}

.tile-sage {
    background: var(--sage-wash);
    border-color: transparent;
}

.tile-slate {
    background: var(--slate-deep);
    border-color: transparent;
    color: #fff;
}

.tile-slate h3 {
    color: #fff;
}

.tile-slate p {
    color: #d6e0e7;
}

.tile-slate .go {
    color: var(--moss);
}

a.tile-slate:hover {
    color: #fff;
}

.tile-num {
    position: absolute;
    top: 18px;
    right: 22px;
    font-family: var(--display);
    font-style: italic;
    font-size: 1.1rem;
    color: inherit;
    opacity: 0.75;
}

/* doctors */

.doctors-duo {
    display: grid;
    gap: 22px;
}

@media (min-width: 760px) {
    .doctors-duo {
        grid-template-columns: 1fr 1fr;
    }
}

.doc-card {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--sheet);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
}

@media (min-width: 520px) {
    .doc-card {
        grid-template-columns: 0.9fr 1.1fr;
    }
}

.doc-card > a {
    display: block;
}

.doc-card img {
    width: 100%;
    height: 100%;
    aspect-ratio: 5 / 6;
    object-fit: cover;
    object-position: 50% 22%;
}

.doc-card div {
    padding: 24px;
    align-self: center;
}

.doc-card h3 {
    margin-bottom: 0.25em;
}

.doc-card .role {
    color: var(--sage-deep);
    font-weight: 700;
    font-size: 0.95rem;
}

.doc-card p {
    color: var(--muted);
    font-size: 0.98rem;
}

/* office strip */

.strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(82%, 520px);
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px var(--gutter) 18px;
    margin: 0;
    list-style: none;
    scrollbar-color: var(--sage) transparent;
    padding-inline: max(var(--gutter), (100% - var(--wrap)) / 2);
    scroll-padding-inline: max(var(--gutter), (100% - var(--wrap)) / 2);
}

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

.strip figure {
    margin: 0;
}

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

.strip figcaption {
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--on-dark-muted);
}

.split {
    display: grid;
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}

@media (min-width: 900px) {
    .split {
        grid-template-columns: 1fr 1fr;
    }

    .split-wide {
        grid-template-columns: 1.3fr 0.7fr;
    }
}

/* logos of memberships and schools */

.logos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.logos li {
    display: grid;
    place-items: center;
    min-height: 104px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.logos img {
    max-height: 72px;
    width: auto;
    object-fit: contain;
}

/* call band */

.call-band {
    position: relative;
    overflow: hidden;
    background: var(--forest);
    color: var(--on-dark);
    padding: clamp(48px, 6vw, 80px) 0;
}

.call-band::after {
    content: "";
    position: absolute;
    right: -6%;
    bottom: -30px;
    width: 58%;
    height: 140px;
    background: url("/img/ridge.svg") no-repeat right bottom / contain;
    opacity: 0.5;
    pointer-events: none;
}

.call-band h2 {
    color: #fff;
}

.call-band .eyebrow {
    color: var(--moss);
}

.call-band p {
    color: var(--on-dark-muted);
}

.call-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 24px;
    align-items: end;
}

@media (min-width: 900px) {
    .call-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

.big-phone {
    display: inline-block;
    font-family: var(--display);
    font-size: clamp(2.2rem, 1.6rem + 3vw, 3.8rem);
    font-weight: 400;
    line-height: 1;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
    font-variant-numeric: lining-nums;
}

.big-phone:hover {
    color: var(--moss);
}

.call-facts {
    display: grid;
    gap: 6px;
    margin: 18px 0 0;
}

.call-facts div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.call-facts dt {
    min-width: 4.5em;
    color: var(--moss);
    font-weight: 700;
}

.call-facts dd {
    margin: 0;
    color: var(--on-dark);
    overflow-wrap: anywhere;
}

.call-facts a {
    color: #fff;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    background: var(--forest-2);
    color: var(--on-dark);
    padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 88px);
}

.page-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: clamp(40px, 6vw, 80px);
    background: url("/img/ridge.svg") no-repeat center bottom / 100% 100%;
    opacity: 0.55;
    pointer-events: none;
}

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

.page-hero h1 {
    color: #fff;
    font-size: clamp(2.3rem, 1.6rem + 3.2vw, 4.2rem);
}

.page-hero h1 em {
    color: var(--moss);
}

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

.page-hero .eyebrow {
    color: var(--moss);
}

.page-hero a {
    color: #fff;
}

.crumbs {
    margin-bottom: 18px;
    font-size: 0.92rem;
    color: var(--on-dark-muted);
}

.crumbs a {
    color: #fff;
}

.crumbs span[aria-hidden] {
    margin: 0 0.35em;
    color: var(--moss);
}

.source {
    font-size: 0.95rem;
    color: var(--on-dark-muted);
    margin: 0;
}

.prose {
    max-width: 70ch;
}

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

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

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

.prose ul {
    padding-left: 1.2em;
}

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

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

.ticks {
    list-style: none;
    padding: 0 !important;
    display: grid;
    gap: 10px;
    margin: 0 0 1.2em;
}

.ticks li {
    position: relative;
    padding: 12px 16px 12px 46px;
    margin: 0;
    background: var(--sage-wash);
    border-radius: var(--radius-sm);
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 1.05em;
    width: 16px;
    height: 9px;
    border-left: 3px solid var(--sage-deep);
    border-bottom: 3px solid var(--sage-deep);
    transform: rotate(-45deg);
}

.service-layout {
    display: grid;
    gap: clamp(32px, 5vw, 64px);
}

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

    .service-aside {
        position: sticky;
        top: 110px;
    }
}

.service-aside {
    display: grid;
    gap: 18px;
}

.aside-photo {
    margin: 0;
}

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

.aside-card {
    padding: 22px;
    border-radius: var(--radius);
    background: var(--forest-2);
    color: var(--on-dark);
}

.aside-card h2 {
    font-size: 1.45rem;
    color: #fff;
}

.aside-card p {
    color: var(--on-dark-muted);
    font-size: 0.97rem;
}

.aside-card .btn {
    width: 100%;
    justify-content: center;
}

.diagrams {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 1.4em 0;
    padding: 0;
    list-style: none;
}

.diagrams li {
    margin: 0;
}

.diagrams figure,
.diagram {
    margin: 0;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    width: fit-content;
    max-width: 100%;
}

.diagram-side {
    float: right;
    margin: 0.2em 0 1em 1.4em;
}

@media (max-width: 560px) {
    .diagram-side {
        float: none;
        margin: 0 0 1em;
    }
}

.diagrams figcaption,
.diagram figcaption {
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--muted);
    max-width: 300px;
}

.crack-types {
    display: grid;
    gap: 16px;
    margin: 1.2em 0 0;
}

.crack {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: start;
    padding: 20px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.crack:not(:has(figure)) {
    grid-template-columns: 1fr;
}

.crack h3 {
    margin-top: 0;
}

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

.crack .diagram {
    padding: 8px;
}

@media (max-width: 520px) {
    .crack {
        grid-template-columns: 1fr;
    }
}

.callout {
    padding: 20px 22px;
    border-left: 5px solid var(--sage);
    background: var(--sage-wash);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.4em 0;
}

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

.others {
    padding: clamp(40px, 5vw, 64px) 0;
    background: var(--birch);
}

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

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

.chips a {
    display: inline-block;
    padding: 0.55em 1.05em;
    border-radius: 999px;
    background: var(--sheet);
    border: 1px solid var(--line);
    color: var(--slate-deep);
    font-weight: 600;
    text-decoration: none;
}

.chips a:hover {
    background: var(--forest);
    color: #fff;
}

/* doctors page */

.person {
    display: grid;
    gap: clamp(24px, 4vw, 48px);
    padding: clamp(32px, 4vw, 48px) 0;
    border-top: 1px solid var(--line);
}

.person:first-of-type {
    border-top: 0;
    padding-top: 0;
}

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

.person-photo {
    margin: 0;
}

.person-photo img {
    width: 100%;
    max-width: 320px;
    border-radius: var(--radius);
}

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

.edu li {
    padding-left: 18px;
    position: relative;
    color: var(--slate-deep);
    font-weight: 600;
}

.edu li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sage);
}

/* gallery of the office */

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

@media (min-width: 760px) {
    .gallery {
        grid-template-columns: 1.4fr 1fr;
        grid-template-rows: auto auto;
    }

    .gallery li:first-child {
        grid-row: span 2;
    }
}

.gallery figure {
    margin: 0;
    height: 100%;
}

.gallery a {
    display: block;
    height: 100%;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

/* documents */

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

@media (min-width: 760px) {
    .docs {
        grid-template-columns: 1fr 1fr;
    }
}

.doc {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
    height: 100%;
    padding: 18px 20px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.doc:hover {
    border-color: var(--sage);
    color: var(--ink);
    transform: translateY(-2px);
}

.doc-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 58px;
    border-radius: 6px 16px 6px 6px;
    background: var(--forest);
    color: var(--moss);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.doc strong {
    display: block;
    font-size: 1.05rem;
    color: var(--forest);
}

.doc span.doc-note {
    display: block;
    font-size: 0.93rem;
    color: var(--muted);
}

/* payment */

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

.cards li {
    padding: 0.45em 0.95em;
    border-radius: 999px;
    background: var(--sheet);
    border: 1px solid var(--line);
    font-weight: 700;
    color: var(--slate-deep);
}

.facts-grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 800px) {
    .facts-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.panel {
    padding: clamp(22px, 3vw, 32px);
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.panel h2 {
    font-size: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
}

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

.panel-dark {
    background: var(--forest-2);
    border-color: transparent;
    color: var(--on-dark);
}

.panel-dark h2 {
    color: #fff;
}

.panel-dark p {
    color: var(--on-dark-muted);
}

.panel-dark a {
    color: #fff;
}

/* contact */

.contact-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr 1.1fr;
        align-items: start;
    }
}

.contact-list {
    display: grid;
    gap: 16px;
    margin: 18px 0 0;
}

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

.contact-list dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.routes {
    display: grid;
    gap: 16px;
}

@media (min-width: 800px) {
    .routes {
        grid-template-columns: 1fr 1fr;
    }
}

.route {
    padding: 22px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.route .from {
    margin: 0 0 6px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sage-deep);
}

.route h3 {
    font-size: 1.3rem;
}

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

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

.contact-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
    color: var(--forest);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75em 0.9em;
    border: 1.5px solid #8a9aa3;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
}

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

.contact-form .btn {
    justify-self: start;
    cursor: pointer;
    font: 700 1rem var(--text);
}

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

.contact-sent {
    padding: 16px 18px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
    background: var(--sage-wash);
    color: var(--forest);
}

.contact-form ul {
    margin: 4px 0 0;
    padding-left: 1.1em;
    color: #9b2c1f;
}

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

.foot {
    background: var(--forest);
    color: var(--on-dark-muted);
    padding: clamp(48px, 6vw, 72px) 0 28px;
    font-size: 0.98rem;
}

.foot h2 {
    font-family: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--moss);
    margin: 0 0 12px;
}

.foot a {
    color: #fff;
}

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

.foot-grid {
    display: grid;
    gap: 32px;
}

@media (min-width: 760px) {
    .foot-grid {
        grid-template-columns: 1.3fr 1fr 1fr 1fr;
    }
}

.foot-brand img {
    width: 200px;
    height: auto;
    margin-bottom: 16px;
}

.foot address {
    font-style: normal;
}

.foot-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.foot-phone {
    font-family: var(--display);
    font-size: 1.6rem;
    text-decoration: none;
}

.social {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.social a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line-dark);
    color: #fff;
}

.social a:hover {
    background: var(--moss);
    color: var(--forest);
}

.social svg {
    width: 20px;
    height: 20px;
}

.foot-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line-dark);
    font-size: 0.9rem;
}

.foot-bottom p {
    margin: 0;
}

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

.not-found {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px var(--gutter);
    text-align: center;
    background: var(--paper);
}

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

.not-found img {
    margin: 0 auto 28px;
    width: 220px;
}

.not-found p {
    color: var(--muted);
}

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

    .draw {
        stroke-dashoffset: 0;
    }
}

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

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

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

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

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

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

.lightbox::backdrop {
    background: none;
}

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

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

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

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

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

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

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

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

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

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

.lightbox-next {
    right: 12px;
}

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

    .lightbox-caption {
        padding: 0;
    }

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

    .lightbox-prev {
        left: 20px;
    }

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

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

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

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

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

.panel-dark address {
    font-style: normal;
    color: var(--on-dark-muted);
}

.panel .doc {
    margin-top: 8px;
}

.panel-dark .big-phone {
    color: #fff;
}

.panel-dark .big-phone:hover {
    color: var(--moss);
}

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

.aside-card a:not(.btn):hover {
    color: var(--moss);
}

.foot {
    border-top: 1px solid var(--line-dark);
}

.not-found a[href^="tel:"] {
    white-space: nowrap;
}
