/* =========================================
   EIRTHUM PREMIUM (EP) LANDING CSS
   EXACT SEED.COM LAYOUT & AESTHETIC
   ========================================= */

:root {
    --ep-bg: #f7f6f2;
    /* Seed's creamy white */
    --ep-surface: #ffffff;
    --ep-dark: #123321;
    /* Seed's deep forest green */
    --ep-text: #123321;
    --ep-text-light: #4a5c54;
    --ep-text-inverse: #f7f6f2;
    --ep-border: #e6e2d8;
    --ep-font-serif: 'Playfair Display', serif;
    --ep-font-sans: 'Inter', sans-serif;

    --ep-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ep-ease-slow: cubic-bezier(0.25, 1, 0.5, 1);
}

html,
body {
    background-color: var(--ep-bg);
    color: var(--ep-text);
    font-family: var(--ep-font-sans);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    /* CRITICAL FIX: hidden breaks position: sticky on mobile. clip prevents horizontal scroll without breaking sticky. */
    overflow-x: clip;
    width: 100%;
}

/* Typography */
.ep-serif {
    font-family: var(--ep-font-serif);
    font-weight: 400;
}

.ep-sans {
    font-family: var(--ep-font-sans);
}

/* Animations */
.ep-observe {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ep-ease-slow), transform 1s var(--ep-ease-slow);
    will-change: opacity, transform;
}

.ep-observe.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ep-mask-image {
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    transition: clip-path 1.5s var(--ep-ease-slow);
    will-change: clip-path;
}

.ep-mask-image.is-visible {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* Buttons */
.ep-btn-solid,
.ep-btn-solid-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ep-dark);
    color: var(--ep-text-inverse) !important;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.ep-btn-solid {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
}

.ep-btn-solid-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.ep-btn-solid:hover,
.ep-btn-solid-large:hover {
    background: #0d2618;
}

.ep-btn-text {
    display: inline-flex;
    align-items: center;
    color: var(--ep-text);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--ep-text);
    padding-bottom: 2px;
    transition: opacity 0.3s ease;
}

.ep-btn-text:hover {
    opacity: 0.7;
}

/* Header Override (Hides global headers) */
body>.shop-header,
body>.navigation {
    display: none !important;
}

/* Seed-inspired Transparent Header */
.ep-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 3rem;
    background: transparent;
    transition: all 0.3s ease;
}

