/*
 * GRYX revamp / phase two
 * Living-rock chapter and Gradient Blinds behavior scoped to footer slits.
 */

/* Living rock ------------------------------------------------------------ */

.phase-two-story.rock-showcase {
    --phase-two-edge: clamp(14px, 2.2vw, 38px);
    z-index: 9;
    padding: clamp(60px, 6.2vw, 98px) var(--phase-two-edge) 0;
    color: var(--revamp-ink);
    background: var(--revamp-paper);
    border-top: 1px solid var(--revamp-light-line);
}

.phase-two-story.rock-showcase::before {
    display: none;
}

.phase-two-story.rock-showcase::after {
    display: none;
}

.phase-two-story .rock-showcase__frame {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(320px, .72fr) minmax(540px, 1.28fr);
    width: 100%;
    min-height: clamp(480px, 34vw, 620px);
    overflow: hidden;
    isolation: isolate;
    /* background: #f1efe7; */
    background: var(--main-large-panel, #F4F6F7);
    /* Square corners + card rule colour to match the capability cards above */
    border: 1px solid var(--rule, var(--revamp-light-line));
    border-radius: 0;
}

.phase-two-story .rock-showcase__frame::before {
    display: none;
}

.rock-cursor-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.phase-two-story .rock-showcase__header,
.phase-two-story .rock-interaction,
.phase-two-story .phase-two-rail {
    position: relative;
    z-index: 2;
}

/* The cube grid lies over the copy panel's grid area; multiply only darkens, so the type stays legible. */
.phase-two-story .rock-cursor-grid {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    z-index: 3;
}

html[data-site-theme="dark"] .phase-two-story .rock-cursor-grid {
    mix-blend-mode: screen;
    opacity: .3;
}

.phase-two-story .rock-showcase__header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    margin: 0;
    padding: clamp(36px, 4.2vw, 72px) clamp(30px, 4vw, 68px);
    overflow: hidden;
    /* background: rgba(248,246,239,.46); */
    background: var(--left-panel, #EEF2F4);
    border-right: 1px solid var(--revamp-light-line);
}

.phase-two-story .rock-showcase__header > :not(.rock-cursor-grid) {
    position: relative;
    z-index: 1;
}

.phase-two-story .rock-showcase__lead {
    max-width: 650px;
}

.phase-two-story .rock-showcase__eyebrow {
    margin-bottom: clamp(18px, 2.2vw, 32px);
    color: var(--revamp-orange-deep);
    font-family: var(--font-mono);
    font-size: .69rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .18em;
}

.phase-two-story .rock-showcase__header h2 {
    max-width: 650px;
    margin: 0;
    color: var(--revamp-ink);
    font-family: var(--font-sans);
    font-size: clamp(3rem, 4.45vw, 5.45rem);
    font-weight: 600;
    line-height: .9;
    letter-spacing: -.066em;
}

.phase-two-story .rock-showcase__header h2 span {
    color: var(--revamp-orange);
}

.phase-two-story .rock-showcase__copy {
    max-width: 520px;
    margin-top: clamp(48px, 7vw, 112px);
    padding: clamp(18px, 2vw, 28px) 0 0;
    border-top: 1px solid var(--revamp-light-line);
    border-left: 0;
    color: var(--revamp-muted);
    font-family: var(--font-sans);
    font-size: clamp(.9rem, .98vw, 1.04rem);
    line-height: 1.58;
}

.phase-two-story .rock-showcase__copy > p:first-child {
    margin: 0;
}

.phase-two-story .rock-showcase__hint {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 18px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--revamp-light-line);
    color: var(--revamp-orange-deep);
    font-family: var(--font-mono);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .095em;
    text-transform: uppercase;
}

.phase-two-story .rock-showcase__hint b {
    color: rgba(8,10,9,.34);
    font-weight: 400;
}

