:root {
    /* Interactions:* */
    /* Playful Micro-Interactions:** IntersectionObserver` with `threshold: 0.15` to detect when elements enter the viewport. On entry */
    --primary-dark: #1a0e05;
    --primary-warm: #d4622a;
    --secondary-warm: #f0a050;
    --tertiary-warm: #f5e6d0;
    --body-warm: #e8d5c0;
    --crystalline: #e87830;
    --deep-earth: #3d2410;
    --highlight: #ffc870;
    --contrast-dark: #0d0704;
    --accent-cool: #5a3825;
    --blob-angle: 0deg;
}

@property --blob-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--contrast-dark); }
body {
    min-height: 100%;
    overflow-x: hidden;
    font-family: "Nunito", sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 400;
    line-height: 1.7;
    color: var(--body-warm);
    background: var(--contrast-dark);
}
button { font: inherit; }

.immersive-scroll { position: relative; isolation: isolate; }
.section {
    position: relative;
    min-height: 100vh;
    padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 4vw, 5rem);
    overflow: hidden;
}
.section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 18% 24%, #f0a05016 0 2px, transparent 3px), radial-gradient(circle at 72% 64%, #ffc87012 0 1px, transparent 3px), repeating-linear-gradient(110deg, transparent 0 22px, #d4622a08 24px, transparent 28px);
    pointer-events: none;
}

.display-title, .section-title {
    font-family: "Fraunces", serif;
    font-variation-settings: "SOFT" 100, "WONK" 1;
    line-height: .9;
    letter-spacing: -.04em;
}
.display-title { font-size: clamp(3rem, 10vw, 8rem); color: var(--tertiary-warm); text-shadow: 0 8px 34px #0d070488; }
.section-title { font-size: clamp(3rem, 9vw, 7rem); color: var(--tertiary-warm); }
.kicker {
    font-family: "Victor Mono", monospace;
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--secondary-warm);
}
.section-subtitle, .hero-subtitle {
    max-width: 44rem;
    font-family: "Syne", sans-serif;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--body-warm);
}
.section-heading { position: relative; z-index: 2; display: grid; gap: 1rem; margin-bottom: clamp(3rem, 7vw, 6rem); }
.broken-left { width: min(74rem, 100%); margin-right: auto; grid-template-columns: repeat(8, 1fr); }
.broken-left .kicker { grid-column: 1 / 3; }
.broken-left .section-title { grid-column: 2 / 8; }
.broken-left .section-subtitle { grid-column: 4 / 9; }
.broken-right { width: min(74rem, 100%); margin-left: auto; grid-template-columns: repeat(8, 1fr); }
.broken-right .kicker { grid-column: 6 / 9; }
.broken-right .section-title { grid-column: 1 / 7; text-align: right; }
.broken-right .section-subtitle { grid-column: 2 / 6; }
.center-heading { text-align: center; justify-items: center; }

