/* ==========================================================================
   Booking wizard
   --------------------------------------------------------------------------
   One decision per screen, a summary that never disappears, and motion that
   explains where you are rather than decorating the page.

   Every animation is optional: it is all disabled under
   prefers-reduced-motion: reduce, and the flow works with JavaScript off.
   ========================================================================== */

body.wz {
    min-height: 100dvh;
    background:
        radial-gradient(1100px 520px at 50% -12%, rgba(31, 70, 50, 0.09), transparent 62%),
        var(--paper);
    padding-bottom: env(safe-area-inset-bottom);
}

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

.wz-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(251, 248, 241, 0.82);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
}

.wz-header__row {
    width: min(100% - 2rem, 44rem);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding-block: 0.875rem;
}

.wz-brand {
    justify-self: start;
    font-family: var(--serif);
    font-size: 0.9375rem;
    color: var(--ink);
    text-decoration: none;
    line-height: 1.2;
    max-width: 60%;
}

.wz-brand__short {
    display: inline;
}

.wz-brand__full {
    display: none;
}

@media (min-width: 30rem) {
    .wz-brand {
        font-size: 1rem;
    }

    .wz-brand__short {
        display: none;
    }

    .wz-brand__full {
        display: inline;
    }
}

.wz-step {
    margin: 0;
    text-align: center;
    line-height: 1.15;
}

.wz-step__count {
    display: block;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7d5f16;
    color: color-mix(in oklab, var(--brand-accent) 68%, #1a1408);
    font-weight: 700;
}

.wz-step__of {
    color: var(--ink-soft);
    font-weight: 600;
}

.wz-step__name {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink);
}

.wz-exit {
    justify-self: end;
    font-size: 0.875rem;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 0.5rem 0.25rem;
}

.wz-exit:hover {
    color: var(--ink);
    text-decoration: underline;
}

.wz-progress {
    height: 3px;
    background: rgba(31, 70, 50, 0.1);
    overflow: hidden;
}

.wz-progress__fill {
    display: block;
    height: 100%;
    width: var(--progress, 25%);
    background: linear-gradient(90deg, var(--brand), var(--brand-accent));
    border-radius: 0 3px 3px 0;
    transition: width 0.5s var(--ease-out);
}

/* --------------------------------------------------------------- layout */

.wz-main {
    width: min(100% - 2rem, 44rem);
    margin-inline: auto;
    padding-block: 2rem 1rem;
    /* Fade only. A transform here (even one left behind by an animation with
       fill-mode: both) makes <main> the containing block for the fixed action
       bar, which then sticks to the bottom of the page instead of the screen. */
    animation: wz-appear 0.4s var(--ease-out) both;
}

