/* ==========================================================================
   Home page
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero — a walk through a warm-lit, three-room showroom. The section is tall
   (scroll length) and .hero-stage sticks to the screen; js/home.js sets the
   active room, js/hero-3d.js moves the camera.
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    background: var(--night);
    color: var(--on-dark);
}

/* the walk-through needs scrolling room (only with JS; without it the hero is one screen).
   More height = slower walk: the video's ~21 s (four rooms) are spread over ~5.5 screens of scrolling. */
.js .hero {
    height: 650vh;
}

.hero-stage {
    position: sticky;
    top: 0;
    isolation: isolate;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-still,
.hero-still img,
.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-still img {
    object-fit: cover;
    object-position: 50% 0;
}

.hero-still {
    opacity: 0;
    transition: opacity 400ms var(--ease-out);
}

.hero-still.is-active {
    opacity: 1;
}

/* light version (no 3D): a simple parallax, the active still drifts up as you scroll its room
   (js/home.js sets --pp 0..1); never with reduced motion */
@media (prefers-reduced-motion: no-preference) {
    html:not(.has-3d) .hero-still img {
        transform: translate3d(0, calc(var(--pp, 0) * -28px), 0) scale(1.06);
        will-change: transform;
    }
}

.hero-canvas {
    opacity: 0;
    transition: opacity 900ms var(--ease-out);
}

/* js/hero-3d.js adds html.has-3d after the first frame is drawn */
.has-3d .hero-canvas {
    opacity: 1;
}

.has-3d .hero-still {
    opacity: 0;
}

/* photoreal video tour (js/hero-video.js adds html.has-video once the first frame is ready) */
.hero-seq {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 600ms var(--ease-out);
    pointer-events: none;
}

.has-video .hero-seq {
    opacity: 1;
}

.has-video .hero-still {
    opacity: 0;
}

/* readability: a soft warm-dark veil where the text sits, light elsewhere */
.hero-media::before,
.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;   /* over the video */
    pointer-events: none;
}

/* the strong veil is for the intro text (living room); in the other rooms the floor stays clear */
.hero-media::before {
    /* phones/tablets: the copy sits over the busiest part of the room, so the veil holds longer */
    background: linear-gradient(to top, rgba(20, 16, 13, 0.94) 0%, rgba(20, 16, 13, 0.78) 38%, rgba(20, 16, 13, 0.4) 56%, rgba(20, 16, 13, 0) 72%);
    transition: opacity 500ms var(--ease-out);
}

.hero[data-room]:not([data-room="0"]) .hero-media::before {
    opacity: 0;
}

/* always: the menu and the room's card stay readable */
.hero-media::after {
    background:
        linear-gradient(to bottom, rgba(20, 16, 13, 0.6) 0%, rgba(20, 16, 13, 0.18) 34%, rgba(20, 16, 13, 0) 50%),
        linear-gradient(to top, rgba(20, 16, 13, 0.35) 0%, rgba(20, 16, 13, 0) 22%);
}

/* phones: the first card would cover the title; the intro already says it */
@media (max-width: 1023px) {
    .floor-card[data-room="0"] {
        display: none;
    }
}

/* the ghost button sits on the video: plain tint instead of frosted glass */
.hero .btn-ghost {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(23, 19, 15, 0.45);
}

/* panels: one per room, crossfading with a short blur (enter a bit slower than exit) */
.room-panel {
    transition: opacity 420ms var(--ease-out) 60ms, transform 420ms var(--ease-out) 60ms, visibility 0s linear 0s;
}

.js .room-panel:not(.is-active) {
    opacity: 0;
    transform: translateY(14px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
}

.hero-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-top: calc(var(--header-h) + 32px);
    padding-bottom: clamp(88px, 14vh, 140px);
}

.hero-copy {
    max-width: 40rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: var(--fs-display);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 30px rgba(20, 16, 13, 0.35);
}

