
/* =========================================
   OFFICES — COMPARE SECTION
========================================= */

.offices-compare {
    width: 100%;
    background: #f3f0e9;
    color: #1f2925;
    scroll-margin-top: var(--header-height);
}

/* =========================================
   MAIN CONTAINER — 50 / 50
========================================= */

.offices-compare__container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(40px, 4vw, 80px);

    width: 100%;
    max-width: 1920px;
    margin: 0 auto;

    padding: clamp(70px, 6vw, 110px)
             clamp(24px, 5.5vw, 100px);
}

/* =========================================
   LEFT COLUMN — CONTENT
========================================= */

.offices-compare__intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    width: 100%;
    min-width: 0;
    margin: 0;
    gap: 0;
}

.offices-compare__intro-left,
.offices-compare__intro-right {
    width: 100%;
    min-width: 0;
}

/* EYEBROW */

.offices-compare__eyebrow {
    display: block;
    margin-bottom: 28px;

    color: #a97b42;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* TITLE */

.offices-compare__title {
    margin: 0;
    font-size: 45px;
    font-weight: 100;
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-family: "Cormorant Garamond", Georgia, serif;
}

/* DESCRIPTION */

.offices-compare__description {
    max-width: 540px;
    margin: 0 0 10px;
    color: #56615a;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    margin-top: 20px;
}

/* =========================================
   RIGHT COLUMN — COMPARE WIDGET
========================================= */

.offices-compare__widget {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;
}

/* MAIN BOX */

.offices-compare__stage {
    width: 100%;
    min-width: 0;
    padding: 20px 20px 24px;

    border: 1px solid #ddd5ca;
    background: #f7f4ee;
}

/* =========================================
   STAGE HEADER
========================================= */

.offices-compare__stage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 16px;
}

.offices-compare__stage-label {
    color: #1f2925;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

.offices-compare__stage-label--right {
    text-align: right;
}

/* =========================================
   IMAGE COMPARISON
========================================= */

.offices-compare__canvas {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 10;

    overflow: hidden;
    background: #ffffff;

    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    cursor: ew-resize;
}

/* SHARED IMAGE STYLES */

.offices-compare__image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

/* EMPTY FLOORPLAN — BASE IMAGE */

.offices-compare__image--base {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
}

/* ARRANGEMENT — OVERLAY */

.offices-compare__overlay {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;

    clip-path: inset(0 50% 0 0);

    pointer-events: none;
}

.offices-compare__image--overlay {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;
}

/* =========================================
   DIVIDER LINE
========================================= */

.offices-compare__divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;

    width: 0;

    border-left: 1px solid #a97b42;

    pointer-events: none;
}

/* =========================================
   DRAG HANDLE
========================================= */

.offices-compare__handle {
    position: absolute;
    top: 50%;
    left: 0;

    transform: translate(-50%, -50%);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    padding: 0;

    border: 1px solid #a97b42;
    border-radius: 50%;

    background: #f3f0e9;
    color: #a97b42;

    box-shadow: 0 5px 18px rgba(31, 41, 37, 0.12);

    pointer-events: auto;
    cursor: ew-resize;
}

.offices-compare__handle svg {
    width: 20px;
    height: 20px;
}

/* =========================================
   RANGE SLIDER
========================================= */

.offices-compare__range-wrap {
    width: 100%;
    margin-top: 24px;
    padding: 0 6px;
}

.offices-compare__range {
    -webkit-appearance: none;
    appearance: none;

    display: block;
    width: 100%;
    height: 3px;

    margin: 0;
    border: 0;
    border-radius: 0;

    background: #d8d1c6;
    outline: none;
    cursor: pointer;
}

/* CHROME / SAFARI */

.offices-compare__range::-webkit-slider-runnable-track {
    height: 3px;

    background: linear-gradient(
        to right,
        #8e6b35 0%,
        #8e6b35 var(--compare-position, 50%),
        #d8d1c6 var(--compare-position, 50%),
        #d8d1c6 100%
    );
}

.offices-compare__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;

    width: 16px;
    height: 16px;
    margin-top: -6.5px;

    border: 3px solid #8e6b35;
    border-radius: 50%;

    background: #f3f0e9;
    cursor: ew-resize;
}

/* FIREFOX */

.offices-compare__range::-moz-range-track {
    height: 3px;
    background: #d8d1c6;
}

.offices-compare__range::-moz-range-progress {
    height: 3px;
    background: #8e6b35;
}

.offices-compare__range::-moz-range-thumb {
    width: 12px;
    height: 12px;

    border: 3px solid #8e6b35;
    border-radius: 50%;

    background: #f3f0e9;
    cursor: ew-resize;
}

