/* ============================================================
   SF DENIM — COMPLETE STYLESHEET
   ============================================================ */

/* ─── FONTS ──────────────────────────────────────────────── */

@font-face {
    font-family: 'Loubag';
    src: url('asset/OTF/Loubag-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Loubag';
    src: url('asset/OTF/Loubag-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Comfortaa';
    src: url('asset/OTF/Comfortaa-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ─── DESIGN TOKENS ──────────────────────────────────────── */

:root {
    --font-display:  'Loubag', 'Times New Roman', serif;
    --font-body:     'Comfortaa', sans-serif;
    --font-ui:       'Arial', sans-serif;

    --color-brand:   #5d8197;
    --color-brand-2: #6a869a;
    --color-cream:   #F4F1ED;
    --color-stone:   #6A6A6A;
    --color-brown:   #623e2b;
    --color-white:   #ffffff;

    --ease-smooth:   cubic-bezier(0.4, 0, 0.2, 1);
    --ease-reveal:   cubic-bezier(0.15, 0, 0.15, 1);
}

/* ─── RESET ──────────────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-brand);
    font-family: var(--font-display);
    color: var(--color-white);
    overflow-x: hidden;
    transition: background-color 1s var(--ease-smooth);
}

body.sustain-view-active {
    background-color: var(--color-cream) !important;
}

img, video {
    display: block;
    max-width: 100%;
}

/* ─── NAVIGATION ─────────────────────────────────────────── */

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 36px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity    0.8s ease,
        visibility 0.8s ease,
        background-color 0.5s ease;
}

nav.nav-active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.nav-logo img {
    height: 30px;
    width: 60px;
}

.nav-links {
    display: flex;
    gap: 44px;
}

.nav-links a {
    color: var(--color-white);
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font-ui);
    font-size: 13px;
    letter-spacing: 0.22em;
    font-weight: 400;
    transition: opacity 0.3s ease, color 0.5s ease;
}

.nav-links a:hover {
    opacity: 0.55;
}

/* Light-background nav overrides */
body.on-light .nav-links a,
body.on-brand .nav-links a {
    color: var(--color-brand);
}

body.on-brand .nav-logo img {
    filter: brightness(0) saturate(100%) invert(56%) sepia(13%)
            saturate(1039%) hue-rotate(162deg) brightness(91%) contrast(88%);
}

body.on-light .nav-logo img {
    filter: brightness(0) saturate(100%) invert(56%) sepia(13%)
            saturate(1039%) hue-rotate(162deg) brightness(91%) contrast(88%);
}

/* ─── SECTION 1: HERO ────────────────────────────────────── */

.hero-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transform: scale(0.3);
    clip-path: inset(15%);
    opacity: 0;
    transition:
        transform   1.5s var(--ease-reveal),
        clip-path   1.5s var(--ease-reveal),
        opacity     1s ease;
}

body.is-loaded .hero-image {
    transform: scale(1);
    clip-path: inset(0%);
    opacity: 1;
}

.content-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    text-transform: uppercase;
}

.initial-text {
    position: absolute;
    width: 574px !important;
    height: 68px !important;
    max-width: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: fadeOut 0.8s forwards 2.5s;
}

.final-text {
    opacity: 0;
    animation: fadeIn 1s forwards 3.2s;
}

.final-text img {
    height: 96px;
    width: 200px;
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1);   }
}

/* ─── SECTION 2: SUSTAINABILITY ──────────────────────────── */

.sustain-section {
    font-family: var(--font-display);
    width: 100vw;
    height: 100vh;
    background-color: transparent !important;
    color: var(--color-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
    overflow: hidden;
}

.sustain-layout {
    width: 85%;
    max-width: 1400px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}

.sustain-content {
    margin-left: -50px;
}

.sustain-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 300;
    line-height: 1.55;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    margin-left: -15px;
}

.reveal-text,
.reveal-text1 {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.6s var(--ease-smooth);
}

body.sustain-view-active .reveal-text1 {
    opacity: 1;
}

.sustain-image-container {
    position: relative;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.gallery-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 620px;
    height: auto;
    backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
    opacity: 0;
    transition: opacity 0.7s var(--ease-smooth);
}

body.sustain-view-active .gallery-img {
    opacity: 1;
}

/* ─── SECTION 3: CORE VALUES ─────────────────────────────── */

.values-section {
    font-family: var(--font-body);
    width: 100vw;
    height: 100vh;
    background-color: var(--color-brand) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 15;
}

.values-grid {
    width: 90%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.value-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(40px);
}

.value-icon {
    width: 150px;
    height: 150px;
    margin-bottom: 30px;
    filter: brightness(0) invert(1);
}

.value-text {
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 24px;
    line-height: 1.6;
    font-weight: 300;
}

/* ─── PARALLAX BANNER ────────────────────────────────────── */

.parallax-banner {
    width: 100vw;
    height: 300px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    background-color: var(--color-cream);
}

.parallax-banner img {
    width: auto;
    height: 100%;
    min-width: 100%;
    object-fit: cover;
    object-position: top center;
    position: absolute;
    filter: grayscale(100%) contrast(110%);
}

/* ─── SECTION 4: UNIFIED WRAPPER PANELS ──────────────────── */

.story-section {
    width: 100vw;
    height: 100vh;
    background-color: var(--color-cream);
    color: var(--color-stone);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100%;
}

.story-container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--color-cream);
    padding: 0 5%;
    will-change: transform, opacity;
    transition: none !important;
}

#story {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transition: none !important;
}
 
#strength {
    z-index: 2;
    opacity: 0;
    visibility: visible;
    transition: none !important;
}

