/* ============================================
   footprint.broker v2 - Pop-Art Environmental Brokerage
   Palette:
     Muted Sage:      #8FA68E
     Vintage Cream:   #F2EDE3
     Carbon Charcoal: #2D2D2D
     Sunset Rose:     #D4717E
     Sky Periwinkle:  #7B91C7
     Canopy Green:    #3A6B4A
     Fossil Amber:    #C4943A
   Fonts: Syne, Inter, Instrument Sans
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
    color: #2D2D2D;
    background-color: #8FA68E;
    overflow-x: hidden;
}

/* --- Giant Footprint Watermark Underlayer --- */
#footprint-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130vw;
    height: 130vh;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

#footprint-watermark svg {
    width: 100%;
    height: 100%;
}

/* --- Halftone Canvas Overlay --- */
#halftone-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* --- Halftone Dot Transition Bands --- */
.halftone-band {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 80px;
    overflow: hidden;
    pointer-events: none;
}

.halftone-band::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, #2D2D2D 2px, transparent 2px),
        radial-gradient(circle, #2D2D2D 1.5px, transparent 1.5px),
        radial-gradient(circle, #2D2D2D 1px, transparent 1px);
    background-size: 16px 16px, 16px 16px, 16px 16px;
    background-position: 0 0, 8px 8px, 4px 12px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.halftone-band.visible::before {
    opacity: 0.15;
}

.halftone-band-1 {
    background-color: #8FA68E;
}

.halftone-band-1::before {
    background-image:
        radial-gradient(circle, #3A6B4A 2.5px, transparent 2.5px),
        radial-gradient(circle, #3A6B4A 1.8px, transparent 1.8px),
        radial-gradient(circle, #3A6B4A 1px, transparent 1px);
}

.halftone-band-2 {
    background-color: #F2EDE3;
}

.halftone-band-2::before {
    background-image:
        radial-gradient(circle, #8FA68E 2.5px, transparent 2.5px),
        radial-gradient(circle, #8FA68E 1.8px, transparent 1.8px),
        radial-gradient(circle, #8FA68E 1px, transparent 1px);
}

.halftone-band-3 {
    background-color: #2D2D2D;
}

.halftone-band-3::before {
    background-image:
        radial-gradient(circle, #8FA68E 2px, transparent 2px),
        radial-gradient(circle, #8FA68E 1.5px, transparent 1.5px),
        radial-gradient(circle, #8FA68E 1px, transparent 1px);
}

/* --- Hero Section (Opening Viewport) --- */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #8FA68E;
    overflow: hidden;
    z-index: 1;
}

.hero-left {
    width: 40%;
    padding: 0 5vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateX(-20px);
}

.domain-name {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(32px, 6vw, 80px);
    color: #2D2D2D;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.domain-name .dot {
    color: #D4717E;
    display: inline-block;
    transition: transform 0.3s ease;
}

.domain-name:hover .dot {
    transform: scale(1.3);
}

.manifesto {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.2vw, 17px);
    color: #2D2D2D;
    opacity: 0.8;
    line-height: 1.8;
    max-width: 360px;
    overflow: hidden;
    min-height: 3.6em;
}

.manifesto .char {
    display: inline;
    opacity: 0;
}

/* Blinking cursor for typewriter effect */
.manifesto .cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: #2D2D2D;
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-right {
    width: 60%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-footprint-svg {
    width: 65%;
    max-width: 420px;
    height: auto;
}

.hero-footprint-svg .foot-outline {
    stroke-dasharray: 2200;
    stroke-dashoffset: 2200;
}

/* --- Mountain Silhouette Dividers --- */
.mountain-divider {
    position: relative;
    z-index: 2;
    width: 100%;
    line-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.8s ease;
}

.mountain-divider[data-direction="left"] {
    transform: translateX(-100%);
}

.mountain-divider[data-direction="right"] {
    transform: translateX(100%);
}

.mountain-divider.visible {
    transform: translateX(0);
    opacity: 1;
}

.mountain-divider-1 {
    margin-top: -1px;
}

.mountain-divider svg {
    width: 100%;
    height: 120px;
    display: block;
}

/* --- Trading Cards Section --- */
.cards-section {
    position: relative;
    z-index: 1;
    background-color: #F2EDE3;
    padding: 0 5vw;
}

.card-spacer {
    height: 40vh;
}

.trading-card {
    max-width: 800px;
    margin: 0 auto;
    background: #F2EDE3;
    border: 3px solid #2D2D2D;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    opacity: 0;
    clip-path: circle(0% at 50% 50%);
    transition: clip-path 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease;
}

.trading-card.visible {
    opacity: 1;
    clip-path: circle(150% at 50% 50%);
}

/* Ripple hover effect via CSS custom properties */
.trading-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), #3A6B4A 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.trading-card:hover::before {
    opacity: 0.1;
}

/* Subtle lift on hover */
.trading-card {
    transition: clip-path 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.trading-card.visible:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(45, 45, 45, 0.12);
}

.card-inner {
    display: flex;
    align-items: stretch;
    position: relative;
    z-index: 2;
}

.card-icon {
    flex: 0 0 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-right: 3px solid #2D2D2D;
}

.card-icon svg {
    width: 100%;
    height: auto;
}

.card-content {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 3vw, 32px);
    color: #2D2D2D;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.card-description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.2vw, 16px);
    color: #2D2D2D;
    opacity: 0.75;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.card-metric {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3.5vw, 40px);
    color: #D4717E;
    line-height: 1;
}

.metric-unit {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(12px, 1vw, 14px);
    color: #2D2D2D;
    opacity: 0.6;
    margin-left: 0.25em;
}

/* Card color accents */
.card-forest {
    border-color: #3A6B4A;
}

.card-forest .card-icon {
    border-right-color: #3A6B4A;
}

.card-forest .card-metric {
    color: #3A6B4A;
}

.card-ocean {
    border-color: #7B91C7;
}

.card-ocean .card-icon {
    border-right-color: #7B91C7;
}

.card-ocean .card-metric {
    color: #7B91C7;
}

.card-glacier {
    border-color: #C4943A;
}

.card-glacier .card-icon {
    border-right-color: #C4943A;
}

.card-glacier .card-metric {
    color: #C4943A;
}

/* --- Data Ribbon Section --- */
.data-ribbon-section {
    position: relative;
    z-index: 1;
    background-color: #2D2D2D;
    padding: 14vh 5vw;
    overflow: hidden;
}

.ribbon-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12vh;
}

.data-block {
    text-align: left;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.data-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.data-number {
    display: block;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 10vw, 130px);
    color: #F2EDE3;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.data-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(13px, 1.2vw, 16px);
    color: #8FA68E;
    line-height: 1.6;
    max-width: 420px;
}

/* Alternating accent colors on data numbers */
.data-block:nth-child(1) .data-number { color: #D4717E; }
.data-block:nth-child(2) .data-number { color: #C4943A; }
.data-block:nth-child(3) .data-number { color: #7B91C7; }

/* Alternating data block alignment */
.data-block:nth-child(2) {
    text-align: right;
    margin-left: auto;
}

.data-block:nth-child(2) .data-label {
    margin-left: auto;
}

/* --- Horizon Footer --- */
.horizon-section {
    position: relative;
    z-index: 1;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.horizon-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 6vh 5vw;
}

.horizon-text {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: clamp(20px, 3.5vw, 42px);
    color: #F2EDE3;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.horizon-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.horizon-domain {
    display: block;
    font-family: 'Syne', sans-serif;
    font-weight: 400;
    font-size: clamp(13px, 1.2vw, 16px);
    color: #8FA68E;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    opacity: 0;
    transition: opacity 1.4s ease 0.5s;
}

.horizon-domain.visible {
    opacity: 0.7;
}

.horizon-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        #2D2D2D 0%,
        #3A6B4A 45%,
        #8FA68E 75%,
        #7B91C7 100%
    );
    z-index: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column-reverse;
        justify-content: center;
        padding: 10vh 0 5vh;
    }

    .hero-left {
        width: 100%;
        padding: 2rem 6vw;
        text-align: left;
    }

    .hero-right {
        width: 100%;
        height: 50vh;
    }

    .hero-footprint-svg {
        width: 55%;
    }

    .card-inner {
        flex-direction: column;
    }

    .card-icon {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 3px solid #2D2D2D;
        padding: 1rem;
    }

    .card-icon svg {
        width: 160px;
    }

    .card-forest .card-icon {
        border-bottom-color: #3A6B4A;
    }

    .card-ocean .card-icon {
        border-bottom-color: #7B91C7;
    }

    .card-glacier .card-icon {
        border-bottom-color: #C4943A;
    }

    .card-content {
        padding: 1.5rem;
    }

    .mountain-divider svg {
        height: 80px;
    }

    .halftone-band {
        height: 50px;
    }

    .ribbon-container {
        gap: 6vh;
    }

    .data-block:nth-child(2) {
        text-align: left;
        margin-left: 0;
    }

    .data-block:nth-child(2) .data-label {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .domain-name {
        font-size: clamp(28px, 8vw, 48px);
    }

    .card-spacer {
        height: 20vh;
    }

    .data-number {
        font-size: clamp(36px, 12vw, 80px);
    }

    .card-icon {
        flex: 0 0 auto;
    }

    .card-icon svg {
        width: 120px;
    }
}