/* =========================================
   BUTTONS — VIEW MODES
========================================= */

.offices-compare__bottom {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    width: 100%;
    margin-top: 22px;
}

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

    width: 100%;
    gap: 8px;
}

.offices-compare__mode-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-width: 0;
    min-height: 46px;

    padding: 10px 12px;

    border: 1px solid #ddd5ca;
    border-radius: 0;

    background: transparent;
    color: #1f2925;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;

    cursor: pointer;

    transition:
        background-color 0.22s ease,
        color 0.22s ease,
        border-color 0.22s ease;
}

.offices-compare__mode-button:hover,
.offices-compare__mode-button.is-active {
    background: #1d2724;
    color: #ffffff;
    border-color: #1d2724;
}

/* =========================================
   FOOTNOTE
========================================= */

.offices-compare__note {
    width: 100%;
    margin: 22px 0 0;

    color: #56615a;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.65;
}

/* =========================================
   ACCESSIBILITY
========================================= */

.offices-compare__handle:focus-visible,
.offices-compare__range:focus-visible,
.offices-compare__mode-button:focus-visible {
    outline: 2px solid #a97b42;
    outline-offset: 4px;
}

/* =========================================
   COMPACT DESKTOP — 1025–1280px
========================================= */

@media (min-width: 1025px) and (max-width: 1280px) {

    .offices-compare__container {
        gap: 36px;
    }

    .offices-compare__title {
        font-size: clamp(43px, 4vw, 58px);
    }

    .offices-compare__description {
        margin-top: 28px;
        font-size: 16px;
    }

    .offices-compare__stage {
        padding: 16px;
    }

    .offices-compare__mode-button {
        font-size: 12px;
        padding-inline: 8px;
    }
}

/* =========================================
   TABLET — MAX 1024px
========================================= */

@media (max-width: 1024px) {

    .offices-compare__container {
        grid-template-columns: 1fr;
        align-items: stretch;

        gap: 44px;
        padding: 64px 32px;
    }

    .offices-compare__intro {
        width: 100%;
    }

    .offices-compare__title {
        max-width: 750px;
        font-size: clamp(48px, 6vw, 70px);
    }

    .offices-compare__description {
        max-width: 680px;
        margin-top: 28px;
    }

    .offices-compare__widget {
        width: 100%;
    }

    .offices-compare__canvas {
        aspect-ratio: 16 / 10;
    }
}

/* =========================================
   MOBILE — MAX 740px
========================================= */

@media (max-width: 740px) {

    .offices-compare__container {
        gap: 34px;
        padding: 60px 20px;
    }

    /* LEFT CONTENT */

    .offices-compare__eyebrow {
        margin-bottom: 22px;
        font-size: 11px;
        letter-spacing: 0.16em;
    }

    .offices-compare__title {
        font-size: clamp(42px, 10vw, 60px);
        line-height: 0.98;
    }

    .offices-compare__description {
        margin-top: 26px;
        font-size: 16px;
        line-height: 1.65;
    }

    /* WIDGET */

    .offices-compare__stage {
        padding: 14px 12px 18px;
    }

    .offices-compare__stage-head {
        gap: 12px;
        margin-bottom: 12px;
    }

    .offices-compare__stage-label {
        font-size: 11px;
    }

    .offices-compare__canvas {
        aspect-ratio: 4 / 3;
    }

    .offices-compare__handle {
        width: 38px;
        height: 38px;
    }

    .offices-compare__handle svg {
        width: 18px;
        height: 18px;
    }

    .offices-compare__range-wrap {
        margin-top: 20px;
    }

    /* BUTTONS */

    .offices-compare__bottom {
        margin-top: 18px;
    }

    .offices-compare__modes {
        gap: 6px;
    }

    .offices-compare__mode-button {
        min-height: 44px;
        padding: 8px 6px;
        font-size: 11px;
    }

    /* NOTE */

    .offices-compare__note {
        margin-top: 18px;
        font-size: 12px;
        line-height: 1.6;
    }
}

/* =========================================
   SMALL MOBILE — MAX 420px
========================================= */

@media (max-width: 420px) {

    .offices-compare__title {
        font-size: clamp(38px, 10vw, 44px);
    }

    .offices-compare__canvas {
        aspect-ratio: 1 / 1;
    }

    .offices-compare__stage {
        padding-inline: 10px;
    }

    .offices-compare__mode-button {
        font-size: 10px;
        padding-inline: 4px;
    }
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    .offices-compare__mode-button {
        transition: none;
    }
}
