/* ppuzzl.com — Generative Tessellation */
:root {
    --emerald: #00c97b;
    --matrix: #0a1f1a;
    --dim: #1a3d33;
    --bright: #33ffaa;
    --amber: #e8a832;
    --phantom: #d4e8df;
    --charcoal: #0f2e26;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'IBM Plex Mono', monospace; font-weight: 400; font-size: 16px; line-height: 1.7; color: var(--phantom); background: var(--matrix); overflow-x: hidden; }

.scenes { scroll-snap-type: y mandatory; overflow-y: scroll; height: 100vh; }
.scene { scroll-snap-align: start; height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }

#voronoi-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.genesis-content { position: relative; z-index: 1; text-align: center; }
.site-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 56px; letter-spacing: 0.04em; color: var(--phantom); opacity: 0; transition: opacity 0.6s; }
.site-title.on span { display: inline-block; opacity: 0; animation: letterIn 0.3s forwards; }
.site-title.on { opacity: 1; }
@keyframes letterIn { to { opacity: 1; } }
.seed-hash { font-family: 'Orbitron', sans-serif; font-weight: 500; font-size: 24px; color: var(--amber); margin-top: 16px; opacity: 0; transition: opacity 0.4s 0.5s; }
.seed-hash.on { opacity: 1; }

.hex-nav { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); z-index: 100; display: flex; flex-direction: column; gap: 12px; }
.hex-nav-item { width: 16px; height: 18px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); background: var(--dim); cursor: pointer; transition: background 0.3s, box-shadow 0.3s; }
.hex-nav-item.active { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.hex-nav-item:hover { background: var(--bright); }

.hex-rosette { display: grid; grid-template-columns: repeat(5, 100px); grid-template-rows: repeat(3, 100px); gap: 8px; justify-content: center; align-items: center; }
.hex-cell { width: 100px; height: 110px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); background: var(--dim); display: flex; align-items: center; justify-content: center; transform: scale(0); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.hex-cell.on { transform: scale(1); }
.hex-inner { padding: 12px; text-align: center; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.hex-text { font-size: 11px; line-height: 1.5; color: var(--phantom); }
.hex-center { grid-column: 3; grid-row: 2; width: 120px; height: 130px; background: var(--charcoal); box-shadow: 0 0 12px rgba(0,201,123,0.2); }
.hex-ring:nth-child(2) { grid-column: 2; grid-row: 1; }
.hex-ring:nth-child(3) { grid-column: 4; grid-row: 1; }
.hex-ring:nth-child(4) { grid-column: 1; grid-row: 2; }
.hex-ring:nth-child(5) { grid-column: 5; grid-row: 2; }
.hex-ring:nth-child(6) { grid-column: 2; grid-row: 3; }
.hex-ring:nth-child(7) { grid-column: 4; grid-row: 3; }

.fractal-svg { width: 60px; height: 60px; }
.fractal-path { stroke-dasharray: 500; stroke-dashoffset: 500; transition: stroke-dashoffset 3s ease-out; }
.hex-cell.on .fractal-path { stroke-dashoffset: 0; }

.hex-honeycomb { display: grid; grid-template-columns: repeat(7, 56px); grid-template-rows: repeat(5, 48px); gap: 4px; justify-content: center; }
.honey-hex { width: 56px; height: 62px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); background: var(--dim); transition: background-color 0.4s ease; box-shadow: 0 0 6px rgba(0,201,123,0.15); opacity: 0; }
.honey-hex.on { opacity: 1; }
.honey-hex.excited { background: var(--emerald); }
.honey-hex.refractory { background: var(--bright); }
.honey-hex[data-idx="0"] { grid-column: 4; grid-row: 1; }
.honey-hex[data-idx="1"] { grid-column: 3; grid-row: 1; }
.honey-hex[data-idx="2"] { grid-column: 5; grid-row: 1; }
.honey-hex[data-idx="3"] { grid-column: 2; grid-row: 2; }
.honey-hex[data-idx="4"] { grid-column: 3; grid-row: 2; }
.honey-hex[data-idx="5"] { grid-column: 4; grid-row: 2; }
.honey-hex[data-idx="6"] { grid-column: 5; grid-row: 2; }
.honey-hex[data-idx="7"] { grid-column: 6; grid-row: 2; }
.honey-hex[data-idx="8"] { grid-column: 2; grid-row: 3; }
.honey-hex[data-idx="9"] { grid-column: 3; grid-row: 3; }
.honey-hex[data-idx="10"] { grid-column: 4; grid-row: 3; }
.honey-hex[data-idx="11"] { grid-column: 5; grid-row: 3; }
.honey-hex[data-idx="12"] { grid-column: 6; grid-row: 3; }
.honey-hex[data-idx="13"] { grid-column: 2; grid-row: 4; }
.honey-hex[data-idx="14"] { grid-column: 3; grid-row: 4; }
.honey-hex[data-idx="15"] { grid-column: 4; grid-row: 4; }
.honey-hex[data-idx="16"] { grid-column: 5; grid-row: 4; }
.honey-hex[data-idx="17"] { grid-column: 6; grid-row: 4; }
.honey-hex[data-idx="18"] { grid-column: 4; grid-row: 5; }

.signal-cluster { display: flex; flex-direction: column; gap: 20px; max-width: 600px; padding: 0 24px; }
.signal-hex { clip-path: polygon(5% 0%, 95% 0%, 100% 50%, 95% 100%, 5% 100%, 0% 50%); background: var(--charcoal); padding: 24px 40px; opacity: 0; transform: translateY(12px); transition: opacity 0.5s, transform 0.5s; }
.signal-hex.visible { opacity: 1; transform: translateY(0); }
.signal-hex.left { align-self: flex-start; }
.signal-hex.right { align-self: flex-end; }
.signal-text { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 14px; color: var(--bright); }

.recursion-hex { width: 300px; height: 330px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); background: var(--dim); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; transform: scale(0.1); transition: transform 2s cubic-bezier(0.22, 1, 0.36, 1); }
.recursion-hex.on { transform: scale(1); }
.recursion-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 28px; color: var(--phantom); }
.recursion-seed { font-family: 'Orbitron', sans-serif; font-weight: 500; font-size: 18px; color: var(--amber); animation: seedPulse 3s infinite; }
@keyframes seedPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.reseed-btn { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 12px; letter-spacing: 0.08em; color: var(--matrix); background: var(--amber); border: none; padding: 8px 20px; clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%); cursor: pointer; transition: background 0.2s; }
.reseed-btn:hover { background: var(--bright); }

@media (max-width: 768px) {
    .site-title { font-size: 32px; }
    .hex-rosette { grid-template-columns: repeat(5, 70px); grid-template-rows: repeat(3, 70px); }
    .hex-cell { width: 70px; height: 77px; }
    .hex-center { width: 84px; height: 92px; }
    .hex-nav { right: 8px; }
    .recursion-hex { width: 220px; height: 240px; }
    .recursion-title { font-size: 20px; }
}
