/* =========================================
   Base & Variables
========================================= */
:root {
    --color-bg-grey: #f8f8f8; /* Aligning with --color-bg-alt */
    --color-accent-black: #111111;
    --color-accent-red: #8B0000; /* Updated to base.css deep red */
    --transition-cinematic: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

body, html {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg-grey);
    font-family: 'Inter', system-ui, sans-serif; /* Aligning with base body font */
}

/* =========================================
   Dropdown Menu Fix (Desktop & Mobile)
========================================= */
/* Force the dropdown container to be solid white */
.main-nav .dropdown-menu {
    background-color: #ffffff !important;
}

/* Force the links inside the dropdown to be deep red */
.main-nav .dropdown-menu li a {
    color: #8B0000 !important;
}

/* Optional: Subtle dark hover effect for contrast */
.main-nav .dropdown-menu li a:hover {
    color: #050505 !important; 
    background-color: #f8f8f8 !important;
}



/* =========================================
   Hero & "Consume" Effect
========================================= */
.hero-consume-section {
    position: relative;
    height: 50vh; 
    width: 100%;
    z-index: 1;
}

.hero-image-wrapper {
    position: relative; /* Normal flow */
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    z-index: -1;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-gradient-bleed {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh; /* Starts at the end of the image */
    background: linear-gradient(to bottom, rgba(232,232,232,0) 0%, var(--color-bg-grey) 100%);
}

/* =========================================
   Narrative Sequence (Fixed Flow)
========================================= */
.narrative-track {
    background-color: transparent;
    position: relative;
    z-index: 2;
    margin-top: -10vh; 
}

.sticky-text-container {
    position: relative; 
    padding: 0 10%;
    display: flex;
    flex-direction: column; /* Stacks text directly below heading */
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1.5rem;
}

.dynamic-heading {
    font-size: clamp(3rem, 6vw, 6rem);
    color: var(--color-accent-black);
    margin: 0;
    text-transform: uppercase;
    line-height: 1;
}

.stylistic-context {
    max-width: 800px;
}

.stylistic-context p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 2rem;
}

.btn-solid-red {
    display: inline-block;
    background-color: var(--color-accent-red);
    color: #fff;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-solid-red:hover {
    background-color: #5a0000; /* Darker shade of the new deep red */
}

/* =========================================
   Vertical Image Accordion (Updated 50/50 Split)
========================================= */
.accordion-scroll-track {
    height: 400vh; 
    position: relative;
    z-index: 3;
    background-color: var(--color-bg-grey);
}

.accordion-sticky-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 5vh 10%;
    box-sizing: border-box;
}

.vertical-accordion {
    display: flex;
    flex-direction: column;
    height: 90vh;
    gap: 10px;
}

.accordion-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: flex var(--transition-cinematic);
    will-change: flex;
    /* Ensure the background matches the page so the fade works */
    background-color: var(--color-bg-grey); 
}

.accordion-panel.active {
    flex: 5;
}

/* 1. Constrain Image to 50% and 9:16 Ratio */
.accordion-panel img {
    width: 50%;
    height: 100%;
    object-fit: cover;
    object-position: left center; /* Anchors the focal point to the left */
    aspect-ratio: 9 / 16;
}

/* 2. The Edge Gradient Fade */
.accordion-panel::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* Match image width */
    height: 100%;
    /* Transparent for the first 75%, fading to bg-grey at the very right edge */
    background: linear-gradient(to right, rgba(248,248,248,0) 75%, var(--color-bg-grey) 100%);
    z-index: 2;
    pointer-events: none; /* Allows clicks to pass through if needed */
}

/* 3. Text floating in the right 50% */
.panel-content-right {
    position: absolute;
    right: 5%; /* Anchors the block near the right edge */
    top: 50%;
    transform: translateY(-40%);
    width: 30%; /* Reduced from 45% to pull the left edge far away from the center */
    z-index: 3;
    color: var(--color-accent-black); /*[cite: 1] */
    opacity: 0; /*[cite: 1] */
    transition: opacity 0.4s ease, transform 0.4s ease; /*[cite: 1] */
}

.accordion-panel.active .panel-content-right {
    opacity: 1;
    transform: translateY(-50%);
    transition-delay: 0.4s;
}

.panel-content-right h2 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-accent-red);
    text-transform: uppercase;
}

.panel-content-right p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

/* =========================================
   Serif font for product headings
========================================= */
.dynamic-heading,
.panel-content-right h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* =========================================
   Editorial Framing & Highlights