#story-image {
    z-index: 1.5;
    opacity: 0;
    visibility: hidden;
    transition: none !important;
}

#story-image img {
    max-height: 70vh;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.story-container h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--color-brown);
    margin-bottom: 32px;
}

.story-container p {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 30px;
    letter-spacing: 4px;
    max-width: 950px;
    text-transform: uppercase;
    /* color: var(--color-brown); */
}

/* ─── SECTION 5: GALLERY GRID PANEL ──────────────────────── */
/*  */
#gallery-panel.story-container {
    background-color: transparent !important;
}

#gallery-panel {
    z-index: 3;
    opacity: 0;
    visibility: visible;
    transition: none !important;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 60px;
    align-items: start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    width: 100%;
}

.gallery-item:transparent {
    background-color: transparent !important;
}

.gallery-item:nth-child(odd) {
    margin-top: 80px;
}

.gallery-item:nth-child(even) {
    margin-top: 0px;
}

.gallery-item:first-child {
    margin-top: 0px;
}

.gallery-item img,
.gallery-item video.gallery-media {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transform: scale(1); 
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img,
.gallery-item:hover video.gallery-media {
    transform: scale(1.04);
}

/* ─── SECTION 6: OUR SPIRIT PANEL ────────────────────────── */

#spirit-panel {
    z-index: 4;
    opacity: 0;
    visibility: visible;
    transition: none !important;
    background-color: var(--color-cream);
}

#spirit-panel h2 {
    color: var(--color-brown);
}

#spirit-panel p {
    color: var(--color-stone);
    opacity: 0.85;
    max-width: 1070px;
    margin-bottom: 40px;
}

.spirit-images-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    margin-top: 20px;
}

.spirit-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    width: 100%;
    height: 280px;
}

.spirit-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─── SECTION 7: INDUSTRIAL VIDEO PANEL ──────────────────── */

#industrial-video-panel {
    z-index: 5;
    opacity: 1;
    visibility: hidden;
    padding: 0 !important;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    transition: none !important;
}

#industrial-video-panel .industrial-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    filter: saturate(0.8) contrast(1.1);
    z-index: 1;
}

#industrial-video-panel .banner-overlay {
    position: absolute;
    bottom: 50px;
    left: 50px;
    z-index: 10;
    color: var(--color-white);
}

/*  */
/* ─── SECTION 8: ACCREDITATIONS (SHIFT FIX) ──────────────── */

.logo-section {
    width: 100vw;
    min-height: 100vh;
    background-color: var(--color-cream);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    position: relative;
    z-index: 10;
    margin-top: 0;
}

.logo-section .logo-group {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0 auto;
    width: 90%;
    max-width: 1100px;
    text-align: center;
}

.logo-title {
    font-family: var(--font-display);
    font-size: 70px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 300;
    color: var(--color-brown);
    margin-bottom: 120px;
    opacity: 0;
    transform: translateY(30px);
    transition: none;
}

.logo-grid {
    display: grid;
    align-items: center;
    justify-items: center;
    gap: 40px 20px;
}

.logo-grid.accreditations {
    grid-template-columns: repeat(6, 1fr);
    width: 105%;
}

.logo-grid.partners {
    grid-template-columns: repeat(5, 1fr);
    max-width: 1200px;
    margin: 0 auto;
}

.logo-item {
    width: 100%;
    /* max-width: 80px; */
    opacity: 0;
    transform: translateY(20px);
    will-change: transform, opacity;
}

.logo-item img {
    width: 154px;
    height: 52px;
    /* opacity: 0.65; */
    transition: opacity 0.4s ease, filter 0.4s ease;
}

/* .logo-item:hover img {
    opacity: 1;
    filter: grayscale(0%);
} */

/* ─── SECTION 9: FOOTER BANNER + PARTNERS (SHIFT FIX) ────── */

.footer-banner {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    z-index: 11;
    background-color: var(--color-cream);
}

#footerBannerImg {
    width: 100%;
    height: 130%;
    object-fit: contain;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.partners-overlay {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 90%;
    max-width: 1100px;
    text-align: center;
}

/* ─── SECTION 10: CONTACT ────────────────────────────────── */

.footer-contact-section {
    width: 100%;
    padding: 100px 0;
    background-color: var(--color-brand-2);
    color: var(--color-white);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 12;
}

.contact-container {
    width: 85%;
    max-width: 1400px;
    opacity: 1;
    transform: translateY(0);
    display: flex;
    justify-content: center;
}

.contact-svg-content {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* ─── GSAP PIN CLEANUP ───────────────────────────────────── */

.pin-spacer {
    border: none !important;
    padding: 0 !important;
}

/* ─── RESPONSIVE OVERRIDES ───────────────────────────────── */

@media (max-width: 900px) {
    nav { padding: 28px 32px; }

    .sustain-layout {
        grid-template-columns: 1fr;
        width: 90%;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .gallery-grid {
        gap: 30px 40px;
        padding: 20px;
    }

    .gallery-item:nth-child(odd) {
        margin-top: 40px;
    }

    .logo-grid.accreditations { grid-template-columns: repeat(3, 1fr); }
    .logo-grid.partners        { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .spirit-images-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .spirit-img-wrapper {
        height: 180px;
    }
}

@media (max-width: 600px) {
    nav { padding: 24px 20px; }
    .nav-links { gap: 20px; }
    .nav-links a { font-size: 11px; letter-spacing: 0.1em; }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .gallery-item:nth-child(odd),
    .gallery-item:nth-child(even) {
        margin-top: 0;
    }

    .logo-grid.accreditations { grid-template-columns: repeat(2, 1fr); }

    .initial-text { width: 90vw; height: auto; }
    .final-text img { height: 64px; width: auto; }
}