/* ==========================================================================
   1. Brand Design Tokens & Font Resets
   ========================================================================== */
:root {
    --grind-pink: #f6dbdf;
    --grind-dark-charcoal: #2d2926;
    --grind-white: #ffffff;
    --grind-light-gray: #f5f5f5;
    --font-primary:
        "ApercuPro", "Helvetica Neue", Arial, -apple-system, BlinkMacSystemFont,
        sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    color: var(--grind-dark-charcoal);
    background-color: var(--grind-white);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   2. Grind Global Kit (gkit) Typography & Spacing Fixes
   ========================================================================== */
.gkit-h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.gkit-p-17 {
    font-size: 1.06rem;
    line-height: 1.6;
    font-weight: 400;
}

.gkit-p-15 {
    font-size: 0.94rem;
    line-height: 1.5;
}

.gkit-bold {
    font-weight: 700;
}

.gkit-medium {
    font-weight: 500;
}

sup {
    font-size: 60%;
    vertical-align: super;
    line-height: 0;
}

/* Base Buttons */
.gkit-btn-md {
    display: inline-block;
    padding: 14px 36px;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 0px;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.gkit-primary {
    background-color: var(--grind-dark-charcoal);
    color: var(--grind-white);
}

.gkit-primary:hover {
    background-color: #4a443f;
}

/* ==========================================================================
   3. Micro-Utility System Layout & Grid Enforcement
   ========================================================================== */
.container,
.container-sm {
    width: 100%;
    padding-right: 24px;
    padding-left: 24px;
    margin-right: auto;
    margin-left: auto;
}

.container-sm {
    max-width: 1100px;
}
.container {
    max-width: 1200px;
}

/* Flexbox Grid Fix */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    align-items: center;
}

.col-12 {
    width: 100%;
    padding: 0 15px;
}

.w-100 {
    width: 100%;
    height: auto;
    display: block;
}

/* Margin & Padding Utilities */
.m-0 {
    margin: 0;
}
.mb-0 {
    margin-bottom: 0 !important;
}
.mb-1 {
    margin-bottom: 0.25rem !important;
}
.mb-2 {
    margin-bottom: 0.5rem !important;
}
.mb-4 {
    margin-bottom: 1.5rem !important;
}
.mt-2 {
    margin-top: 0.5rem !important;
}
.mt-4 {
    margin-top: 1.5rem !important;
}
.my-0 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
.pt-2 {
    padding-top: 0.5rem !important;
}
.pb-0 {
    padding-bottom: 0 !important;
}

.py-4 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.text-center {
    text-align: center;
}
.position-relative {
    position: relative;
}
.d-flex {
    display: flex;
}
.flex-wrap {
    flex-wrap: wrap;
}
.justify-content-center {
    justify-content: center;
}
.justify-content-lg-between {
    justify-content: space-between;
}
.gap-4 {
    gap: 1.5rem;
}

/* ==========================================================================
   Header & Logo Layout
   ========================================================================== */
header {
    position: fixed; /* Keeps header pinned to top while scrolling */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Higher z-index ensures it floats above all other text strips */
    background-color: transparent; /* Initially transparent over hero mountains */
    padding: 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition:
        background-color 0.3s ease,
        padding 0.3s ease; /* Smooth state transition */
}

/* The active state injected by JavaScript once user scrolls down */
header.is-scrolled {
    background-color: var(--grind-pink); /* Changes to #f6dbdf dynamically */
    padding: 12px 0; /* Slightly shrinks padding for a sleeker scrolled look */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Adds a subtle drop profile */
}

.logo {
    display: block;
    width: 100px;
    height: auto;
    transition: opacity 0.2s ease-in-out;
}

.logo:hover {
    opacity: 0.85;
}

.svg--grind-logo {
    width: 100%;
    height: auto;
    display: block;
}

.svg--grind-logo .cls-1 {
    fill: var(--grind-dark-charcoal);
}
/* ==========================================================================
   4. Section Specific Structural Blocks
   ========================================================================== */

/* Sustain Hero Block */
.sustain-hero {
    position: relative;
    height: 65vh;
    min-height: 480px;
    background-color: #ebd5d1;
}

.sustain-hero__picture,
.sustain-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center top;
    aspect-ratio: 9 / 16;
    filter: brightness(75%);
}

.absolute-fill {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sustain-hero__content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-bottom: 36px;
    justify-content: flex-end;
    align-items: flex-start;
}

.sustain-hero__pretitle {
    display: block;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 9px;
    letter-spacing: 6px;
    margin-bottom: 12px;
    color: #ffffff;
}

.sustain-hero__title {
    font-size: 4.5rem !important;
    line-height: 1.2;
    font-weight: 400;
    width: 100%;
    color: #ffffff;
    font-family: argent-cf, sans-serif;
    @media (min-width: 992px) {
        font-size: 4rem;
    }
}

/* Mission Statement Block */
.mission-statement {
    display: block;
    width: 100%;
}

.mission-statement__content {
    max-width: 850px;
    margin: 0 auto;
}

.mission-statement__description {
    font-size: 1.45rem;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Impact Video Widget / Dynamic Counter Panel */
.impact-video {
    position: relative;
    color: var(--grind-white);
    background-color: #000;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
}

.impact-video__media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    z-index: 1;
}