.ep-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ep-header-left,
.ep-header-right {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.ep-logo {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--ep-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    letter-spacing: -0.02em;
}

.ep-nav,
.ep-header-right {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.ep-nav a,
.ep-nav-link {
    color: var(--ep-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.ep-nav a:hover,
.ep-nav-link:hover {
    opacity: 0.6;
}

/* Scrolled Header Effect - Floating Pills */
.ep-header {
    transition: all 0.3s ease;
}

/* Base Pill Styling */
.ep-header-left {
    transition: padding 0.3s ease, border-radius 0.3s ease;
    border-radius: 50px;
    padding: 0.5rem 1.5rem 0.5rem 1rem;
}

.ep-header-right {
    transition: padding 0.3s ease, border-radius 0.3s ease;
    border-radius: 50px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
}

/* Scrolled State */
.ep-header.is-scrolled {
    position: fixed;
    top: 0;
    padding: 1.5rem 3rem;
}

.ep-header.is-scrolled .ep-header-left,
.ep-header.is-scrolled .ep-header-right {
    background: rgba(247, 246, 242, 0.95);
    /* Cream background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Hero Section (Seed Layout) */
.ep-hero-wrap {
    position: relative;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
    background: var(--ep-bg);
}

.ep-hero-bg {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    object-fit: cover;
    z-index: 0;
    will-change: transform;
    opacity: 0.8;
}

.ep-hero-badge-wrap {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    width: 100%;
}

.ep-hero-top-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #e2f1e6;
    color: #188a53;
    font-weight: 700;
    padding: 0.75rem 1.75rem;
    font-size: 1.15rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(24, 138, 83, 0.15);
    letter-spacing: -0.01em;
}

.ep-hero-top-badge-dot {
    width: 8px;
    height: 8px;
    background: #188a53;
    border-radius: 50%;
}

@media (max-width: 768px) {

    .ep-nav,
    .desktop-nav,
    .desktop-only {
        display: none !important;
    }

    .ep-mobile-menu-btn {
        display: flex !important;
    }

    .ep-mobile-only {
        display: inline-block !important;
    }

    .ep-header-inner {
        /* Padding removed as per user request to prevent double-padding */
    }

    .ep-container {
        padding: 0 1.5rem !important;
    }

    .ep-header {
        padding: 1rem 12px;
    }

    .ep-header.is-scrolled {
        padding: 1rem 12px !important;
    }

    /* We want the pill effect on mobile! */
    .ep-header-left,
    .ep-header-right {
        padding: 8px !important;
        /* 8px padding on mobile */
        background: rgba(247, 246, 242, 0.95) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }

    .ep-header.is-scrolled .ep-header-left,
    .ep-header.is-scrolled .ep-header-right {
        /* Keep background on scroll */
    }

    .ep-hero-badge-wrap {
        top: 100px;
        padding: 0 1.5rem;
    }

    /* Cinematic Scroll Sequence Styles */
    .ep-hero-scroll-container {
        height: 400vh;
        /* 4 images = 4 screen heights */
        position: relative;
    }

    .ep-hero-wrap {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow: hidden;
        --scroll-progress: 0;
        /* Default value */
    }

    .ep-hero-content-grid {
        text-align: left !important;
        padding: 5rem 1.5rem 0;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .ep-hero-product-col.cinematic-col {
        position: relative;
        flex-grow: 1;
        width: 100%;
        margin-top: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        /* CRITICAL FIX: Ensure the container doesn't collapse, causing text overlap */
        min-height: 400px;
    }

    /* Image Sequence Logic using Horizontal Swipe */
    .cinematic-img {
        position: absolute !important;
        top: 0 !important;
        /* perfectly position by stretching past the 1.5rem container padding on both sides */
        left: -1.5rem !important;
        right: -1.5rem !important;
        bottom: 0 !important;
        width: auto !important;
        max-width: none !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center center !important;
        border-radius: 0 !important;
        box-shadow: none !important;

        /* Classy fade into the background at the top */
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%);
        mask-image: linear-gradient(to bottom, transparent 0%, black 25%);

        /* Disable floating animations on mobile for cinematic effect */
        animation: none !important;
        will-change: transform;
    }

    /* Image 1 */
    #heroImg1 {
        transform: translateX(var(--img1-x, 0vw)) scale(1.4);
        z-index: 4;
    }

    /* Image 2 */
    #heroImg2 {
        transform: translateX(var(--img2-x, 100vw)) scale(1.4);
        z-index: 3;
    }

    /* Image 3 */
    #heroImg3 {
        transform: translateX(var(--img3-x, 100vw)) scale(1.4);
        z-index: 2;
    }

    /* Image 4 */
    #heroImg4 {
        transform: translateX(var(--img4-x, 100vw)) scale(1.0);
        z-index: 1;
    }

    .ep-hero-text-col {
        margin: 0 !important;
        width: 100%;
        position: relative;
        z-index: 50;
    }

    .floating-1,
    .floating-2 {
        width: 100% !important;
        max-width: 350px !important;
        height: auto;
    }

    .ep-hero-top-badge {
        font-size: 0.85rem;
        padding: 0.5rem 1.2rem;
        gap: 0.4rem;
        white-space: normal;
        line-height: 1.4;
        background: #ffffff;
        border: 1px solid #188a53;
    }

    .ep-hero-top-badge-dot {
        width: 6px;
        height: 6px;
        flex-shrink: 0;
    }

    .ep-hero-title {
        font-size: clamp(2.5rem, 11vw, 3rem);
        line-height: 1.1;
        margin-bottom: 1rem;
    }

    .ep-hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .ep-hero-buttons {
        flex-direction: row;
        gap: 0.5rem;
        width: 100%;
        align-items: center;
        justify-content: space-between;
    }

    .ep-hero-buttons .ep-btn-solid-large {
        flex: 1;
        padding: 0.8rem 0.5rem;
        font-size: 0.95rem;
        text-align: center;
        justify-content: center;
    }

    .ep-hero-buttons .ep-btn-text {
        flex: 1;
        font-size: 0.95rem;
        justify-content: center;
        text-align: center;
        padding: 0.8rem 0;
    }
    
    .ep-hero-buttons .ep-btn-text svg,
    .ep-hero-buttons .desktop-text {
        display: none !important;
    }

    .ep-hero-buttons .mobile-text {
        display: inline !important;
    }

    .ep-products-scroller {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding-bottom: 0;
        overflow-x: hidden;
    }

    .ep-product-card {
        min-width: 0 !important;
        padding: 1.5rem 0.5rem !important;
        width: 100%;
        overflow: hidden;
    }

    .ep-card-image {
        height: 120px;
    }

    .ep-product-card .ep-card-title {
        font-size: 1rem !important;
        margin-bottom: 1rem;
        word-wrap: break-word;
        white-space: normal;
    }
}