.hero-title .sans {
    display: block;
    margin-bottom: 0.12em;
    font-family: var(--font-sans);
    font-size: 0.5em;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-title em {
    display: block;
    font-style: italic;
    font-variation-settings: "opsz" 72;
}

.hero-lead {
    max-width: 34rem;
    margin-top: 24px;
    font-size: var(--fs-lead);
    line-height: 1.55;
    color: #d6d0c8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

@media (max-width: 479px) {
    .hero-actions .btn {
        flex: 1 1 100%;
    }
}

/* captions for rooms 2 and 3: a glass card */
.room-caption {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    bottom: clamp(88px, 14vh, 140px);
    max-width: 30rem;
    padding: 24px 26px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(28, 23, 19, 0.45);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
}

.room-caption .room-name {
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem);
    font-style: italic;
    line-height: 1.05;
    color: var(--on-dark);
}

.room-caption p:not(.room-name) {
    margin: 12px 0 20px;
    color: #d6d0c8;
    font-size: var(--fs-small);
    line-height: 1.55;
}

/* without JS the extra captions would stack on top of the hero text */
html:not(.js) .room-caption {
    display: none;
}

/* which floor is on screen */
.room-nav {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    bottom: 24px;
    display: flex;
    gap: 8px;
}

.room-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px 0;
    border: 0;
    background: none;
    color: rgba(238, 239, 235, 0.55);
    font-size: var(--fs-xs);
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: color var(--dur) ease;
}

.room-nav-bar {
    position: relative;
    display: block;
    height: 2px;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(238, 239, 235, 0.22);
}

.room-nav-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--sand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 500ms var(--ease-out);
}

.room-nav-item.is-active {
    color: var(--on-dark);
}

.room-nav-item.is-past .room-nav-bar::after {
    transform: scaleX(1);
}

/* the active bar fills as you move through its room (js/home.js sets --fill, 0..1) */
.room-nav-item.is-active .room-nav-bar::after {
    transform: scaleX(var(--fill, 1));
    transition: none;
}

@media (hover: hover) and (pointer: fine) {
    .room-nav-item:hover {
        color: var(--on-dark);
    }
}

html:not(.js) .room-nav {
    display: none;
}

/* floor card: the room's floor, its benefits and a quote button, during the "floor moment"
   (phones: top, under the tour controls; desktop: right side) */
.floor-card {
    position: absolute;
    top: calc(var(--header-h) + 64px);
    left: var(--gutter);
    right: var(--gutter);
    max-width: 22rem;
    margin-left: auto;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(23, 19, 15, 0.84);   /* solid: no frosted glass over the moving video */
    color: var(--on-dark);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    filter: blur(4px);
    /* exit: quick */
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), filter 180ms var(--ease-out), visibility 0s linear 180ms;
}

.floor-card.is-on {
    opacity: 1;
    visibility: visible;
    transform: none;
    filter: none;
    /* enter: a little slower */
    transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out), filter 320ms var(--ease-out), visibility 0s;
}

.floor-card-name {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
    font-style: italic;
    line-height: 1.05;
}

.floor-card-list {
    margin: 10px 0 16px;
    padding-left: 1.1em;
    color: #d6d0c8;
    font-size: var(--fs-small);
    line-height: 1.5;
}

html:not(.has-3d):not(.has-video) .floor-card {
    display: none;
}

/* phones and tablets: animated blur and big backdrop blurs cost dropped frames when the cards and
   captions change (measured: 67-100 ms frames at those moments), so fade only and blur less */
@media (max-width: 1023px) {
    .js .room-panel,
    .js .room-panel:not(.is-active),
    .floor-card,
    .floor-card.is-on {
        filter: none;
    }

}