========================================= */
.divider-top-red {
    width: 60px;
    height: 2px;
    background-color: var(--color-accent-red);
    margin-bottom: 1rem;
    border: none;
    display: block;
}

.divider-bottom-black {
    width: 60px;
    height: 2px;
    background-color: var(--color-accent-black);
    margin-top: 1rem;
    border: none;
    display: block;
}

.text-deep-red {
    color: var(--color-accent-red);
    font-weight: inherit; /* Ensures it blends naturally with surrounding text */
}

/* =========================================
   Process Flow Section (Light Theme)
========================================= */
.process-flow-section {
    position: relative;
    width: 100%;
    padding: 6rem 5%;
    background-color: var(--color-bg-grey); /* Sits naturally on your page's white space */
    z-index: 10;
}

.process-flow-header {
    position: relative;
    text-align: center;
    margin-bottom: 4rem;
}

.process-flow-header h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--color-accent-black); /* Dark header text for readability */
    font-weight: 700;
    font-family: 'Playfair Display', serif; 
}

.process-flow-header .red-dot {
    color: var(--color-accent-red);
}

.process-flow-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: stretch; /* Forces all boxes to match the tallest one */
    justify-content: space-between;
    gap: 1rem;
}

/* --- The 4 Process Boxes --- */
.process-step {
    flex: 1;
    padding: 2rem;
    background: #ffffff; /* Solid white to lift off the grey background */
    border: 2px solid var(--color-accent-red); /* Deep red border */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); /* Subtle shadow for depth */
}

.process-step h3 {
    font-size: 1.6rem;
    color: var(--color-accent-red);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
}

.process-step p {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #444444; /* Dark grey paragraph text */
}

/* --- Directional Arrows --- */
.process-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent-red);
    font-size: 1.5rem;
    margin-top: 3rem; 
    align-self: flex-start; 
}

.process-arrow.mobile-arrow {
    display: none;
}

/* =========================================
   Process Flow Section (Image Background & Light Tint)
========================================= */
.process-flow-section {
    position: relative;
    width: 100%;
    padding: 6rem 5%;
    background-image: url('../../assets/Process-Background.webp'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Desktop parallax effect */
    z-index: 10;
}

/* The Semi-Transparent White Tint */
.process-flow-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85); /* Light tint to keep text readable */
    z-index: 1;
}

.process-flow-header {
    position: relative;
    z-index: 2; /* Sits above the tint */
    text-align: center;
    margin-bottom: 4rem;
}

.process-flow-header h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--color-accent-black);
    font-weight: 700;
    font-family: 'Playfair Display', serif; 
}

.process-flow-header .red-dot {
    color: var(--color-accent-red);
}

.process-flow-container {
    position: relative;
    z-index: 2; /* Sits above the tint */
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
}

/* --- The 4 Process Boxes --- */
.process-step {
    flex: 1;
    padding: 2rem;
    background: #ffffff;
    border: 2px solid var(--color-accent-red);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.process-step h3 {
    font-size: 1.6rem;
    color: var(--color-accent-red);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
}

.process-step p {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #444444; 
}

/* --- Directional Arrows --- */
.process-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent-red);
    font-size: 1.5rem;
    margin-top: 3rem; 
    align-self: flex-start; 
}

.process-arrow.mobile-arrow {
    display: none;
}

/* =========================================
   Global CTA Section
========================================= */
.global-cta-section {
    background-color: var(--color-bg-grey);
    padding: 8rem 5%;
    text-align: center;
    position: relative;
    z-index: 10; /* Ensures it sits above the background image */
}

