@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    /* New Brand Palette (Aligned with Packaging) */
    --base-warm: #F4E8D5;        /* Light Warm Beige */
    --base-yellow: #FFFFFF;      /* White Contrast */
    --forest-night: #453A6A;     /* Deep Indigo */
    --sage-muted: #756A9D;       /* Light Lavender */
    --champagne: #756A9D;        /* Light Lavender Accent */
    --saffron-gold: #CD8A42;     /* Muted Gold/Orange */
    --charcoal-deep: #453A6A;    /* Deep Indigo Text */
    --gray-soft: rgba(69, 58, 106, 0.05); /* Light Indigo Wash */
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'DM Sans', sans-serif;
    
    /* Motion */
    --transition-slow: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-fast: all 0.3s ease;
    
    /* Spacing */
    --section-padding: 10rem;
}

/* Mobile-first Overrides */
@media (max-width: 1200px) {
    :root { --section-padding: 8rem; }
}

@media (max-width: 1024px) {
    :root { --section-padding: 6rem; }
}

@media (max-width: 768px) {
    :root { --section-padding: 4rem; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--base-warm);
    color: var(--charcoal-deep);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

/* Typography Base */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 10vw, 7.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 4vw, 2.5rem); }

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

@media (max-width: 640px) {
    .container { padding: 0 1.5rem; }
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    z-index: 2000;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
    background: transparent;
}

header.scrolled {
    background: rgba(244, 232, 213, 0.95);
    backdrop-filter: blur(10px);
    height: 70px;
    box-shadow: 0 2px 30px rgba(0,0,0,0.03);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.brand-logo {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--forest-night);
    letter-spacing: -0.04em;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
    line-height: 1;
}

.logo-img {
    height: clamp(35px, 5vw, 45px);
    width: auto;
    object-fit: contain;
}

.footer-logo-img {
    height: 40px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-motto {
    font-family: var(--font-body);
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--sage-muted);
    font-weight: 600;
    margin-top: 0.4rem;
}

@media (max-width: 768px) {
    .brand-motto { display: none; }
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    position: relative;
    color: var(--charcoal-deep);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--champagne);
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.nav-links a:hover { color: var(--champagne); }
.nav-links a:hover::after { width: 100%; }

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 2100;
    flex-shrink: 0;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--forest-night);
    transition: var(--transition-fast);
}

@media (max-width: 1200px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--base-warm);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: var(--transition-slow);
        box-shadow: -10px 0 50px rgba(0,0,0,0.05);
        z-index: 2050;
    }

    .nav-links.active { right: 0; }
    .menu-toggle { display: flex; }
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -7px); }

    header.scrolled .menu-toggle span { background: var(--forest-night); }
}

/* Sections */
section { padding: var(--section-padding) 0; }

.hero {
    min-height: 100vh;
    padding: 120px 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.stack-on-mobile {
    display: flex;
    gap: 8rem;
    align-items: center;
}

@media (max-width: 1024px) {
    .stack-on-mobile {
        flex-direction: column;
        gap: 4rem;
        text-align: center;
    }
}

/* Visual Placeholders */
.image-placeholder {
    background: var(--gray-soft);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 300px;
    height: auto;
    aspect-ratio: 4/5;
    position: relative;
}

@media (min-width: 1025px) {
    .image-placeholder.large { height: 700px; aspect-ratio: auto; }
    .image-placeholder.medium { height: 500px; aspect-ratio: auto; }
}

/* 3D Nutritional Molecule (Benefits Page) */
#molecule-container {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
}

.molecule-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: var(--saffron-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--base-warm);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    box-shadow: 0 0 40px rgba(205, 138, 66, 0.6);
    z-index: 10;
}

.molecule-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    background: var(--forest-night);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--saffron-gold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--saffron-gold);
    opacity: 0;
    transform: translate(-50%, -50%) translateZ(-100px);
}

/* Recipes 3D Tilt */
.recipe-3d-wrap {
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

/* 3D Magnet Cursor */
#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background-image: url('../images/mak.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease-out, opacity 0.3s ease;
    opacity: 0;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

/* Hide cursor on mobile/tablet or devices without a precise pointer */
@media (max-width: 1024px), (pointer: coarse) {
    #custom-cursor {
        display: none !important;
    }
}

body:hover #custom-cursor {
    opacity: 1;
}

/* Page Transition Overlay */
#page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--forest-night);
    z-index: 10000;
    pointer-events: none;
    transform: translateY(100%);
}

/* Ensure no standard cursor on interactive elements if desired, or keep for accessibility */
a, button {
    cursor: pointer;
}

/* Contact 3D Seal */
#contact-seal-3d {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 400px;
    height: 400px;
    border: 1px solid var(--gray-soft);
    border-radius: 50%;
    opacity: 0.1;
    z-index: 1;
    background: radial-gradient(circle, var(--saffron-gold) 0%, transparent 70%);
    transform: rotateX(60deg) rotateZ(0deg);
}

/* Grid & Layout Utilities */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
}

@media (max-width: 768px) {
    .responsive-grid { gap: 2rem; }
}

