:root {
    --vesta-content-width: 1240px;
    --vesta-gutter: clamp(20px, 6vw, 80px);
    --vesta-section-space: clamp(48px, 6vw, 88px);
    --vesta-intro-space: clamp(40px, 4vw, 64px);
    --vesta-layout-gap: clamp(28px, 5vw, 64px);
    --vesta-heading-gap: clamp(28px, 3vw, 40px);
    --vesta-card-radius: 12px;
    --vesta-control-radius: 4px;
}

body[data-page] .client-gallery {
    display: block;
    padding-block: var(--vesta-section-space);
}

body[data-page] .gallery-project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

body[data-page] .gallery-project-grid:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
}

body[data-page] .gallery-project-grid:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-project-card > a {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: #e7ebe2;
    border-radius: var(--vesta-card-radius);
    color: #fff;
    text-decoration: none;
}

.gallery-project-grid:has(> :nth-child(2):last-child) .gallery-project-card > a {
    aspect-ratio: 5 / 4;
}

.gallery-project-grid:has(> :only-child) .gallery-project-card > a {
    aspect-ratio: 21 / 9;
}

.gallery-project-card > a:focus-visible {
    outline: 3px solid #61705c;
    outline-offset: 3px;
}

.gallery-project-card img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.gallery-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.gallery-project-card a:hover img {
    transform: scale(1.04);
}

.gallery-tile a:hover img {
    transform: scale(1.025);
}

.gallery-project-card a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #14110e80;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.gallery-project-card a:is(:hover, :focus-visible)::after {
    opacity: 1;
}

.gallery-project-card .gallery-photo-count {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1;
    margin: 0;
    padding: 5px 12px;
    background: #f7f7f4;
    border-radius: 999px;
    color: #222821;
    font-size: 12px;
    font-weight: 500;
}

.gallery-card-arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: #f7f7f4;
    border-radius: 50%;
    color: #222821;
    font-size: 15px;
    transition: transform .25s ease;
}

.gallery-project-card a:hover .gallery-card-arrow {
    transform: translate(2px, -2px);
}

