:root {
    --bg: #fbf7ef;
    --paper: #fffdf8;
    --paper-soft: #f5eee2;
    --ink: #26322f;
    --muted: #66756f;
    --line: #dfd2bf;
    --brand: #52766b;
    --brand-dark: #31584f;
    --brand-soft: #dce9e1;
    --clay: #b8795d;
    --clay-dark: #91573f;
    --gold: #d3ad69;
    --danger: #a84335;
    --shadow: 0 18px 45px rgba(53, 64, 59, 0.12);
    --radius: 8px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(251, 247, 239, 0.96), rgba(246, 239, 228, 0.9)),
        radial-gradient(circle at top left, rgba(211, 173, 105, 0.18), transparent 34rem);
    color: var(--ink);
    line-height: 1.6;
}

a {
    color: inherit;
}

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

.skip-link {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 100;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--brand-dark);
    font-weight: 760;
    text-decoration: none;
    box-shadow: var(--shadow);
    transform: translateY(-160%);
    opacity: 0;
    pointer-events: none;
    transition: transform 160ms ease, opacity 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    outline: 3px solid rgba(211, 173, 105, 0.55);
    outline-offset: 3px;
}

body > header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(223, 210, 191, 0.75);
    background: rgba(255, 253, 248, 0.92);
    backdrop-filter: blur(18px);
}

body > header > div,
.site-container {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
}

body > header > div {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

body > header a {
    text-decoration: none;
}

body > header > div > a:first-child {
    font-size: 1.02rem;
    font-weight: 760;
    letter-spacing: 0;
    color: var(--brand-dark);
}

body > header nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 650;
}

body > header nav a:hover {
    color: var(--brand-dark);
}

body > header > div > a:last-child,
.button-primary,
.button-secondary,
.button-outline,
button {
    min-height: 44px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.78rem 1rem;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 760;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body > header > div > a:last-child,
.button-primary,
button {
    color: #fff;
    background: var(--brand-dark);
    box-shadow: 0 10px 26px rgba(49, 88, 79, 0.22);
}

body > header > div > a:last-child:hover,
.button-primary:hover,
button:hover {
    background: #274941;
    transform: translateY(-1px);
}

.button-secondary {
    color: var(--brand-dark);
    background: var(--brand-soft);
    border-color: rgba(49, 88, 79, 0.18);
}

.button-outline {
    color: var(--brand-dark);
    background: rgba(255, 253, 248, 0.74);
    border-color: rgba(49, 88, 79, 0.24);
}

.site-hero {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    display: grid;
    align-items: center;
    isolation: isolate;
}

.site-hero img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(38, 50, 47, 0.82), rgba(38, 50, 47, 0.44) 42%, rgba(38, 50, 47, 0.06)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.16));
}

.site-hero__content {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
    padding: 84px 0;
    color: #fffdf8;
}

.eyebrow {
    margin: 0;
    color: #f2dec0;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section .eyebrow,
.card .eyebrow,
aside .eyebrow,
.form-panel .eyebrow,
.calendar-shell .eyebrow {
    color: var(--clay-dark);
}

.site-hero h1,
.page-hero h1 {
    max-width: 760px;
    margin: 16px 0 0;
    font-size: clamp(2.6rem, 7vw, 5.25rem);
    line-height: 0.98;
    letter-spacing: 0;
    font-weight: 820;
}

.site-hero p:not(.eyebrow),
.page-hero p {
    max-width: 650px;
    margin: 24px 0 0;
    color: rgba(255, 253, 248, 0.9);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

.hero-trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 760px;
    margin-top: 40px;
}

.trust-item {
    border: 1px solid rgba(255, 253, 248, 0.24);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, 0.13);
    padding: 14px;
    backdrop-filter: blur(12px);
}

.trust-item strong {
    display: block;
    color: #fff;
}

.trust-item span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 253, 248, 0.78);
    font-size: 0.88rem;
}

.section {
    padding: clamp(56px, 8vw, 92px) 0;
}

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

