/* ============================================================
   footprint.markets - Blobitecture Environmental Markets
   Colors: #F2E6D9, #4A1942, #8B9E7C, #C7919B, #7B8794, #FDFAF5, #A85C3B
   Fonts: Libre Baskerville, Poppins, DM Mono
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F2E6D9;
    color: #4A1942;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(32px, 5vw, 64px);
    color: #4A1942;
}

h1 .dot {
    color: #A85C3B;
}

h2 {
    font-size: clamp(26px, 4.5vw, 56px);
    color: #4A1942;
    margin-bottom: 0.5em;
}

.market-label {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #A85C3B;
    display: block;
    margin-bottom: 0.75em;
}

/* ============================================================
   Hero Section
   ============================================================ */

.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #F2E6D9;
}

.hero-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-blob {
    opacity: 0;
    transform-origin: center;
}

.hero-blob rect {
    transition: transform 400ms ease-out;
}

/* Marble texture overlays via CSS-styled SVG rects */
.marble-overlay-1 {
    fill: url(#marble-1);
    opacity: 0.15;
}

.marble-overlay-2 {
    fill: url(#marble-2);
    opacity: 0.12;
}

.marble-overlay-3 {
    fill: url(#marble-3);
    opacity: 0.1;
}

/* Connection lines in hero */
.connection-line {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
}

/* Hero title */
.hero-title {
    position: relative;
    z-index: 10;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
}

.hero-tagline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(14px, 1.8vw, 20px);
    font-weight: 400;
    color: #4A1942;
    opacity: 0.7;
    margin-top: 0.5em;
}

/* ============================================================
   Cultural Icon Circles
   ============================================================ */

.cultural-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.culture-circle {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #FDFAF5;
    border: 1.5px solid rgba(74, 25, 66, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    pointer-events: auto;
    cursor: default;
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.culture-circle:hover {
    transform: scale(1.15) !important;
}

/* Positioned around the hero edges */
.culture-circle-1 { top: 12%; left: 8%; }
.culture-circle-2 { top: 18%; right: 12%; }
.culture-circle-3 { bottom: 22%; left: 14%; }
.culture-circle-4 { bottom: 15%; right: 8%; }
.culture-circle-5 { top: 50%; right: 5%; }

/* Inline cultural circles near market blobs */
.culture-circle-inline {
    position: relative;
    margin: 20px auto;
    opacity: 0;
    transform: scale(0);
}

.culture-circle-6 { margin-left: 15%; margin-top: -20px; }
.culture-circle-7 { margin-right: 10%; margin-left: auto; margin-top: -20px; }

/* Closing section circles */
.cultural-icons-closing {
    position: relative;
    width: 100%;
    height: 120px;
    display: flex;
    justify-content: center;
    gap: 80px;
    align-items: center;
}

.culture-circle-8,
.culture-circle-9,
.culture-circle-10 {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
}

/* ============================================================
   Markets Flow Section
   ============================================================ */

.markets-flow {
    position: relative;
    padding: 60px 0 120px;
}

.market-blob-wrapper {
    position: relative;
    margin-bottom: 40px;
}

/* Asymmetric positioning classes */
.market-blob-left {
    width: 55%;
    margin-left: 8%;
}

.market-blob-right {
    width: 50%;
    margin-left: auto;
    margin-right: 10%;
}

.market-blob-left-wide {
    width: 65%;
    margin-left: 5%;
}

.market-blob-center {
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}

.market-blob-right-narrow {
    width: 40%;
    margin-left: auto;
    margin-right: 15%;
}

/* The blob containers */
.market-blob {
    position: relative;
    padding: 60px 50px;
    background-color: #FDFAF5;
    clip-path: polygon(
        5% 8%,
        18% 2%,
        35% 0%,
        55% 1%,
        72% 3%,
        88% 8%,
        96% 18%,
        99% 32%,
        100% 50%,
        98% 68%,
        95% 82%,
        88% 92%,
        72% 98%,
        55% 100%,
        35% 99%,
        18% 96%,
        5% 90%,
        1% 78%,
        0% 62%,
        1% 45%,
        2% 28%,
        3% 15%
    );
    transition: transform 400ms ease-out, box-shadow 400ms ease-out;
    overflow: hidden;
}

.market-blob::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(139, 158, 124, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(199, 145, 155, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(123, 135, 148, 0.06) 0%, transparent 40%);
    pointer-events: none;
    animation: marbleShift 20s ease-in-out infinite alternate;
}

@keyframes marbleShift {
    0% { background-position: 0% 0%, 0% 0%, 0% 0%; }
    100% { background-position: 10% 5%, -5% 10%, 5% -5%; }
}

.market-blob:hover {
    transform: scale(1.02);
}

.blob-inner {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.blob-inner.visible {
    opacity: 1;
    transform: scale(1);
}

.blob-inner p {
    margin-top: 0.75em;
    color: #4A1942;
    opacity: 0.85;
}

/* Different blob clip-paths for variety */
#market-biodiversity {
    clip-path: polygon(
        3% 12%,
        15% 3%,
        32% 1%,
        50% 0%,
        68% 2%,
        85% 5%,
        95% 15%,
        100% 30%,
        99% 50%,
        97% 70%,
        92% 85%,
        82% 95%,
        65% 100%,
        45% 99%,
        28% 97%,
        12% 92%,
        4% 80%,
        0% 65%,
        1% 45%,
        2% 25%
    );
}

#market-water {
    clip-path: polygon(
        8% 5%,
        22% 0%,
        40% 2%,
        60% 1%,
        78% 0%,
        92% 6%,
        98% 20%,
        100% 40%,
        99% 58%,
        96% 75%,
        90% 88%,
        78% 97%,
        60% 100%,
        40% 99%,
        22% 95%,
        10% 88%,
        3% 72%,
        0% 55%,
        1% 35%,
        4% 18%
    );
}

#market-energy {
    clip-path: polygon(
        6% 10%,
        20% 2%,
        38% 0%,
        58% 2%,
        75% 5%,
        90% 12%,
        97% 25%,
        100% 45%,
        98% 65%,
        93% 80%,
        84% 93%,
        70% 99%,
        52% 100%,
        34% 98%,
        18% 93%,
        7% 82%,
        1% 68%,
        0% 50%,
        2% 32%,
        4% 18%
    );
}

#market-soil {
    clip-path: polygon(
        4% 6%,
        16% 1%,
        34% 0%,
        52% 2%,
        70% 1%,
        86% 4%,
        96% 14%,
        100% 32%,
        99% 52%,
        96% 72%,
        90% 86%,
        80% 96%,
        62% 100%,
        42% 98%,
        24% 95%,
        10% 88%,
        2% 72%,
        0% 52%,
        1% 34%,
        3% 16%
    );
}

#market-ocean {
    clip-path: polygon(
        7% 10%,
        20% 3%,
        38% 1%,
        56% 0%,
        74% 3%,
        88% 10%,
        96% 22%,
        100% 42%,
        98% 62%,
        94% 78%,
        86% 90%,
        72% 98%,
        54% 100%,
        36% 98%,
        20% 92%,
        8% 82%,
        1% 66%,
        0% 48%,
        2% 30%,
        5% 16%
    );
}

