:root {
    /* DESIGN.md typography parser tokens: Interactions (The Core Animation Pattern */
    --paper: #f5e6d0;
    --night: #1a0a00;
    --teal: #2a6b63;
    --orange: #c4520a;
    --umber: #2a1a0a;
    --black: #0d0500;
    --aged: #ede0cc;
    --sienna: #a8662e;
    --bright: #d4621e;
    --cabinet: #3d2010;
    --ink: #1c1108;
    --hex-size: clamp(180px, 19vw, 280px);
    --hex-height: calc(var(--hex-size) * 0.866);
    --gap: clamp(5px, 0.5vw, 10px);
    --fast: 200ms cubic-bezier(.25,.46,.45,.94);
    --spring: 420ms cubic-bezier(.34,1.56,.64,1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--night);
    color: var(--paper);
    font-family: "Lexend", Inter, system-ui, sans-serif;
    font-size: clamp(.94rem, 1.1vw, 1.08rem);
    font-weight: 300;
    line-height: 1.55;
}

.svg-defs {
    position: absolute;
    pointer-events: none;
}

#generative-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: var(--night);
}

.grain {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .18;
    background:
        radial-gradient(circle at 12% 18%, rgba(212,98,30,.16), transparent 28%),
        radial-gradient(circle at 78% 34%, rgba(42,107,99,.15), transparent 30%),
        repeating-linear-gradient(0deg, rgba(245,230,208,.035) 0 1px, transparent 1px 5px);
    mix-blend-mode: screen;
}

.content-wrapper {
    position: relative;
    z-index: 1;
}

.scroll-indicator {
    position: fixed;
    left: 8px;
    top: 18vh;
    z-index: 20;
    width: 10px;
    height: 64vh;
    clip-path: polygon(50% 0, 100% 7%, 100% 93%, 50% 100%, 0 93%, 0 7%);
    background: rgba(168,102,46,.18);
}

.scroll-indicator span {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: var(--scroll-progress, 0%);
    background: linear-gradient(to top, var(--bright), var(--orange), transparent);
    box-shadow: 0 0 18px rgba(212,98,30,.75);
}

.archive-tabs {
    position: fixed;
    top: 16vh;
    right: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tab {
    position: relative;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(168,102,46,.8);
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    background: rgba(42,26,10,.88);
    color: var(--sienna);
    font-family: "Share Tech Mono", monospace;
    font-size: .95rem;
    cursor: pointer;
    transition: width var(--spring), background var(--fast), color var(--fast), filter var(--fast);
}

.tab::after {
    content: attr(title);
    position: absolute;
    right: 15px;
    top: 50%;
    translate: 0 -50%;
    width: 135px;
    opacity: 0;
    text-align: right;
    font-size: .76rem;
    letter-spacing: .08em;
}

.tab:hover,
.tab.active {
    width: 190px;
    background: var(--bright);
    color: var(--black);
    filter: drop-shadow(0 0 12px rgba(212,98,30,.42));
}

.tab:hover::after,
.tab.active::after {
    opacity: 1;
}

.honeycomb-section {
    position: relative;
    min-height: 92vh;
    display: grid;
    place-items: center;
    padding: clamp(48px, 8vw, 112px) clamp(18px, 4vw, 72px);
}

.honeycomb-container {
    width: min(1420px, calc(100vw - 92px));
    display: grid;
    grid-template-columns: repeat(4, var(--hex-size));
    grid-auto-rows: calc(var(--hex-height) * .76);
    gap: var(--gap);
    justify-content: center;
    align-items: center;
}

.dense-grid {
    grid-template-columns: repeat(5, var(--hex-size));
}

.opening-grid {
    grid-template-columns: repeat(3, var(--hex-size));
}

.offset-section .honeycomb-container {
    transform: translateX(calc(var(--hex-size) * .25));
}

.hex-cell {
    --cursor-x: 50%;
    --cursor-y: 50%;
    position: relative;
    width: var(--hex-size);
    height: var(--hex-height);
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: pointer;
    background:
        radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(212,98,30,.18), transparent 33%),
        linear-gradient(135deg, rgba(28,17,8,.82), rgba(42,26,10,.58));
    filter: drop-shadow(0 12px 34px rgba(13,5,0,.32));
    transition: transform var(--spring), filter var(--fast), opacity var(--fast);
}

.hex-cell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, var(--orange), rgba(168,102,46,.28), var(--teal));
    opacity: .52;
}

.hex-cell::after {
    content: "";
    position: absolute;
    inset: 2px;
    clip-path: inherit;
    background:
        radial-gradient(circle at 38% 34%, rgba(245,230,208,.08), transparent 42%),
        linear-gradient(145deg, rgba(26,10,0,.86), rgba(61,32,16,.66));
}

