/* Centre Médical Gmedic, Gardanne. Indigo night and the logo's spectrum (red cross "M", amber band, cobalt
   "edic"); Gabarito for display, Host Grotesk for text. The signature is the 24-hour dial of
   the opening hours in the hero (templates/_partials/dial.html.twig, js/site.js). */

@font-face {
    font-family: "Gabarito";
    src: url("/fonts/gabarito.woff2") format("woff2");
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: "Host Grotesk";
    src: url("/fonts/host-grotesk.woff2") format("woff2");
    font-weight: 300 800;
    font-display: swap;
}

:root {
    --night: #14164a;
    --night-2: #1c1f63;
    --ink: #2b2e83;
    --red: #e7302a;
    --red-text: #c0211b;
    --red-light: #ff7466;
    --orange: #ed7f33;
    --amber: #f9b513;
    --cobalt: #007bc3;
    --cobalt-text: #00639e;
    --sky: #3fb4e6;
    --mist: #9bc6cc;
    --mist-light: #c9e3e7;
    --paper: #f6f7fb;
    --white: #ffffff;
    --text: #1b1d45;
    --muted: #4a4d78;
    --line: rgba(43, 46, 131, 0.14);
    --spectrum: linear-gradient(90deg, #e7302a 0%, #ed7f33 25%, #f9b513 45%, #3fb4e6 72%, #007bc3 100%);
    --display: "Gabarito", "Trebuchet MS", system-ui, sans-serif;
    --body: "Host Grotesk", "Trebuchet MS", system-ui, sans-serif;
    --radius: 28px;
    --wrap: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    color-scheme: light;
}

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

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

body {
    margin: 0;
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
    overflow-x: hidden;
}

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

a {
    color: var(--cobalt-text);
    text-underline-offset: 0.18em;
}

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

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

h1,
h2,
h3 {
    font-family: var(--display);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
    color: var(--night);
    text-wrap: balance;
}

h2 {
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    font-weight: 800;
}

h3 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 700;
}

p {
    margin: 0 0 1em;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

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

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 0.7rem 1rem;
    background: var(--night);
    color: var(--white);
    border-radius: 10px;
    font-weight: 700;
}

.skip:focus {
    top: 12px;
    color: var(--white);
}

.eyebrow {
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cobalt-text);
    margin: 0 0 0.8rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 52px;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 2px solid transparent;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-light {
    background: var(--white);
    color: var(--night);
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5);
}

.btn-light:hover {
    color: var(--night);
    background: #fff6dc;
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
    color: var(--white);
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.btn-ink {
    background: var(--ink);
    color: var(--white);
}

.btn-ink:hover {
    background: var(--night);
    color: var(--white);
}

.arrow-link {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 3px solid var(--amber);
    padding-bottom: 2px;
}

.arrow-link::after {
    content: " \2192";
}

.arrow-link:hover {
    color: var(--cobalt-text);
}

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

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

.top-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    min-height: 76px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.brand {
    flex: none;
    display: block;
    border-radius: 8px;
}

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

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

.nav a {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--night);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    white-space: nowrap;
}

.nav a:hover {
    background: rgba(43, 46, 131, 0.07);
    color: var(--night);
}

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

.top-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.lang {
    display: flex;
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px;
}

.lang a,
.lang span {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink);
}

.lang span[aria-current] {
    background: var(--mist-light);
    color: var(--night);
}

.call {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    background: var(--red-text);
    color: var(--white);
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.08rem;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 10px 24px -12px rgba(192, 33, 27, 0.8);
}

.call:hover {
    background: var(--night);
    color: var(--white);
}

@media (max-width: 880px) {
    .top-row {
        gap: 0.3rem 0.8rem;
    }

    .brand img {
        height: 50px;
    }

    .top-actions {
        margin-left: auto;
    }

    .nav {
        order: 3;
        width: 100%;
        margin: 0 calc(var(--gutter) * -1);
        padding: 0 var(--gutter) 2px;
        width: calc(100% + var(--gutter) * 2);
        overflow-x: auto;
        scrollbar-width: none;
    }

    .nav a {
        font-size: 0.98rem;
        padding: 0.4rem 0.75rem;
    }
}