/* while a floor card is showing, the room caption (same corner) steps aside */
.js .hero.is-floor-moment .room-caption.is-active {
    opacity: 0;
    filter: blur(4px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms var(--ease-out), filter 180ms var(--ease-out), visibility 0s linear 180ms;
}

@media (min-width: 1024px) {
    .floor-card {
        top: auto;
        left: auto;
        right: max(var(--gutter), calc((100vw - var(--container-wide)) / 2));
        bottom: 104px;
    }
}

/* layer labels of the floor sample (only drawn with the 3D scene, pinned by js/hero-3d.js) */
.layer-labels {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    pointer-events: none;
}

.layer-labels li {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--on-dark);
    font-size: var(--fs-xs);
    font-weight: 500;
    white-space: nowrap;
    text-shadow: 0 1px 8px rgba(20, 16, 13, 0.8);
    opacity: 0;
    translate: -6px 0;
    /* exit: quick */
    transition: opacity 140ms var(--ease-out), translate 140ms var(--ease-out);
}

/* a short leader line pointing back at the layer */
.layer-labels li::before {
    content: "";
    width: 14px;
    height: 1px;
    background: var(--sand);
}

.layer-labels li.is-on {
    opacity: 1;
    translate: 0 0;
    /* enter: a little slower, eased out */
    transition: opacity 240ms var(--ease-out), translate 240ms var(--ease-out);
}

html:not(.has-3d) .layer-labels {
    display: none;
}

