/* === VARIABLES === */
:root {
    --burnt-orange: #e85d26;
    --emerald: #4aba7a;
    --deep-brown: #2a1a0e;
    --copper: #c47a3a;
    --warm-sand: #d4c4b0;
    --cream: #f4ede4;
    --muted-taupe: #a08672;
    --purple-holo: #7b3fa0;
    --dark-bg: #1a0a04;
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    background: var(--cream);
    color: var(--deep-brown);
    overflow-x: hidden;
}

/* === SPREADS === */
.spread {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    padding: 4rem 2rem;
}

/* === BLOBS === */
.blob {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 52% 48% 70%;
    opacity: 0.3;
    animation: morph 12s ease-in-out infinite alternate;
    pointer-events: none;
}

.blob-1 {
    width: 500px; height: 500px;
    background: linear-gradient(135deg, var(--burnt-orange), var(--purple-holo));
    top: -10%; right: -5%;
}
.blob-2 {
    width: 350px; height: 350px;
    background: linear-gradient(225deg, var(--emerald), var(--copper));
    bottom: 10%; left: -8%;
    animation-delay: -4s;
}
.blob-3 {
    width: 200px; height: 200px;
    background: var(--purple-holo);
    top: 40%; left: 50%;
    animation-delay: -8s;
}
.blob-4 {
    width: 400px; height: 400px;
    background: linear-gradient(45deg, var(--copper), var(--burnt-orange));
    top: -15%; right: -10%;
    animation-delay: -2s;
}
.blob-5 {
    width: 600px; height: 600px;
    background: linear-gradient(180deg, var(--burnt-orange), var(--purple-holo));
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    opacity: 0.15;
}
.blob-6 {
    width: 300px; height: 300px;
    background: var(--emerald);
    bottom: -5%; right: 5%;
    animation-delay: -6s;
}
.blob-7 {
    width: 450px; height: 450px;
    background: linear-gradient(90deg, var(--copper), var(--emerald));
    top: -10%; left: -10%;
    animation-delay: -3s;
}
.blob-8 {
    width: 500px; height: 500px;
    background: linear-gradient(270deg, var(--burnt-orange), var(--purple-holo));
    bottom: -15%; right: -10%;
    animation-delay: -5s;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 52% 48% 70%; }
    25% { border-radius: 58% 42% 56% 44% / 64% 30% 70% 36%; }
    50% { border-radius: 50% 50% 34% 66% / 56% 68% 32% 44%; }
    75% { border-radius: 42% 58% 64% 36% / 48% 42% 58% 52%; }
    100% { border-radius: 70% 30% 30% 70% / 52% 70% 30% 48%; }
}

/* === HOLO GRID === */
.holo-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(232,93,38,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232,93,38,0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
    0% { transform: perspective(800px) rotateX(2deg) translateY(0); }
    100% { transform: perspective(800px) rotateX(2deg) translateY(60px); }
}

/* === HERO === */
.spread-hero {
    background: var(--dark-bg);
    flex-direction: column;
    gap: 2rem;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-headline {
    font-family: 'Bungee Shade', cursive;
    font-size: clamp(3rem, 9vw, 8rem);
    line-height: 1.0;
    letter-spacing: 0.02em;
    color: var(--burnt-orange);
    animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.dot {
    color: var(--emerald);
}

.hero-sub {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--warm-sand);
    margin-top: 1rem;
    opacity: 0;
    animation: fadeUp 0.6s 0.4s ease forwards;
}

@keyframes bounceIn {
    0% { transform: scale(0.3) translateY(40px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ticker */
.probability-ticker {
    margin-top: 3rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.ticker-item {
    background: rgba(232, 93, 38, 0.1);
    border: 1px solid rgba(232, 93, 38, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeUp 0.5s ease forwards;
}
.ticker-item:nth-child(1) { animation-delay: 0.6s; }
.ticker-item:nth-child(2) { animation-delay: 0.8s; }
.ticker-item:nth-child(3) { animation-delay: 1.0s; }

.ticker-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    color: var(--warm-sand);
}

.ticker-prob {
    font-family: 'Dela Gothic One', cursive;
    font-size: 2rem;
    color: var(--emerald);
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--muted-taupe);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    z-index: 2;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* === TEXT SPREAD === */
.spread-text {
    background: var(--cream);
}

.spread-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-headline {
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--deep-brown);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.body-text {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--deep-brown);
    margin-bottom: 1rem;
}

/* Bar chart viz */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bar {
    position: relative;
    height: 48px;
    background: var(--warm-sand);
    border-radius: 8px;
    overflow: hidden;
}

.bar::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: linear-gradient(90deg, var(--burnt-orange), var(--copper));
    border-radius: 8px;
    transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bar.animated::before {
    width: calc(var(--bar-width) * 1%);
}

.bar::after {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--deep-brown);
    z-index: 1;
}

.viz-caption {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    color: var(--muted-taupe);
    margin-top: 1rem;
}

/* === QUOTE SPREAD === */
.spread-quote {
    background: var(--dark-bg);
}

.pull-quote {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.quote-text {
    font-family: 'Bungee Shade', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.2;
    color: var(--burnt-orange);
}

/* === VISUAL SPREAD (How It Works) === */
.spread-visual {
    background: linear-gradient(180deg, var(--cream) 0%, #efe7dc 100%);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(26, 10, 4, 0.08);
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
}

.step-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.step-number {
    font-family: 'Dela Gothic One', cursive;
    font-size: 3rem;
    color: var(--warm-sand);
    line-height: 1;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 1.5rem auto;
}

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

.step-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--deep-brown);
    margin-bottom: 0.75rem;
}

.step-desc {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--muted-taupe);
    line-height: 1.5;
}

/* === MARKETS SPREAD === */
.spread-markets {
    background: var(--dark-bg);
}

.spread-markets .section-headline {
    color: var(--cream);
    text-align: center;
    margin-bottom: 2rem;
}

.markets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.market-card {
    background: rgba(244, 237, 228, 0.05);
    border: 1px solid rgba(212, 196, 176, 0.15);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease, border-color 0.3s;
}

.market-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.market-card:hover {
    border-color: var(--burnt-orange);
}

.market-prob-ring {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.market-prob-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(212, 196, 176, 0.2);
    stroke-width: 6;
}

.ring-fill {
    fill: none;
    stroke: var(--burnt-orange);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 264;
    stroke-dashoffset: 264;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.market-card.visible .ring-fill {
    stroke-dashoffset: calc(264 - (264 * var(--percent) / 100));
}

.ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Dela Gothic One', cursive;
    font-size: 1.1rem;
    color: var(--burnt-orange);
}

.market-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--cream);
    line-height: 1.4;
}

.market-volume {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--muted-taupe);
    display: block;
    margin-top: 0.5rem;
}

/* === CTA SPREAD === */
.spread-cta {
    background: linear-gradient(135deg, var(--deep-brown) 0%, var(--dark-bg) 100%);
    flex-direction: column;
    text-align: center;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-headline {
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--cream);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.cta-content .body-text {
    color: var(--warm-sand);
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

.cta-button {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cream);
    background: var(--burnt-orange);
    border: none;
    padding: 1rem 3rem;
    border-radius: 60px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(232, 93, 38, 0.4);
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 40px rgba(232, 93, 38, 0.6);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .steps-grid {
        grid-template-columns: 1fr;
    }
    .markets-grid {
        grid-template-columns: 1fr;
    }
    .probability-ticker {
        flex-direction: column;
        align-items: center;
    }
}