@media (max-width: 420px) {
    .call {
        padding: 0.55rem 0.8rem;
        font-size: 1rem;
    }

    .lang a,
    .lang span {
        padding: 0.2rem 0.45rem;
    }
}

/* ---- hero: indigo night, the original's red-to-blue wash in halftone, the dial ---- */

.hero,
.page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: var(--night);
    background-image:
        radial-gradient(60% 80% at 0% 100%, rgba(231, 48, 42, 0.55), transparent 70%),
        radial-gradient(40% 50% at 12% 78%, rgba(249, 181, 19, 0.35), transparent 70%),
        radial-gradient(60% 80% at 100% 0%, rgba(0, 123, 195, 0.7), transparent 70%),
        linear-gradient(160deg, var(--night-2), var(--night));
    color: var(--white);
}

.hero::before,
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1.1px, transparent 1.6px);
    background-size: 13px 13px;
    -webkit-mask-image: radial-gradient(70% 90% at 0% 100%, #000, transparent 75%);
    mask-image: radial-gradient(70% 90% at 0% 100%, #000, transparent 75%);
}

.hero::after,
.page-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: var(--spectrum);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    padding-top: clamp(3rem, 7vw, 6rem);
    padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.hero .eyebrow,
.page-hero .eyebrow {
    color: var(--mist-light);
}

.hero h1 {
    color: var(--white);
    font-size: clamp(3rem, 8.4vw, 6.6rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.035em;
    margin-bottom: 1.6rem;
}

.hero h1 span {
    display: block;
    color: var(--amber);
}

.hero .lead {
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    max-width: 34em;
    color: #e4e6f7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 2rem 0 1.4rem;
}

.hero-actions .btn-light {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    min-height: 60px;
    padding-inline: 1.7rem;
}

.hero-address {
    color: var(--mist-light);
    font-size: 1rem;
    margin: 0;
}

.hero-address span {
    color: #c5c8e8;
}

.hero-dial {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
}

.hero-closed {
    margin: 0;
    color: #d6d9f2;
    font-size: 0.98rem;
}

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

/* ---- the dial ---- */

.dial {
    position: relative;
    margin: 0;
    width: min(100%, 430px);
    aspect-ratio: 1;
}

.dial-face {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.dial-plate {
    fill: rgba(255, 255, 255, 0.05);
    stroke: rgba(255, 255, 255, 0.16);
    stroke-width: 1.5;
}

.dial-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 24;
}

.dial-arc {
    fill: none;
    stroke-width: 24;
    stroke-linecap: round;
    stroke-dasharray: 100 100;
    filter: drop-shadow(0 0 10px rgba(249, 181, 19, 0.35));
}

.dial-ticks line {
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 2;
    stroke-linecap: round;
}

.dial-ticks line.major {
    stroke: var(--white);
    stroke-width: 3;
}

.dial-nums text {
    fill: rgba(255, 255, 255, 0.72);
    font-family: var(--display);
    font-weight: 600;
    font-size: 17px;
    text-anchor: middle;
}

.dial-nums text.edge {
    fill: var(--white);
    font-weight: 800;
    font-size: 22px;
}

.dial-needle {
    transform-box: view-box;
    transform-origin: 50% 50%;
    opacity: 0;
}

.dial.is-live .dial-needle {
    opacity: 1;
}

.dial-needle line {
    stroke: var(--white);
    stroke-width: 5;
    stroke-linecap: round;
}

.dial-needle .tip {
    fill: var(--white);
    stroke: var(--night);
    stroke-width: 5;
}

.dial.is-open .dial-needle .tip {
    stroke: var(--cobalt);
}

.dial-centre {
    position: absolute;
    inset: 22%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.2rem;
    container-type: inline-size;
}

.dial-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--white);
    color: var(--night);
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(0.82rem, 7.5cqi, 1rem);
    white-space: nowrap;
    margin-bottom: 0.3rem;
}

.dial-status::before {
    content: "";
    width: 0.6em;
    height: 0.6em;
    border-radius: 50%;
    background: var(--red);
}

.dial.is-open .dial-status::before {
    background: #1e9e64;
    box-shadow: 0 0 0 4px rgba(30, 158, 100, 0.2);
}