/* tour controls: next-room arrow + "Skip the tour" (top right on phones, bottom right on desktop) */
.tour-controls {
    position: absolute;
    top: calc(var(--header-h) + 12px);
    right: var(--gutter);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-next,
.tour-skip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(23, 19, 15, 0.7);
    color: var(--on-dark);
    font-size: var(--fs-xs);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.tour-skip {
    padding: 0 16px;
}

.tour-next {
    width: 40px;
    padding: 0;
}

.tour-next .icon {
    width: 18px;
    height: 18px;
    transform: rotate(90deg);   /* chevron pointing down */
}

.tour-next:active,
.tour-skip:active {
    transform: scale(0.96);
}

@media (hover: hover) and (pointer: fine) {
    .tour-next:hover,
    .tour-skip:hover {
        background: rgba(28, 23, 19, 0.7);
        border-color: rgba(255, 255, 255, 0.4);
    }
}

/* the arrow nudges down once in a while, inviting the scroll (not with reduced motion) */
@media (prefers-reduced-motion: no-preference) {
    .tour-next .icon {
        animation: tour-nudge 2.8s var(--ease-out) 2s infinite;
    }
}

@keyframes tour-nudge {
    0%, 70%, 100% { translate: 0 0; }
    80% { translate: 0 3px; }
}

/* at the end of the tour the arrow has nothing left to show */
.hero.is-last-room .tour-next {
    opacity: 0;
    pointer-events: none;
}

html:not(.js) .tour-controls {
    display: none;
}

/* loading progress of the 3D rooms (the still image of the first room is already on screen) */
.hero-loader {
    position: absolute;
    left: 50%;
    bottom: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    translate: -50% 0;
    color: rgba(238, 239, 235, 0.75);
    font-size: var(--fs-xs);
    transition: opacity 300ms var(--ease-out);
}

.hero-loader-bar {
    width: 140px;
    height: 2px;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(238, 239, 235, 0.2);
}

.hero-loader-fill {
    display: block;
    height: 100%;
    background: var(--sand);
    transform: scaleX(var(--load, 0));
    transform-origin: left;
    transition: transform 200ms var(--ease-out);
}

.hero-loader.is-done {
    opacity: 0;
}

@media (min-width: 1024px) {
    /* bottom left, on the content's left edge (the bottom-right corner belongs to the floating WhatsApp button) */
    .tour-controls {
        top: auto;
        right: auto;
        bottom: 24px;
        left: max(var(--gutter), calc((100vw - var(--container-wide)) / 2));
    }

    .hero-loader {
        bottom: 96px;
    }
}

@media (min-width: 1024px) {
    .hero-media::before {
        background: linear-gradient(to right, rgba(20, 16, 13, 0.82) 0%, rgba(20, 16, 13, 0.45) 30%, rgba(20, 16, 13, 0) 55%);
    }

    .hero-media::after {
        background:
            linear-gradient(to top, rgba(20, 16, 13, 0.6) 0%, rgba(20, 16, 13, 0) 30%),
            linear-gradient(to bottom, rgba(20, 16, 13, 0.5) 0%, rgba(20, 16, 13, 0) 18%);
    }

    .hero-inner {
        align-items: center;
        padding-bottom: 96px;
    }

    .hero-copy {
        max-width: min(36rem, 46vw);
    }

    .hero-still img {
        object-position: 50% 50%;
    }

    .room-caption {
        left: auto;
        right: max(var(--gutter), calc((100vw - var(--container-wide)) / 2));
        bottom: 104px;
    }

    .room-nav {
        left: max(var(--gutter), calc((100vw - var(--container-wide)) / 2));
        right: auto;
        width: 420px;
    }
}

/* --------------------------------------------------------------------------
   Numbers — glass cards on night, right under the hero
   -------------------------------------------------------------------------- */
.numbers {
    position: relative;
    padding-block: clamp(8px, 2vw, 24px) clamp(72px, 9vw, 112px);
    background:
        radial-gradient(50% 90% at 50% 0%, rgba(207, 52, 52, 0.12), rgba(207, 52, 52, 0) 70%),
        radial-gradient(40% 80% at 85% 100%, rgba(201, 183, 156, 0.1), rgba(201, 183, 156, 0) 70%),
        var(--night);
    color: var(--on-dark);
}

.numbers-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 900px) {
    .numbers-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

.number-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(20px, 3vw, 32px) clamp(16px, 2.4vw, 28px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.number-value {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 1.7rem + 3vw, 4rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: lining-nums tabular-nums;
}

.number-label {
    font-size: var(--fs-small);
    color: var(--on-dark-muted);
}

/* PLACEHOLDER styling: dashed, so it is obvious the number is missing */
.number-card.is-placeholder {
    border-style: dashed;
    border-color: rgba(201, 183, 156, 0.5);
}

.number-card.is-placeholder .number-value {
    color: var(--sand);
}

/* --------------------------------------------------------------------------
   Services — asymmetric bento grid; each card is one link
   -------------------------------------------------------------------------- */
.bento {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(340px, auto);
}

@media (min-width: 768px) {
    .bento {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 420px 280px 280px 300px;
        grid-template-areas:
            "metal metal"
            "pool polished"
            "garage polished"
            "threed painting";
    }
}

@media (min-width: 1024px) {
    .bento {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 300px 300px 320px;
        grid-template-areas:
            "metal metal pool polished"
            "metal metal garage polished"
            "threed threed painting painting";
    }
}

@media (min-width: 768px) {
    .svc-metallic { grid-area: metal; }
    .svc-pool { grid-area: pool; }
    .svc-polished { grid-area: polished; }
    .svc-garage { grid-area: garage; }
    .svc-3d { grid-area: threed; }
    .svc-painting { grid-area: painting; }
}

.svc {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--night-2);
    color: var(--on-dark);
}

.svc img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms var(--ease-out);
}

.svc::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(23, 19, 15, 0.75) 0%, rgba(23, 19, 15, 0.2) 45%, rgba(23, 19, 15, 0) 70%);
}

/* glass panel with the text */
.svc-body {
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(23, 19, 15, 0.42);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    transition: transform var(--dur) var(--ease-out);
}

.svc h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.svc h3 a {
    text-decoration: none;
}

/* the whole card is clickable through the title link */
.svc h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.svc h3 a:focus-visible {
    outline: none;
}