.hex-cell:hover {
    transform: translateY(-7px) scale(1.025);
    filter: drop-shadow(0 0 22px rgba(212,98,30,.35)) drop-shadow(0 14px 35px rgba(13,5,0,.48));
}

.hex-cell.pressed {
    transform: scale(.96);
}

.hex-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: clamp(22px, 2.4vw, 36px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.opening-hive {
    min-height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(196,82,10,.17), transparent 48%);
}

.opening-hive .hex-cell {
    opacity: 0;
    animation: hatchIn .72s var(--spring) forwards;
}

.opening-hive .hex-cell:nth-child(1) { animation-delay: .05s; }
.opening-hive .hex-cell:nth-child(2) { animation-delay: .18s; }
.opening-hive .hex-cell:nth-child(3) { animation-delay: .31s; }
.opening-hive .hex-cell:nth-child(4) { animation-delay: .44s; }
.opening-hive .hex-cell:nth-child(5) { animation-delay: .57s; }
.opening-hive .hex-cell:nth-child(6) { animation-delay: .70s; }
.opening-hive .hex-cell:nth-child(7) { animation-delay: .83s; }

.cell-text {
    font-family: "Righteous", "Arial Black", system-ui, sans-serif;
    font-size: clamp(2rem, 4.2vw, 4.15rem);
    line-height: .94;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--bright);
    text-shadow: 3px 3px 0 var(--black), 0 0 24px rgba(212,98,30,.3);
    filter: url(#ink-bleed-filter);
}

.dot-info {
    color: var(--paper);
}

.title-fragment small,
.seal-cell span,
.mono-label {
    margin-top: 10px;
    color: var(--sienna);
    font-family: "Share Tech Mono", monospace;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: .75rem;
}

.registry-card strong {
    font-family: "Righteous", system-ui;
    color: var(--bright);
    font-size: clamp(2.1rem, 4vw, 3.7rem);
    letter-spacing: .05em;
}

h2 {
    font-family: "Anybody", Inter, system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(1.15rem, 2vw, 1.75rem);
    line-height: 1.05;
    letter-spacing: .03em;
    color: var(--paper);
    margin-bottom: 10px;
}

p {
    color: var(--aged);
}

.text-cell::after {
    background:
        radial-gradient(circle at 30% 20%, rgba(237,224,204,.08), transparent 36%),
        linear-gradient(145deg, rgba(61,32,16,.92), rgba(42,26,10,.78));
}

.wide-copy p,
.final-card p {
    max-width: 19ch;
}

.license-card::after {
    background:
        repeating-linear-gradient(0deg, rgba(168,102,46,.08) 0 1px, transparent 1px 10px),
        linear-gradient(135deg, rgba(245,230,208,.14), rgba(61,32,16,.68));
}

.license-header,
.license-number,
.stamp {
    font-family: "Share Tech Mono", monospace;
    text-transform: uppercase;
}

.license-header {
    color: var(--black);
    background: var(--bright);
    padding: 4px 9px;
    letter-spacing: .16em;
    font-size: .76rem;
    box-shadow: 0 0 0 1px rgba(13,5,0,.35) inset;
}

.license-number {
    margin-top: 10px;
    color: var(--paper);
    letter-spacing: .12em;
    font-size: .78rem;
    border-bottom: 1px dashed var(--sienna);
    padding-bottom: 6px;
}