/* ============================================================
   Section Connectors
   ============================================================ */

.section-connector {
    width: 100%;
    height: 80px;
    display: block;
    margin: -20px 0;
}

.blob-connector {
    position: absolute;
    right: -80px;
    top: 20%;
    width: 100px;
    height: 200px;
    opacity: 0.5;
}

.connector-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

.connector-path.drawn {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1200ms ease-in-out;
}

/* ============================================================
   Closing Section
   ============================================================ */

.closing-section {
    position: relative;
    padding: 100px 0 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.closing-blob {
    width: 60%;
    max-width: 700px;
    padding: 70px 60px;
    background-color: #FDFAF5;
    clip-path: polygon(
        6% 8%,
        20% 2%,
        38% 0%,
        58% 1%,
        76% 3%,
        90% 10%,
        97% 22%,
        100% 40%,
        99% 60%,
        96% 78%,
        90% 90%,
        76% 98%,
        58% 100%,
        38% 99%,
        20% 96%,
        6% 88%,
        1% 72%,
        0% 52%,
        1% 34%,
        3% 18%
    );
    text-align: center;
    position: relative;
    transition: transform 400ms ease-out;
}

.closing-blob::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(139, 158, 124, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 70%, rgba(199, 145, 155, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: marbleShift 20s ease-in-out infinite alternate;
}

.closing-blob:hover {
    transform: scale(1.02);
}

.closing-inner {
    position: relative;
    z-index: 2;
}

.closing-inner h2 {
    font-size: clamp(24px, 3.5vw, 44px);
    margin-bottom: 0.6em;
}

.closing-inner p {
    color: #4A1942;
    opacity: 0.85;
    margin-bottom: 1em;
}

.closing-domain {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(20px, 3vw, 36px);
    font-weight: 700;
    color: #A85C3B;
    letter-spacing: -0.01em;
    margin-top: 1.5em !important;
    opacity: 1 !important;
}

/* ============================================================
   Animations
   ============================================================ */

/* Hero blob entrance: circle to blob morph */
@keyframes blobMorphIn1 {
    0% {
        opacity: 0;
        clip-path: circle(0% at 50% 50%);
    }
    100% {
        opacity: 0.85;
        clip-path: none;
    }
}

/* Class-based animations triggered by JS */
.hero-blob.animate-in {
    animation: blobFadeIn 600ms ease-out forwards;
}

@keyframes blobFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }
    100% {
        opacity: 0.85;
        transform: scale(1);
    }
}