.svc:focus-within {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

.svc p {
    margin-top: 8px;
    font-size: var(--fs-small);
    line-height: 1.5;
    color: var(--on-dark-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* phones have the room: show the whole description */
@media (max-width: 767px) {
    .svc p {
        -webkit-line-clamp: unset;
    }
}

.svc-metallic .svc-body {
    max-width: 34rem;
}

.svc-metallic h3 {
    font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
}

.svc-metallic p {
    -webkit-line-clamp: unset;
    font-size: 1rem;
}

.svc-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.svc-features li {
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-size: var(--fs-xs);
}

@media (hover: hover) and (pointer: fine) {
    .svc:hover img {
        transform: scale(1.05);
    }

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

/* --------------------------------------------------------------------------
   Process — "Built layer by layer". Plain list of four steps by default; with
   js/layers-3d.js (.is-layered) the section is tall, its stage sticks to the
   screen and a 3D slice of the floor is built as the visitor scrolls.
   -------------------------------------------------------------------------- */
.process {
    background: var(--paper);
}

.steps {
    display: grid;
    gap: 32px 24px;
    counter-reset: none;
}

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

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

.step {
    padding-top: 24px;
    border-top: 1px solid var(--line-light);
}

.step-number {
    display: block;
    margin-bottom: 18px;
    font-family: var(--font-serif);
    font-size: 2.75rem;
    font-style: italic;
    line-height: 1;
    color: var(--red);
}

.step h3 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
}

.step p {
    margin-top: 8px;
    color: var(--slate);
}

.process-visual {
    display: none;
}

/* ---- layered (3D) version ---- */
.process.is-layered {
    padding-block: 0;
}

/* scroll length: the floor is built over ~2 screens of scrolling */
.process.is-layered .process-track {
    height: 320vh;
}

.process.is-layered .process-stage {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
}

.process.is-layered .process-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: clamp(24px, 4vw, 64px);
    width: 100%;
    padding-top: var(--header-h);
}

.process.is-layered .section-head {
    margin: 0;
    text-align: left;
}

.process.is-layered .steps {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: clamp(24px, 4vh, 40px);
}

.process.is-layered .step {
    display: grid;
    grid-template-columns: 56px 1fr;
    column-gap: 12px;
    padding: 16px 0;
}

.process.is-layered .step-number {
    grid-row: span 2;
    margin: 0;
    font-size: 2rem;
}

.process.is-layered .step p {
    margin-top: 4px;
    font-size: var(--fs-small);
}

/* the step being built is clear, the others step back */
.js .process.is-layered .step.is-visible {
    opacity: 0.38;
    transition: opacity 260ms var(--ease-out), transform var(--dur-slow) var(--ease-out), filter var(--dur-slow) var(--ease-out);
}

.js .process.is-layered .step.is-visible.is-done {
    opacity: 0.6;
}

.js .process.is-layered .step.is-visible.is-active {
    opacity: 1;
}

.process.is-layered .step.is-active {
    border-top-color: var(--red);
}

.process.is-layered .process-visual {
    position: relative;
    display: block;
    height: min(74vh, 720px);
    height: min(74svh, 720px);
}

.layers-canvas {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 500ms var(--ease-out);
}

.process.is-ready .layers-canvas {
    opacity: 1;
}

.layer-tags {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    pointer-events: none;
}

.layer-tags li {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--graphite);
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 220ms var(--ease-out);
}

/* a short leader line pointing back at the layer */
.layer-tags li::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--red);
}

.layer-tags li.is-on {
    opacity: 1;
}

.layer-tags .layer-tag-final {
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    background: var(--night);
    color: var(--on-dark);
}

.layer-tags .layer-tag-final::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* tablets and phones: the 3D slice on top, the current step under it */
@media (max-width: 1023px) {
    .process.is-layered .process-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 8px;
        align-content: center;
    }

    .process.is-layered .process-visual {
        order: -1;
        height: 46vh;
        height: 46svh;
    }

    .process.is-layered .section-head p {
        display: none;
    }

    .process.is-layered .section-head .title {
        font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
    }

    .process.is-layered .steps {
        margin-top: 12px;
    }

    /* only the step being built */
    .process.is-layered .step:not(.is-active) {
        display: none;
    }

    .process.is-layered .step {
        min-height: 110px;
    }
}