@keyframes wz-appear {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.wz-title {
    font: 400 clamp(1.75rem, 5vw, 2.35rem)/1.1 var(--serif);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.wz-lede {
    color: var(--ink-soft);
    font-size: 0.9375rem;
    max-width: 34rem;
    margin-bottom: 1.5rem;
}

.bar-space {
    height: calc(6.5rem + env(safe-area-inset-bottom));
}

/* -------------------------------------------------------------- filters */

.filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: -1rem;
    padding: 0.25rem 1rem 1rem;
    scroll-snap-type: x proximity;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filter {
    flex: 0 0 auto;
    scroll-snap-align: start;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 40px;
    cursor: pointer;
    transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.filter:hover {
    border-color: var(--brand);
    background: #f6f3ea;
}

.filter.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* ------------------------------------------------------------ catalogue */

.cat {
    margin-bottom: 2rem;
}

.cat[hidden] {
    display: none;
}

.cat__title {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: #7d5f16;
    color: color-mix(in oklab, var(--brand-accent) 68%, #1a1408);
    margin: 1.75rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
}

.cards {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: 1fr;
}

@media (min-width: 38rem) {
    .cards {
        grid-template-columns: 1fr 1fr;
    }
}

.card-svc {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.125rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
    animation: wz-rise 0.5s var(--ease-out) both;
}

.card-svc:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--line-strong);
}

/* A short stagger so the list arrives as a group rather than all at once.
   Capped at the first few cards so scrolling never feels delayed. */
.cards .card-svc:nth-child(1) { animation-delay: 0.02s; }
.cards .card-svc:nth-child(2) { animation-delay: 0.06s; }
.cards .card-svc:nth-child(3) { animation-delay: 0.10s; }
.cards .card-svc:nth-child(4) { animation-delay: 0.14s; }
.cards .card-svc:nth-child(5) { animation-delay: 0.18s; }
.cards .card-svc:nth-child(n + 6) { animation-delay: 0.2s; }

.card-svc__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.6rem;
}

.card-svc__name {
    font: 400 1.0625rem/1.3 var(--serif);
    margin: 0;
    letter-spacing: -0.01em;
}

.card-svc__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tag {
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    color: var(--brand);
    background: #eaf0e9;
    border-radius: 999px;
    padding: 0.2rem 0.45rem;
}

.tag--gold {
    color: #6d5310;
    background: #f7ecd2;
}

.card-svc__desc {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* --------------------------------------------------------- option pills */

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.875rem;
}

.option {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    transition: background 0.16s var(--ease), color 0.16s var(--ease),
                border-color 0.16s var(--ease), transform 0.16s var(--ease);
}

.option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.option__dur {
    color: var(--ink-soft);
    font-weight: 500;
}

.option__price {
    font-weight: 600;
    color: var(--ink);
}

.option:hover {
    border-color: var(--brand);
    background: #f7f4ec;
}

.option:has(input:checked) {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(19, 38, 28, 0.18);
}

.option:has(input:checked) .option__dur {
    color: rgba(255, 255, 255, 0.75);
}

.option:has(input:checked) .option__price {
    color: #fff;
}

.option:has(input:focus-visible) {
    outline: 3px solid var(--brand-accent);
    outline-offset: 2px;
}

/* ---------------------------------------------------------- date strip */

.dates {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: -1rem;
    padding: 0.25rem 1rem 1rem;
    -webkit-overflow-scrolling: touch;
}

.dates::-webkit-scrollbar {
    display: none;
}

.date {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 3.875rem;
    padding: 0.55rem 0 0.6rem;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    line-height: 1.15;
    transition: background 0.18s var(--ease), color 0.18s var(--ease),
                border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.date:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}

.date.is-selected {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 6px 18px rgba(19, 38, 28, 0.16);
}

.date.is-empty {
    opacity: 0.4;
    pointer-events: none;
}

.date__dow {
    display: block;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    opacity: 0.75;
}

.date__num {
    display: block;
    font: 400 1.25rem/1.1 var(--serif);
    margin-block: 0.1rem;
}

.date__mon {
    display: block;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.6;
}

/* ---------------------------------------------------------------- slots */

.slotgroup {
    margin-bottom: 1.25rem;
}

.slotgroup__title {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-weight: 700;
    color: #7d5f16;
    color: color-mix(in oklab, var(--brand-accent) 68%, #1a1408);
    margin-bottom: 0.6rem;
}

.slotgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    animation: wz-rise 0.32s var(--ease-out) both;
}

@media (min-width: 26rem) {
    .slotgrid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.slot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.4rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background 0.16s var(--ease), color 0.16s var(--ease),
                border-color 0.16s var(--ease), transform 0.16s var(--ease);
}

.slot input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.slot:hover {
    border-color: var(--brand);
    background: #f7f4ec;
}

.slot:has(input:checked) {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(19, 38, 28, 0.16);
}

.slot:has(input:focus-visible) {
    outline: 3px solid var(--brand-accent);
    outline-offset: 2px;
}

.empty {
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.9375rem;
}

/* Loading placeholders that match the slot grid, so the page does not jump. */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

@media (min-width: 26rem) {
    .skeleton-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.skeleton {
    height: 46px;
    border-radius: var(--radius-sm);
    background: linear-gradient(100deg, #efeade 20%, #f8f5ee 40%, #efeade 60%);
    background-size: 220% 100%;
    animation: wz-shimmer 1.3s linear infinite;
}

/* ------------------------------------------------------------ summaries */

.crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.crumb__change {
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.crumb__change:hover {
    border-bottom-color: currentColor;
}

.crumb__service {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

/* --------------------------------------------------------- sticky action */

.bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(255, 253, 249, 0.9);
    backdrop-filter: saturate(1.4) blur(16px);
    -webkit-backdrop-filter: saturate(1.4) blur(16px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 28px rgba(23, 33, 27, 0.06);
    padding-bottom: env(safe-area-inset-bottom);
}

.bar__inner {
    width: min(100% - 2rem, 44rem);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.75rem;
}

.bar__info {
    min-width: 0;
}

.bar__eyebrow {
    display: block;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #7d5f16;
    color: color-mix(in oklab, var(--brand-accent) 68%, #1a1408);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar__title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52vw;
}

.bar__action {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 0 0 auto;
}

.bar__price {
    font: 400 1.125rem/1 var(--serif);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 26rem) {
    .bar__price {
        display: none;
    }
}

/* --------------------------------------------------------------- review */

.hold {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #eef4ec;
    border: 1px solid #d6e3d6;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
    color: #2f4f3a;
    margin-bottom: 1.25rem;
}

.hold__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #4f8b5f;
    box-shadow: 0 0 0 0 rgba(79, 139, 95, 0.5);
    animation: wz-pulse 2.2s var(--ease) infinite;
}

.hold__left {
    color: var(--ink-soft);
    margin-left: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.review {
    display: grid;
    gap: 0.875rem;
}

.review__card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.review__title {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-weight: 700;
    color: #7d5f16;
    color: color-mix(in oklab, var(--brand-accent) 68%, #1a1408);
    margin-bottom: 0.35rem;
}

.review__lead {
    font: 400 1.1875rem/1.3 var(--serif);
    margin-bottom: 0.75rem;
}

.review__list,
.review__totals {
    margin: 0;
}

.review__row {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f1ece1;
}

.review__row:last-child {
    border-bottom: 0;
}

.review__row dt {
    color: var(--ink-soft);
    font-size: 0.8125rem;
}

.review__row dd {
    margin: 0;
    font-size: 0.9375rem;
    overflow-wrap: anywhere;
}

.review__totals {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
}

.review__row--total dt,
.review__row--total dd {
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
}

.review__row--total dd {
    font-family: var(--serif);
    font-size: 1.125rem;
}

.review__fine {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: var(--ink-soft);
}

.review__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.review__actions form {
    margin: 0;
}

.stage-note {
    margin-top: 1.25rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    background: var(--surface-warm);
    font-size: 0.875rem;
    color: var(--ink-soft);
}

.stage-note p {
    margin: 0;
}

/* ---------------------------------------------------------------- alerts */

.alert {
    background: var(--danger-bg);
    border: 1px solid #e8c4c0;
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    font-size: 0.9375rem;
    color: #7a2a23;
    margin-bottom: 1.25rem;
}

.alert a {
    color: #7a2a23;
}

.privacy {
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 34rem;
    margin-top: 0.5rem;
}

/* Honeypot: invisible to people, irresistible to bots. */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --------------------------------------------------------------- motion */

@keyframes wz-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wz-shimmer {
    from {
        background-position: 180% 0;
    }

    to {
        background-position: -60% 0;
    }
}

@keyframes wz-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 139, 95, 0.45);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(79, 139, 95, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(79, 139, 95, 0);
    }
}

/* Cross-document transitions where the browser supports them: moving between
   steps fades rather than flashing white. */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: wz-fade-out 0.16s ease both;
}

::view-transition-new(root) {
    animation: wz-fade-in 0.24s ease both;
}

@keyframes wz-fade-out {
    to {
        opacity: 0;
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .wz-main,
    .card-svc,
    .slotgrid,
    .hold__dot {
        animation: none !important;
    }

    .skeleton {
        animation: none;
        background: #f1ece1;
    }
}

/* ------------------------------------------------------------- confirmation */

.review__note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--ink-soft);
    max-width: 34rem;
}

.thanks {
    margin-bottom: 1.5rem;
}

.thanks__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #e8f0e8;
    color: var(--brand);
    margin-bottom: 0.875rem;
    animation: wz-pop 0.5s var(--ease-out) both;
}

.thanks__reference {
    font: 400 1.5rem/1.2 var(--serif);
    letter-spacing: 0.05em;
    margin: 0.25rem 0 1rem;
}

.steps-list {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
}

.steps-list li {
    margin-bottom: 0.7rem;
    font-size: 0.9375rem;
    color: var(--ink-soft);
}

.steps-list strong {
    display: block;
    color: var(--ink);
}

@keyframes wz-pop {
    from {
        opacity: 0;
        transform: scale(0.72);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .thanks__mark {
        animation: none !important;
    }
}