.dial-hours {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(1.6rem, 17cqi, 2.9rem);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--white);
    white-space: nowrap;
}

.dial-days {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(0.85rem, 8cqi, 1.1rem);
    color: var(--mist-light);
}

.dial-next {
    font-size: clamp(0.75rem, 6.6cqi, 0.92rem);
    color: #d6d9f2;
    line-height: 1.25;
    max-width: 14em;
}

/* the week strip */

.week {
    display: flex;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.week li {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-family: var(--display);
    font-weight: 800;
    font-size: 1rem;
}

.week abbr {
    text-decoration: none;
    cursor: default;
}

.week .on {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
}

.week .off {
    background: transparent;
    color: #d6d9f2;
    border: 2px dashed rgba(255, 255, 255, 0.4);
}

.week .today {
    background: var(--amber);
    color: var(--night);
    border-color: var(--amber);
}

.card .week .on {
    background: var(--mist-light);
    color: var(--night);
}

.card .week .off {
    color: var(--muted);
    border-color: rgba(43, 46, 131, 0.35);
}

.card .week .today {
    background: var(--amber);
    color: var(--night);
}

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

.band {
    padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section-head {
    max-width: 44rem;
    margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.more {
    margin: 2rem 0 0;
}

/* the care bento */

.care {
    background: var(--paper);
}

.bento {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 1rem;
}

.tile {
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.4rem, 3vw, 2rem);
    box-shadow: 0 20px 40px -32px rgba(20, 22, 74, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 46px -30px rgba(20, 22, 74, 0.55);
}

.tile h3 {
    margin-bottom: 0.6rem;
}

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

.tile-num {
    display: block;
    font-family: var(--display);
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--cobalt-text);
    margin-bottom: 1.4rem;
    letter-spacing: 0.05em;
}

.tile-main {
    grid-row: span 2;
    background:
        radial-gradient(120% 80% at 0% 0%, #fde8e2 0%, transparent 60%),
        radial-gradient(90% 70% at 100% 100%, #dceefa 0%, transparent 60%),
        #fff8ea;
    display: flex;
    flex-direction: column;
}

.tile-main h3 {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 1.2rem;
}

.tile-main::after {
    content: "";
    margin-top: auto;
    height: 8px;
    border-radius: 8px;
    background: var(--spectrum);
    translate: 0 1rem;
}

.tile-ink {
    grid-column: 2 / 4;
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
}

.tile-ink h3 {
    color: var(--white);
}

.tile-ink p {
    color: #e0e2f6;
    font-size: 1.1rem;
}

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

    .tile-main {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .tile-ink {
        grid-column: 1 / -1;
    }
}

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

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

.ticks li {
    position: relative;
    padding-left: 2rem;
    font-size: 1.1rem;
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3em;
    width: 1.05rem;
    height: 1.05rem;
    background:
        linear-gradient(var(--red), var(--red)) center / 100% 34% no-repeat,
        linear-gradient(var(--red), var(--red)) center / 34% 100% no-repeat;
    border-radius: 2px;
}

/* the doctors */

.doctors {
    background: var(--white);
    border-top: 1px solid var(--line);
}

.roll {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
    gap: 0;
    border-top: 2px solid var(--night);
}

.roll li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 0.4rem;
    border-bottom: 1px solid var(--line);
    min-width: 0;
}

.initials {
    flex: none;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--night);
    background:
        linear-gradient(var(--white), var(--white)) padding-box,
        conic-gradient(from 135deg, #e7302a, #ed7f33, #f9b513, #3fb4e6, #007bc3, #e7302a) border-box;
    border: 4px solid transparent;
}

.doc-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.doc-first {
    font-size: 1rem;
    color: var(--muted);
}

.doc-last {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: var(--night);
    overflow-wrap: anywhere;
}

/* the photos of the centre, round like the original's montage */

.rooms {
    position: relative;
    overflow: hidden;
    background-color: #e8f2f4;
    background-image: repeating-radial-gradient(circle at 85% 50%, transparent 0 46px, rgba(0, 123, 195, 0.1) 46px 48px);
}

.rooms-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 2rem;
    align-items: center;
}

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

.photos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
}

.photo a {
    display: block;
    transition: transform 0.25s ease;
}

.photo a:hover {
    transform: scale(1.04) rotate(-1deg);
}

.photo.round a {
    border-radius: 50%;
    padding: 6px;
    background: var(--white);
    box-shadow: 0 18px 36px -20px rgba(20, 22, 74, 0.6);
}

.photo.round img {
    border-radius: 50%;
}

.photo.wide a {
    border-radius: 22px;
    padding: 6px;
    background: var(--white);
    box-shadow: 0 18px 36px -20px rgba(20, 22, 74, 0.6);
}

.photo.wide img {
    border-radius: 16px;
}

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

/* the duty numbers band */

.duty {
    position: relative;
    background: var(--night);
    color: var(--white);
    padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.duty::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 6px;
    background: var(--spectrum);
}

.duty .eyebrow {
    color: var(--amber);
}

.duty h2 {
    color: var(--white);
    margin-bottom: 2.4rem;
}

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

.duty-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1.6rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    min-width: 0;
    container-type: inline-size;
}