/* phones: leave room for the fixed contact bar */
@media (max-width: 767px) {
    .process.is-layered .process-layout {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }

    .process.is-layered .process-visual {
        height: 42vh;
        height: 42svh;
    }
}

/* --------------------------------------------------------------------------
   Our work — before/after sliders and gallery
   -------------------------------------------------------------------------- */
.section-dark .title {
    color: var(--on-dark);
}

.ba-grid {
    display: grid;
    gap: 32px 24px;
}

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

.ba-slider {
    --pos: 50%;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--night-2);
    touch-action: pan-y;
}

.ba-slider:focus-within {
    outline: 2px solid var(--coral);
    outline-offset: 3px;
}

.ba-before,
.ba-after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-after {
    clip-path: inset(0 0 0 var(--pos));
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 2px;
    margin-left: -1px;
    background: #fff;
    pointer-events: none;
}

.ba-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 22px no-repeat,
        #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.ba-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
}

.ba-tag {
    position: absolute;
    top: 14px;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(23, 19, 15, 0.45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 600;
    pointer-events: none;
}

.ba-tag-before { left: 14px; }
.ba-tag-after { right: 14px; }

.ba-item figcaption {
    margin-top: 14px;
    color: var(--on-dark-muted);
    font-size: var(--fs-small);
}

.ba-item figcaption strong {
    color: var(--on-dark);
    font-weight: 600;
}

.gallery-title {
    margin: clamp(56px, 8vw, 96px) 0 24px;
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
    font-weight: 400;
    font-style: italic;
    text-align: center;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    grid-auto-flow: dense;
    gap: 10px;
}

@media (min-width: 768px) {
    .gallery {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 200px;
        gap: 12px;
    }
}

.gallery .g-wide { grid-column: span 2; }
.gallery .g-tall { grid-row: span 2; }

.g-item {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--night-2);
    cursor: zoom-in;
    transition: transform var(--dur-fast) var(--ease-out);
}

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms var(--ease-out), opacity var(--dur) ease;
}

.g-item:active {
    transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
    .g-item:hover img {
        transform: scale(1.05);
    }
}

/* lightbox */
.lightbox {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(17, 14, 11, 0.94);
    color: var(--on-dark);
    opacity: 0;
    transition: opacity var(--dur) ease, display var(--dur) allow-discrete, overlay var(--dur) allow-discrete;
}

.lightbox[open] {
    display: grid;
    place-items: center;
    opacity: 1;
}

@starting-style {
    .lightbox[open] {
        opacity: 0;
    }
}

.lightbox::backdrop {
    background: transparent;
}

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 72px 16px;
    transition: transform var(--dur-slow) var(--ease-out);
}

@starting-style {
    .lightbox[open] .lightbox-figure {
        transform: scale(0.96);
    }
}

.lightbox-img {
    width: auto;
    height: auto;
    max-width: min(92vw, 1200px);
    max-height: 76vh;
    border-radius: var(--radius-md);
    transition: opacity var(--dur) ease;
}

/* old small photos (300px): show them a little larger, but never blown up past 2x */
.lightbox-img.is-small {
    width: min(92vw, 600px);
}

.lightbox-caption {
    max-width: 60ch;
    color: var(--on-dark-muted);
    font-size: var(--fs-small);
    text-align: center;
}

.lightbox-btn {
    position: fixed;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur) ease;
}

.lightbox-btn:active {
    transform: scale(0.94);
}

@media (hover: hover) and (pointer: fine) {
    .lightbox-btn:hover {
        background: rgba(255, 255, 255, 0.16);
    }
}

.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; margin-top: -24px; }
.lightbox-next { right: 16px; top: 50%; margin-top: -24px; }