.ep-hero-content-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 4rem;
    align-items: center;
}

.ep-hero-text-col {
    padding-top: 8rem;
    max-width: 650px;
}

.ep-hero-title {
    font-size: clamp(3.5rem, 5vw, 5.5rem);
    line-height: 1.05;
    color: var(--ep-dark);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.ep-hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--ep-text-light);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.ep-hero-buttons {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.ep-hero-product-col {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-hero-product-img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(18, 51, 33, 0.15);
}

.floating-1 {
    position: absolute;
    width: 400px;
    z-index: 2;
    animation: float1 6s ease-in-out infinite;
}

.floating-2 {
    position: absolute;
    width: 300px;
    right: 0;
    bottom: 20%;
    z-index: 1;
    animation: float2 8s ease-in-out infinite;
}

@keyframes float1 {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-25px);
    }
}



/* Sections Configuration */
.ep-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

.ep-science-section {
    padding: 15vh 0;
    background: #fdfcfa;
    /* Slightly lighter beige */
}

.ep-science-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: start;
}

.ep-science-sticky {
    position: sticky;
    top: 25vh;
}

.ep-science-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    color: var(--ep-dark);
    margin-bottom: 2rem;
}

.ep-science-desc {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--ep-text-light);
    margin-bottom: 3rem;
}

/* Lab Scene Animation Container */
.ep-lab-animation {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    /* Removed overflow: hidden so badges can float outside */
}

.ep-lab-img-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(12, 35, 30, 0.08);
}

.ep-lab-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    display: block;
}

/* Clickable Lab Report Icon */
.ep-lab-report-link {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--ep-font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--ep-dark);
    box-shadow: 0 4px 12px rgba(12, 35, 30, 0.15);
    transition: transform 0.3s ease, background 0.3s ease;
    z-index: 20;
}

.ep-lab-report-link:hover {
    transform: translateY(-2px);
    background: #ffffff;
    color: var(--ep-primary);
}

/* Scanning Laser Effect */
.ep-scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 212, 170, 0.6);
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.8), 0 0 30px rgba(0, 212, 170, 0.4);
    opacity: 0;
    z-index: 5;
}

.ep-lab-animation.is-visible .ep-scanner-line {
    animation: scannerSweep 3s ease-in-out infinite;
    opacity: 1;
}