.duty-label {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--white);
}

.duty-note {
    color: var(--mist-light);
    font-size: 1rem;
}

.duty-num {
    margin-top: auto;
    padding-top: 1rem;
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(2.8rem, 30cqi, 5rem);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--white);
    text-decoration: none;
    white-space: nowrap;
}

.duty-item.long .duty-num {
    font-size: clamp(1.6rem, 12.5cqi, 2.6rem);
    letter-spacing: -0.01em;
}

.duty-item.vital {
    background: rgba(231, 48, 42, 0.16);
    border-color: rgba(255, 116, 102, 0.5);
}

.duty-item.vital .duty-num {
    color: var(--red-light);
}

.duty-num:hover {
    color: var(--amber);
}

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

/* find us */

.find {
    background: var(--paper);
}

.find-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.find-address {
    font-family: var(--display);
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--night);
}

.find-landmark {
    color: var(--muted);
    font-size: 1.1rem;
}

.facts {
    margin: 0;
    display: grid;
    gap: 0;
}

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

.facts div:first-child {
    border-top: 2px solid var(--night);
}

.facts dt {
    font-family: var(--display);
    font-weight: 700;
    color: var(--cobalt-text);
}

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

.facts dd span {
    color: var(--muted);
}

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

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

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

.page-hero .wrap {
    padding-top: clamp(2.5rem, 6vw, 4.5rem);
    padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.page-hero h1 {
    color: var(--white);
    font-size: clamp(2.6rem, 7vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.035em;
}

.page-hero .lead {
    color: #e4e6f7;
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    max-width: 38em;
    margin: 0;
}

.crumbs {
    font-size: 0.98rem;
    color: #d6d9f2;
    margin-bottom: 1.4rem;
}

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

.crumbs a:hover {
    color: var(--amber);
}

/* the numbered trail of /services */

.trail-band {
    background: var(--paper);
}

.trail {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.2rem;
    position: relative;
}

.trail > li {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 1.4rem;
    align-items: start;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.4rem, 3vw, 2.2rem);
}

.trail-num {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(2.6rem, 6vw, 4rem);
    line-height: 0.9;
    color: var(--cobalt-text);
    letter-spacing: -0.04em;
}

.trail > li:nth-child(1) .trail-num {
    color: var(--red-text);
}

.trail > li:nth-child(2) .trail-num {
    color: #9a5a00;
}

.trail h2 {
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
}

.trail p {
    margin: 0;
    font-size: 1.1rem;
}

.trail p a,
.facts dd a[href^="tel:"] {
    white-space: nowrap;
}

@media (max-width: 560px) {
    .trail > li {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.6rem;
    }
}

.agree {
    background: var(--white);
}

.agree-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(1.4rem, 4vw, 3rem);
    align-items: center;
}