.phase-two-story .rock-interaction {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    aspect-ratio: auto;
    contain: layout paint;
    isolation: isolate;
    container-type: inline-size;
    /* background: #f8f6ef; */
    background: var(--main-large-panel, #F4F6F7);
    cursor: crosshair;
}

/* STRATA survey artwork: transparent blue contour lines on website background */
.phase-two-story .strata-survey {
    /* --strata-ink: #171713; */
    --strata-ink: var(--primary-text, #071B2B);
    /* --strata-blue: #264f9d; */
    --strata-blue: var(--topographic-blue, #4875B8);
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    color: var(--strata-ink);
    /* background: #f8f6ef url("../assets/strata-contour-transparent.png") center / 100% 100% no-repeat; */
    background: var(--main-large-panel, #F4F6F7) url("../assets/strata-contour-transparent.png") center / 100% 100% no-repeat;
    pointer-events: none;
}

.phase-two-story .strata-survey::after {
    display: none;
}

.phase-two-story .strata-sidebar-right {
    position: absolute;
    top: 4.3%;
    right: 4.8%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: clamp(10px, 1.8cqi, 18px);
    width: auto;
    max-width: 38%;
    color: var(--strata-ink);
    pointer-events: none;
}

.phase-two-story .strata-title-block {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-end;
    color: var(--strata-ink);
    text-align: right;
}

.phase-two-story .strata-title-block strong {
    font-family: var(--font-sans);
    font-size: clamp(1.5rem, 3.8cqi, 2.6rem);
    font-weight: 800;
    line-height: .76;
    letter-spacing: -.075em;
}

.phase-two-story .strata-title-block > span {
    margin-top: 1.8cqi;
    font-family: var(--font-mono);
    font-size: clamp(.42rem, .68cqi, .62rem);
    font-weight: 600;
    letter-spacing: .2em;
    white-space: nowrap;
}

.phase-two-story .strata-title-block i {
    width: 78%;
    height: 1px;
    margin: 1.6cqi 0 1cqi;
    background: rgba(23,23,19,.78);
}

.phase-two-story .strata-title-block small {
    font-family: var(--font-mono);
    font-size: clamp(.42rem, .75cqi, .68rem);
    font-weight: 600;
    letter-spacing: .18em;
}

.phase-two-story .strata-title-block b {
    margin-top: 1.2cqi;
    font-family: var(--font-mono);
    font-size: clamp(.52rem, 1.1cqi, .92rem);
    font-weight: 500;
    letter-spacing: .12em;
}

.phase-two-story .strata-instrument-stack {
    display: flex;
    width: clamp(20px, 3.4cqi, 30px);
    flex-direction: column;
    align-items: center;
    gap: clamp(7px, 1.3cqi, 13px);
    color: var(--strata-ink);
    margin-right: clamp(1px, 0.4cqi, 4px);
}

.phase-two-story .strata-north-block {
    display: grid;
    justify-items: center;
    gap: .35cqi;
    font: 600 clamp(.46rem, .92cqi, .72rem)/1 var(--font-mono);
}

.phase-two-story .strata-north-block svg {
    width: 72%;
    height: auto;
}

.phase-two-story .strata-instrument-icon {
    display: block;
    width: 100%;
    height: auto;
}

.phase-two-story .strata-icon-line {
    fill: none;
    stroke: currentColor;
    stroke-width: .82;
    vector-effect: non-scaling-stroke;
}

.phase-two-story .strata-icon-line--tiny {
    stroke-width: .52;
}

.phase-two-story .strata-icon-dashed {
    stroke-dasharray: 1.7 2.1;
}

.phase-two-story .strata-icon-fill {
    fill: currentColor;
}

.phase-two-story .strata-icon-paper {
    fill: #f2eee7;
}

.phase-two-story .strata-down-marker {
    width: 88%;
}

.phase-two-story .strata-coordinates {
    position: absolute;
    top: 45%;
    left: 4.3%;
    z-index: 2;
    color: var(--strata-ink);
    font-family: var(--font-mono);
    font-size: clamp(.42rem, .72cqi, .66rem);
    font-weight: 500;
    letter-spacing: .05em;
}

.phase-two-story .strata-coordinates strong,
.phase-two-story .strata-coordinates span,
.phase-two-story .strata-coordinates small {
    display: block;
}

.phase-two-story .strata-coordinates strong {
    font-size: .92em;
    letter-spacing: .12em;
}

.phase-two-story .strata-coordinates span {
    margin-top: .75cqi;
    line-height: 1.7;
}

.phase-two-story .strata-coordinates small {
    margin-top: 1.8cqi;
    font-size: 1em;
    letter-spacing: .07em;
}

.phase-two-story .strata-sample-strip {
    position: absolute;
    bottom: 9.4%;
    left: 4.2%;
    z-index: 2;
    display: flex;
    gap: clamp(4px, .72cqi, 8px);
}

.phase-two-story .strata-sample-card {
    display: flex;
    width: clamp(58px, 10.8cqi, 94px);
    aspect-ratio: .8;
    margin: 0;
    padding: clamp(3px, .45cqi, 5px);
    flex-direction: column;
    border: 1px solid rgba(23,23,19,.62);
    background: rgba(235,231,222,.62);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.phase-two-story .strata-sample-image {
    position: relative;
    display: grid;
    height: 78%;
    overflow: hidden;
    place-items: center;
    border: 1px solid rgba(23,23,19,.56);
    color: rgba(23,23,19,.46);
    background: linear-gradient(135deg, rgba(23,23,19,.035), transparent), rgba(232,228,219,.68);
}

.phase-two-story .strata-sample-image svg {
    position: absolute;
    inset: 12%;
    width: 76%;
    height: 76%;
}

.phase-two-story .strata-placeholder-line {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.05;
    vector-effect: non-scaling-stroke;
}

.phase-two-story .strata-sample-image > span {
    position: absolute;
    bottom: .45cqi;
    font: 600 clamp(.34rem, .52cqi, .48rem)/1 var(--font-mono);
    letter-spacing: .16em;
}

.phase-two-story .strata-sample-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.phase-two-story .strata-sample-card figcaption {
    display: flex;
    min-height: 0;
    margin-top: auto;
    align-items: center;
    gap: clamp(3px, .5cqi, 6px);
    color: var(--strata-ink);
    font: 500 clamp(.34rem, .5cqi, .48rem)/1 var(--font-mono);
    letter-spacing: .055em;
    white-space: nowrap;
}

.phase-two-story .strata-sample-card figcaption b {
    font-weight: 500;
}

.phase-two-story .strata-survey-unit {
    position: absolute;
    bottom: 2.7%;
    left: 4.3%;
    z-index: 2;
    color: var(--strata-ink);
    font: 500 clamp(.36rem, .55cqi, .52rem)/1.5 var(--font-mono);
    letter-spacing: .08em;
}

.phase-two-story .strata-survey-unit > div {
    display: flex;
    margin-top: .45cqi;
    align-items: center;
    gap: 1cqi;
}

.phase-two-story .strata-survey-unit svg {
    width: clamp(15px, 2cqi, 22px);
    height: clamp(15px, 2cqi, 22px);
}

.phase-two-story .strata-survey-unit .strata-barcode {
    width: clamp(20px, 2.7cqi, 30px);
}

.phase-two-story .strata-grid-reference {
    position: absolute;
    right: 5.1%;
    bottom: 6.8%;
    z-index: 2;
    color: var(--strata-ink);
    font: 500 clamp(.36rem, .55cqi, .52rem)/1.55 var(--font-mono);
    letter-spacing: .08em;
}

/* Keep the survey labels visible; contact still changes the rock state. */
.phase-two-story .strata-sidebar-right,
.phase-two-story .strata-coordinates,
.phase-two-story .strata-sample-strip,
.phase-two-story .strata-survey-unit,
.phase-two-story .strata-grid-reference,
.phase-two-story .rock-interaction::after {
    opacity: 1;
    visibility: visible;
    transition: opacity .2s ease;
}

.phase-two-story .rock-interaction.is-on-rock .strata-sidebar-right,
.phase-two-story .rock-interaction.is-on-rock .strata-coordinates,
.phase-two-story .rock-interaction.is-on-rock .strata-sample-strip,
.phase-two-story .rock-interaction.is-on-rock .strata-survey-unit,
.phase-two-story .rock-interaction.is-on-rock .strata-grid-reference,
.phase-two-story .rock-interaction.is-on-rock::after {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.phase-two-story .rock-interaction::before {
    z-index: 1;
    left: 12%;
    right: 8%;
    bottom: 7%;
    height: 10%;
    background: radial-gradient(ellipse, rgba(34, 29, 24, .24), rgba(34, 29, 24, .08) 48%, transparent 74%);
    filter: blur(24px);
    opacity: .55;
    mix-blend-mode: multiply;
}

.phase-two-story #scene {
    z-index: 3;
    background: transparent !important;
    mix-blend-mode: normal;
    filter:
        saturate(1.04)
        contrast(1.04)
        drop-shadow(0 22px 30px rgba(24, 20, 16, .18));
}

.phase-two-story #waterTrail {
    z-index: 2;
    background: transparent !important;
    mix-blend-mode: normal;
    filter: saturate(.96) contrast(1.02);
}

.phase-two-story .rock-interaction:focus-visible {
    outline: 2px solid var(--revamp-orange);
    outline-offset: 8px;
}

.phase-two-story .rock-interaction::after {
    content: "DORMANT / CONTACT TO REVEAL";
    position: absolute;
    right: clamp(18px, 3.2cqi, 32px);
    bottom: clamp(16px, 2.8cqi, 26px);
    z-index: 4;
    color: rgba(8,10,9,.43);
    font-family: var(--font-mono);
    font-size: .57rem;
    letter-spacing: .11em;
    pointer-events: none;
}

.phase-two-story .rock-interaction.is-on-rock::after {
    content: "ACTIVE / LIVING SIGNAL";
    color: var(--revamp-orange-deep);
}

.phase-two-rail {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: calc(100% + (var(--phase-two-edge) * 2));
    margin: clamp(24px, 2.8vw, 42px) calc(var(--phase-two-edge) * -1) 0;
    border-top: 1px solid var(--revamp-light-line);
    border-bottom: 1px solid var(--revamp-light-line);
    background: var(--revamp-paper);
    isolation: isolate;
}

.phase-two-rail__item {
    min-width: 0;
    padding: clamp(22px, 2.4vw, 34px) clamp(22px, 3vw, 54px);
    border-right: 1px solid var(--revamp-light-line);
}

.phase-two-rail__item:last-child {
    border-right: 0;
}

.phase-two-rail__item > span {
    display: block;
    margin-bottom: 14px;
    color: var(--revamp-orange-deep);
    font-family: var(--font-mono);
    font-size: .63rem;
    font-weight: 600;
    letter-spacing: .13em;
}

.phase-two-rail__item strong {
    display: block;
    margin-bottom: 11px;
    color: var(--revamp-ink);
    font-family: var(--font-sans);
    font-size: clamp(1.3rem, 1.8vw, 2rem);
    font-weight: 600;
    letter-spacing: -.035em;
}

.phase-two-rail__item p {
    max-width: 430px;
    margin: 0;
    color: var(--revamp-muted);
    font-size: .91rem;
    line-height: 1.58;
}

.phase-two-story + .section-promise {
    margin-top: 0;
}

@media (max-width: 1100px) {
    .phase-two-story .rock-showcase__frame {
        grid-template-columns: minmax(300px, .86fr) minmax(410px, 1.14fr);
    }

    .phase-two-story .rock-showcase__header {
        padding-right: clamp(26px, 3.2vw, 42px);
        padding-left: clamp(26px, 3.2vw, 42px);
    }

    .phase-two-story .rock-showcase__header h2 {
        font-size: clamp(2.7rem, 5.6vw, 4.6rem);
    }
}

@media (max-width: 760px) {
    .phase-two-story.rock-showcase {
        --phase-two-edge: 18px;
        padding-top: 72px;
    }

    .phase-two-story .rock-showcase__frame {
        grid-template-columns: 1fr;
        min-height: 0;
        border-radius: 0;
    }

    .phase-two-story .rock-showcase__header {
        display: flex;
        flex-direction: column;
        min-height: auto;
        margin: 0;
        padding: 28px 20px 24px;
        border-right: 0;
        border-bottom: 1px solid var(--revamp-light-line);
    }

    .phase-two-story .rock-showcase__header h2 {
        font-size: clamp(2rem, 8vw, 2.75rem);
        line-height: 1.05;
        letter-spacing: -.05em;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .phase-two-story .rock-showcase__copy {
        max-width: 100%;
        margin-top: 22px;
        padding: 16px 0 0;
        border-top: 1px solid var(--revamp-light-line);
        border-left: 0;
    }

    .phase-two-story .strata-title-block strong {
        font-size: clamp(1.1rem, 3.6cqi, 1.5rem);
    }

    .phase-two-story .rock-interaction::after {
        right: 0;
        font-size: .5rem;
    }

    .phase-two-story .rock-interaction {
        width: 100%;
        height: auto;
        min-height: 300px;
        aspect-ratio: 1.7 / 1;
    }

    .phase-two-rail {
        grid-template-columns: 1fr;
    }

    .phase-two-rail__item {
        padding: 22px 20px;
        border-right: 0;
        border-bottom: 1px solid var(--revamp-light-line);
    }

    .phase-two-rail__item:last-child {
        border-bottom: 0;
    }


}

