/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

:root {
    /* Brand Colors */
    --brand: #507BAD;
    --brand-light: #DCEAF7;
    --brand-bg-15: rgba(255, 255, 255, 0.129);
    --brand-bg-30: rgba(10, 140, 76, 0.3);
    --bg: #f2f2f2;
    --text-dark: #1a1a1a;
    --muted: rgba(0, 0, 0, 0.6);
    --border: rgba(10, 140, 76, 0.2);

    /* White Opacity Variations */
    --white-02: rgba(255, 255, 255, 0.02);
    --white-03: rgba(255, 255, 255, 0.03);
    --white-04: rgba(255, 255, 255, 0.04);
    --white-06: rgba(255, 255, 255, 0.06);
    --white-07: rgba(255, 255, 255, 0.07);
    --white-08: rgba(255, 255, 255, 0.08);
    --white-18: rgba(255, 255, 255, 0.18);
    --white-20: rgba(255, 255, 255, 0.2);
    --white-40: rgba(255, 255, 255, 0.4);
    --white-50: rgba(255, 255, 255, 0.5);
    --white-90: rgba(255, 255, 255, 0.9);

    /* Font Family */
    --font-primary: 'Montserrat', Arial, sans-serif;

    /* Type Scale */
    --display-lg-size: clamp(1.959rem, calc(1.577rem + 1.909vw), 3.008rem);
    --display-lg-weight: 800;
    --display-lg-line-height: 1.55;
    --display-lg-letter-spacing: 0.015em;

    --display-md-size: clamp(1.801rem, calc(1.502rem + 1.492vw), 2.622rem);
    --display-md-weight: 800;
    --display-md-line-height: 1.55;
    --display-md-letter-spacing: 0.015em;

    --h1-size: clamp(1.656rem, calc(1.427rem + 1.143vw), 2.284rem);
    --h1-weight: 700;
    --h1-line-height: 1.55;
    --h1-letter-spacing: 0.02em;

    --h2-size: clamp(1.399rem, calc(1.278rem + 0.609vw), 1.734rem);
    --h2-weight: 600;
    --h2-line-height: 1.55;
    --h2-letter-spacing: 0.02em;

    --h3-size: clamp(1.287rem, calc(1.205rem + 0.409vw), 1.511rem);
    --h3-weight: 600;
    --h3-line-height: 1.6;
    --h3-letter-spacing: 0.025em;

    --h4-size: clamp(1.183rem, calc(1.134rem + 0.244vw), 1.317rem);
    --h4-weight: 500;
    --h4-line-height: 1.6;
    --h4-letter-spacing: 0.025em;

    --h5-size: clamp(1.134rem, calc(1.100rem + 0.173vw), 1.229rem);
    --h5-weight: 500;
    --h5-line-height: 1.6;
    --h5-letter-spacing: 0.03em;

    --h6-size: clamp(1.088rem, calc(1.066rem + 0.109vw), 1.148rem);
    --h6-weight: 500;
    --h6-line-height: 1.6;
    --h6-letter-spacing: 0.03em;

    --body-xl-size: clamp(1.043rem, calc(1.033rem + 0.052vw), 1.071rem);
    --body-xl-weight: 400;
    --body-xl-line-height: 1.6;
    --body-xl-letter-spacing: 0.03em;

    --body-size: clamp(1.000rem, calc(1.000rem + 0.000vw), 1.000rem);
    --body-weight: 400;
    --body-line-height: 1.6;
    --body-letter-spacing: 0.03em;

    --body-sm-size: clamp(0.959rem, calc(0.968rem + -0.046vw), 0.933rem);
    --body-sm-weight: 400;
    --body-sm-line-height: 1.65;
    --body-sm-letter-spacing: 0.03em;

    --caption-lg-size: clamp(0.919rem, calc(0.937rem + -0.087vw), 0.871rem);
    --caption-lg-weight: 400;
    --caption-lg-line-height: 1.65;
    --caption-lg-letter-spacing: 0.03em;

    --caption-size: clamp(0.882rem, calc(0.906rem + -0.124vw), 0.813rem);
    --caption-weight: 400;
    --caption-line-height: 1.65;
    --caption-letter-spacing: 0.03em;

    --caption-sm-size: clamp(0.845rem, calc(0.877rem + -0.156vw), 0.759rem);
    --caption-sm-weight: 300;
    --caption-sm-line-height: 1.65;
    --caption-sm-letter-spacing: 0.03em;

    --overline-size: clamp(0.811rem, calc(0.848rem + -0.185vw), 0.709rem);
    --overline-weight: 500;
    --overline-line-height: 1.65;
    --overline-letter-spacing: 0.03em;

    /* Transitions */
    --transition-smooth: 0.3s;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #ffffff;
    color: #111;
    font-size: var(--body-size);
    font-weight: var(--body-weight);
    line-height: var(--body-line-height);
    letter-spacing: var(--body-letter-spacing);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Location Bar --- */
.location-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 8px;
    margin-bottom: clamp(20px, 4vw, 30px);
}