.agree-mark {
    width: clamp(5.5rem, 14vw, 9rem);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(2.8rem, 7vw, 4.6rem);
    color: var(--night);
    background:
        linear-gradient(#fff8ea, #fff8ea) padding-box,
        conic-gradient(from 135deg, #e7302a, #ed7f33, #f9b513, #3fb4e6, #007bc3, #e7302a) border-box;
    border: 8px solid transparent;
}

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

.agree-text {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    max-width: 32em;
}

.callband {
    background: var(--ink);
    color: var(--white);
}

.callband-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.callband h2 {
    color: var(--white);
    margin-bottom: 0.3rem;
}

.callband p {
    color: #e0e2f6;
    margin: 0;
    font-size: 1.15rem;
}

.btn.big {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    min-height: 68px;
    padding-inline: 2rem;
}

/* contact */

.contact-band {
    background: var(--paper);
}

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

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.4rem, 3.4vw, 2.4rem);
    box-shadow: 0 20px 40px -32px rgba(20, 22, 74, 0.45);
    min-width: 0;
}

.card h2 {
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
}

.card .week {
    margin-top: 1.4rem;
}

.big-phone-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.8rem;
    margin-bottom: 1.4rem;
}

.big-phone-line span {
    font-family: var(--display);
    font-weight: 700;
    color: var(--cobalt-text);
}

.big-phone {
    display: inline-block;
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(2rem, 5.4vw, 3rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--night);
    text-decoration: none;
    white-space: nowrap;
}

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

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

/* the form */

.contact-form > div {
    margin-bottom: 1.1rem;
}

.contact-form label {
    display: block;
    font-family: var(--display);
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--night);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    font: inherit;
    color: var(--text);
    padding: 0.8rem 1rem;
    border: 2px solid rgba(43, 46, 131, 0.25);
    border-radius: 14px;
    background: var(--paper);
}

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

.contact-form ul {
    margin: 0.3rem 0 0;
    padding-left: 1.2rem;
    color: var(--red-text);
}

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

.contact-sent {
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 14px;
    background: #e3f4ec;
    color: #0d4a30;
}

.contact-sent strong {
    display: block;
}

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

.foot {
    position: relative;
    background: var(--night-2);
    color: #e0e2f6;
    padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem;
}

.foot .spectrum {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 6px;
    background: var(--spectrum);
}

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

.foot h2 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--amber);
    margin: 0 0 0.7rem;
}

.foot p,
.foot address {
    font-style: normal;
    margin: 0 0 1.2rem;
}

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

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

.foot-small {
    color: #c5c8e8;
}

.logo-tile {
    display: inline-block;
    background: var(--white);
    border-radius: 22px;
    padding: 12px 16px;
    margin-bottom: 1.2rem;
}

.logo-tile img {
    height: 90px;
    width: auto;
}

.foot-phone {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.2rem;
    white-space: nowrap;
}

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

.foot-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    margin-top: 1.5rem;
    padding-top: 1.4rem;
    font-size: 0.95rem;
    color: #c5c8e8;
}

.foot-bottom p {
    margin: 0;
}

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

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

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

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

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

.not-found h1 {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    font-weight: 900;
}

.not-found h2 {
    font-size: 1.6rem;
    margin-top: 2rem;
}

.not-found img {
    height: 100px;
    width: auto;
    margin-bottom: 1.6rem;
}

/* ---- motion: one opening moment, reveals on scroll; all still under reduced motion ---- */

@media (prefers-reduced-motion: no-preference) {
    .dial-arc {
        animation: gm-draw 1.8s cubic-bezier(0.6, 0, 0.2, 1) 0.2s both;
    }

    .dial.is-live .dial-needle {
        animation: gm-needle 1s ease-out 1.3s both;
    }

    .hero-text > * {
        animation: gm-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;
    }

    .week .today {
        animation: gm-pulse 2.4s ease-in-out 2s 2;
    }

    @supports (animation-timeline: view()) {
        .reveal {
            animation: gm-rise linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 55%;
        }
    }
}

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

@keyframes gm-needle {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes gm-rise {
    from {
        opacity: 0;
        translate: 0 28px;
    }
    to {
        opacity: 1;
        translate: 0 0;
    }
}

@keyframes gm-pulse {
    50% {
        box-shadow: 0 0 0 8px rgba(249, 181, 19, 0.25);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ---- lightbox colours ---- */

.lightbox {
    --lb-bg: rgba(14, 15, 52, 0.96);
    --lb-text: #f2f3fb;
    --lb-accent: #f9b513;
    --lb-accent-soft: rgba(249, 181, 19, 0.2);
}

/* ---- 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;
    }
}
