/* Base Setup & Smooth Scroll */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html.lenis,
html.lenis body {
    height: auto;
    width: 100%;
    overflow-x: clip;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

body {
    background-color: #fdfcf9;
    color: #0a0f1a;
    overflow-x: clip;
    max-width: 100%;
}

::selection {
    background: #1fc4bc;
    color: #0a0f1a;
}

p,
li,
.scrub-text {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Main content */
.main-wrapper {
    position: relative;
    z-index: 10;
    background-color: #fdfcf9;
    color: #0a0f1a;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

/* Scroll Wire */
.scroll-wire-container {
    position: fixed;
    left: 4vw;
    top: 0;
    width: 1px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.06);
    z-index: 50;
}

.scroll-wire-fill {
    width: 1px;
    background: #1fc4bc;
    height: 0%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Contact link — visible on dark hero, adapts on scroll via JS class */
.contact-link {
    background: rgba(10, 15, 26, 0.4);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-link--light {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
    color: #0a0f1a !important;
}

.contact-link--light:hover {
    color: #1fc4bc !important;
}

/* Horizontal Scroll Section */
.horizontal-section {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    background: #0a0f1a;
    color: #fdfcf9;
}

@media (min-width: 768px) {
    .horizontal-section {
        height: 100vh;
    }

    .horizontal-container {
        display: flex;
        width: 300%;
        height: 100%;
    }

    .horizontal-panel {
        width: 33.333%;
        flex-shrink: 0;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0 5vw;
    }
}

/* Mobile: compact stacked panels — no forced 100vh empty space */
@media (max-width: 767px) {
    .horizontal-section {
        height: auto;
    }

    .horizontal-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        gap: 0;
    }

    .horizontal-panel {
        width: 100%;
        min-height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 3rem 1.25rem;
    }

    .horizontal-panel:not(:last-child) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
}

/* Typography */
.scrub-text .word {
    opacity: 0.15;
    transition: opacity 0.1s;
}

.char {
    display: inline-block;
}

/* Hero headline */
.hero-title {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.hero-line-1,
.hero-line-2 {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: visible;
    letter-spacing: -0.02em;
}

.hero-line-1 {
    font-size: clamp(1.4rem, 6vw, 5rem);
    line-height: 0.85;
}

.hero-line-2 {
    font-size: clamp(2rem, 9.5vw, 7rem);
    line-height: 0.95;
}

.hero-line-1 .char,
.hero-line-2 .char {
    display: inline-block;
    will-change: transform;
}

/* Footer / donate headline */
.footer-headline {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.footer-line-1,
.footer-line-2,
.footer-line-3,
.footer-line-4 {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: visible;
    letter-spacing: -0.02em;
}

.footer-line-1 {
    font-size: clamp(2rem, 11vw, 7rem);
    line-height: 0.8;
}

.footer-line-2 {
    font-size: clamp(1.2rem, 6vw, 4rem);
    line-height: 1;
}

.footer-line-3 {
    font-size: clamp(1.6rem, 8.5vw, 5.5rem);
    line-height: 0.85;
}

.footer-line-4 {
    font-size: clamp(1.8rem, 9.5vw, 6.5rem);
    line-height: 0.85;
}

/* Panel headings */
.panel-heading {
    font-size: clamp(2rem, 8vw, 4.5rem);
    line-height: 1.05;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* Bento headings */
.bento-heading-lg {
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1;
    max-width: 100%;
}

.bento-heading-md {
    font-size: clamp(1.75rem, 5vw, 2.8rem);
    line-height: 1;
    max-width: 100%;
}

/* Scrub text */
.scrub-text {
    font-size: clamp(1.5rem, 5vw, 4.5rem);
    line-height: 1.15;
    max-width: 100%;
}

/* Image masking */
.reveal-img-wrap {
    overflow: hidden;
    position: relative;
}

.reveal-img-wrap img {
    transform: scale(1.3);
    will-change: transform;
}

/* Donate footer — normal document flow, no gap */
.donate-section {
    background: #fdfcf9;
    position: relative;
    width: 100%;
    z-index: 10;
    overflow-x: clip;
    border-top: 1px solid rgba(198, 156, 109, 0.15);
}

/* Gold gradient headline text */
.text-gradient-gold {
    background: linear-gradient(120deg, #a67c52 0%, #c69c6d 25%, #e8c88a 50%, #f5d78e 75%, #c69c6d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-gradient-gold-outline {
    background: linear-gradient(120deg, #c69c6d 0%, #e8c88a 40%, #ffeb3b 70%, #c69c6d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 1px rgba(166, 124, 82, 0.35);
}

@media (min-width: 768px) {
    .text-gradient-gold-outline {
        -webkit-text-stroke: 1.5px rgba(166, 124, 82, 0.3);
    }
}

/* Nav */
.nav-bar {
    max-width: calc(100vw - 1.5rem);
}

.nav-link:hover {
    color: #1fc4bc;
}

/* Campaign counter */
.campaign-counter {
    font-size: clamp(3rem, 12vw, 6rem);
    line-height: 1;
    max-width: 100%;
}

/* Scroll indicator pulse */
@keyframes scroll-pulse {
    0% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(5px);
    }
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }
}

.animate-scroll {
    animation: scroll-pulse 2s ease-in-out infinite;
}

/* Reveal blocks start hidden for GSAP */
.reveal-block {
    will-change: transform, opacity;
}

/* ─── Scroll Background Infographics (definition section only) ─── */
.section-infographics {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.info-card {
    position: absolute;
    border-radius: 1.25rem;
    border: 1px solid rgba(10, 15, 26, 0.08);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    opacity: 0;
    will-change: transform, opacity;
}

.info-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-card__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), transparent);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.info-card__label {
    font-family: Inter, sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c69c6d;
}

.info-card__value {
    font-family: Syne, sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    color: #0a0f1a;
}

.info-card__stat-text {
    font-family: Inter, sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #0a0f1a;
    opacity: 0.5;
    text-align: center;
    padding: 0 1rem 1rem;
}

/* Positions — definition section */
#definition .info-card--map {
    width: clamp(180px, 28vw, 320px);
    height: clamp(140px, 22vw, 240px);
    top: 8%;
    right: -4%;
}

#definition .info-card--stat {
    width: clamp(130px, 18vw, 180px);
    padding: 1.25rem 1rem 0.5rem;
    bottom: 12%;
    left: 2%;
}

#definition .info-card--diagram {
    width: clamp(140px, 20vw, 200px);
    padding: 1rem;
    top: 55%;
    right: 8%;
}

/* Stat ring */
.info-stat-ring {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 0.5rem;
}

.info-stat-ring__svg {
    width: 100%;
    height: 100%;
}

.info-stat-ring__num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Syne, sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: #1fc4bc;
}

.info-diagram-svg {
    width: 100%;
    height: auto;
}

@media (max-width: 480px) {
    #definition .info-card--diagram {
        display: none;
    }
}

@supports (padding: max(0px)) {
    .nav-bar {
        bottom: max(1.5rem, env(safe-area-inset-bottom));
    }

    .donate-section {
        padding-bottom: max(8rem, env(safe-area-inset-bottom));
    }
}