.hero-blob-2.animate-in {
    animation-delay: 300ms;
}

.hero-blob-3.animate-in {
    animation-delay: 600ms;
}

.hero-title.animate-in {
    animation: titleFadeIn 600ms ease-out 1200ms forwards;
}

@keyframes titleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.connection-line.animate-in {
    animation: drawLine 400ms ease-in-out forwards;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.connection-line:nth-child(5) { animation-delay: 1200ms; }
.connection-line:nth-child(6) { animation-delay: 1400ms; }
.connection-line:nth-child(7) { animation-delay: 1600ms; }

.culture-circle.animate-in {
    animation: circlePopIn 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes circlePopIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.culture-circle-1.animate-in { animation-delay: 1800ms; }
.culture-circle-2.animate-in { animation-delay: 1900ms; }
.culture-circle-3.animate-in { animation-delay: 2000ms; }
.culture-circle-4.animate-in { animation-delay: 2100ms; }
.culture-circle-5.animate-in { animation-delay: 2200ms; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
    .market-blob-left,
    .market-blob-right,
    .market-blob-left-wide,
    .market-blob-center,
    .market-blob-right-narrow {
        width: 90%;
        margin-left: 5%;
        margin-right: 5%;
    }

    .market-blob {
        padding: 50px 35px;
    }

    .closing-blob {
        width: 90%;
        padding: 50px 35px;
    }

    .culture-circle-1 { top: 8%; left: 4%; }
    .culture-circle-2 { top: 10%; right: 4%; }
    .culture-circle-3 { bottom: 18%; left: 4%; }
    .culture-circle-4 { bottom: 10%; right: 4%; }
    .culture-circle-5 { top: 45%; right: 2%; }

    .cultural-icons-closing {
        gap: 30px;
    }

    .blob-connector {
        display: none;
    }

    h1 {
        font-size: clamp(28px, 8vw, 48px);
    }

    h2 {
        font-size: clamp(22px, 5vw, 36px);
    }
}

@media (max-width: 480px) {
    .market-blob {
        padding: 40px 25px;
    }

    .closing-blob {
        padding: 40px 25px;
    }

    .culture-circle {
        width: 45px;
        height: 45px;
    }
}