.location-bar {
    font-size: var(--h4-size);
    font-weight: var(--h4-weight);
    line-height: var(--h4-line-height);
    letter-spacing: var(--h4-letter-spacing);
    color: black;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.company-reg {
    font-size: var(--caption-lg-size);
    font-weight: var(--caption-lg-weight);
    line-height: var(--caption-lg-line-height);
    letter-spacing: var(--caption-lg-letter-spacing);
    color: #777;
    margin-top: -4px;
}

.location-icon {
    font-size: var(--body-size);
}

/* --- Hero Section --- */
.hero-text {
    font-family: 'Unbounded', sans-serif;
    text-align: center;
    font-weight: 400;
    /* Fluid sizing: minimum 39px, scales with viewport, maximum 61px */
    font-size: clamp(2.44rem, 4vw, 3.81rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 920px;
    margin: 0 auto 10px auto;
    color: #1a1a1a;
}

.hero-description {
    text-align: center;
    font-size: var(--body-xl-size);
    font-weight: var(--body-xl-weight);
    line-height: var(--body-xl-line-height);
    letter-spacing: var(--body-xl-letter-spacing);
    color: #666;
    max-width: 720px;
    margin: 0 auto clamp(45px, 2vw, 45px) auto;
}

@media (max-width: 480px) {
    .hero-text {
        font-size: clamp(1.5rem, 8vw, 1.8rem);
    }
}

/* --- FULL-WIDTH INWARD CURVED GALLERY (3 PANELS) --- */
.gallery-container {
    width: 100vw;
    margin-top: -80px;
    margin-bottom: 40px;
    filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.3));
}

