/* =========================================
   CAPABILITIES PAGE: CINEMATIC LIST
   ========================================= */

:root {
    --hero-height: 70vh;
    --hero-opacity: 0.25;
}

.capabilities-page {
    background-color: var(--bg-base);
    color: var(--text-primary);
    padding-top: 0;
}

/* --- UTILITIES --- */
.cursive-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 600;
}

.gold-dot {
    color: #C89B3C;
}

.gold-highlight {
    color: #C89B3C;
    font-weight: inherit; /* Keeps the text weight consistent with the surrounding paragraph */
}

/* --- HERO SECTION --- */
.capabilities-hero {
    position: relative;
    width: 100%;
    min-height: var(--hero-height);
    margin: 0 auto 6rem auto;
    padding-top: 180px;
}

.hero-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(100%);
    opacity: var(--hero-opacity);
    z-index: 0;
}

.hero-fade-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(0, 0, 0, 0.3) 60%, 
        var(--bg-base) 100%
    );
    z-index: 1;
}

/* Your exact original layout applied to the inner wrapper */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 5%;
    text-align: center;
}

.bleed-heading {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0 auto 1.5rem auto;
    line-height: 1.6;
}

/* --- THE CINEMATIC LIST ENGINE --- */
.cinematic-capabilities-list {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 5% 10rem 5%;
}

.cap-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
    /* Keeps space between the navbar and the heading when scrolling */
    scroll-margin-top: 200px;
}

/* The Inactive Heading State */
.cap-heading {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2.5rem 0;
    color: var(--text-secondary);
    transition: color 0.5s ease;
    cursor: pointer;
}

.cap-num {
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: #C89B3C;
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

.cap-heading h2 {
    font-size: clamp(1.8rem, 3.5vw, 3.2rem);
    font-weight: 400;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* The Magic Expansion Grid */
.cap-body-grid {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.cap-body-inner {
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.6s ease;
}

/* --- THE ACTIVE EXPANDED STATE --- */
.cap-row.active .cap-heading {
    color: var(--text-primary);
}

.cap-row.active .cap-num {
    opacity: 1;
}

.cap-row.active .cap-heading h2 {
    transform: translateX(10px);
    /* Subtle shift to the right when active */
}

.cap-row.active .cap-body-grid {
    grid-template-rows: 1fr;
    /* Springs open the container smoothly */
}

.cap-row.active .cap-body-inner {
    opacity: 1;
    transform: translateY(0);
    padding-bottom: 4rem;
    transition: opacity 0.6s ease 0.3s, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) 0.2s;
    /* Delayed fade in so it doesn't clip */
}

/* Internal Visuals & Text */
.cap-visual {
    width: 100%;
    height: 45vh;
    min-height: 350px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 3rem;
    margin-top: 1rem;
}

.cap-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.cap-row.active .cap-visual img {
    transform: scale(1);
}

.cap-text h3 {
    color: #C89B3C;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.cap-text p {
    color: #e0e0e0;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* --- CLOSING CTA (MINIMALIST) --- */
.capabilities-cta {
    background-color: transparent;
    padding: 2rem 5%;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 6rem auto;
}

.capabilities-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.capabilities-cta p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.cta-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background-color: #ffffff;
    color: #050505;
    border: 1px solid #ffffff; /* Added border to maintain shape on hover */
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-pill-btn:hover {
    background-color: transparent;
    color: #ffffff;
    transform: translateY(-3px); /* Kept your slight upward lift! */
}

/* Add this to your mobile media query at the bottom */
@media (max-width: 768px) {
    .cap-visual {
        /* Limits image height so text doesn't get pushed off-screen */
        height: 30vh;
        min-height: 200px;
    }
}