/* ==========================================================================
   CSS Variables & Global Reset
   ========================================================================== */
:root {
    /* Colors */
    --clr-bg: #f2efe9;
    --clr-text: #1a1a1a;
    --clr-accent: #ff6b00;
    --clr-white: #ffffff;
    --clr-border: rgba(26, 26, 26, 0.15);
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --nav-height: 90px;
    --container-width: 1400px;
}

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

html {
    /* Note: scroll-behavior: smooth removed — it conflicts with GSAP ScrollTrigger
       scrub animations and causes janky scroll-linked motion */
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: 18px;
    font-weight: 300;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.1;
}

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

ul {
    list-style: none;
}

img {
    /* Prevent layout shift */
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 5vw;
}

.section-padding {
    padding: 15vh 0;
}

/* ==========================================================================
   Grain Overlay Effect
   ========================================================================== */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    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");
    /* GPU acceleration for the overlay */
    will-change: auto;
    backface-visibility: hidden;
    contain: strict;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    background-color: var(--clr-bg);
    transition: box-shadow 0.4s ease;
    /* GPU layer for fixed nav */
    will-change: box-shadow;
    backface-visibility: hidden;
}

.nav-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 3vw;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.nav-left {
    display: flex;
    justify-content: flex-start;
}

.nav-center {
    display: flex;
    justify-content: center;
}

.nav-right {
    display: flex;
    justify-content: flex-end;
}

/* Premium Logo styling */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--clr-text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links li a, .nav-link {
    color: var(--clr-text);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-wrapper {
    padding: calc(var(--nav-height) + 20px) 3vw 50px 3vw;
    width: 100%;
    background-color: var(--clr-bg);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.hero {
    position: relative;
    height: 80vh;
    width: 100%;
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-white);
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    /* GPU acceleration for video */
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Dark overlay to make text readable */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.15);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 2;
    width: 100%;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(4rem, 10vw, 8rem);
    margin: 0;
    line-height: 1;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    perspective: 1000px;
}

.reveal-word {
    display: inline-block;
    transform-origin: center center;
    /* GPU acceleration for 3D transforms */
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.hero-bottom {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 2;
}

.hero-scroll-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
}

.hero-subtext {
    text-align: left;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
}

/* ==========================================================================
   Value Chain & Silos Section
   ========================================================================== */
.silos-wrapper {
    position: relative;
    height: 250vh;
    background-color: var(--clr-bg);
}

.silos-container {
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.silos-image-wrapper {
    width: 50vw;
    height: 60vh;
    border-radius: 40px;
    overflow: hidden;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    /* GPU acceleration for scroll-driven resize */
    will-change: width, height, border-radius;
    backface-visibility: hidden;
    z-index: 1;
    contain: layout;
}

.silos-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
}

.silos-image-wrapper.darken::after {
    opacity: 1;
}

.silos-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
}

.silos-hero-text {
    position: absolute;
    left: 10vw;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: var(--clr-white);
    pointer-events: none;
    /* GPU acceleration */
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.silos-hero-text h2 {
    font-size: clamp(4rem, 8vw, 6rem);
    line-height: 1.1;
    margin: 0;
}

.story-text-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 10vw;
    z-index: 5;
    opacity: 0;
    color: var(--clr-white);
    /* GPU acceleration */
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.story-inner {
    border-left: 2px solid var(--clr-accent);
    padding-left: 40px;
    max-width: 800px;
    text-align: left;
    display: grid;
    grid-template-areas: "overlay";
    align-items: center;
}

.story-title-group, .story-content {
    grid-area: overlay;
}

.story-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0;
}

.story-label .triangle {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--clr-white);
}

.story-inner h2 {
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    margin-bottom: 25px;
    font-family: var(--font-heading);
    color: var(--clr-white);
    line-height: 1.1;
    opacity: 0;
}

.story-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.story-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    color: rgba(255, 255, 255, 0.75);
    /* GPU acceleration for staggered reveals */
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* ==========================================================================
   Cargo Grid Section
   ========================================================================== */
.cargo-grid-section {
    background-color: #fafafa;
    color: #333;
}

.cargo-grid-section .section-title {
    color: #1a2340;
}

.cargo-header {
    margin-bottom: 60px;
}

.cargo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.cargo-item {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    /* GPU acceleration for hover */
    will-change: transform;
    backface-visibility: hidden;
}

.cargo-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.cargo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.cargo-item-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}

.cargo-item-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 0;
    color: #1a2340;
}

.cargo-item-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* ==========================================================================
   Us In Numbers Section
   ========================================================================== */
.numbers-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
}

.numbers-header .section-title {
    margin-bottom: 0;
    font-size: clamp(2.5rem, 4vw, 4.5rem);
}