.stamp {
    margin-top: 14px;
    padding: 5px 10px;
    border: 2px solid var(--orange);
    color: var(--orange);
    border-radius: 50%;
    rotate: -11deg;
    font-size: .72rem;
    letter-spacing: .09em;
    filter: url(#ink-bleed-filter);
}

.teal-stamp {
    border-color: var(--teal);
    color: var(--teal);
}

.faded-stamp {
    opacity: .58;
}

.micro-lines {
    width: 55%;
    height: 22px;
    margin-top: 14px;
    background: repeating-linear-gradient(90deg, var(--sienna) 0 2px, transparent 2px 6px);
    opacity: .62;
}

.seal-mark {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border: 3px solid var(--teal);
    border-radius: 50%;
    color: var(--teal);
    font-family: "Righteous", system-ui;
    font-size: 1.8rem;
    rotate: -12deg;
    filter: url(#ink-bleed-filter);
}

.wash-cell::after,
.breathing-cell::after,
.illustration-cell::after {
    background: rgba(26,10,0,.3);
}

.watercolor-orb {
    width: 86%;
    height: 86%;
    border-radius: 48% 52% 45% 55%;
    filter: url(#watercolor-filter);
    animation: watercolorPulse 5.5s ease-in-out infinite;
    opacity: .82;
}

.watercolor-orb.amber {
    background:
        radial-gradient(circle at 36% 28%, rgba(245,230,208,.5), transparent 18%),
        radial-gradient(circle at 52% 48%, rgba(212,98,30,.72), rgba(196,82,10,.32) 48%, transparent 72%);
}

.watercolor-orb.teal {
    background:
        radial-gradient(circle at 38% 30%, rgba(237,224,204,.32), transparent 16%),
        radial-gradient(circle at 52% 50%, rgba(42,107,99,.7), rgba(168,102,46,.22) 50%, transparent 74%);
}

.watercolor-orb.paper {
    background:
        radial-gradient(circle at 44% 36%, rgba(245,230,208,.78), rgba(237,224,204,.34) 45%, transparent 73%),
        radial-gradient(circle at 62% 60%, rgba(196,82,10,.22), transparent 56%);
}

.holo-ring {
    position: relative;
    width: 72%;
    height: 72%;
    border: 1px solid rgba(42,107,99,.45);
    clip-path: inherit;
    animation: breathe 4s ease-in-out infinite;
    background:
        radial-gradient(circle, transparent 36%, rgba(42,107,99,.25) 37% 39%, transparent 40%),
        conic-gradient(from 90deg, transparent, rgba(212,98,30,.25), transparent, rgba(42,107,99,.3), transparent);
}

.holo-ring.twin::after {
    content: "";
    position: absolute;
    inset: 18%;
    clip-path: inherit;
    border: 1px dashed rgba(212,98,30,.52);
}

.illustration-cell svg {
    width: 80%;
    height: 80%;
    fill: none;
    stroke: var(--bright);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#watercolor-filter) drop-shadow(0 0 12px rgba(212,98,30,.28));
}

.filtered-out {
    opacity: .18 !important;
    filter: grayscale(.65) blur(.4px);
}

.revealed {
    animation: revealHex .7s var(--spring) both;
}

.flipped .hex-inner {
    animation: cardFlip .62s var(--spring);
}

.footer-hive {
    min-height: 65vh;
    padding: 80px 20px 130px;
    display: grid;
    place-items: center;
}

.footer-dissolve .hex-cell {
    opacity: .26;
    animation: dissolve 8s ease-in-out infinite;
    animation-delay: calc(var(--drift, 0) * 160ms);
}

@keyframes hatchIn {
    from { opacity: 0; transform: scale(.72) rotate(-5deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes revealHex {
    from { opacity: 0; transform: translateY(38px) scale(.88); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes watercolorPulse {
    0%, 100% { transform: scale(.94) rotate(-2deg); border-radius: 48% 52% 45% 55%; }
    50% { transform: scale(1.07) rotate(3deg); border-radius: 55% 45% 58% 42%; }
}

@keyframes breathe {
    0%, 100% { transform: scale(.86); opacity: .26; }
    50% { transform: scale(1.08); opacity: .85; }
}

@keyframes cardFlip {
    0% { transform: rotateY(0); }
    48% { transform: rotateY(92deg) scale(.92); }
    100% { transform: rotateY(0); }
}

@keyframes dissolve {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0); opacity: .28; }
    50% { transform: translateY(70px) translateX(var(--drift-x, 30px)) rotate(28deg); opacity: .05; }
}

@media (max-width: 1280px) {
    .honeycomb-container,
    .dense-grid {
        grid-template-columns: repeat(3, var(--hex-size));
    }
}

@media (max-width: 820px) {
    :root {
        --hex-size: clamp(154px, 44vw, 190px);
    }

    .honeycomb-section {
        min-height: auto;
        padding: 60px 12px;
    }

    .honeycomb-container,
    .dense-grid,
    .opening-grid {
        width: 100%;
        grid-template-columns: repeat(2, var(--hex-size));
        grid-auto-rows: calc(var(--hex-height) * .8);
    }

    .offset-section .honeycomb-container {
        transform: none;
    }

    .cell-text {
        font-size: clamp(1.4rem, 8vw, 2.3rem);
    }

    .archive-tabs {
        top: auto;
        bottom: 0;
        left: 0;
        flex-direction: row;
        justify-content: center;
        padding: 8px 4px;
        background: rgba(13,5,0,.86);
    }

    .tab,
    .tab:hover,
    .tab.active {
        width: 42px;
        height: 42px;
    }

    .tab::after {
        display: none;
    }

    .scroll-indicator {
        display: none;
    }
}