.gallery-wrapper {
    width: 100vw;
    /* Height scales down smoothly so images don't get too tall/narrow on phones */
    height: clamp(250px, 45vw, 550px);
    display: flex;
    gap: 15px;
    clip-path: url(#concave-mask);
    -webkit-clip-path: url(#concave-mask);
}

.panel {
    flex: 1;
    height: 100%;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Overlay for darkening on hover */
.panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.5s ease;
    z-index: 1;
}

/* Text inside panels */
.panel-text {
    color: white;
    font-size: clamp(20px, 3vw, 36px);
    font-weight: 100;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(20px);
    z-index: 2;
}

/* Desktop hover effect */
@media (hover: hover) {
    .panel:hover {
        transform: scale(1.04);
    }

    .panel:hover::after {
        background-color: rgba(0, 0, 0, 0.5);
    }

    .panel:hover .panel-text {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background Images */
.panel-1 {
    background-image: url('assets/source.png');
}

.panel-2 {
    background-image: url('assets/refine.png');
}

.panel-3 {
    background-image: url('assets/deliver.png');
}

/* --- Footer / Subtitle --- */
.subtitle {
    text-align: center;
    font-size: var(--body-sm-size);
    font-weight: var(--h4-weight);
    line-height: var(--body-sm-line-height);
    letter-spacing: var(--body-sm-letter-spacing);
    color: #555;
    margin-top: 20px;
    margin-bottom: 40px;
}

/* --- Mobile / Tablet Adjustments (Gallery) --- */
@media (max-width: 900px) {
    .gallery-wrapper {
        gap: 5px;
    }
}

@media (max-width: 768px) {
    .hero-text {
        font-size: clamp(2rem, 6vw, 2.44rem);
    }

    .gallery-container {
        /* Provides a wider spacing between the hero description and gallery curves on mobile */
        margin-top: -20px;
    }
}

/* --- Logo --- */
.logo {
    top: clamp(20px, 4vw, 30px);
    height: clamp(24px, 4vw, 40px);
    width: auto;
    z-index: 10;
}

/* ─── SCROLL SECTION (WHY US?) ─── */
.transition-gap {
    height: 5vh;
    position: relative;
    z-index: 5;
}

.scroll-section {
    position: relative;
    height: var(--section-height, 400vh);
    z-index: 10;
}

.bg-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.bg-heading {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(5rem, 18vw, 14rem);
    font-weight: 800;
    line-height: 0.9;
    text-transform: uppercase;
    text-align: center;
    color: var(--brand);
    pointer-events: none;
    user-select: none;
}

.cards-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    margin-top: -100vh;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 0 2%;
    pointer-events: none;
}

.card {
    pointer-events: all;
    flex: 1;
    max-width: 380px;
    /* Update to user requested image */
    background: url('assets/card-bg.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* border: 1px solid var(--border); */
    border-radius: 24px;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s;
    position: relative;
    overflow: hidden;
}

/* Dark overlay inside card for text readability */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Adjust opacity as needed */
    z-index: 0;
}

/* Ensure card content stays above the dark overlay */
.card>* {
    position: relative;
    z-index: 1;
}

.card:hover {
    border-color: var(--brand);
    transform: scale(1.02) !important;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    background: var(--white-20);
    padding: 18px;
    border-radius: 20px;
    flex-shrink: 0;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--brand-light);
}

.card-title {
    font-family: var(--font-primary);
    font-size: var(--h2-size);
    font-weight: var(--h2-weight);
    line-height: var(--h2-line-height);
    letter-spacing: var(--h2-letter-spacing);
    color: #ffffff;
    margin-bottom: 36px;
}

.card-body {
    font-size: var(--body-size);
    font-weight: var(--body-weight);
    line-height: var(--body-line-height);
    letter-spacing: var(--body-letter-spacing);
    color: var(--white-90);
}

/* ─── DARK TRANSITION WRAPPER ─── */
.dark-transition-wrapper {
    position: relative;
    width: 100%;
}



.dark-transition-wrapper .transition-gap,
.dark-transition-wrapper .scroll-section {
    position: relative;
    z-index: 2;
}

/* ═══════════════════════════════════════
   RESPONSIVE BREAKPOINTS (WHY US CARDS)
   ═══════════════════════════════════════ */

/* ── Large Tablets (1024px and below) ── */
@media (max-width: 1024px) {
    .card {
        max-width: 280px;
        padding: 32px 24px;
        border-radius: 20px;
    }

    .cards-stage {
        gap: 14px;
        padding: 0 3%;
    }
}

/* ── Tablets (768px and below) ── */
@media (max-width: 768px) {

    /* CARDS — stack vertically */
    .transition-gap {
        height: 5vh;
    }

    .cards-stage {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        align-items: center;
        justify-items: center;
        padding: 5vh 6% 5vh;
        height: 100vh;
        overflow: visible;
    }

    .card {
        grid-area: 1 / 1;
        max-width: 88vw;
        width: 100%;
        flex: none;
        padding: 24px 22px;
        border-radius: 20px;
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .card-icon {
        width: 50px;
        height: 50px;
        min-width: 50px;
        margin-bottom: 0;
        padding: 12px;
        border-radius: 14px;
    }

    .card-text-wrap {
        display: flex;
        flex-direction: column;
    }

    .card-title {
        font-size: var(--body-size);
        margin-bottom: 6px;
    }

    .card-body {
        font-size: var(--body-sm-size);
    }
}

/* ── Small Phones (480px and below) ── */
@media (max-width: 480px) {
    .card {
        max-width: 94vw;
        padding: 20px 18px;
        gap: 14px;
    }

    .card-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        padding: 10px;
    }

    .card-title {
        font-size: var(--body-sm-size);
    }

    .card-body {
        font-size: var(--caption-lg-size);
    }
}

/* ── Touch device: disable hover transform on cards ── */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none !important;
        border-color: var(--border);
    }

    .contact-link:hover {
        transform: none;
    }
}

/* ─── 3D PELLET CANVAS ─── */
#pellet-canvas-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#pellet-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ─── CONTACT SECTION ─── */
.contact-section {
    position: relative;
    width: 100%;
    background: rgba(0, 0, 0, 0);
    /* Rely on body bg transition instead */
    overflow: hidden;
    padding: 0;
}

.contact-editorial {
    padding: 100px 8% 0;
    position: relative;
    z-index: 1;
}

.contact-body,
.contact-footer-line {
    position: relative;
    z-index: 1;
}

.contact-eyebrow {
    font-size: var(--overline-size);
    font-weight: var(--overline-weight);
    line-height: var(--overline-line-height);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-eyebrow::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--brand);
    flex-shrink: 0;
}

.contact-big-text {
    font-family: var(--font-primary);
    font-size: clamp(52px, 11vw, 160px);
    font-weight: 900;
    line-height: 0.82;
    text-transform: uppercase;
    letter-spacing: -4px;
    color: #fff;
    margin-bottom: 0;
}

.contact-big-text .outline {
    -webkit-text-stroke: 2px var(--white-18);
    color: transparent;
}

.contact-big-text .green {
    color: var(--brand);
}

.contact-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 60px 8% 80px;
    align-items: start;
}

