/* Approved midnight blue replaces the former ink color only in staging. */
:root {
    --ink: #102438;
}

/* Layout preview only: horizontal blue color-field on dark content bands. */
.approach-section,
.online-section,
.information-cta,
.site-contact-cta {
    background: linear-gradient(90deg, #2b63ae 0%, #22518c 48%, #172d4b 100%);
}

/* Walking photograph and copy are confined to the staging additions. */
.projects-walking-section {
    padding: 72px 0;
    background: var(--paper);
}

.projects-walking-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 48px;
    align-items: center;
}

.projects-walking-photo {
    position: relative;
    margin: 0;
    min-width: 0;
    padding-bottom: 60px;
}

.projects-walking-slides {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 4px;
}

.projects-walking-slide {
    position: absolute;
    inset: 0;
    margin: 0;
}

.projects-walking-slide[hidden],
.projects-walking-controls[hidden] {
    display: none;
}

.projects-walking-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
}

.projects-walking-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 44px;
}

.projects-walking-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.projects-walking-controls button:hover {
    border-color: var(--ink);
}

.projects-walking-controls img {
    display: block;
    width: 20px;
    height: 20px;
}

.projects-walking-controls [data-walking-previous] img { transform: rotate(-90deg); }
.projects-walking-controls [data-walking-next] img { transform: rotate(90deg); }
.projects-walking-controls [data-walking-status] { min-width: 5ch; text-align: center; color: var(--ink); }
.projects-walking-slides:focus-visible,
.projects-walking-controls button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.projects-walking-copy {
    min-width: 0;
}

.projects-walking-copy h2 {
    margin-bottom: 24px;
    font-size: 2.25rem;
    line-height: 1.2;
}

.projects-walking-copy .projects-walking-book {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--ink);
}

#about-walking-note > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

@media (max-width: 767px) {
    .projects-walking-section { padding: 48px 0; }
    .projects-walking-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .projects-walking-photo { width: min(100%, 440px); justify-self: center; }
    .projects-walking-copy h2 { font-size: 1.875rem; }
}

/* Square project photographs are limited to the layout preview. */
.project-types .project-type-media {
    aspect-ratio: 1;
    min-height: 0;
    align-self: center;
}

.project-types .project-type-media img {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 1;
    object-fit: contain;
}

/* Curriculum blocks use independent native accordions only in staging. */
.about-curriculum--blocks { border: 0; }

.about-curriculum--blocks .about-curriculum-block { border-top: 1px solid var(--line); }
.about-curriculum--blocks .about-curriculum-block:last-child { border-bottom: 1px solid var(--line); }

.about-curriculum--blocks .about-curriculum-block > summary h3 {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
}

.about-curriculum--blocks .about-curriculum-block[open] > summary::after { content: '-'; }
.about-curriculum--blocks .about-curriculum-block-content { padding: 0 4px 24px; }
.about-curriculum--blocks .about-curriculum-block-content > :last-child { margin-bottom: 0; }

/* Theatre slideshow retains the existing square frame. */
.project-types [data-theatre-carousel] {
    position: relative;
    overflow: hidden;
}

.project-types [data-theatre-carousel] .project-theatre-slide {
    position: absolute;
    inset: 0;
    object-fit: cover;
    opacity: 1;
    visibility: visible;
    transition: opacity 700ms ease, visibility 0s linear;
}

.project-types [data-theatre-carousel] .project-theatre-slide[hidden] {
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition-delay: 0s, 700ms;
}
.project-types [data-theatre-carousel]:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }

@media (prefers-reduced-motion: reduce) {
    .project-types [data-theatre-carousel] .project-theatre-slide { transition: none; }
}

/* Generated abstract artwork is confined to internal staging heroes. */
.page-heading--image.subpage-hero--abstract > .wrap.narrow {
    max-width: var(--wrap);
    text-align: left;
}

.subpage-hero--abstract .subpage-hero-image,
.subpage-hero--abstract .heading-hero-image {
    object-position: center;
}

.subpage-hero--abstract::after {
    background: none;
}

@media (max-width: 767px) {
    .subpage-hero--abstract .subpage-hero-image,
    .subpage-hero--abstract .heading-hero-image {
        object-position: 76% center;
    }

    .subpage-hero--abstract::after {
        background: none;
    }
}

