/* =========================================================================
   1. VARIABLES & RESET
   ========================================================================= */
:root {
    /* Colors */
    --primary: #182f58;
    /* Frissy Blue */
    --secondary: #f6921e;
    /* Frissy Orange */
    --dark: #0d0d0d;
    --light: #fafafa;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-800: #1f2937;

    /* Fonts in use: 'Outfit' (Headings) and 'Inter' (Body) */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================================================
   2. NAVBAR
   ========================================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
    background: transparent;
}

/* Scrolled State */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

/* Fix 2.2: Ensure Navbar Button Text is White on Scroll */
.navbar.scrolled .btn {
    color: var(--white) !important;
    /* Force White Text */
    border-color: transparent;
}

.navbar.scrolled .nav-links a:not(.btn) {
    color: var(--dark);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--white);
    /* White text initially */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    /* Legibility on hero */
}

.navbar.scrolled .nav-links a {
    text-shadow: none;
    /* Remove shadow on white bg */
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px 0;
    transition: 0.3s;
}

.navbar.scrolled .bar {
    background-color: var(--dark);
}

/* =========================================================================
   3. HERO SECTION (SCROLLYTELLING)
   ========================================================================= */
.scroll-container {
    height: 400vh;
    /* Determines timeline length */
    position: relative;
    z-index: 1;
}

.sticky-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* Restore 100vh */
    overflow: hidden;
    /* Fix 5: Flexbox to center content vertically/horizontally */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
}

canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    /* Ensures it fills width */
    height: 100%;
    /* Ensures it fills height */
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.85);
    /* Darken slightly for text contrast */
}


.overlay-text-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    /* Allow scrolling/clicks through text areas */
}

/* Scroll Text Styles */
.scroll-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Centered */
    width: 100%;
    text-align: center;
    color: var(--white);
    opacity: 0;
    /* HIDDEN BY DEFAULT */
    transition: opacity 0.5s ease, transform 0.5s ease;

    /* Improve readability */
    padding: 2rem;
    border-radius: 20px;
    /* backdrop-filter: blur(4px); Remobved as per user aesthetic request to look cleaner */
    /* background-color: rgba(0,0,0,0.2); Moved text-shadow instead */
}

.scroll-text h1 {
    font-size: 5rem;
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    /* Strong shadow for readability */
}