.gallery-card-copy {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    padding: 96px 24px 24px;
    background: linear-gradient(180deg, #14110e00 0, #14110ed9 100%);
}

body[data-page] .gallery-project-card .gallery-project-location {
    margin: 0 0 6px;
    color: #ffffffd9;
    font-size: var(--vesta-label-size) !important;
    letter-spacing: .06em;
    text-transform: uppercase;
}

body[data-page] .gallery-project-card h2 {
    margin: 0;
    color: #fff;
    font-size: var(--vesta-subheading-size) !important;
    line-height: 1.25 !important;
}

.gallery-card-more {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows .3s ease, opacity .3s ease;
}

body[data-page] .gallery-card-more > p {
    overflow: hidden;
    min-height: 0;
    margin: 0;
    color: #fff;
    font-size: var(--vesta-small-size) !important;
    line-height: 1.6;
}

.gallery-project-card a:is(:hover, :focus-visible) .gallery-card-more {
    grid-template-rows: 1fr;
    opacity: 1;
}

body[data-page] .gallery-project-card a:is(:hover, :focus-visible) .gallery-card-more > p {
    padding-top: 10px;
}

.gallery-photo-count {
    display: block;
    margin-top: 12px;
    color: #61705c;
    font-size: 13px;
    line-height: 1.6;
}

body[data-page] .page-opening.gallery-project-opening {
    min-height: clamp(360px, 52svh, 520px);
}

body[data-page] .gallery-project-page {
    padding-block: 28px var(--vesta-section-space);
}

.gallery-project-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.gallery-back-link {
    display: inline-block;
    color: #61705c;
    font-size: 14px;
    text-decoration: none;
}

.gallery-back-link:hover {
    color: #263321;
}

.gallery-project-toolbar .gallery-photo-count {
    margin: 0;
}

body[data-page] .gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

body[data-page] .gallery-tile {
    position: relative;
    overflow: hidden;
    min-width: 0;
    margin: 0;
    background: #e7ebe2;
    border-radius: var(--vesta-card-radius);
}

.gallery-tile > a {
    display: block;
    height: 100%;
}

.gallery-span-3 { grid-column: span 3; }
.gallery-span-4 { grid-column: span 4; }
.gallery-span-5 { grid-column: span 5; }
.gallery-span-6 { grid-column: span 6; }
.gallery-span-7 { grid-column: span 7; }
.gallery-span-8 { grid-column: span 8; }
.gallery-span-12 { grid-column: span 12; }

.gallery-height-tall { height: clamp(240px, 26vw, 360px); }
.gallery-height-short { height: clamp(200px, 20vw, 280px); }

body[data-page] .gallery-tile figcaption {
    position: absolute;
    inset: auto 0 0;
    margin: 0;
    padding: 32px 16px 12px;
    background: linear-gradient(transparent, #111b14b3);
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    pointer-events: none;
}

@media (max-width: 1000px) {
    body[data-page] .gallery-project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-project-grid:has(> :nth-child(2):last-child) .gallery-project-card > a {
        aspect-ratio: 4 / 5;
    }

    .gallery-project-grid:has(> :only-child) .gallery-project-card > a {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 700px) {
    body[data-page] .gallery-project-grid,
    body[data-page] .gallery-project-grid:has(> :nth-child(2):last-child) {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .gallery-project-grid .gallery-project-card > a,
    .gallery-project-grid:has(> :nth-child(2):last-child) .gallery-project-card > a,
    .gallery-project-grid:has(> :only-child) .gallery-project-card > a {
        aspect-ratio: 4 / 5;
    }

    .gallery-card-copy {
        padding: 72px 20px 20px;
    }

    /* Phones use one wide photo followed by two side by side. */
    body[data-page] .gallery-mosaic {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .gallery-mosaic .gallery-tile {
        grid-column: span 1;
        height: 150px;
    }

    /* Captions would cover these small photos, so only the wide ones show them. */
    .gallery-mosaic .gallery-tile:not(:nth-child(3n + 1), :nth-child(3n + 2):last-child) figcaption {
        display: none;
    }

    .gallery-mosaic .gallery-tile:nth-child(3n + 1),
    .gallery-mosaic .gallery-tile:nth-child(3n + 2):last-child {
        grid-column: span 2;
        height: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-project-card img,
    .gallery-card-arrow,
    .gallery-card-more,
    .gallery-project-card a::after,
    .gallery-tile img {
        transition: none;
    }
}

body[data-page] .shell {
    width: min(calc(100% - var(--vesta-gutter) * 2), var(--vesta-content-width));
    margin-inline: auto;
}

body[data-page] .shell .shell {
    width: 100%;
}

body[data-page] .living-controls.shell,
body[data-page] :is(.living-controls,.living-warranty,.living-close,.partner-support,.collective-benefits,.partner-application,.support,.warranty,.journal-section,.article-section,.next-story,.page-cta,.gallery-coming,.protection-opening,.collection-controls,.collection-comfort,.feature-stories,.finish-reveal,.collection-specs,.collection-coverage,.about-story,.about-purpose,.about-values,.vs-details,.vs-purpose,.vs-study,.vs-invitation) {
    padding-block: var(--vesta-section-space);
}

body[data-page] :is(.page-hero,.article-hero,.gallery-intro,.about-editorial,.contact-section,.planner) {
    padding-top: var(--vesta-intro-space);
    padding-bottom: var(--vesta-section-space);
}

body[data-page] :is(.page-hero-grid,.support-grid,.partner-support,.collective-benefits,.partner-application>.shell,.collection-comfort,.collection-specs,.vs-editorial,.vs-study,.vs-beliefs,.page-cta>.shell) {
    gap: var(--vesta-layout-gap);
}

body[data-page] :is(.section-head,.living-section-head,.collection-heading,.story-heading) {
    gap: 24px;
    margin-bottom: var(--vesta-heading-gap);
}

body[data-page] .living-controls .living-ways {
    margin-top: 0;
}

body[data-page] main :is(h1,h2,h3) + p:not(:is(.eyebrow,.vh-kicker,.story-kicker,.vs-kicker)) {
    margin-top: 20px;
}

body[data-page] :is(.page-hero-copy,.contact-intro,.partner-application-copy,.collection-heading,.collection-comfort-copy,.vs-study-copy,.living-partners>div) > p:not(:is(.eyebrow,.vh-kicker,.story-kicker,.vs-kicker)) {
    max-width: 60ch;
}

body[data-page] :is(.living-ways,.feature-photo-grid,.journal-grid) {
    gap: 24px;
}

body[data-page] .living-controls .living-ways > a {
    border-radius: var(--vesta-card-radius);
}

body[data-page] .living-controls .living-ways p {
    max-width: none;
}

body[data-page] :is(.button,.vh-button,.vs-button,.primary,.secondary,.nav-cta,.lab-cta) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    max-width: 100%;
    padding: 12px 22px;
    border-radius: var(--vesta-control-radius);
    text-align: center;
    white-space: normal;
}

body[data-page] :is(.text-link,.vh-link,.vs-link) {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    text-underline-offset: 5px;
}

body[data-page] .form-panel {
    padding: clamp(24px, 3vw, 40px);
    border-radius: var(--vesta-card-radius);
}

body[data-page] .field-grid {
    gap: 20px;
}

body[data-page] .field-grid label {
    font-size: var(--vesta-small-size);
    line-height: 1.5;
}

body[data-page] .field-grid :is(input,select,textarea) {
    font-size: var(--vesta-body-size);
    line-height: 1.5;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: var(--vesta-control-radius);
}

body[data-page] :is(a,button,input,select,textarea,summary):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

body[data-page] main [id] {
    scroll-margin-top: 100px;
}

@media (max-width: 800px) {
    body[data-page] :is(.living-ways,.feature-photo-grid,.journal-grid) {
        gap: 20px;
    }

    body[data-page] .section-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    body[data-page] .living-controls .living-ways {
        grid-template-columns: 1fr;
    }
}

body[data-page] .page-opening {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: clamp(520px, calc(100svh - 120px), 920px);
    margin: 0 22px;
    padding: 64px 0;
    overflow: hidden;
    border: 0;
    background: #242c25;
    color: #faf8ef;
}

.page-opening-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-opening::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #111b14e6, #111b1499 55%, #111b1433);
    pointer-events: none;
}

body[data-page] .page-opening-content {
    position: relative;
}

body[data-page] .page-opening :is(.page-hero-grid,.section-head) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    margin: 0;
}

body[data-page] .page-opening :is(h1,h1 span) {
    color: #faf8ef;
    max-width: 22ch;
}

body[data-page] .page-opening :is(p,.eyebrow,.section-tag,.story-kicker,.breadcrumb,.text-link) {
    color: #e5e6d6;
}

body[data-page] .page-opening :is(.page-hero-copy,p) {
    max-width: 52ch;
}

body[data-page] .page-opening .breadcrumb {
    margin: 0 0 32px;
}

body[data-page] .page-opening .primary {
    background: #f5f4f0;
    color: #242c25;
    border-color: #f5f4f0;
}

body[data-page] .page-opening .primary:hover {
    background: #e5e6d6;
}

body[data-page] .planner-opening .primary {
    margin-top: 28px;
}

@media (max-width: 800px) {
    body[data-page] .page-opening {
        margin-inline: 12px;
        min-height: 560px;
        padding-block: 40px;
    }

    body[data-page] .page-opening .shell {
        width: calc(100% - 40px);
    }

    .page-opening::after {
        background: linear-gradient(90deg, #111b14df, #111b14a6);
    }
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-track {
    background: var(--vesta-background, #f7f8f5);
}

::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #61705c;
}

::-webkit-scrollbar-thumb:hover {
    background: #3b4b36;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Chrome and Edge ignore the rules above once these are set, so only Firefox gets them. */
@supports not selector(::-webkit-scrollbar) {
    html {
        scrollbar-width: thin;
        scrollbar-color: #61705c var(--vesta-background, #f7f8f5);
    }
}

body[data-page] .living-hero-copy .vh-button {
    gap: 42px;
    min-height: 52px;
    padding: 14px 23px;
}

/* The home hero sits on a full-size photo, so it carries a larger title than other pages. */
body[data-page] .living-hero-copy h1 {
    font-size: clamp(2.5rem, 4.9vw, 5rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -.035em !important;
}

@media (min-width: 801px) {
    body[data-page] main .living-hero-copy > p:not(.vh-kicker) {
        font-size: 18px !important;
    }
}