/* Selected about portrait is limited to the layout preview introduction. */
.information-section--about .information-intro--portrait {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.85fr);
    gap: 40px;
    align-items: center;
}

.information-section--about .information-intro--portrait .staging-about-portrait {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 4px;
}

@media (max-width: 767px) {
    .information-section--about .information-intro--portrait {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
}

/* Colorized home photograph is confined to the layout preview. */
.clinic-hero::before {
    background-image: url('/assets/images/hero-home-long-sleeves-v2.jpg');
}

/* Preserve the former vertical home portrait frame in staging. */
.intro-section .intro-portrait {
    aspect-ratio: 400 / 461;
    height: auto;
    object-fit: cover;
    object-position: center;
}

/* Approved midnight blue is limited to the top bar and footer. */
.contact-bar,
.site-footer {
    background: #102438;
}

.mobile-contact-bar {
    background: #102438;
}

/* Use the original logo alpha as a mask to preserve its exact geometry. */
@supports ((mask-image: url("")) or (-webkit-mask-image: url(""))) {
    .site-header .brand {
        position: relative;
        display: block;
    }

    .site-header .brand::after {
        content: "";
        position: absolute;
        inset: 0;
        background: #102438;
        -webkit-mask: url('/assets/images/gerry-grassi-logo.png') center / contain no-repeat;
        mask: url('/assets/images/gerry-grassi-logo.png') center / contain no-repeat;
        pointer-events: none;
    }

    .site-header .brand img {
        display: block;
        opacity: 0;
    }

    .site-loader .loader-logo {
        grid-area: 1 / 1;
        opacity: 0;
        animation: none;
    }

    .site-loader::before {
        content: "";
        grid-area: 1 / 1;
        width: min(52vw, 205px);
        aspect-ratio: 377 / 148;
        background: #102438;
        -webkit-mask: url('/assets/images/gerry-grassi-logo.png') center / contain no-repeat;
        mask: url('/assets/images/gerry-grassi-logo.png') center / contain no-repeat;
        transform-style: preserve-3d;
        animation: loader-spin 920ms linear infinite;
    }

    @media (prefers-reduced-motion: reduce) {
        .site-loader::before {
            animation: none;
        }
    }
}

.mobile-contact-bar svg {
    width: 19px;
    height: 19px;
}

/* Keep the tallest book slide in the layout so the controls never move. */
.home-book-slides {
    display: grid;
}

.home-book-slides > .home-book-slide {
    grid-area: 1 / 1;
    min-width: 0;
}

.home-book-slides > .home-book-slide[hidden] {
    display: grid;
    visibility: hidden;
    pointer-events: none;
    animation: none;
}

/* Mirror the studio consultation band without changing the online section. */
.home-studio-section {
    background: var(--paper);
}

/* Four selected videos and explicit social destinations, only on the home. */
.home-videos-section .home-video-grid--selected {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 28px;
}

.contact-bar .social-links {
    align-items: center;
}

.contact-bar .social-link[aria-label="Instagram"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: 32px;
    padding: 4px 8px;
    border-color: #fff;
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
}

.contact-bar .social-link[aria-label="Instagram"] .visually-hidden {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 16px;
    line-height: 16px;
    text-align: center;
    transform: none;
    overflow: visible;
    clip: auto;
    clip-path: none;
}

.contact-bar .social-link[aria-label="Instagram"]:hover,
.contact-bar .social-link[aria-label="Instagram"]:focus-visible {
    background: #e7eef5;
    color: var(--ink);
    text-decoration: none;
}

@media (max-width: 680px) {
    .contact-bar .social-links { gap: 4px; }
    .contact-bar .social-link[aria-label="Instagram"] { gap: 4px; padding-inline: 5px; }
}

.home-social-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 42px;
}

.home-social-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 280px;
    max-width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
    text-align: center;
}

.home-social-actions svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

@media (max-width: 680px) {
    .home-videos-section .home-video-grid--selected { grid-template-columns: 1fr; }
    .home-social-actions { align-items: stretch; flex-direction: column; }
    .home-social-actions a { width: 100%; }
}