.section--soft {
    background: linear-gradient(180deg, #f7efe3, #fbf7ef);
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.section-header h2,
.content-block h1,
.content-block h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.section-header p,
.content-block p {
    color: var(--muted);
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 20px;
}

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

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

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

.card,
article,
aside,
.form-panel,
.calendar-shell,
.appointment-summary,
.message-box {
    border: 1px solid rgba(223, 210, 191, 0.88);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, 0.86);
    box-shadow: 0 12px 34px rgba(56, 66, 61, 0.08);
}

.card,
article,
aside,
.form-panel,
.message-box {
    padding: clamp(18px, 3vw, 28px);
}

.card h2,
.card h3,
article h2,
article h3,
aside h2,
aside h3 {
    margin-top: 0;
    color: var(--ink);
    line-height: 1.18;
}

.card p,
article p,
aside p {
    color: var(--muted);
}

.journey-list {
    counter-reset: steps;
    display: grid;
    gap: 16px;
    padding: 0;
    margin: 22px 0 0;
    list-style: none;
}

.journey-list li {
    position: relative;
    padding: 18px 18px 18px 64px;
    border: 1px solid rgba(223, 210, 191, 0.8);
    border-radius: var(--radius);
    background: #fffaf2;
}

.journey-list li::before {
    counter-increment: steps;
    content: counter(steps);
    position: absolute;
    left: 18px;
    top: 18px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--clay);
    font-weight: 800;
}

.page-hero {
    padding: clamp(64px, 9vw, 112px) 0;
    background:
        linear-gradient(120deg, rgba(49, 88, 79, 0.93), rgba(82, 118, 107, 0.78)),
        url("/images/cabinet-hero.png") center / cover;
    color: #fffdf8;
}

.page-hero h1 {
    color: #fffdf8;
}

.content-block {
    max-width: 880px;
}

.content-block--wide {
    max-width: none;
}

.prose-warm {
    color: var(--muted);
    font-size: 1.05rem;
}

.legal-content {
    max-width: 940px;
}

.legal-intro,
.legal-section {
    border: 1px solid rgba(223, 210, 191, 0.88);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, 0.9);
    box-shadow: 0 12px 34px rgba(56, 66, 61, 0.06);
}

.legal-intro {
    margin-bottom: 18px;
    padding: clamp(20px, 4vw, 30px);
}

.legal-section {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding: clamp(20px, 4vw, 32px);
}

.legal-section h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    line-height: 1.15;
}

.legal-section p,
.legal-intro p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.legal-section a {
    color: var(--brand-dark);
    font-weight: 780;
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

.legal-details {
    display: grid;
    gap: 8px;
    border-left: 3px solid var(--gold);
    background: #fffaf2;
    padding: 14px 16px;
}

.legal-section ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 1.15rem;
    color: var(--muted);
    line-height: 1.7;
}

.practice-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 34px;
}

.practice-details div {
    border-left: 3px solid var(--gold);
    padding-left: 16px;
}

.booking-type-form,
.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
    margin-top: 28px;
}

.appointment-type-picker {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
}

.appointment-type-picker .section-header {
    margin-bottom: 0;
}

.appointment-type-picker .section-header > div {
    width: 100%;
}

.appointment-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 12px;
    max-width: 860px;
}