.contact-pitch {
    position: relative;
}

.pitch-label {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--white-08);
    line-height: 1;
    margin-bottom: -10px;
}

.pitch-headline {
    font-family: var(--font-primary);
    font-size: var(--h1-size);
    font-weight: var(--h1-weight);
    line-height: var(--h1-line-height);
    letter-spacing: var(--h1-letter-spacing);
    color: #fff;
    margin-bottom: 20px;
}

.pitch-headline em {
    font-style: normal;
    color: var(--brand);
}

.pitch-body {
    font-size: var(--body-size);
    font-weight: var(--body-weight);
    line-height: var(--body-line-height);
    letter-spacing: var(--body-letter-spacing);
    color: var(--white-50);
    max-width: 420px;
    border-left: 2px solid var(--brand-bg-30);
    padding-left: 20px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    padding: 22px 24px;
    border: 1px solid var(--white-07);
    border-radius: 16px;
    background: var(--white-03);
    transition: background var(--transition-smooth), border-color var(--transition-smooth), transform var(--transition-smooth);
}

.contact-link:hover {
    background: rgba(10, 140, 76, 0.1);
    border-color: var(--brand);
    transform: translateX(6px);
}

.contact-link-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--brand-bg-15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition-smooth);
}

.contact-link:hover .contact-link-icon {
    background: var(--brand);
}

.contact-link-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--brand);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke var(--transition-smooth);
}

.contact-link:hover .contact-link-icon svg {
    stroke: #fff;
}

.contact-link-text {
    display: flex;
    flex-direction: column;
}

.contact-link-label {
    font-size: var(--caption-size);
    font-weight: var(--h3-weight);
    line-height: var(--caption-line-height);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--white-40);
    margin-bottom: 6px;
}

.contact-link-value {
    font-family: var(--font-primary);
    font-size: var(--h3-size);
    font-weight: var(--h1-weight);
    line-height: var(--h3-line-height);
    letter-spacing: var(--h3-letter-spacing);
    color: #fff;
}

.contact-footer-line {
    border-top: 1px solid var(--white-06);
    padding: 28px 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-footer-line p {
    font-size: var(--caption-lg-size);
    font-weight: var(--caption-lg-weight);
    line-height: var(--caption-lg-line-height);
    letter-spacing: var(--caption-lg-letter-spacing);
    color: var(--white-20);
}

.contact-footer-line p strong {
    color: var(--white-40);
    font-weight: var(--h2-weight);
}

/* Scroll-reveal for contact section */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.35s;
}

.reveal-delay-4 {
    transition-delay: 0.5s;
}

/* ── Contact responsive: Large Tablets ── */
@media (max-width: 1024px) {
    .contact-body {
        gap: 40px;
        padding: 50px 7% 70px;
    }
}

/* ── Contact responsive: Tablets ── */
@media (max-width: 768px) {
    .contact-editorial {
        padding: 70px 6% 0;
    }

    .contact-big-text {
        letter-spacing: -2px;
        font-size: clamp(48px, 14vw, 110px);
    }

    .contact-body {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 40px 6% 60px;
    }

    .pitch-body {
        max-width: 100%;
    }

    .contact-footer-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 24px 6%;
    }
}

/* ── Contact responsive: Small Phones ── */
@media (max-width: 480px) {
    .contact-editorial {
        padding: 50px 5% 0;
    }

    .contact-big-text {
        font-size: clamp(44px, 15vw, 80px);
        letter-spacing: -1.5px;
    }

    .contact-body {
        padding: 32px 5% 50px;
        gap: 28px;
    }

    .contact-link {
        padding: 18px 18px;
        gap: 14px;
    }

    .contact-link-icon {
        width: 42px;
        height: 42px;
    }

    .contact-link-value {
        font-size: var(--body-size);
    }

    .contact-footer-line {
        padding: 20px 5%;
    }

    .contact-footer-line p {
        font-size: var(--caption-size);
    }
}

/* ── Very Small Phones ── */
@media (max-width: 360px) {
    .contact-big-text {
        font-size: 40px;
        letter-spacing: -1px;
    }
}

/* ─── FLOATING WHATSAPP BUTTON ─── */
.floating-wa-btn {
    position: fixed;
    right: 30px;
    top: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--brand);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), background-color var(--transition-smooth);
}

.floating-wa-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(71, 206, 121, 0.3);
    background-color: var(--brand-bg-30);
}

.floating-wa-btn svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .floating-wa-btn {
        right: 20px;
        top: 20px;
        width: 50px;
        height: 50px;
    }

    .floating-wa-btn svg {
        width: 28px;
        height: 28px;
    }
}