.numbers-nav {
    display: flex;
    gap: 15px;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255,107,0,0.2);
    color: var(--clr-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: var(--clr-accent);
    color: var(--clr-white);
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.number-card {
    position: relative;
    height: 600px;
    border-radius: 20px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: var(--clr-white);
    padding: 40px;
    transition: transform 0.3s ease;
    /* GPU acceleration for hover */
    will-change: transform;
    backface-visibility: hidden;
    contain: content;
}

.number-card:hover {
    transform: translateY(-10px);
}

.nc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.nc-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nc-label {
    font-weight: 500;
    font-size: 1.1rem;
}

.nc-value {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 6vw, 6rem);
    line-height: 1.1;
    margin-top: 30px;
}

.nc-desc {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-top: auto;
}

/* ==========================================================================
   Services Section (Accordion)
   ========================================================================== */
.services-header {
    margin-bottom: 80px;
}

.services-header p {
    font-size: 1.5rem;
    opacity: 0.7;
}

.accordion {
    border-top: 1px solid var(--clr-border);
}

.accordion-item {
    border-bottom: 1px solid var(--clr-border);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.accordion-header h3 {
    font-size: clamp(1.8rem, 3vw, 3rem);
    font-family: var(--font-heading);
    transition: padding-left 0.4s ease;
}

.accordion-header:hover h3 {
    padding-left: 20px;
    color: var(--clr-accent);
}

.accordion-header .icon {
    font-size: 2rem;
    font-weight: 300;
    transition: transform 0.4s ease;
}

.accordion-item.active .accordion-header .icon {
    transform: rotate(45deg);
    color: var(--clr-accent);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), padding 0.5s ease;
}

.accordion-content p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 800px;
    padding-bottom: 0;
}

.accordion-item.active .accordion-content {
    padding-bottom: 40px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--clr-text);
    color: var(--clr-white);
    padding: 100px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.footer-brand .logo {
    color: var(--clr-white);
    margin-bottom: 20px;
}

.footer-brand p {
    opacity: 0.6;
    max-width: 300px;
}

.footer h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.footer ul li {
    margin-bottom: 15px;
}

.footer ul li a {
    opacity: 0.6;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer ul li a:hover {
    opacity: 1;
    color: var(--clr-accent);
}

.footer-contact p {
    opacity: 0.6;
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.6;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a:hover {
    color: var(--clr-accent);
}

/* ==========================================================================
   Hamburger & Mobile Menu
   ========================================================================== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger .line {
    width: 24px;
    height: 2px;
    background-color: var(--clr-text);
    transition: transform 0.35s ease, opacity 0.35s ease;
    display: block;
}

.hamburger.active .line:first-child {
    transform: translateY(4px) rotate(45deg);
}

.hamburger.active .line:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--clr-bg);
    z-index: 998;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}

.mobile-menu.open {
    transform: translateY(0);
}

.mobile-menu a {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: var(--clr-text);
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--clr-accent);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .nav-links { display: none; }
    .nav-center, .nav-right { display: none; }
    .nav-container { grid-template-columns: 1fr auto; }
    .hamburger { display: flex; }

    .hero-wrapper { padding: calc(var(--nav-height) + 10px) 15px 30px 15px; }

    .about-grid, .footer-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .about-stats {
        border-left: none;
        padding-left: 0;
        flex-direction: row;
        gap: 30px;
    }
    .numbers-grid { grid-template-columns: 1fr; }
    .number-card { height: 400px; }
    .cargo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .section-padding { padding: 10vh 0; }

    /* Hero */
    .hero { height: 75vh; }
    .hero-title {
        font-size: clamp(2.8rem, 10vw, 8rem);
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
        margin-bottom: 0;
    }
    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 0 25px;
        bottom: 25px;
    }
    .hero-subtext { font-size: 0.9rem; }

    /* Silos section */
    .silos-image-wrapper {
        width: 88vw;
        height: 45vh;
    }
    .silos-hero-text {
        left: 50%;
        top: 12%;
        transform: translateX(-50%);
        text-align: center;
        width: 90%;
    }
    .silos-hero-text h2 { font-size: clamp(2.5rem, 8vw, 4rem); }
    .story-text-container { padding: 0 5vw; }
    .story-inner { padding-left: 20px; }
    .story-inner h2 { font-size: clamp(1.5rem, 5vw, 2.5rem); }
    .story-content p { font-size: 0.85rem; }

    /* Numbers */
    .numbers-header { flex-direction: column; align-items: flex-start; gap: 20px; }
    .numbers-nav { display: none; }

    /* Accordion */
    .accordion-header { padding: 25px 0; }
    .about-stats { flex-direction: column; }

    /* Footer */
    .footer { padding: 60px 0 30px; }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