.scroll-text h2 {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.scroll-text p {
    font-size: 1.25rem;
    max-width: 500px;
    margin: 1rem auto 2rem;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Visibility State */
.scroll-text.active {
    opacity: 1;
    /* VISIBLE ONLY WHEN ACTIVE */
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
    /* Allow clicking buttons */
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    /* Adjusted for smaller hero */
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    color: var(--white);
    text-align: center;
    opacity: 0.8;
    animation: fadeOutScroll 1s forwards;
    animation-play-state: paused;
    /* Controlled by JS scroll */
}

.scroll-indicator p {
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.arrow-down {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

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

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}


/* =========================================================================
   4. SECTIONS (General) // REDESIGNED
   ========================================================================= */
.section-padding {
    padding: 6rem 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 4.1 USP Strip (Minimalist) */
.usp-strip {
    background: var(--primary);
    padding: 2rem 0;
    color: var(--white);
    position: relative;
    z-index: 5;
    /* Sit on top of any potential canvas overlap */
    margin-top: -1px;
    /* Avoid gap */
}

.usp-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.usp-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.usp-icon {
    font-size: 1.5rem;
}

.usp-text {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.usp-divider {
    width: 1px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.2);
    display: block;
}

@media (max-width: 768px) {
    .usp-divider {
        display: none;
    }

    .usp-row {
        gap: 1.5rem;
        flex-direction: column;
        justify-content: center;
    }

    .usp-item {
        width: 100%;
        justify-content: center;
    }
}

/* 4.2 Products Bento Grid */
.products-bento {
    background-color: #F8F9FB;
    /* Very light gray */
}

.section-header .subtitle {
    display: block;
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 3rem;
}

/* Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: repeat(2, 300px);
    /* Fixed height rows */
    gap: 1.5rem;
}

.bento-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    display: flex;
    /* Flex context for positioning */
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Main Feature (Spans 2 rows) */
.main-feature {
    grid-column: 1;
    grid-row: 1 / span 2;
    /* Stronger Blob Effect */
    background: radial-gradient(circle at 80% 50%, #ffe0b2 0%, #ffffff 65%);
    flex-direction: column;
    justify-content: center;
    /* Center content vertically */
    position: relative;
    overflow: hidden;
    /* contain the image */
}

.main-feature .bento-content {
    padding: 3rem;
    z-index: 10;
    /* Text on top */
    max-width: 45%;
    /* Limit text width to prevent overlap */
    position: relative;
}

.main-feature .bento-img {
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    object-fit: cover;
    transform: none;
    transition: transform 0.5s ease;
    z-index: 1;
}

.main-feature:hover .bento-img {
    transform: scale(1.05);
}

.badge-pop {
    background: var(--secondary);
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(246, 146, 30, 0.3);
}

.main-feature h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Sub Features */
.sub-feature {
    grid-column: 2;
    display: flex;
    align-items: center;
    padding: 0;
}

.sub-feature .bento-content {
    padding: 2rem;
    flex: 1;
    z-index: 2;
}

.sub-feature h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.sub-feature p {
    font-size: 0.9rem;
    color: #666;
}

.bento-img-small {
    width: 150px;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to right, transparent, black 20%);
    /* Fade in from left */
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%);
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .main-feature {
        grid-column: 1;
        grid-row: auto;
        min-height: 400px;
    }

    .main-feature .bento-img {
        position: relative;
        right: 0;
        top: 0;
        transform: none;
        width: 100%;
        margin-top: 2rem;
    }

    .sub-feature {
        grid-column: 1;
        min-height: 200px;
    }
}

/* 4.3 Catering (Split) */
.catering-split {
    background-color: var(--white);
}

.split-card {
    background-color: #F0F4F8;
    /* Light blue-gray for Frissy */
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
}

.split-content {
    flex: 1;
    padding: 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.brand-logo {
    max-width: 90px;
    /* Reduced User Request */
    height: auto;
}

.split-content h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-list-clean {
    margin-top: 2rem;
}

.feature-list-clean li {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    padding-left: 2rem;
    position: relative;
}

.feature-list-clean li::before {
    content: "•";
    color: var(--secondary);
    font-size: 2rem;
    position: absolute;
    left: 0;
    top: -5px;
}

.split-image {
    flex: 1;
    position: relative;
}

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

@media (max-width: 900px) {
    .split-card {
        flex-direction: column-reverse;
    }

    .split-content {
        padding: 3rem 2rem;
    }

    .split-image {
        height: 300px;
    }
}

/* =========================================================================
   5. UTILITIES / BUTTONS / ANIMATIONS
   ========================================================================= */
.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    /* Frissy Blue */
    color: var(--white);
    box-shadow: 0 4px 15px rgba(24, 47, 88, 0.3);
    /* Updated shadow color */
}

.btn-primary:hover {
    background-color: #122442;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 47, 88, 0.4);
}

.btn-white {
    background-color: var(--white);
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    background-color: var(--gray-100);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.8rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

/* =========================================================================
   6. CTA SECTION (PRE-FOOTER) - [NEW]
   ========================================================================= */
.cta-section {
    position: relative;
    padding: 5rem 0;
    background-color: var(--secondary);
    /* Frissy Orange for impact */
    /* Add a subtle pattern or gradient if desired */
    background: linear-gradient(135deg, var(--secondary) 0%, #e88615 100%);
    color: var(--white);
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-section .btn-white {
    color: var(--secondary);
    /* Orange text for button */
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* Decorative circles */
.cta-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
}

/* =========================================================================
   7. FOOTER (REDESIGNED)
   ========================================================================= */
.footer-redesign {
    background-color: var(--primary);
    color: var(--white);
    padding: 5rem 0 2rem;
    font-size: 0.95rem;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 3rem;
    gap: 3rem;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    height: 60px;
    /* Increased slightly for better visibility if removing filter */
    width: auto;
    margin-bottom: 1.5rem;
    /* filter: brightness(0) invert(1); REMOVED: Caused white blob effect on badge logo */
    opacity: 1;
}

.footer-bio {
    opacity: 0.8;
    line-height: 1.6;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--secondary);
    /* Pop color */
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
    /* Tiny nudge effect */
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    opacity: 0.6;
    font-size: 0.85rem;
}

.crafted-by {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
}

.cosmica-logo {
    height: 20px;
    width: auto;
    filter: brightness(0) invert(1);
    /* Ensure it's white */
}

@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================================================
   8. MOBILE NAVIGATION & RESPONSIVENESS
   ========================================================================= */
@media (max-width: 900px) {

    /* Navbar Mobile Layout */
    .mobile-menu-btn {
        display: block;
        z-index: 1001;
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(24, 47, 88, 0.98);
        /* Frissy Blue with slight transparency */
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 2rem;
        font-weight: 700;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered Animation for Links */
    .nav-links.active li:nth-child(1) a {
        transition-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) a {
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(3) a {
        transition-delay: 0.3s;
    }

    /* Hamburger Animation to 'X' */
    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

@media (max-width: 768px) {

    /* Hero Text Scaling */
    .scroll-text h1 {
        font-size: 2.8rem;
    }

    .scroll-text h2 {
        font-size: 1.8rem;
    }

    .scroll-text p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Adjust CTA Section */
    .cta-section h2 {
        font-size: 2rem;
    }

    /* Fix: Reset Bento Content Width on Mobile */
    .main-feature .bento-content {
        max-width: 100%;
    }
}

/* Fix: Ensure Mobile Menu Text is White */
@media (max-width: 900px) {
    .nav-links a {
        color: var(--white) !important;
    }
}