/* About Page Styles */

body.page-about {
    --cream: #F1E8E1;
    --sage: #5F7775;
    --rust: #BA5826;
    --navy: #243746;
    --light-gray-brand: #D8DFE1;
    --olive: #555025;
    --gold-brand: #CC9F53;
    --about-shell: min(1320px, calc(100% - 48px));
    --about-shell-narrow: min(1180px, calc(100% - 48px));
    --about-section-pad: clamp(56px, 7vw, 96px);
    --about-section-gap: clamp(28px, 4vw, 48px);
}

/* =============================================
   About Copy Sections
   ============================================= */

/* Override parent theme's .container max-width/padding and header bg on about page.
   body.page-about comes from add_slug_body_class() in functions.php */
body.page-about .site-header {
    background: var(--light-gray-brand);
}

body.page-about #page.container {
    max-width: none;
    padding: 0;
}

body.page-about .site-content {
    padding-bottom: 0;
}

.about-page {
    background-color: var(--cream);
    color: var(--navy);
}

.about-page p,
.about-page li,
.about-page a,
.about-page button {
    font-family: 'Public Sans', var(--cabin), sans-serif;
}

.about-page p,
.about-page li {
    font-size: clamp(1rem, 0.3vw + 0.95rem, 1.125rem);
    line-height: 1.75;
    color: rgba(36, 55, 70, 0.92);
}

.about-page h1,
.about-page h2,
.about-page h3,
.about-page h4 {
    color: var(--navy);
}