.impact-video__content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.impact-video__description {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 32px;
}

.impact-video__number {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
}

.impact-video__character {
    background-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 3.75rem;
    font-weight: 800;
    padding: 2px 14px;
    border-radius: 4px;
    min-width: 52px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.impact-video__bottom-text {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
}

/* How Your Purchase Makes a Difference Grid */
.makes-difference i {
    font-style: italic;
    font-family: Georgia, serif;
}

.makes-difference__title {
    font-size: 2.75rem;
    font-weight: 800;
}

.makes-difference__types {
    width: 100%;
}

.makes-difference__type {
    flex: 1;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.4);
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 0px;
}

.makes-difference__type svg {
    margin-bottom: 20px;
}

/* Articles Carousel Layout Track */
.articles-carousel__copy {
    text-align: center;
    margin-bottom: 48px;
}

.articles-carousel__title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.slick-track {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap; /* Fallback rendering if layout scripts are not loaded */
}

.articles-carousel-slide {
    flex: 1;
    min-width: 300px;
    max-width: 360px;
    background: var(--grind-white);
    text-decoration: none;
    color: var(--grind-dark-charcoal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.articles-carousel-slide__picture,
.articles-carousel-slide__image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.articles-carousel-slide__content {
    padding: 18px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--grind-white);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.articles-carousel-slide__title {
    font-size: 1.05rem;
    padding-right: 15px;
    line-height: 1.3;
}

.articles-carousel-slide__arrow svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* Slick Navigation Controls */
.slick-dots {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 12px;
    margin-top: 40px;
}

.slick-dots button {
    border: none;
    background: rgba(0, 0, 0, 0.15);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    text-indent: -9999px;
    cursor: pointer;
}

.slick-dots .slick-active button {
    background: var(--grind-dark-charcoal);
}

/* Strip layout slider duplications */
.slick-cloned {
    display: none !important;
}

/* ==========================================================================
   5. Responsive Viewport Adaptations
   ========================================================================== */
@media (min-width: 768px) {
    .py-md-8 {
        padding-top: 5.5rem;
        padding-bottom: 5.5rem;
    }
    .py-md-10 {
        padding-top: 7.5rem;
        padding-bottom: 7.5rem;
    }

    .col-md-6 {
        width: 50%;
        padding: 0 20px;
    }
    .col-md-12 {
        width: 100%;
        padding: 0 20px;
    }

    .text-md-left {
        text-align: left;
    }
    .mb-md-5 {
        margin-bottom: 2.5rem !important;
    }
    .mt-md-0 {
        margin-top: 0 !important;
    }
    .mt-md-8 {
        margin-top: 4.5rem !important;
    }
    .flex-md-nowrap {
        flex-wrap: nowrap;
    }

    .flex-row-reverse {
        flex-direction: row-reverse;
    }

    .d-none {
        display: none !important;
    }
    .d-md-block {
        display: block !important;
    }
}

@media (max-width: 767px) {
    .d-md-none {
        display: block !important;
    }
    .d-none {
        display: none !important;
    }

    .sustain-hero__title {
        font-size: 2.5rem !important;
    }
    .mission-statement__description {
        font-size: 1.2rem;
    }
    .gkit-h1 {
        font-size: 1.85rem;
    }

    .row {
        gap: 32px 0;
    }

    .impact-video {
        min-height: 420px;
    }
    .impact-video__character {
        font-size: 2.5rem;
        padding: 4px 10px;
        min-width: 40px;
    }

    .slick-track {
        flex-direction: column;
        align-items: center;
        width: 100% !important;
        transform: none !important;
        gap: 20px;
    }
    .articles-carousel-slide {
        max-width: 100%;
        width: 100%;
    }
}

/* ==========================================================================
   Desktop Grid Override for Slick Carousel Section (Leaves Mobile Intact)
   ========================================================================== */
@media screen and (min-width: 768px) {
    /* 1. Neutralize Slick Slider layout boundaries on desktop views */
    .articles-carousel__slider.slick-slider,
    div.articles-carousel__slider {
        display: block !important;
        width: 100% !important;
    }

    .articles-carousel__slider .slick-list {
        overflow: visible !important;
        width: 100% !important;
    }

    /* 2. Strip out the 15,000px wide carousel track and force a clean flexbox grid row */
    .articles-carousel__slider .slick-track,
    div.articles-carousel__slider .slick-track {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important; /* Locks columns strictly side-by-side */
        justify-content: center !important;
        align-items: stretch !important; /* Uniform height response across all cards */
        gap: 24px !important; /* Clean visual space gaps */
        width: 100% !important; /* Wipes out the 15000px constraint */
        transform: none !important; /* Wipes out any active script slide movement offsets */
    }

    /* 3. Render only the unique content slides and eliminate structural duplicates */
    .articles-carousel-slide.slick-slide {
        display: flex !important; /* Forces layout tracking back on unique cards */
        flex-direction: column !important;
        flex: 1 1 0% !important; /* Gives each of the 3 articles equal horizontal space */
        max-width: calc(33.333% - 16px) !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    /* 4. Hide structural clones generated by the JavaScript carousel loop on desktop */
    .articles-carousel-slide.slick-cloned {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* 5. Hide the carousel pagination dots on desktop viewports */
    .articles-carousel__slider .slick-dots {
        display: none !important;
    }
}