@keyframes scannerSweep {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Floating Verification Badges */
.ep-lab-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid #e6e2d8;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ep-dark);
    box-shadow: 0 8px 16px rgba(12, 35, 30, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s var(--ep-ease-slow), transform 1s var(--ep-ease-slow);
    z-index: 10;
}

.ep-lab-animation.is-visible .ep-lab-badge {
    opacity: 1;
    transform: translateY(0);
}

.badge-1 {
    top: 15%;
    left: -5%;
}

.badge-2 {
    top: 50%;
    right: -5%;
}

.badge-3 {
    bottom: 15%;
    left: 10%;
}

.delay-1 {
    transition-delay: 0.5s;
}

.delay-2 {
    transition-delay: 0.8s;
}

.ep-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--ep-border);
    padding-top: 3rem;
}

.ep-stat-item {
    border-left: 2px solid var(--ep-dark);
    padding-left: 1.5rem;
}

.ep-stat-num {
    font-size: 3rem;
    color: var(--ep-dark);
    display: block;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.ep-stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ep-text-light);
}

.ep-ecosystem {
    padding: 15vh 0;
    background: var(--ep-bg);
}

.ep-ecosystem-header {
    text-align: center;
    margin-bottom: 8rem;
}

.ep-section-title {
    font-size: clamp(3rem, 5vw, 4rem);
    color: var(--ep-dark);
}

.ep-product-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    margin-bottom: 10rem;
    align-items: center;
}

.ep-product-row:nth-child(even) {
    grid-template-columns: 1fr 1fr;
}

.ep-product-row:nth-child(even) .ep-product-content {
    order: 2;
}

.ep-product-row:nth-child(even) .ep-product-image-wrap {
    order: 1;
}

.ep-product-eyebrow {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ep-text-light);
    display: block;
    margin-bottom: 1.5rem;
}

.ep-product-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.1;
    color: var(--ep-dark);
    margin-bottom: 1.5rem;
}

.ep-product-desc {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--ep-text-light);
    margin-bottom: 2.5rem;
}

.ep-product-image-wrap {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.ep-product-image-wrap::before {
    content: "";
    display: block;
    padding-bottom: 120%;
    /* 5:6 */
}

.ep-product-image-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Premium Ethereal Animation for Spice Energy */
.ep-animated-energy {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: darken;
    /* Blends the white background perfectly into the beige section */
    animation: etherealFloat 15s ease-in-out infinite, pulseGlow 8s ease-in-out infinite;
    transform-origin: center center;
    opacity: 0.95;
}

/* Premium Transparent Oil Drop */
.ep-transparent-oil-drop {
    width: 130%;
    max-width: 130%;
    position: absolute;
    left: -15%;
    mix-blend-mode: multiply;
    /* Magically removes the white background */
    animation: etherealFloat 12s ease-in-out infinite alternate;
    transform-origin: center center;
    filter: contrast(1.05) brightness(0.98);
}

/* Premium Organic Oil Video/Photo Animation */
.ep-organic-oil-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: luxuriousBreathe 18s ease-in-out infinite alternate;
    transform-origin: center;
}

@keyframes luxuriousBreathe {
    0% {
        transform: scale(1);
        filter: brightness(1) saturate(1);
    }

    100% {
        transform: scale(1.06);
        filter: brightness(1.05) saturate(1.1);
    }
}

@keyframes etherealFloat {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
    }

    33% {
        transform: translateY(-15px) scale(1.02) rotate(1deg);
    }

    66% {
        transform: translateY(10px) scale(0.98) rotate(-1deg);
    }

    100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@keyframes pulseGlow {
    0% {
        filter: brightness(1) contrast(1);
    }

    50% {
        filter: brightness(1.1) contrast(1.05);
    }

    100% {
        filter: brightness(1) contrast(1);
    }
}

/* Seed-Style Product Grid */
.ep-products-grid-section {
    background-color: var(--ep-primary);
    padding: 6rem 0;
    color: var(--ep-light);
}