.global-cta-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.global-cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent-black);
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.global-cta-content p {
    font-size: 1.15rem;
    color: #444;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.service-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 3rem;
    border-radius: 50px; /* Pill shape */
    border: 2px solid var(--color-accent-red);
    background: var(--color-accent-red);
    color: #ffffff; 
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.service-cta-btn:hover {
    background: transparent;
    color: var(--color-accent-red); 
}

/* ============================================================
   MOBILE RESPONSIVE (Products Master) - UPDATED
   ============================================================ */
@media (max-width: 768px) {
    /* --- 0. Global Mobile Reset (Prevents all bleeding) --- */
    * {
        box-sizing: border-box !important;
    }

    /* --- 1. Mobile Nav Layout --- */
    .main-nav .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100%;
        padding: 1rem 1.5rem !important;
    }

    .main-nav .nav-brand {
        display: none !important;
    }

    .main-nav .mobile-toggle {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 0 !important;
        order: 1;
        display: flex !important;
    }

    .main-nav .nav-actions {
        position: relative !important;
        display: block !important;
        order: 2;
    }

    .main-nav .nav-quote-pill {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.85rem !important;
    }

    /* --- 2. Enforce Absolute Centering for ALL Text --- */
    .sticky-text-container,
    .heading-group,
    .dynamic-heading,
    .stylistic-context p,
    .panel-content-right h2,
    .panel-content-right p,
    .process-flow-header h2,
    .process-step h3,
    .process-step p,
    .global-cta-content h2,
    .global-cta-content p {
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .sticky-text-container {
        padding: 0 5%;
    }

    /* Center the red decorative lines globally on mobile */
    .divider-top-red,
    .divider-bottom-black {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* --- 3. Accordion Stack Fix (Capabilities Mobile Style) --- */
    .accordion-scroll-track {
        height: auto !important;
        padding: 4rem 0 !important;
    }

    .accordion-sticky-stage {
        position: static !important;
        height: auto !important;
        padding: 0 5% !important;
    }

    .vertical-accordion {
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4rem !important; /* Gives scrolling space between panels */
    }

    .accordion-panel {
        flex: none !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: visible !important;
        background-color: var(--color-bg-grey);
    }

    .accordion-panel img {
        width: 100% !important;
        height: 30vh !important; /* Matches cap-visual mobile height limit[cite: 4] */
        min-height: 200px !important;
        object-fit: cover !important;
        border-radius: 12px !important; 
    }

    .accordion-panel::after {
        display: none !important; /* Removes the edge gradient */
    }

    /* Initial Hidden State (Matches capabilities .cap-body-inner)[cite: 4] */
    .panel-content-right {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        padding: 1.5rem 0.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        
        /* The Capabilities Cinematic Fade-in effect */
        opacity: 0 !important;
        transform: translateY(20px) !important;
        transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
    }

    /* Active Visible State */
    .accordion-panel.active .panel-content-right {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .panel-content-right p {
        font-size: 1.05rem !important;
        line-height: 1.6 !important;
    }

    /* --- 4. Process Flow (Stacked, Contained & Centered) --- */
    .process-flow-section {
        display: grid;
        grid-template-rows: auto auto; 
        padding: 0 !important; 
        background-image: none !important; 
    }

    .process-flow-overlay {
        grid-column: 1 / -1;
        grid-row: 1 / 3; 
        align-self: start; 
        position: sticky;
        top: 0;
        height: 100vh;
        width: 100%;
        background-image: url('../../assets/Process-Background.webp');
        background-size: cover;
        background-position: center;
        z-index: 0;
    }

    .process-flow-overlay::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.85); 
    }

    .process-flow-header {
        grid-column: 1 / -1;
        grid-row: 1; 
        position: relative;
        z-index: 2;
        padding-top: 4rem; 
    }

    .process-flow-container {
        grid-column: 1 / -1;
        grid-row: 2; 
        position: relative;
        z-index: 2;
        padding: 0 5% 4rem 5% !important; /* Moves padding to the container to stop box bleeding */
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: 100%;
    }

    .process-step {
        width: 100% !important; 
        margin: 0 auto;
        padding: 2rem !important;
    }

    .process-arrow.desktop-arrow {
        display: none !important;
    }

    .process-arrow.mobile-arrow {
        display: flex !important;
        margin: 0;
        padding: 1.5rem 0;
        align-self: center;
    }
}

/* =========================================
   FFS Benefits Grid Section
========================================= */
.ffs-benefits-section {
    padding: 6rem 10%;
    background-color: #ffffff;
    position: relative;
    z-index: 10;
}

.ffs-benefits-header {
    text-align: center;
    margin-bottom: 4rem;
}

.ffs-benefits-header h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    color: var(--color-accent-black);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.ffs-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1300px;
    margin: 0 auto;
}

.benefit-card {
    background-color: var(--color-bg-grey);
    border-top: 3px solid var(--color-accent-red);
    padding: 2.5rem 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

.benefit-card h3 {
    font-size: 1.35rem;
    color: var(--color-accent-black);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
}

.benefit-card p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555555;
    margin: 0;
}

@media (max-width: 992px) {
    .ffs-benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ffs-benefits-section {
        padding: 4rem 5%;
    }
    
    .ffs-benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .benefit-card {
        text-align: center;
    }
}


/* ============================================================
   Mobile Menu Background Fix
   ============================================================ */
@media (max-width: 900px) {
    /* Force the open mobile menu container to be solid white */
    .main-nav .nav-links {
        background-color: #ffffff !important;
    }
    
    /* Ensure the mobile nav links remain deep red */
    .main-nav .nav-links > li > a {
        color: #8B0000 !important;
    }
}