.about-copy-section {
    padding: var(--about-section-pad) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.about-copy-section--vision {
    background: linear-gradient(180deg, rgba(95, 119, 117, 0.18) 0%, rgba(216, 223, 225, 0.72) 100%);
    border-top: 1px solid rgba(36, 55, 70, 0.08);
    border-bottom: 1px solid rgba(36, 55, 70, 0.08);
}

.about-copy-section--mission-copy {
    background: linear-gradient(180deg, rgba(95, 119, 117, 0.12) 0%, rgba(216, 223, 225, 0.48) 100%);
    border-bottom: 1px solid rgba(36, 55, 70, 0.08);
}

.about-copy-inner {
    width: var(--about-shell-narrow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(24px, 4vw, 36px);
}

.about-section-heading {
    font-family: 'EB Garamond', var(--garamond), serif;
    font-size: clamp(2.3rem, 3.9vw, 3.5rem);
    font-weight: 400;
    line-height: 1.02;
    color: var(--navy);
    text-align: center;
    width: 100%;
    max-width: 1020px;
    margin: 0;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.about-copy-text {
    width: min(100%, 780px);
    font-family: 'Public Sans', var(--cabin), sans-serif;
    font-size: clamp(1.08rem, 0.4vw + 1rem, 1.28rem);
    line-height: 1.7;
    color: rgba(36, 55, 70, 0.92);
}

.about-copy-text p {
    margin-bottom: 18px;
}

.about-copy-text p:last-child {
    margin-bottom: 0;
}

/* Responsive: About Copy Sections */
@media (max-width: 1000px) {
    .about-copy-section {
        padding: clamp(40px, 6vw, 56px) 0;
    }

    .about-copy-inner {
        width: min(100%, calc(100% - 40px));
        gap: 18px;
    }

    .about-section-heading {
        font-size: clamp(2.15rem, 6.5vw, 2.7rem);
        line-height: 1.06;
        width: min(100%, calc(100% - 28px));
        max-width: 19ch;
        padding: 0 14px;
    }

    .about-copy-text {
        width: 100%;
    }
}

/* =============================================
   Brands Carousel Section
   ============================================= */

.brands-section {
    background: var(--light-gray-brand);
    padding: clamp(28px, 4vw, 44px) 0 var(--about-section-pad);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 3vw, 32px);
    overflow: hidden;
    width: 100%;
}

body.page-about .brands-section {
    padding-top: clamp(44px, 5vw, 68px);
}

.brands-heading {
    font-family: 'EB Garamond', var(--garamond), serif;
    font-size: clamp(2.3rem, 3.9vw, 3.5rem);
    font-weight: 400;
    line-height: 1.02;
    color: var(--navy);
    text-align: center;
    width: min(100%, calc(var(--about-shell) - 48px));
    max-width: 1020px;
    margin: 0 auto;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

/* Carousel track */
.carousel-track-wrap {
    position: relative;
    width: var(--about-shell);
    max-width: 100%;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
    overscroll-behavior-x: contain;
    -webkit-user-select: none;
    user-select: none;
}

/* Arrow buttons */
.carousel-arrow {
    position: absolute;
    z-index: 20;
    top: 50%;
    transform: translateY(-50%);
    background: var(--deep-blue);
    border: none;
    border-radius: 40px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
    transition: background 0.2s, box-shadow 0.2s;
}

.carousel-arrow:hover {
    background: #1a2f42;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.carousel-arrow svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    stroke-width: 2.5;
    fill: none;
    flex-shrink: 0;
}

.carousel-arrow-left {
    left: 16px;
}

.carousel-arrow-right {
    right: 16px;
}

/* Brand card — outer shell */
.brand-card {
    position: absolute;
    border-radius: 30px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity, width, height;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    perspective: 1200px;
    -webkit-perspective: 1200px;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

body.home .brand-card:hover,
body.page-about .brand-card:hover {
    transform: none !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

/* Card background photo */
.brand-card-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.brand-card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark photo overlay */
.brand-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
}

/* White cast overlay — opacity driven by JS per slot position */
.brand-card-cast {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}

/* 3-D flip */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.brand-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.brand-card:not(.flipped) .card-back {
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.brand-card.flipped .card-front {
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.brand-card:not(.flipped) .card-front,
.brand-card.flipped .card-back {
    opacity: 1;
    visibility: visible;
}

.card-face {
    position: absolute;
    inset: 0;
    border-radius: 30px;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

/* Card FRONT — Logo + plus button */
.brand-card-ui {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px;
    transition: opacity 0.3s;
    z-index: 2;
}

.brand-logo {
    max-height: 48px;
    max-width: 170px;
    object-fit: contain;
    object-position: left top;
}

/* Plus button — only visible on center card */
.brand-plus {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    display: none;
    color: white;
}

.brand-card.is-center .brand-plus {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-plus svg {
    width: 100%;
    height: 100%;
}

/* Card BACK */
.card-back {
    background: rgba(241, 232, 225, 0.96);
    transform: rotateY(180deg) translateZ(1px);
    -webkit-transform: rotateY(180deg) translateZ(1px);
    display: flex;
    flex-direction: column;
    padding: 25px;
    gap: 20px;
}

.card-front {
    transform: rotateY(0deg) translateZ(1px);
    -webkit-transform: rotateY(0deg) translateZ(1px);
}

/* Top row: brand logo (left) + close button (right) */
.card-back-top {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
    width: 100%;
    gap: 10px;
}

.card-back-logo {
    max-width: 204px;
    height: 50px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 1;
}

.card-back-top-spacer {
    flex: 1;
}

.card-close {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    color: var(--deep-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-close svg {
    width: 100%;
    height: 100%;
}

/* Middle: description + social icons */
.card-back-mid {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.card-back-text {
    font-family: 'Public Sans', var(--cabin), sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(36, 55, 70, 0.92);
    text-align: center;
    line-height: 1.65;
    width: 100%;
}

.card-back-socials {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.card-back-socials a {
    display: flex;
    width: 30px;
    height: 30px;
    color: var(--deep-blue);
    transition: opacity 0.2s;
}

.card-back-socials a:hover {
    opacity: 0.7;
}

.card-back-socials svg {
    width: 100%;
    height: 100%;
}

/* Visit Website button */
.card-visit-btn {
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rust);
    color: var(--cream);
    font-family: 'Public Sans', var(--cabin), sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: none;
    border-radius: 40px;
    padding: 11px 24px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.card-visit-btn:hover {
    background: var(--gold-brand);
    color: var(--navy);
    transform: translateY(-1px);
}

/* Dot indicators */
.carousel-dots {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b0babe;
    transition: background 0.3s, transform 0.3s;
    cursor: pointer;
    border: none;
    padding: 0;
}

.carousel-dot.active {
    background: var(--deep-blue);
    transform: scale(1.35);
}

/* Homepage reuse of the brand carousel */
body.home .home-brand-carousel-section {
    background: transparent;
    padding: clamp(20px, 3vw, 36px) 0 clamp(20px, 3vw, 34px);
    gap: clamp(16px, 2.4vw, 28px);
}

body.home .home-brand-carousel-section .brands-heading {
    font-family: 'EB Garamond', var(--garamond), serif;
    font-size: clamp(2.3rem, 3.9vw, 3.5rem);
    font-weight: 400;
    line-height: 1.02;
    color: var(--navy);
    text-align: center;
    width: min(100%, calc(var(--about-shell) - 48px));
    max-width: 1020px;
    margin: 0 auto;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

body.home .home-brand-carousel-section .carousel-track-wrap {
    width: min(1320px, calc(100% - 48px));
}

/* Responsive: Brands Carousel */
@media (max-width: 1000px) {
    .brands-section {
        padding: clamp(4px, 1.2vw, 10px) 0 clamp(28px, 5vw, 40px);
        gap: 10px;
    }

    body.page-about .brands-section {
        padding-top: 26px;
    }

    .brands-heading {
        font-size: clamp(2.15rem, 6.5vw, 2.7rem);
        line-height: 1.06;
        width: min(100%, calc(100% - 28px));
        max-width: 19ch;
        padding: 0 14px;
    }

    .carousel-track-wrap {
        width: min(100%, calc(100% - 24px));
        height: 520px;
    }

    body.home .home-brand-carousel-section {
        padding: 14px 0 14px;
        gap: 8px;
    }

    body.home .home-brand-carousel-section .brands-heading {
        font-family: 'EB Garamond', var(--garamond), serif;
        font-size: clamp(2.15rem, 6.5vw, 2.7rem);
        font-weight: 400;
        line-height: 1.06;
        color: var(--navy);
        text-align: center;
        width: min(100%, calc(100% - 28px));
        max-width: 19ch;
        padding: 0 14px;
        margin: 0 auto;
        letter-spacing: -0.02em;
        text-wrap: balance;
    }

    body.home .home-brand-carousel-section .carousel-track-wrap {
        width: min(100%, calc(100% - 24px));
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
    }

    .carousel-arrow svg {
        width: 14px;
        height: 14px;
    }

    .carousel-arrow-left {
        left: 8px;
    }

    .carousel-arrow-right {
        right: 8px;
    }
}

/* =============================================
   Timeline Section
   ============================================= */

.about-timeline {
    padding: clamp(32px, 4.5vw, 56px) 0 var(--about-section-pad);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(28px, 4vw, 40px);
    background: #fff;
}

.about-timeline-heading {
    font-family: 'EB Garamond', var(--garamond), serif;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 400;
    line-height: 1.08;
    color: var(--navy);
    text-align: center;
    margin: 0;
    padding: 0 24px;
    width: min(100%, calc(var(--about-shell) - 48px));
    max-width: 980px;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.about-timeline-container {
    width: var(--about-shell);
    max-width: 100%;
}

.about-timeline-row {
    display: flex;
    padding: 0;
}

.about-timeline-row--top .about-timeline-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-end;
}

.about-timeline-row--bottom .about-timeline-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
}

.about-timeline-entry {
    flex: 2;
}

.about-timeline-spacer {
    flex: 1;
}

.about-timeline-year {
    font-family: 'Public Sans', var(--cabin), sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rust);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 6px;
}

.about-timeline-desc {
    font-family: 'Public Sans', var(--cabin), sans-serif;
    font-size: clamp(1rem, 0.25vw + 0.96rem, 1.08rem);
    color: rgba(36, 55, 70, 0.9);
    line-height: 1.7;
    margin-bottom: 0;
}

.about-timeline-connector {
    width: 3px;
    height: 30px;
    background-color: rgba(95, 119, 117, 0.72);
}

.about-timeline-line {
    width: 100%;
    height: 3px;
    background-color: rgba(95, 119, 117, 0.72);
}

/* Responsive: Timeline — staggered vertical timeline around a center spine */
@media (max-width: 1000px) {
    .about-timeline {
        padding: clamp(40px, 6vw, 56px) 20px;
        gap: 20px;
    }

    .about-timeline-heading {
        padding: 0 14px;
        width: min(100%, calc(100% - 28px));
        max-width: 18.5ch;
        font-size: clamp(2.15rem, 6.35vw, 2.65rem);
        line-height: 1.06;
    }

    .about-timeline-container {
        display: grid;
        grid-template-columns: minmax(0, 180px) 3px minmax(0, 1fr);
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
        align-items: start;
        min-width: 0;
    }

    .about-timeline-row {
        display: flex;
        flex-direction: column;
        gap: 69px;
        padding: 0;
        min-width: 0;
    }

    .about-timeline-row--top {
        grid-column: 1;
    }

    .about-timeline-row--bottom {
        grid-column: 3;
        padding-top: 69px;
    }

    .about-timeline-spacer {
        display: none;
    }

    .about-timeline-line {
        grid-column: 2;
        width: 3px;
        height: 100%;
        align-self: stretch;
        justify-self: center;
    }

    .about-timeline-row--top .about-timeline-entry,
    .about-timeline-row--bottom .about-timeline-entry {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        position: relative;
        flex: unset;
        width: 100%;
        min-width: 0;
    }

    .about-timeline-row--top .about-timeline-entry {
        padding-right: 23px;
    }

    .about-timeline-row--bottom .about-timeline-entry {
        padding-left: 26px;
    }

    .about-timeline-row--top .about-timeline-connector {
        width: 23px;
        height: 3px;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .about-timeline-row--bottom .about-timeline-connector {
        width: 26px;
        height: 3px;
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .about-timeline-desc {
        min-width: 0;
    }

    .about-timeline-desc p {
        margin: 0;
    }

    .about-timeline-desc p + p {
        margin-top: 0;
    }
}

/* =============================================
   Current Work Section
   ============================================= */

.about-current-work {
    background-color: var(--light-gray-brand);
    padding: clamp(32px, 4.5vw, 56px) 0 var(--about-section-pad);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(28px, 4vw, 40px);
    overflow: hidden;
}

.about-current-work-heading {
    font-family: 'EB Garamond', var(--garamond), serif;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 400;
    line-height: 1.08;
    color: var(--navy);
    text-align: center;
    margin: 0;
    width: min(100%, calc(var(--about-shell) - 48px));
    max-width: 980px;
    padding: 0 24px;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.about-current-work-inner {
    display: flex;
    gap: clamp(28px, 4vw, 56px);
    width: var(--about-shell);
    max-width: 100%;
}

@media (min-width: 1001px) {
    .about-section-heading,
    .brands-heading,
    body.home .home-brand-carousel-section .brands-heading {
        font-size: clamp(1.85rem, 3.12vw, 2.8rem);
    }

    .about-timeline-heading,
    .about-current-work-heading {
        font-size: clamp(1.55rem, 3.2vw, 2.35rem);
    }
}

.about-current-work-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-current-work-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-current-work-title {
    font-family: 'Public Sans', var(--cabin), sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rust);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin: 0;
}

.about-current-work-body {
    font-family: 'Public Sans', var(--cabin), sans-serif;
    font-size: clamp(1rem, 0.3vw + 0.95rem, 1.1rem);
    line-height: 1.75;
    color: rgba(36, 55, 70, 0.92);
}

.about-current-work-body p {
    margin-bottom: 18px;
}

.about-current-work-body p:last-child {
    margin-bottom: 0;
}

body.page-about .about-current-work .about-current-work-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    background-color: #BA5826 !important;
    color: #F1E8E1 !important;
    font-family: 'Public Sans', var(--cabin), sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 50px;
    text-decoration: none;
    text-decoration-line: none;
    width: fit-content;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    border: 0;
    box-shadow: 0 10px 24px rgba(186, 88, 38, 0.2);
    -webkit-text-fill-color: currentColor;
}

body.page-about .about-current-work .about-current-work-btn:hover,
body.page-about .about-current-work .about-current-work-btn:focus {
    background: #CC9F53 !important;
    color: #243746 !important;
    text-decoration: none;
    transform: translateY(-1px);
}

.about-current-work-video {
    flex: 1;
    align-self: flex-start;
    display: flex;
    justify-content: center;
}

.about-current-work-video-embed {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 24px 48px rgba(36, 55, 70, 0.16);
    line-height: 0;
    isolation: isolate;
}

.about-current-work-video-placeholder {
    background-color: var(--navy);
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(36, 55, 70, 0.16);
}

.about-current-work-video-embed iframe,
.about-current-work-video-embed video,
.about-current-work-video-embed > div {
    width: 100%;
    display: block;
    border-radius: 0;
    box-shadow: none;
}

.about-current-work-video-embed > div {
    position: absolute;
    inset: 0;
}

.about-current-work-video-embed iframe,
.about-current-work-video-embed video {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    transform: scale(1.14);
    transform-origin: center center;
}

.about-current-work-video-embed > div iframe,
.about-current-work-video-embed > div video {
    width: 100% !important;
    height: 100% !important;
}

/* Responsive: Current Work */
@media (max-width: 1000px) {
    .about-current-work {
        padding: clamp(40px, 6vw, 56px) 0;
        gap: 20px;
    }

    .about-current-work-inner {
        flex-direction: column;
        gap: 20px;
        width: min(100%, calc(100% - 40px));
    }

    .about-current-work-heading {
        width: min(100%, calc(100% - 28px));
        max-width: 19.5ch;
        padding: 0 14px;
        font-size: clamp(2.15rem, 6.6vw, 2.75rem);
        line-height: 1.06;
    }

    /* Video on top, text below (reverse order from desktop) */
    .about-current-work-video {
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .about-current-work-video-embed {
        width: 100%;
        max-width: min(100%, 760px);
    }

    .about-current-work-video-embed iframe {
        width: 100% !important;
        height: 100% !important;
        transform: scale(1.065);
    }

    .about-current-work-video-placeholder {
        min-height: 250px;
    }
}