@media (max-width: 767px) {
    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 20px;
        margin-top: 0;
    }
}

.lightbox-count {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    font-size: var(--fs-xs);
    color: var(--on-dark-muted);
}

.lightbox :focus-visible {
    outline-color: var(--coral);
}

/* --------------------------------------------------------------------------
   Colors — a sample board: chips on the right, the chosen sample large on the left
   -------------------------------------------------------------------------- */
.sample-board {
    display: grid;
    gap: 32px;
    align-items: start;
}

@media (min-width: 1024px) {
    .sample-board {
        grid-template-columns: 1.05fr 1fr;
        gap: 56px;
    }

    .sample-preview {
        position: sticky;
        top: calc(var(--header-h) + 24px);
    }
}

.sample-preview-frame {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--night-2);
    box-shadow: 0 30px 60px -30px rgba(23, 19, 15, 0.45);
}

.sample-preview-frame img,
.sample-solid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sample-preview-frame img {
    transition: opacity var(--dur) ease;
}

.sample-preview-frame img.is-loading {
    opacity: 0;
}

.sample-solid {
    background: var(--solid, #555);
}

/* glossy topcoat highlight across the sample */
.sample-preview-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.sample-preview figcaption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

#samplePreviewName {
    font-family: var(--font-serif);
    font-size: 1.75rem;
}

#samplePreviewGroup {
    color: var(--slate);
    font-size: var(--fs-small);
}

.sample-groups {
    display: grid;
    gap: 28px;
}

.sample-group h3 {
    margin-bottom: 12px;
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--slate);
}

.swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.swatch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 5px 16px 5px 5px;
    border: 1px solid var(--line-light);
    border-radius: 999px;
    background: var(--paper);
    font-size: var(--fs-small);
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur) ease, box-shadow var(--dur) ease;
}

.swatch img,
.swatch-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.swatch-dot {
    display: block;
    background: var(--swatch);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.swatch[aria-pressed="true"] {
    border-color: var(--graphite);
    box-shadow: inset 0 0 0 1px var(--graphite);
}

.swatch:active {
    transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
    .swatch:hover {
        border-color: rgba(30, 31, 34, 0.4);
    }
}

.colors-note {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: clamp(48px, 6vw, 72px);
    text-align: center;
    color: var(--slate);
}

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.testimonials {
    background: var(--paper);
}

.quotes {
    display: grid;
    gap: 20px;
}

@media (min-width: 1024px) {
    .quotes {
        grid-template-columns: repeat(3, 1fr);
        align-items: start;
    }

    /* small offset on the middle card breaks the row's symmetry */
    .quote:nth-child(2) {
        margin-top: 48px;
    }
}

.quote {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: clamp(24px, 3vw, 36px);
    border: 1px solid var(--line-light);
    border-radius: var(--radius-lg);
    background: var(--porcelain);
}

.quote blockquote p {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.45;
}

.quote blockquote::before {
    content: "\201C";
    display: block;
    height: 0.5em;
    font-family: var(--font-serif);
    font-size: 4rem;
    line-height: 1;
    color: var(--red);
}

.quote figcaption {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--fs-small);
    color: var(--slate);
}

.quote figcaption img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.quote figcaption strong {
    display: block;
    color: var(--graphite);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-layout {
    display: grid;
    gap: 40px;
}

@media (min-width: 1024px) {
    .faq-layout {
        grid-template-columns: 1fr 1.35fr;
        gap: 80px;
        align-items: start;
    }

    .faq-head {
        position: sticky;
        top: calc(var(--header-h) + 32px);
    }
}

.faq-head p {
    margin: 18px 0 28px;
    color: var(--slate);
    font-size: var(--fs-lead);
    max-width: 30rem;
}

@media (max-width: 1023px) {
    .faq-head {
        text-align: center;
    }

    .faq-head p {
        margin-inline: auto;
    }
}

/* accordion items: css/base.css */

/* --------------------------------------------------------------------------
   Location — the map with a frosted info card on top
   -------------------------------------------------------------------------- */
.location {
    border-top: 1px solid var(--line-light);
}

.map-card {
    display: grid;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--paper);
    border: 1px solid var(--line-light);
}

