/*============
   ARCHITECTURE PAGE
========= */

section {
    position: relative;
}

/* =================
   IMAGE SYSTEM
====================*/

.plate {
    margin: 0;
}

.plate img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 18px;
    filter: sepia(.12) saturate(.94);
    transition: transform .9s ease, filter .9s ease;
}

.plate:hover img {
    transform: scale(1.02);
    filter: sepia(0) saturate(1.05);
}

.plate figcaption {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
    padding-top: .9rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid rgba(58, 46, 40, .35);
    font-size: .8rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--label);
}

.curtain[data-reveal].is-armed {
    opacity: 1;
    transform: none;
}

@keyframes uncover {
    from { clip-path: inset(0 0 100% 0); }
    to   { clip-path: inset(0); }
}

@supports (animation-timeline: view()) {
    .curtain img {
        animation: uncover linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 60%;
    }
}

/* ========================================
   HERO   (fades into the first stage)
======================================== */

.arch-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: white;
    background: var(--deep-espresso);
}

.arch-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 55%;
    animation: settle 2.8s ease-out both;
}

.arch-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(58, 46, 40, .45) 0%, rgba(58, 46, 40, .15) 40%, rgba(58, 46, 40, .65) 100%);
}

.arch-hero::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 180px;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(250, 247, 241, 0) 0%, var(--blend-0) 100%);
}

.arch-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 8% 10rem;
}

.arch-hero__content > * {
    animation: rise 1.1s ease-out both;
}

.arch-hero__content > :nth-child(1) { animation-delay: .3s; }
.arch-hero__content > :nth-child(2) { animation-delay: .5s; }
.arch-hero__content > :nth-child(3) { animation-delay: .8s; }

.arch-hero .section-label {
    color: var(--honey-oatmilk);
}

.arch-hero h1 {
    max-width: 11ch;
    margin-bottom: 2rem;
    font-size: clamp(4.5rem, 11vw, 9rem);
    line-height: .9;
}

/* ========================================
   STAGES   (each ends on the colour the next begins with)
======================================== */

.stage--begin { background: linear-gradient(180deg, var(--blend-0) 0%, var(--blend-1) 100%); }
.stage--plan  { background: linear-gradient(180deg, var(--blend-1) 0%, var(--blend-2) 100%); }
.stage--build { background: linear-gradient(180deg, var(--blend-2) 0%, var(--blend-3) 100%); }
.stage--home  { background: linear-gradient(180deg, var(--blend-3) 0%, var(--blend-4) 100%); }

/* ========================================
   PAIR: one wide image beside one that fills the same height
======================================== */

.pair {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 2.5rem;
    align-items: stretch;
    margin-top: 3.5rem;
}

.pair .plate {
    display: flex;
    flex-direction: column;
}

.pair__wide {
    grid-column: 1 / span 7;
}

.pair__wide > img {
    flex: none;
    height: auto;
    aspect-ratio: 3 / 2;
}

.pair__narrow {
    grid-column: 8 / span 5;
}

.pair__narrow img {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    object-position: 55% center;
}

.pair--home .pair__wide { grid-column: 1 / span 8; }
.pair--home .pair__narrow { grid-column: 9 / span 4; }
.pair--home .pair__narrow img { object-position: center 30%; }

/* ========================================
   THE PLAN
======================================== */

.plan__hero {
    margin-top: 3.5rem;
}

.plan__hero img {
    aspect-ratio: 2 / 1;
    object-position: center 65%;
}

.plan__rooms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.plan__rooms img {
    aspect-ratio: 4 / 3;
    filter: none;
}

/* ========================================
   THE BUILD
======================================== */

.build__wide {
    margin-top: 3.5rem;
}

.build__wide img {
    aspect-ratio: 2 / 1;
    object-position: center 55%;
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin: 3.5rem 0 0;
    padding: 0;
    list-style: none;
}

.steps li {
    position: relative;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(58, 46, 40, .45);
    font-family: var(--font-display);
    font-size: 2rem;
}

.steps li::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--antique-wood);
}

/* ========================================
   THE HOME: slider, courtyard, gallery
======================================== */

.compare {
    --pos: 50%;
    position: relative;
    flex: none;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 18px;
    background: var(--soft-linen);
}

.compare .compare__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    transform: none;
}

.compare:hover .compare__img {
    transform: none;
}

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

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

.compare__handle::after {
    content: "\2194";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff;
    color: var(--deep-espresso);
    font-size: 1.2rem;
    box-shadow: 0 4px 18px rgba(58, 46, 40, .3);
}

.compare:focus-within .compare__handle::after {
    outline: 2px solid var(--antique-wood);
    outline-offset: 3px;
}

.compare__tag {
    position: absolute;
    top: 1rem;
    padding: .25rem .8rem;
    border-radius: 999px;
    background: rgba(58, 46, 40, .75);
    color: var(--coconut-cream);
    font-size: .75rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    pointer-events: none;
}

.compare__tag--before { left: 1rem; }
.compare__tag--after { right: 1rem; }

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

.home__gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 3.5rem;
}

.home__gallery img {
    aspect-ratio: 4 / 5;
}

.pos-left { object-position: 35% center; }
.pos-right { object-position: 70% center; }

/* ========================================
   CALL TO ACTION   (flat oat latte, meets the footer)
======================================== */

.arch-cta {
    padding: 7rem 0;
    background: var(--blend-4);
    text-align: center;
}

.arch-cta h2 {
    max-width: 16ch;
    margin: 0 auto 2rem;
}

/* ========================================
   STAGE MARKER (right edge, wide screens only)
======================================== */

.journey {
    position: fixed;
    top: 50%;
    right: 1rem;
    z-index: 900;
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility .5s ease;
}

.journey.is-visible {
    opacity: 1;
    visibility: visible;
}

.journey ol {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.journey a {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    font-size: .75rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--deep-espresso);
}

.journey a::after {
    content: "";
    width: 12px;
    height: 12px;
    border: 1px solid var(--deep-espresso);
    border-radius: 50%;
    transition: background .3s ease;
}

.journey a span {
    opacity: 0;
    transform: translateX(.5rem);
    transition: opacity .3s ease, transform .3s ease;
}

.journey a:hover span,
.journey a:focus-visible span,
.journey a[aria-current="true"] span {
    opacity: 1;
    transform: none;
}

.journey a[aria-current="true"]::after {
    background: #C99191;
}

@media (max-width: 1399.98px) {
    .journey { display: none; }
}

/*========================================
   TABLETS
========================================*/

@media (max-width: 991.98px) {
    .pair {
        grid-template-columns: 1fr;
        row-gap: 2.5rem;
    }

    .pair__wide,
    .pair__narrow,
    .pair--home .pair__wide,
    .pair--home .pair__narrow {
        grid-column: auto;
    }

    .pair__narrow img {
        flex: none;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .pair--home .pair__narrow img {
        aspect-ratio: 4 / 5;
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 2.5rem;
    }
}

/*========================================
   MOBILE
========================================*/

@media (max-width: 767.98px) {
    .plan__rooms,
    .home__gallery {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .plan__hero img,
    .build__wide img {
        aspect-ratio: 4 / 3;
    }

    .home__gallery img {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 575.98px) {
    .arch-hero__content {
        padding-bottom: 8rem;
    }

    .steps li {
        font-size: 1.6rem;
    }
}