.home-studio-section .home-online-image {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

@media (min-width: 681px) {
    .home-studio-section .home-online-layout {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    }
}

/* The preceding book band already supplies the separation from Services. */
.home-book-section + .services-section {
    padding-top: 0;
}

/* WhatsApp feedback: preserve readable margins and remove unnecessary blank space. */
.clinical-faq .clinical-faq-list summary {
    font-weight: 500;
}

.information-content-section--about {
    width: 100%;
}

.about-band .information-content {
    width: min(calc(100% - 40px), 860px);
    margin-inline: auto;
}

.home-reviews-section .home-review-slides {
    display: block;
}

.home-reviews-section .home-review-slide {
    display: none;
}

.home-reviews-section .home-review-slide.is-active {
    display: block;
}

.home-videos-section .home-video-grid--selected {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.home-videos-section .home-video-preview::after {
    background: none;
}

.home-videos-section .home-video-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-videos-section .home-video-item h3 {
    font-size: 1.05rem;
}

.clinical-group-icon {
    display: block;
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
}

/* Approved clinical directory: one column with compact gradient headings. */
.clinical-directory .clinical-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

.clinical-directory .clinical-group {
    padding: 0;
    overflow: hidden;
    border: 0;
    box-shadow: 0 2px 10px rgba(16, 36, 56, 0.04);
}

.clinical-directory .clinical-group-heading {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-height: 76px;
    padding: 16px 26px;
    background: linear-gradient(90deg, #2b63ae 0%, #22518c 48%, #172d4b 100%);
    color: #fff;
}

.clinical-directory .clinical-group-icon {
    width: 44px;
    height: 44px;
    margin: 0;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.staging-back-top {
    display: flex;
    justify-content: flex-end;
    padding-block: 16px;
}

.staging-back-top a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: #263a52;
}

.staging-back-top img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.staging-back-top a:focus-visible {
    outline: 2px solid #263a52;
    outline-offset: 4px;
}

.clinical-directory .clinical-group h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.clinical-directory .clinical-group h3 a,
.clinical-directory .clinical-group h3 a:hover,
.clinical-directory .clinical-group h3 a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.clinical-directory .clinical-group h3 a:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.clinical-directory .clinical-group ul {
    gap: 0 24px;
    padding: 16px 26px 24px;
}

.clinical-directory .clinical-group li { min-width: 0; }

.clinical-directory .clinical-group li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 10px 0;
    border-bottom: 1px solid #e6edf2;
    font-size: 1.0625rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.clinical-directory .clinical-group-arrow {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    transform: rotate(90deg);
    opacity: 0.55;
}

@media (max-width: 900px) {
    .clinical-directory .clinical-group ul { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
    .clinical-directory .clinical-groups { gap: 18px; }
    .clinical-directory .clinical-group-heading {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 14px;
        min-height: 72px;
        padding: 14px 20px;
    }
    .clinical-directory .clinical-group-icon { width: 40px; height: 40px; }
    .clinical-directory .clinical-group h3 { font-size: 1.125rem; }
    .clinical-directory .clinical-group ul { padding: 12px 20px 20px; }
}

@media (max-width: 680px) {
    .home-book-slides {
        grid-template-rows: auto auto;
        row-gap: 24px;
    }

    .home-book-slides > .home-book-slide,
    .home-book-slides > .home-book-slide[hidden] {
        display: contents;
    }

    .home-book-copy {
        display: flex;
        flex-direction: column;
        grid-area: 1 / 1;
        min-width: 0;
    }

    .home-book-copy .home-book-link {
        align-self: flex-start;
        margin-top: auto;
    }

    .home-book-cover {
        grid-area: 2 / 1;
        width: min(100%, 270px);
        align-self: start;
    }

    .home-videos-section .home-video-grid--selected {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .home-videos-section,
    .home-reviews-section {
        padding-block: 36px;
    }

    .home-social-actions {
        margin-top: 28px;
    }

    .project-types {
        padding-bottom: 36px;
    }

    .information-section:has(.clinical-faq) {
        padding-bottom: 0;
    }

    .clinical-faq {
        padding-bottom: 36px;
    }
}