.map-frame {
    display: block;
    width: 100%;
    height: 300px;
    border: 0;
    filter: grayscale(0.4) contrast(1.05);
}

.map-info {
    padding: 28px 24px;
}

@media (min-width: 768px) {
    .map-card {
        position: relative;
        min-height: 500px;
        align-items: center;
    }

    .map-frame {
        position: absolute;
        inset: 0;
        height: 100%;
    }

    .map-info {
        position: relative;
        width: min(430px, calc(100% - 48px));
        margin: 24px;
        padding: 32px;
        border: 1px solid rgba(255, 255, 255, 0.7);
        border-radius: var(--radius-lg);
        background: rgba(245, 246, 244, 0.84);
        -webkit-backdrop-filter: blur(16px) saturate(1.3);
        backdrop-filter: blur(16px) saturate(1.3);
        box-shadow: 0 24px 50px -24px rgba(23, 19, 15, 0.45);
    }
}

.map-info h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.map-info dl {
    display: grid;
    gap: 16px;
}

.map-info dt {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--graphite);
}

.map-info dd {
    margin: 2px 0 0;
    color: var(--slate);
}

.map-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

/* phones: the fixed contact bar covers the bottom 68px, so the hero content sits above it */
@media (max-width: 767px) {
    .room-nav {
        bottom: calc(80px + env(safe-area-inset-bottom));
    }

    .hero-inner {
        padding-bottom: calc(132px + env(safe-area-inset-bottom));
    }

    .room-caption {
        bottom: calc(132px + env(safe-area-inset-bottom));
    }
}

/* --------------------------------------------------------------------------
   Showroom extras: hotspots pinned to the floors (js/hero-3d.js positions them),
   their cards, and the live flake color picker
   -------------------------------------------------------------------------- */
.hotspot {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    display: none;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.has-3d .hotspot.is-on {
    display: block;
}

/* white dot + soft pulsing ring (the ring only animates opacity/transform) */
.hotspot::before,
.hotspot::after {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.hotspot::after {
    inset: 4px;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    box-shadow: none;
    animation: hotspot-pulse 2.2s var(--ease-out) infinite;
}

.hotspot[aria-expanded="true"]::after {
    animation: none;
    opacity: 1;
}

@keyframes hotspot-pulse {
    0% { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(1.35); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hotspot::after { animation: none; }
}

.spot-card {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    width: min(300px, calc(100vw - 32px));
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(28, 23, 19, 0.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
    color: #d6d0c8;
    font-size: var(--fs-small);
    line-height: 1.5;
    transform-origin: 0 0;
}

.spot-card:not([hidden]) {
    animation: spot-in 200ms var(--ease-out);
}

@keyframes spot-in {
    from { opacity: 0; transform: var(--spot-pos) scale(0.96); }
}

.spot-card .spot-title {
    margin-bottom: 6px;
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--on-dark);
}

.spot-card .btn {
    margin-top: 14px;
}

.flake-picker {
    display: none;
    margin: -4px 0 18px;
}

.has-3d .flake-picker {
    display: block;
}

.flake-picker-label {
    display: block;
    margin-bottom: 8px;
    font-size: var(--fs-xs);
    color: #d6d0c8;
}

.flake-picker-label strong {
    color: var(--on-dark);
    font-weight: 600;
}

.flake-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.flake-chip {
    width: 36px;
    height: 36px;
    padding: 3px;
    border: 1.5px solid transparent;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur) ease;
}

.flake-chip img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.flake-chip[aria-pressed="true"] {
    border-color: var(--on-dark);
}

.flake-chip:active {
    transform: scale(0.92);
}