/* Footer Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
}

@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; }
    .footer-logo { justify-content: center; }
    .footer-grid p { margin-left: auto; margin-right: auto; }
}

/* Utility Classes */
.text-center { text-align: center; }
.bg-yellow { background-color: var(--base-yellow); }
.bg-warm { background-color: var(--base-warm); }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-900 { max-width: 900px; }
.max-w-800 { max-width: 800px; }
.max-w-600 { max-width: 600px; }

/* Cards & Editorial */
.editorial-block {
    position: relative;
    padding: 2rem;
    transition: var(--transition-slow);
}

@media (max-width: 768px) {
    .editorial-block { padding: 1.5rem; }
}

.editorial-block h3 { font-size: 2rem; margin-bottom: 1.5rem; }

.block-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--base-yellow);
    z-index: -1;
    transform: scale(0.95);
    opacity: 0;
    transition: var(--transition-slow);
}

.editorial-block:hover .block-overlay { transform: scale(1); opacity: 1; }

/* Dark Sections */
.dark-section {
    background-color: var(--forest-night);
    color: var(--base-warm);
    position: relative;
}

.dark-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
}

/* Table */
.comparison-container { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
    background: var(--base-yellow); 
    box-shadow: 0 40px 100px rgba(0,0,0,0.03); 
    width: 100%;
}

.comparison-table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 500px; 
    margin: 0 auto;
}

.comparison-table th { 
    font-family: var(--font-heading); 
    font-size: clamp(1.1rem, 2vw, 1.5rem); 
    padding: 1.5rem; 
    text-align: center; 
    color: var(--charcoal-deep);
}

.comparison-table td { 
    padding: 1.25rem 1.5rem; 
    border-bottom: 1px solid var(--gray-soft); 
    font-size: 0.9rem;
    color: var(--charcoal-deep);
    text-align: center;
}

.comparison-table .highlight { color: var(--saffron-gold); font-weight: 700; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 1.25rem 3.5rem;
    border: 1px solid var(--forest-night);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
    transition: var(--transition-slow);
    cursor: pointer;
    text-align: center;
}

@media (max-width: 640px) {
    .btn { width: 100%; padding: 1.25rem 2rem; }
}

.btn-primary { background: var(--forest-night); color: var(--base-warm); }
.btn-primary:hover { background: transparent; color: var(--forest-night); }
.btn-secondary { border-color: var(--champagne); color: var(--charcoal-deep); }
.btn-secondary:hover { background: var(--champagne); color: #fff; }

.btn-luxury {
    background: var(--saffron-gold);
    border-color: var(--saffron-gold);
    color: var(--forest-night);
}

.btn-luxury:hover {
    background: var(--forest-night);
    border-color: var(--forest-night);
    color: var(--base-warm);
}

/* Footer */
footer { background: var(--forest-night); color: var(--base-warm); padding: 8rem 0 4rem; }

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: var(--base-warm); /* Ensure background color matches */
}

/* Ensure sections are transparent or use semi-transparent backgrounds to let atmospheric layer show through */
section, main { 
    position: relative;
    z-index: 1;
}

.bg-yellow { background-color: var(--base-yellow); }
.bg-warm { background-color: var(--base-warm); }

/* Immersive Redesign Additions */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

/* Animations */
@keyframes fadeInUp { 
    from { opacity: 0; transform: translateY(40px); } 
    to { opacity: 1; transform: translateY(0); } 
}
.reveal { animation: fadeInUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards; }

/* Recipe Drawer */
#recipe-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(69, 58, 106, 0.6); /* Forest Night with Opacity */
    backdrop-filter: blur(8px);
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-slow);
}

#recipe-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 900px;
    height: 100vh;
    background: var(--base-warm);
    z-index: 3001;
    transform: translateX(100%);
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -20px 0 60px rgba(0,0,0,0.1);
    overscroll-behavior: contain;
    touch-action: auto;
}

.drawer-header {
    position: sticky;
    top: 0;
    padding: 2rem 3rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: var(--base-warm);
    z-index: 10;
}

.drawer-close {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--charcoal-deep);
}

.close-icon { font-size: 1.5rem; line-height: 1; }

.drawer-content {
    padding: 0 5rem 10rem;
}

.recipe-detail-grid {
    display: grid;
    grid-template-columns: clamp(280px, 30vw, 350px) 1fr;
    gap: clamp(1.5rem, 5vw, 5rem);
}

@media (max-width: 1024px) {
    .drawer-content { padding: 0 3rem 6rem; }
}

@media (max-width: 640px) {
    .drawer-content { padding: 0 1.5rem 4rem; }
    .recipe-detail-grid { min-width: 600px; padding-right: 1.5rem; }
}

.ingredients-section h4, .method-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--saffron-gold);
    margin-bottom: 2rem;
    font-weight: 700;
}

.ingredients-list {
    list-style: none;
    border-top: 1px solid var(--gray-soft);
}

.ingredients-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-soft);
    font-size: 0.95rem;
    opacity: 0.8;
}

.recipe-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--saffron-gold);
    font-weight: 700;
}

.recipe-description {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 4rem;
    font-family: var(--font-heading);
    font-style: italic;
    opacity: 0.7;
}

.method-steps {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.step {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1rem;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--saffron-gold);
    opacity: 0.3;
}

.step p {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.8;
}

.drawer-reveal {
    opacity: 0;
}

.reveal { animation: fadeInUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