.scroll-crystal {
    position: fixed;
    z-index: 50;
    top: 50%;
    right: clamp(.8rem, 2vw, 2rem);
    width: 2.6rem;
    height: 3.8rem;
    transform: translateY(-50%);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    background: #3d2410;
    box-shadow: 0 0 0 2px #f0a05055, 0 0 24px #d4622a77;
    transition: clip-path .35s ease, transform .35s ease;
}
.crystal-fill { position: absolute; inset: auto 0 0; height: 0%; background: conic-gradient(from var(--blob-angle), #5a3825, #d4622a, #f0a050, #ffc870, #d4622a); transition: height .15s linear; }

.particle-field { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.particle { position: absolute; width: 6px; height: 6px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); background: #f0a05033; animation: particleDrift var(--dur) linear var(--delay) infinite; }
@keyframes particleDrift { from { transform: translate3d(0, 110vh, 0) rotate(0deg); opacity: 0; } 12%, 86% { opacity: 1; } to { transform: translate3d(var(--drift), -18vh, 0) rotate(360deg); opacity: 0; } }

.geode-section { display: grid; place-items: center; background: radial-gradient(circle at 52% 45%, #5a3825 0, #3d2410 30%, #1a0e05 64%, #0d0704 100%); }
.hero-grid { position: relative; z-index: 2; width: min(1200px, 100%); min-height: 76vh; display: grid; place-items: center; }
.geode-blob {
    position: absolute;
    width: min(80vw, 700px);
    height: min(80vw, 700px);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: conic-gradient(from var(--blob-angle), #d4622a, #f0a050, #e87830, #ffc870, #d4622a);
    box-shadow: inset 0 0 90px #0d070488, 0 30px 90px #d4622a55;
    animation: blobMorph 8s ease-in-out infinite alternate, blobFloat 6s ease-in-out infinite alternate, conicSpin 12s linear infinite;
    backdrop-filter: blur(2px);
}
.hero-copy { position: relative; z-index: 3; max-width: 62rem; text-align: center; mix-blend-mode: difference; display: grid; justify-items: center; gap: 1.4rem; }
.specimen-card {
    position: absolute;
    z-index: 4;
    padding: 1rem 1.2rem;
    min-width: 12rem;
    background: #1a0e05cc;
    border: 1px solid #f0a05066;
    color: var(--highlight);
    font-family: "Victor Mono", monospace;
    box-shadow: 0 18px 35px #0d070488;
    animation: specimenBob 5s ease-in-out infinite alternate;
}
.specimen-card span { display: block; color: var(--secondary-warm); font-size: .7rem; letter-spacing: .1em; }
.specimen-one { left: 2%; top: 18%; clip-path: polygon(8% 0,100% 0,92% 82%,28% 100%,0 40%); }
.specimen-two { right: 4%; bottom: 18%; clip-path: polygon(0 18%,88% 0,100% 64%,72% 100%,8% 88%); animation-delay: -1.5s; }
@keyframes specimenBob { to { transform: translateY(-16px) rotate(2deg); } }

.blob-button {
    position: relative;
    isolation: isolate;
    margin-top: .5rem;
    padding: 1rem 1.35rem;
    border: 2px solid #f0a050;
    border-radius: 999px;
    background: #0d0704d8;
    color: #ffc870;
    cursor: pointer;
    font-family: "Syne", sans-serif;
    font-weight: 800;
    letter-spacing: .03em;
    box-shadow: 0 0 28px #d4622a44;
    transition: transform .3s ease, background .3s ease, color .3s ease;
    overflow: hidden;
}
.blob-button:hover { transform: rotate(-2deg) scale(1.05); background: #ffc870; color: #0d0704; }
.dark-button { background: #1a0e05; }
.ripple { position: absolute; width: 24px; height: 24px; border-radius: 50%; background: #f5e6d099; transform: translate(-50%, -50%) scale(0); animation: ripple .7s ease-out forwards; pointer-events: none; z-index: -1; }
@keyframes ripple { to { transform: translate(-50%, -50%) scale(12); opacity: 0; } }

.crack-map { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .9; }
.crack-map svg { width: 100%; height: 100%; }
.crack-map path { fill: none; stroke: #d4622a44; stroke-width: .7px; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: crackDraw 5s ease forwards; }
@keyframes crackDraw { to { stroke-dashoffset: 0; } }

.transition-cluster { position: absolute; z-index: 5; height: 130px; width: 520px; pointer-events: none; }
.bottom-cluster { bottom: -40px; left: 50%; transform: translateX(-50%); }
.right-cluster { bottom: -20px; right: -90px; }
.transition-cluster i {
    position: absolute;
    bottom: 0;
    left: var(--x);
    width: var(--s);
    height: calc(var(--s) * 1.12);
    clip-path: polygon(50% 0%, 88% 16%, 100% 58%, 70% 100%, 24% 88%, 0 42%);
    background: conic-gradient(from var(--blob-angle), #5a3825, #d4622a, #f0a050, #ffc870, #e87830, #5a3825);
    transform: scale(0) rotate(var(--r));
    animation: crystalRise .8s cubic-bezier(.34,1.56,.64,1) var(--d) forwards, conicSpin 30s linear infinite;
    box-shadow: 0 0 22px #f0a05044;
}
@keyframes crystalRise { to { transform: scale(1) rotate(var(--r)); } }

.strata-section { background: linear-gradient(180deg, #3d2410, #5a3825 48%, #1a0e05); }
.strata-stack { position: relative; z-index: 2; display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
.stratum-band {
    position: relative;
    display: grid;
    grid-template-columns: minmax(4rem, .7fr) 5fr;
    gap: 2rem;
    width: min(1020px, 100%);
    padding: clamp(1.5rem, 4vw, 3rem);
    background: linear-gradient(105deg, #0d0704aa, #d4622a22, #f0a05010);
    border: 1px solid #f0a05035;
    border-radius: 32% 8% 22% 9% / 17% 26% 12% 20%;
    box-shadow: 0 22px 50px #0d070466;
    opacity: 0;
    transform: translateX(-9vw);
}
.stratum-band.from-right { justify-self: end; transform: translateX(9vw); grid-template-columns: minmax(4rem, .7fr) 5fr; }
.stratum-band.narrow { width: min(820px, 100%); }
.stratum-band.visible { opacity: 1; transform: translateX(0); transition: opacity .7s ease calc(var(--i) * 100ms), transform .7s ease calc(var(--i) * 100ms); }
.stratum-band::after, .cavern-card::after, .forge-track::after, .quote-blob::after, .granted-copy::after, .specimen-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, #5a3825, #d4622a, #f0a050, #ffc870) 1;
    clip-path: inset(0 100% 100% 0);
    pointer-events: none;
}
.visible::after { animation: borderLicense .6s cubic-bezier(.4,0,.2,1) calc(var(--i) * 100ms) forwards, glowSettle 1.2s ease calc((var(--i) * 100ms) + 600ms); }
@keyframes borderLicense { to { clip-path: inset(0 0 0 0); } }
@keyframes glowSettle { 45% { box-shadow: 0 0 12px #f0a05066; } }
.band-index { font-family: "Victor Mono", monospace; color: #ffc870; font-size: clamp(2rem, 6vw, 4.6rem); line-height: 1; }
.stratum-band h3, .cavern-card h3, .forge-node h3 { font-family: "Syne", sans-serif; font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: .03em; color: #f0a050; }
.stratum-band p { color: #e8d5c0; max-width: 42rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.1rem; }
.badge-row button { cursor: pointer; padding: .48rem .85rem; border: 1px solid #d4622a; border-radius: 999px; background: #5a382566; color: #ffc870; font-family: "Victor Mono", monospace; font-size: .82rem; transition: transform .25s ease, background .25s ease; }
.badge-row button:hover { transform: rotate(2deg) scale(1.06); background: #d4622a; color: #0d0704; }

.cavern-section { background: #1a0e05; min-height: 120vh; }
.hex-overlay { position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='80' viewBox='0 0 70 80'%3E%3Cpath d='M35 2 68 20v40L35 78 2 60V20z' fill='none' stroke='%23f0a050' stroke-opacity='.06'/%3E%3C/svg%3E"); opacity: .9; }
.cavern-cloud { position: relative; z-index: 2; min-height: 670px; max-width: 1180px; margin: 0 auto; }
.cavern-card {
    position: absolute;
    width: min(310px, 72vw);
    min-height: 240px;
    padding: 2.2rem;
    display: grid;
    align-content: center;
    gap: .8rem;
    color: #e8d5c0;
    background: #e878301a;
    border: 1px solid #f0a05044;
    backdrop-filter: blur(2px);
    box-shadow: 0 28px 60px #0d070488;
    transform: perspective(800px) rotateY(calc(var(--mx, 0) * 5deg)) rotateX(calc(var(--my, 0) * -5deg));
    transition: transform .15s ease, background .25s ease;
    opacity: 0;
}
.cavern-card.visible { opacity: 1; transition: opacity .65s ease calc(var(--i) * 100ms), transform .15s ease; }
.cavern-card:hover { background: #e878302e; }
.cavern-card code { font-family: "Victor Mono", monospace; font-size: .9rem; letter-spacing: .05em; color: #f0a050; }
.hex-card { left: 2%; top: 4%; clip-path: polygon(50% 0%, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%); }
.pent-card { right: 4%; top: 12%; clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0 38%); }
.diamond-card { left: 26%; bottom: 5%; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0 50%); padding: 3.8rem; }
.oct-card { right: 18%; bottom: 0; clip-path: polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%); }

.forge-section { background: radial-gradient(circle at 72% 30%, #d4622a33, transparent 32%), linear-gradient(135deg, #5a3825, #1a0e05 62%, #0d0704); }
.forge-track { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 2rem 0; opacity: 0; }
.forge-track.visible { opacity: 1; transition: opacity .6s ease; }
.forge-line { position: absolute; top: 72px; left: 8%; right: 8%; height: 4px; background: linear-gradient(90deg, #5a3825, #d4622a, #f0a050, #ffc870); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 18px #f0a05077; }
.forge-track.visible .forge-line { animation: lineDraw 1.4s ease forwards; }
@keyframes lineDraw { to { transform: scaleX(1); } }
.forge-node { position: relative; display: grid; justify-items: center; text-align: center; gap: .8rem; opacity: 0; transform: translateY(28px); }
.forge-track.visible .forge-node { animation: nodeUp .55s ease calc(var(--i) * 160ms) forwards; }
@keyframes nodeUp { to { opacity: 1; transform: translateY(0); } }
.forge-node span { width: 86px; height: 86px; clip-path: polygon(50% 0%, 88% 16%, 100% 58%, 70% 100%, 24% 88%, 0 42%); background: conic-gradient(from var(--blob-angle), #d4622a, #f0a050, #ffc870, #e87830, #d4622a); animation: conicSpin 30s linear infinite, crystalPulse 2.4s ease-in-out infinite; box-shadow: 0 0 25px #f0a05055; }
@keyframes crystalPulse { 50% { transform: scale(1.08); } }
.forge-node p { color: #e8d5c0; max-width: 15rem; }

.exhibition-section { background: linear-gradient(180deg, #1a0e05, #3d2410 45%, #5a3825 100%); }
.quote-gallery { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .9fr; gap: clamp(1rem, 4vw, 2.5rem); align-items: center; max-width: 1200px; margin: 0 auto; }
.quote-blob { position: relative; padding: clamp(2rem, 5vw, 4rem); min-height: 330px; display: grid; place-items: center; background: #e8783024; border: 1px solid #f0a05044; backdrop-filter: blur(2px); opacity: 0; transform: scale(.98) translateY(22px); animation: blobBreathe 6s ease-in-out infinite alternate; }
.quote-blob.visible { opacity: 1; transform: scale(1) translateY(0); transition: opacity .7s ease calc(var(--i) * 100ms), transform .7s ease calc(var(--i) * 100ms); }
.quote-a { border-radius: 30% 70% 57% 43% / 34% 36% 64% 66%; grid-row: span 2; }
.quote-b { border-radius: 62% 38% 44% 56% / 58% 43% 57% 42%; }
.quote-c { border-radius: 42% 58% 70% 30% / 45% 64% 36% 55%; }
blockquote { font-family: "Fraunces", serif; font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 320; font-variation-settings: "SOFT" 80, "WONK" .8; color: #f5e6d0; line-height: 1.25; }
blockquote footer { margin-top: 1.2rem; font-family: "Syne", sans-serif; font-size: .92rem; font-weight: 700; color: #ffc870; }

.granted-section { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(135deg, #d4622a, #e87830 50%, #f0a050); }
.granted-blob { position: absolute; width: min(62vw, 560px); height: min(62vw, 560px); border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; background: #f5e6d040; box-shadow: inset 0 0 80px #0d070433, 0 35px 80px #0d070433; animation: blobMorph 10s ease-in-out infinite alternate, blobFloat 7s ease-in-out infinite alternate; }
.granted-copy { position: relative; z-index: 2; max-width: 720px; padding: clamp(2rem, 5vw, 4rem); text-align: center; color: #1a0e05; opacity: 0; }
.granted-copy.visible { opacity: 1; transition: opacity .7s ease; }
.granted-copy .section-title, .granted-copy .section-subtitle, .granted-copy .kicker { color: #1a0e05; }
.granted-copy .section-subtitle { margin: 1.2rem auto; }

.lava-footer { position: relative; z-index: 3; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 2rem clamp(1.5rem, 4vw, 5rem); background: #0d0704; border-top: 2px solid #d4622a; color: #e8d5c0; font-family: "Victor Mono", monospace; font-size: .85rem; }

@keyframes blobMorph { 0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; } 50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; } 100% { border-radius: 42% 58% 62% 38% / 42% 47% 53% 58%; } }
@keyframes blobFloat { to { transform: translateY(-20px); } }
@keyframes blobBreathe { to { transform: scale(1.02); } }
@keyframes conicSpin { to { --blob-angle: 360deg; } }

@media (max-width: 860px) {
    .broken-left, .broken-right { display: block; }
    .broken-right .section-title { text-align: left; }
    .section-heading > * + * { margin-top: 1rem; }
    .stratum-band, .stratum-band.from-right { grid-template-columns: 1fr; justify-self: stretch; }
    .cavern-cloud { display: grid; gap: 1.2rem; min-height: auto; }
    .cavern-card { position: relative; inset: auto; width: 100%; clip-path: none; border-radius: 22px; }
    .forge-track { grid-template-columns: 1fr; gap: 2rem; }
    .forge-line { display: none; }
    .quote-gallery { grid-template-columns: 1fr; }
    .quote-a { grid-row: auto; }
    .specimen-card { display: none; }
    .scroll-crystal { right: .7rem; width: 1.8rem; height: 2.8rem; }
}