.appointment-type-card {
    appearance: none;
    position: relative;
    width: 100%;
    min-height: 116px;
    display: block;
    border: 1px solid rgba(49, 88, 79, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, 0.72);
    color: var(--ink);
    padding: 15px 46px 15px 15px;
    text-decoration: none;
    backdrop-filter: blur(10px);
    box-shadow: none;
    font: inherit;
    text-align: left;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.appointment-type-card:hover,
.appointment-type-card:focus-visible {
    border-color: rgba(49, 88, 79, 0.44);
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 10px 24px rgba(56, 66, 61, 0.06);
    transform: none;
}

.appointment-type-card:focus-visible {
    outline: 3px solid rgba(82, 118, 107, 0.2);
    outline-offset: 3px;
}

.appointment-type-card.is-selected {
    border-color: var(--brand-dark);
    background: linear-gradient(135deg, rgba(49, 88, 79, 0.95), rgba(82, 118, 107, 0.86));
    color: #fffdf8;
    box-shadow: 0 12px 28px rgba(49, 88, 79, 0.2);
}

.appointment-type-card__meta,
.appointment-type-card__tag {
    display: block;
}

.appointment-type-card__info {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(82, 118, 107, 0.28);
    border-radius: 999px;
    background: #fffdf8;
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1;
}

.appointment-type-card__info::after {
    content: attr(data-description);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 10;
    width: min(280px, calc(100vw - 48px));
    border: 1px solid rgba(223, 210, 191, 0.95);
    border-radius: var(--radius);
    background: #fffdf8;
    color: var(--muted);
    box-shadow: 0 16px 34px rgba(56, 66, 61, 0.12);
    padding: 11px 12px;
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    text-align: left;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    visibility: hidden;
}

.appointment-type-card__info:hover::after,
.appointment-type-card:focus-visible .appointment-type-card__info::after {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.appointment-type-card strong {
    display: block;
    color: var(--ink);
    font-size: 1.02rem;
    line-height: 1.25;
}

.appointment-type-card__meta {
    display: block;
    margin-top: 6px;
    color: var(--brand-dark);
    font-size: 0.88rem;
    font-weight: 680;
    line-height: 1.45;
}

.appointment-type-card__tag {
    width: fit-content;
    margin-top: 10px;
    border: 1px solid rgba(181, 137, 77, 0.28);
    border-radius: 999px;
    background: #fff7e9;
    color: #74512b;
    padding: 5px 9px;
    font-size: 0.78rem;
    font-weight: 780;
}

.appointment-type-card.is-selected strong,
.appointment-type-card.is-selected .appointment-type-card__meta {
    color: #fffdf8;
}

.appointment-type-card.is-selected .appointment-type-card__tag {
    border-color: rgba(255, 253, 248, 0.26);
    background: rgba(255, 253, 248, 0.13);
    color: #fffdf8;
}

.appointment-type-card.is-selected .appointment-type-card__info {
    border-color: rgba(255, 253, 248, 0.32);
    background: rgba(255, 253, 248, 0.16);
    color: #fffdf8;
}

label {
    color: var(--ink);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(126, 113, 95, 0.36);
    border-radius: var(--radius);
    background: #fffdf8;
    color: var(--ink);
    padding: 0.82rem 0.9rem;
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(82, 118, 107, 0.22);
    border-color: var(--brand);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

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

.form-row {
    margin-top: 16px;
}

.form-stack .form-row {
    margin-top: 0;
}

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

.consent-list {
    display: grid;
    gap: 12px;
    margin: 20px 0 0;
}

.consent-list label {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: start;
    gap: 10px;
    color: var(--muted);
    font-weight: 600;
}

.consent-list input {
    width: auto;
    margin-top: 4px;
}

.calendar-shell {
    scroll-margin-top: 96px;
    margin-top: 32px;
    padding: 18px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.calendar-nav h2 {
    margin: 0;
    text-align: center;
    font-size: 1.2rem;
}

.calendar-nav.is-loading {
    opacity: 0.72;
}

.calendar-nav.is-loading a {
    pointer-events: none;
}

.booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    align-items: start;
    gap: 24px;
}

.booking-layout > div {
    min-width: 0;
}

.booking-layout fieldset {
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(118px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-color: rgba(49, 88, 79, 0.35) transparent;
}

.day-column {
    min-width: 118px;
    border: 1px solid rgba(223, 210, 191, 0.85);
    border-radius: var(--radius);
    background: #fffdf8;
    padding: 12px;
}

.day-column__title {
    margin: 0 0 10px;
    color: var(--brand-dark);
    font-weight: 800;
}

.slot-list {
    display: grid;
    gap: 8px;
}

.slot-option {
    display: block;
    cursor: pointer;
}

.slot-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.slot-option span {
    display: block;
    border: 1px solid rgba(82, 118, 107, 0.22);
    border-radius: var(--radius);
    background: #f7f0e5;
    padding: 0.64rem 0.5rem;
    text-align: center;
    color: var(--brand-dark);
    font-weight: 760;
}

.slot-option:hover span,
.slot-option input:checked + span {
    border-color: var(--brand-dark);
    background: var(--brand-dark);
    color: #fff;
}

.payment-option-list {
    display: grid;
    gap: 10px;
    margin: 20px 0 0;
    border: 0;
    padding: 0;
}

.payment-option-list legend {
    margin-bottom: 6px;
    color: var(--ink);
    font-weight: 800;
}

.payment-option-card {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 12px;
    align-items: start;
    border: 1px solid rgba(82, 118, 107, 0.18);
    border-radius: var(--radius);
    background: #fffdf8;
    padding: 13px;
    cursor: pointer;
}

.payment-option-card:has(input:checked) {
    border-color: var(--brand-dark);
    background: var(--brand-soft);
}

.payment-option-card input {
    width: auto;
    margin-top: 4px;
}

.payment-option-card strong,
.payment-option-card small,
.payment-option-card em {
    display: block;
}

.payment-option-card small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.45;
}

.payment-option-card em {
    margin-top: 6px;
    color: var(--brand-dark);
    font-style: normal;
    font-weight: 800;
}

.empty-slots {
    color: var(--muted);
    font-size: 0.9rem;
}

.alert {
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-top: 20px;
}

.alert-error {
    border: 1px solid rgba(168, 67, 53, 0.22);
    background: #fff0ed;
    color: var(--danger);
}

.alert-info {
    border: 1px solid rgba(82, 118, 107, 0.18);
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.faq-list {
    display: grid;
    gap: 10px;
}

.payment-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 28px;
    align-items: start;
}

.payment-summary {
    position: sticky;
    top: 104px;
}

.checkout-panel {
    min-height: 520px;
}

#payment-complete h2 {
    margin: 0 0 10px;
    font-size: 1.4rem;
}

#payment-complete p {
    margin: 0 0 18px;
}

details {
    border: 1px solid rgba(223, 210, 191, 0.85);
    border-radius: var(--radius);
    background: #fffdf8;
    padding: 18px;
}

summary {
    cursor: pointer;
    font-weight: 780;
}

footer {
    border-top: 1px solid rgba(223, 210, 191, 0.85);
    background: #fffdf8;
}

footer > div {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 32px;
    padding: 42px 0;
    color: var(--muted);
}

footer a {
    color: var(--brand-dark);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.footer-links {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

@media (max-width: 900px) {
    body > header > div {
        min-height: auto;
        padding: 14px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    body > header nav {
        width: 100%;
        gap: 14px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .hero-trust,
    .grid-3,
    .grid-4,
    .grid-2,
    .practice-details,
    .booking-layout,
    .form-grid,
    .payment-shell,
    footer > div {
        grid-template-columns: 1fr;
    }

    .payment-summary {
        position: static;
    }

    .section-header {
        align-items: start;
        flex-direction: column;
    }

    .site-hero {
        min-height: 680px;
    }

    .site-hero::after {
        background: linear-gradient(180deg, rgba(38, 50, 47, 0.84), rgba(38, 50, 47, 0.42));
    }
}

@media (max-width: 560px) {
    body > header > div,
    .site-container,
    .site-hero__content,
    footer > div {
        width: min(100% - 24px, 1120px);
    }

    .site-hero h1,
    .page-hero h1 {
        font-size: 2.45rem;
    }

    .hero-actions,
    .section-actions,
    .calendar-nav,
    .booking-type-form {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions a,
    .section-actions a,
    .calendar-nav a,
    .booking-type-form button,
    .button-primary,
    .button-secondary,
    .button-outline {
        width: 100%;
    }
}