.ep-products-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 2rem;
}

.ep-products-title {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--ep-light);
    max-width: 50%;
}

.ep-products-header-right {
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 1.5rem;
}

.ep-products-header-right p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.ep-shop-all-link {
    color: var(--ep-light);
    text-decoration: none;
    font-family: var(--ep-font-sans);
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 4px;
    transition: border-color 0.3s;
}

.ep-shop-all-link:hover {
    border-color: var(--ep-light);
}

.ep-products-scroller {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    scrollbar-width: none;
}

.ep-products-scroller::-webkit-scrollbar {
    display: none;
}

.ep-product-card {
    flex: 0 0 calc(25% - 1.2rem);
    min-width: 300px;
    background-color: #3b5042;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s var(--ep-ease-slow), background-color 0.3s;
    color: #ffffff !important;
}

.ep-product-card:hover {
    transform: translateY(-8px);
    background-color: #42584a;
}

.ep-card-badges {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
}

.ep-badge-pill {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-family: var(--ep-font-sans);
    font-size: 0.8rem;
    font-weight: 600;
}

.ep-badge-pill.highlight {
    background: #e6ffec;
    color: var(--ep-dark);
}

.ep-card-sku {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.ep-sku-pill {
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-family: var(--ep-font-sans);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
}

.ep-product-card .ep-card-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #ffffff;
}

.ep-card-image-wrap {
    width: 100%;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.05);
    /* Slight box to contain white background jpgs elegantly */
    border-radius: 12px;
    padding: 1rem;
}

.ep-card-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

@media (max-width: 1024px) {
    .ep-hero-content-grid {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 6rem 2rem 0;
    }

    .ep-hero-text-col {
        margin: 0 auto;
        padding-top: 0;
    }

    .ep-hero-buttons {
        justify-content: center;
    }

    .ep-hero-product-col {
        margin-top: 4rem;
        height: auto;
    }

    .floating-1,
    .floating-2 {
        position: relative;
        right: auto;
        bottom: auto;
        margin: 0 auto;
    }

    .ep-science-grid,
    .ep-product-row,
    .ep-product-row:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .ep-science-sticky {
        position: relative;
        top: 0;
    }

    .ep-product-row:nth-child(even) .ep-product-content {
        order: 1;
    }

    .ep-product-row:nth-child(even) .ep-product-image-wrap {
        order: 2;
    }

    .ep-products-header {
        flex-direction: column;
        gap: 2rem;
    }

    .ep-products-title {
        max-width: 100%;
        font-size: 2.5rem;
    }

    .ep-products-header-right {
        max-width: 100%;
        text-align: left;
        align-items: flex-start;
    }
}

/* Mobile Overlay Backdrop */
.ep-mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    /* Dark backdrop */
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ep-mobile-menu-overlay.is-active {
    opacity: 1;
    pointer-events: all;
}

/* Side Drawer */
.ep-mobile-nav-links {
    position: absolute;
    top: 0;
    right: 0;
    width: 75vw;
    /* Takes up 3/4 of the screen */
    max-width: 300px;
    height: 100vh;
    background: #fdfdfc;
    /* Cream background like Seed */
    display: flex;
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    /* Space at top for the close button */
    gap: 2rem;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ep-mobile-menu-overlay.is-active .ep-mobile-nav-links {
    transform: translateX(0);
}

.ep-mobile-nav-links a {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--ep-text);
    text-decoration: none;
    text-align: left;
    /* Align links to the left inside the drawer */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}

.ep-mobile-nav-links a:last-child {
    border-bottom: none;
}

.ep-mobile-nav-links a:hover {
    color: #188a53;
}

/* --- Mobile Spacing Overrides --- */
@media (max-width: 768px) {
    .ep-products-grid-section {
        padding: 32px 0 !important;
    }
    .ep-science-section,
    .ep-ecosystem {
        padding: 32px 0 !important;
    }
}