@property --theme-accent {
    syntax: '<color>';
    inherits: true;
    initial-value: var(--theme-accent);
}

@property --theme-bg {
    syntax: '<color>';
    inherits: true;
    initial-value: var(--theme-bg);
}

:root {
    --bg-color: var(--theme-bg, #050505);
    --bg-sec: var(--theme-bg, #0a0a0c);
    --accent-green: var(--theme-accent);
    --accent-neon: var(--theme-accent);
    --accent-lime: var(--theme-accent);
    --text-main: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.6);
    transition: --theme-accent 0.8s ease-in-out, --theme-bg 0.8s ease-in-out;
}

/* Hide default cursor and apply to interactive elements globally */
@media (hover: hover) and (pointer: fine) {

    *,
    *::before,
    *::after {
        cursor: none !important;
    }

    #monster-custom-cursor {
        position: fixed;
        top: -20px;
        left: -20px;
        width: 38px;
        height: 38px;
        background: url('monsterlogo/monsterlogooforwebsitetop.png') center/contain no-repeat;
        pointer-events: none;
        z-index: 999999999;
        /* Adjust translate so the logo edge roughly aligns with the pointer tip */
        transform: translate(-10%, -10%);
        filter: var(--theme-logo-filter, none) drop-shadow(0 0 10px rgba(var(--theme-accent-rgb, 57, 255, 20), 0.8));
        transition: transform 0.1s ease-out, filter 0.8s ease-in-out;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Fluid Wave Canvas Overlay (controlled entirely by JS) ─── */
#flavor-wave-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
}

body {
    background-color: var(--theme-bg, var(--bg-color));
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    scrollbar-width: none;
    position: relative;
    z-index: 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body:not(.no-doodle-bg)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('monsterlogo/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
    /* Reduced opacity to make it darker against the black body background */
}

/* Custom background for the performance page */
body.perf-page-bg {
    background-image: url('monsterlogo/performancepage.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.perf-page-bg:not(.no-doodle-bg)::before {
    background-image: url('monsterlogo/performancepage.png') !important;
    /* Increased opacity as requested to make it much lighter/brighter */
    opacity: 0.8 !important;
    z-index: -1 !important;
}

/* Custom background for the energy page */
body.energy-page-bg {
    background-image: url('monsterlogo/energypage.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.energy-page-bg:not(.no-doodle-bg)::before {
    background-image: url('monsterlogo/energypage.png') !important;
    /* Adjust opacity if needed, matching global 0.15 for now */
    opacity: 0.15 !important;
    z-index: -1 !important;
}

/* Custom background for the ingredients page */
body.ingredients-page-bg {
    background-image: url('monsterlogo/ingridientspage.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.ingredients-page-bg:not(.no-doodle-bg)::before {
    background-image: url('monsterlogo/ingridientspage.png') !important;
    opacity: 0.6 !important;
    z-index: -1 !important;
}

/* Custom background for the flavors page */
body.flavors-page-bg {
    background-image: url('monsterlogo/flavourspage.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* Opacity directly on body is bad for content, let's keep it on ::before but ensure z-index */
}

body.flavors-page-bg:not(.no-doodle-bg)::before {
    background-image: url('monsterlogo/flavourspage.png') !important;
    opacity: 0.8 !important;
    z-index: -1 !important;
}

/* Custom background for the engineers page */
body.engineers-page-bg {
    background-image: url('monsterlogo/engineerspage.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.engineers-page-bg:not(.no-doodle-bg)::before {
    background-image: url('monsterlogo/engineerspage.png') !important;
    opacity: 0.8 !important;
    z-index: -1 !important;
}

body::-webkit-scrollbar {
    display: none;
}

/* Glassmorphism NAV Apple-style */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4vw;
    background: rgba(5, 5, 5, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 9990;
    transform: translate3d(0, -100%, 0);
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-nav.visible {
    transform: translate3d(0, 0, 0);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 100px;
    /* Increased for larger impact */
    width: auto;
    filter: var(--theme-logo-filter, none);
    transition: filter 0.8s ease-in-out;
    animation: neonFlicker 4.5s infinite alternate;
}

@keyframes neonFlicker {

    0%,
    18%,
    22%,
    25%,
    53%,
    57%,
    100% {
        filter: var(--theme-logo-filter, none) drop-shadow(0 0 10px rgba(var(--theme-accent-rgb), 0.8)) drop-shadow(0 0 20px rgba(var(--theme-accent-rgb), 0.4));
        opacity: 1;
    }

    20%,
    24%,
    55% {
        filter: var(--theme-logo-filter, none) drop-shadow(0 0 2px rgba(var(--theme-accent-rgb), 0.3));
        opacity: 0.75;
    }
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

/* ── Base nav link ── */
.nav-links a:not(.btn-cta) {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 6px 4px;
    position: relative;
    transition: color 0.25s ease, text-shadow 0.25s ease;
    border: none;
    background: transparent;
}

/* ── Energy glow blur behind the streak (wide, blurry) ── */
.nav-links a:not(.btn-cta)::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--theme-accent);
    filter: blur(8px);
    opacity: 0;
    transform: translate3d(0, 0, 0) scale3d(0, 1, 1);
    transform-origin: left center;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s ease;
    border-radius: 4px;
    will-change: transform, opacity;
}

/* ── Energy streak line (sharp, precise) ── */
.nav-links a:not(.btn-cta)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--theme-accent) 30%,
            #ffffff 50%,
            var(--theme-accent) 70%,
            transparent 100%);
    transform: translate3d(0, 0, 0) scale3d(0, 1, 1);
    transform-origin: left center;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 6px var(--theme-accent), 0 0 12px rgba(var(--theme-accent-rgb), 0.6);
    border-radius: 2px;
    will-change: transform;
}

/* ── Hover state: sweep the energy line left-to-right ── */
.nav-links a:not(.btn-cta):hover {
    color: #ffffff;
    text-shadow:
        0 0 8px rgba(var(--theme-accent-rgb), 0.9),
        0 0 20px rgba(var(--theme-accent-rgb), 0.4);
}

.nav-links a:not(.btn-cta):hover::before,
.nav-links a:not(.btn-cta):hover::after {
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    opacity: 1;
}

/* ── Active page: permanent dim line (no sweep needed) ── */
.nav-links a:not(.btn-cta).active {
    color: var(--theme-accent);
    text-shadow:
        0 0 8px rgba(var(--theme-accent-rgb), 0.7),
        0 0 16px rgba(var(--theme-accent-rgb), 0.3);
}

.nav-links a:not(.btn-cta).active::after {
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    opacity: 1;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--theme-accent) 30%,
            #ffffff 50%,
            var(--theme-accent) 70%,
            transparent 100%);
    box-shadow: 0 0 4px var(--theme-accent);
}

/* Scroll performance killer lock */
body.is-scrolling * {
    pointer-events: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.nav-links a:not(.btn-cta).active::before {
    transform: scaleX(1);
    opacity: 0.5;
}


.btn-cta {
    background: linear-gradient(90deg, var(--theme-accent), var(--theme-accent));
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    color: #050505;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(var(--theme-accent-rgb), 0.2);
    display: inline-block;
}

.btn-cta:hover {
    box-shadow: 0 0 30px rgba(var(--theme-accent-rgb), 0.5);
    transform: scale(1.02);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    padding: 10px 24px;
    border-radius: 30px;
    color: var(--text-main);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    border-color: var(--theme-accent);
    color: var(--theme-accent);
    background: rgba(var(--theme-accent-rgb), 0.05);
}

/* Scroll Container Setup */
#scroll-wrapper {
    position: relative;
    width: 100vw;
    height: 400vh;
    /* Core driving length for 120 scrub frames */
}

/* Canvas & Overlays Overlay */
.canvas-container {
    position: sticky;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
}

/* Hide the Veo watermark baked into the bottom right of the frames */
.canvas-container canvas {
    transform: scale(1.05) translateY(2%);
}

#hero-canvas {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Typography & Content Overlays */
.overlay-text {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    padding: 0 10vw;
    pointer-events: none;
    /* Let canvas handle events */
    opacity: 0;
    visibility: hidden;
    z-index: 10;
}

/* Allow clicking buttons inside overlays */
.overlay-text .btn-group {
    pointer-events: auto;
}

h1 {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    text-transform: uppercase;
    color: var(--text-main);
}

p {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
    max-width: 500px;
}

.right-align {
    text-align: right;
}

.right-align p,
.right-align .tech-list {
    margin-left: auto;
}

.left-align {
    text-align: left;
}

.center-align {
    text-align: center;
}

.center-align p {
    margin-left: auto;
    margin-right: auto;
}

/* Text Blocks Container Sizes */
.overlay-text.left-align,
.overlay-text.right-align {
    max-width: 100%;
}

.text-highlight {
    color: var(--theme-accent);
    font-weight: 500;
}

/* Tech List */
.tech-list {
    list-style: none;
    margin-top: 1.5rem;
    display: inline-block;
    max-width: 500px;
}

.tech-list li {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.right-align .tech-list li {
    justify-content: flex-end;
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--theme-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--theme-accent);
    flex-shrink: 0;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 2rem;
}

.large-btn {
    padding: 12px 30px;
    font-size: 1rem;
}

/* --- Mobile Navigation & Responsiveness --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 9999;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: left center;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

@media (max-width: 768px) {
    h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    h2 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .overlay-text {
        padding: 0 5vw;
        text-align: center !important;
        background: radial-gradient(circle, rgba(0, 0, 0, 0.6) 0%, transparent 80%);
    }

    .overlay-text.left-align,
    .overlay-text.right-align {
        text-align: center !important;
    }

    .right-align p,
    .right-align .tech-list {
        margin-left: auto;
        margin-right: auto;
    }

    .tech-list {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0;
    }

    .tech-list li {
        justify-content: center !important;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }

    .btn-group a {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
    }

    .glass-nav {
        padding: 0 5vw;
        height: 80px;
    }

    .logo img {
        height: 80px;
    }

    .glass-nav>.btn-cta {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 9998;
        transform: translate3d(0, -100%, 0);
        will-change: transform;
    }

    .nav-links.active {
        transform: translate3d(0, 0, 0) !important;
    }

    .nav-links a {
        font-size: 1.8rem;
        font-weight: 800;
        letter-spacing: 2px;
    }

    .nav-links.active a:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active a:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav-links.active a:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav-links.active a:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav-links.active a:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-links.active a:nth-child(6) {
        transition-delay: 0.35s;
    }

    .nav-links.active a.mobile-cta {
        transition-delay: 0.4s;
    }
}

.mobile-cta {
    display: none;
}

@media (max-width: 768px) {
    .mobile-cta {
        display: inline-block;
        margin-top: 1rem;
        background: linear-gradient(90deg, var(--theme-accent), var(--theme-accent));
        color: #050505 !important;
        padding: 12px 30px;
        border-radius: 30px;
        box-shadow: 0 0 15px rgba(var(--theme-accent-rgb), 0.2);
    }
}

/* --- Ingredients Page Styles --- */
.ingredients-page {
    padding-top: 140px;
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

.ingredients-page h1 {
    font-size: 4rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    text-align: center;
}

.ingredients-page .subtitle {
    font-size: 1.2rem;
    color: var(--theme-accent);
    margin-bottom: 4rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.ing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 30px;
    width: 90%;
    max-width: 1200px;
}

.ing-card {
    background: rgba(10, 10, 12, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 35px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    will-change: transform, box-shadow;
}

.ing-card:hover {
    transform: translate3d(0, -10px, 0) scale(1.02);
    box-shadow: 0 20px 40px rgba(var(--theme-accent-rgb), 0.1);
    border-color: rgba(var(--theme-accent-rgb), 0.3);
    background: rgba(10, 10, 12, 0.8);
}

.ing-card h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ing-card h3::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background: var(--theme-accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--theme-accent);
    transition: transform 0.3s ease;
}

.ing-card:hover h3::before {
    transform: scale(1.5);
}

.ing-card p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ── Mobile Performance Overrides ── */
@media (max-width: 768px) {
    * {
        /* Force hardware acceleration and remove heavy backdrop filters on mobile for smooth scrolling */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .glass-nav {
        /* Replace blur with a solid semi-transparent background for readability without lag */
        background: rgba(10, 10, 12, 0.95);
    }
}