@import url('https://fonts.googleapis.com/css2?family=Gasoek+One&family=Gowun+Dodum&family=IBM+Plex+Mono:wght@400;500&family=Noto+Serif+KR:wght@400;600;700&display=swap');

/* IBM Plex Mono only for tiny germination codes. Interactions should be exploratory: hovering a seed tag reveals an alternate phrase. */

:root {
    --seedling: #8FD694;
    --chlorophyll: #0E3B2E;
    --glass: #EAF7EE;
    --vinyl: #BFD7EA;
    --pollen: #FFD166;
    --coral: #FF8A7A;
    --soil: #171A14;
    --serif: 'Noto Serif KR', lora, serif;
    --display: 'Gasoek One', sans-serif;
    --label: 'Gowun Dodum', Inter, inter, sans-serif;
    --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    background: #EAF7EE;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #171A14;
    font-family: var(--serif);
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 6%, rgba(255, 209, 102, .35), transparent 18rem),
        linear-gradient(135deg, #EAF7EE 0%, #BFD7EA 48%, #8FD694 100%);
}

button { font: inherit; color: inherit; }

.conservatory {
    position: relative;
    isolation: isolate;
}

.chamber {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 5rem);
    border-bottom: 1px solid rgba(14, 59, 46, .16);
    background:
        radial-gradient(circle at var(--mx, 30%) var(--my, 35%), rgba(255, 255, 255, .56), transparent 13rem),
        radial-gradient(circle at 75% 15%, rgba(255, 138, 122, .15), transparent 20rem),
        linear-gradient(135deg, rgba(234, 247, 238, .82), rgba(191, 215, 234, .55) 52%, rgba(143, 214, 148, .45));
}

.chamber::before {
    content: '';
    position: absolute;
    inset: -15%;
    background-image:
        linear-gradient(112deg, transparent 0 11%, rgba(14, 59, 46, .08) 11.2% 11.45%, transparent 11.7% 100%),
        linear-gradient(72deg, transparent 0 18%, rgba(255, 255, 255, .28) 18.1% 18.4%, transparent 18.6% 100%);
    background-size: 23rem 100%, 17rem 100%;
    transform: rotate(-7deg);
    pointer-events: none;
}

.chamber::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(14, 59, 46, .14) 1px, transparent 1.6px);
    background-size: 4.8rem 4.8rem;
    mask-image: linear-gradient(135deg, transparent, black 30%, transparent 80%);
    opacity: .4;
    pointer-events: none;
}

.greenhouse-ribs {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        repeating-linear-gradient(100deg, transparent 0 8.5rem, rgba(14, 59, 46, .08) 8.58rem 8.68rem, transparent 8.75rem 17rem),
        linear-gradient(180deg, rgba(255, 255, 255, .3), transparent 34%);
    mix-blend-mode: multiply;
}

.pollen-field {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.pollen {
    position: absolute;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: #FFD166;
    opacity: var(--alpha);
    box-shadow: 0 0 18px rgba(255, 209, 102, .65);
    animation: drift var(--duration) linear infinite;
    transform: translate3d(0, 0, 0);
}

@keyframes drift {
    from { transform: translate3d(0, 104vh, 0) rotate(0deg); }
    to { transform: translate3d(var(--dx), -12vh, 0) rotate(220deg); }
}

.seed-tray {
    position: fixed;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: .7rem;
    padding: .75rem .55rem;
    border: 1px solid rgba(14, 59, 46, .24);
    border-radius: 999px;
    background: rgba(234, 247, 238, .48);
    box-shadow: inset 0 0 24px rgba(255,255,255,.55), 0 18px 50px rgba(14,59,46,.14);
    backdrop-filter: blur(16px);
}

.tray-dot {
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid rgba(14, 59, 46, .35);
    border-radius: 48% 52% 55% 45%;
    background: rgba(143, 214, 148, .38);
    cursor: pointer;
    position: relative;
    transition: transform .4s ease, background .4s ease, box-shadow .4s ease;
}

.tray-dot::before {
    content: attr(data-symbol);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--label);
    font-size: .7rem;
}

.tray-dot span {
    position: absolute;
    left: 1.7rem;
    top: -.15rem;
    white-space: nowrap;
    padding: .25rem .45rem;
    border-radius: 1rem;
    background: rgba(234, 247, 238, .78);
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .05em;
    opacity: 0;
    transform: translateX(-.35rem);
    transition: .3s ease;
}

.tray-dot:hover span { opacity: 1; transform: translateX(0); }
.tray-dot.active { background: #FFD166; box-shadow: 0 0 24px rgba(255, 209, 102, .8); transform: scale(1.18); }

.trellis {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.grow-line {
    fill: none;
    stroke: #0E3B2E;
    stroke-width: 2.2;
    stroke-linecap: round;
    opacity: .44;
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    transition: stroke-dashoffset 2.4s cubic-bezier(.22,.7,.1,1), opacity 1s ease;
}

.chamber-active .grow-line { stroke-dashoffset: 0; }
.grow-line.secondary { stroke: #8FD694; stroke-width: 2; opacity: .58; }
.grow-line.hair { stroke: #FF8A7A; stroke-width: 1.2; opacity: .42; }
.grow-line.fork { opacity: .22; }
.forking-stem.route-0 .route-a,
.forking-stem.route-1 .route-b,
.forking-stem.route-2 .route-c { stroke: #FFD166; opacity: .9; stroke-width: 3.3; filter: drop-shadow(0 0 10px rgba(255, 209, 102, .9)); }

.dormant { display: flex; align-items: flex-end; }

.hangul-shadow {
    position: absolute;
    right: -5vw;
    bottom: -8vh;
    font-family: var(--display);
    font-size: clamp(10rem, 31vw, 34rem);
    line-height: .72;
    color: rgba(14, 59, 46, .08);
    text-shadow: -24px 10px 0 rgba(143, 214, 148, .10), 18px -12px 0 rgba(255, 138, 122, .09);
    filter: blur(1.5px);
    z-index: 0;
}

.opening-copy {
    position: relative;
    z-index: 4;
    margin-left: clamp(1rem, 9vw, 10rem);
    margin-bottom: 8vh;
    color: #0E3B2E;
}

.opening-copy h1 {
    margin: .1rem 0 0;
    font-family: var(--display);
    font-size: clamp(4rem, 13vw, 13rem);
    line-height: .8;
    letter-spacing: -.05em;
    filter: blur(.35px);
    opacity: .78;
}

.poem {
    margin: 1.3rem 0 0 2vw;
    font-size: clamp(1.15rem, 2vw, 2rem);
    color: #171A14;
}

.specimen-code {
    margin: 0 0 .8rem;
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .13em;
    color: rgba(23, 26, 20, .66);
    text-transform: uppercase;
}

.fog {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background:
        radial-gradient(circle at var(--wipe-x, 52%) var(--wipe-y, 72%), transparent 0 var(--wipe-size, 0px), rgba(234, 247, 238, .38) calc(var(--wipe-size, 0px) + 30px), rgba(191, 215, 234, .74) calc(var(--wipe-size, 0px) + 150px)),
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.75), transparent 15rem),
        repeating-radial-gradient(circle at 18% 30%, rgba(255,255,255,.24) 0 .08rem, transparent .08rem .8rem),
        linear-gradient(135deg, rgba(234, 247, 238, .72), rgba(191, 215, 234, .62));
    backdrop-filter: blur(7px) saturate(1.1);
    transition: opacity 1.1s ease;
}

.fog.cleared { opacity: .34; }

.maybe-seed {
    width: 3.2rem;
    height: 1.8rem;
    position: relative;
}

.maybe-seed span {
    position: absolute;
    inset: 0;
    border-radius: 48% 52% 50% 50%;
    background: #FFD166;
    box-shadow: 0 0 28px rgba(255, 209, 102, .78);
    transform-origin: center;
    animation: choose 5.4s ease-in-out infinite;
}

.maybe-seed span:nth-child(2) { opacity: .34; transform: translateX(-1.1rem) scale(.75); animation-delay: .35s; }
.maybe-seed span:nth-child(3) { opacity: .28; transform: translateX(1.15rem) scale(.75); animation-delay: .7s; }
.hero-seed { margin: .85rem 0 0 3vw; }

@keyframes choose {
    0%, 100% { transform: translateX(0) scale(1); }
    45% { transform: translateX(var(--seed-dx, .45rem)) translateY(var(--seed-dy, -.18rem)) scale(.88); }
    72% { transform: translateX(0) scale(1.05); }
}

.seed-tag {
    position: absolute;
    z-index: 6;
    border: 1px solid rgba(14, 59, 46, .25);
    background: rgba(234, 247, 238, .68);
    backdrop-filter: blur(12px);
    border-radius: .2rem;
    padding: .55rem .8rem;
    font-family: var(--label);
    font-size: .82rem;
    letter-spacing: .06em;
    box-shadow: 0 10px 26px rgba(14, 59, 46, .12);
    cursor: pointer;
    transform: rotate(var(--r, -3deg));
    transition: transform .35s ease, background .35s ease;
}

.seed-tag::before {
    content: '';
    position: absolute;
    width: 1px;
    height: 5rem;
    bottom: 100%;
    left: 30%;
    background: rgba(14, 59, 46, .25);
    transform: rotate(18deg);
}

.seed-tag:hover,
.seed-tag.alt-visible { transform: rotate(1deg) translateY(-.35rem); background: rgba(255, 209, 102, .54); }

.reveal-tag { left: 57%; bottom: 18vh; --r: 4deg; }
.tag-east { right: 16%; top: 22%; --r: -7deg; }
.tag-west { left: 14%; top: 18%; --r: 5deg; }
.tag-south { left: 20%; bottom: 15%; --r: -4deg; }
.final-tag { right: 18%; bottom: 18%; --r: 3deg; }

.beads i {
    position: absolute;
    z-index: 6;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 25%, rgba(255,255,255,.95), rgba(191, 215, 234, .3) 45%, rgba(14, 59, 46, .08));
    box-shadow: inset 0 0 10px rgba(255,255,255,.6), 0 8px 18px rgba(14, 59, 46, .1);
    animation: bead 8s ease-in-out infinite;
}

.beads i:nth-child(1) { width: 1.1rem; height: 1.1rem; left: 24%; top: 18%; }
.beads i:nth-child(2) { width: .6rem; height: .6rem; left: 68%; top: 27%; animation-delay: .5s; }
.beads i:nth-child(3) { width: 1.6rem; height: 1.6rem; left: 78%; top: 61%; animation-delay: 1.3s; }
.beads i:nth-child(4) { width: .85rem; height: .85rem; left: 42%; top: 45%; animation-delay: 2s; }
.beads i:nth-child(5) { width: 1.2rem; height: 1.2rem; left: 53%; top: 12%; animation-delay: 2.7s; }
.beads i:nth-child(6) { width: .7rem; height: .7rem; left: 18%; top: 64%; animation-delay: 3.2s; }

@keyframes bead {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(1.8rem) scale(1.08); }
}

.vellum-panel {
    position: relative;
    z-index: 4;
    max-width: min(34rem, 76vw);
    padding: clamp(1.4rem, 3vw, 3rem);
    border: 1px solid rgba(14, 59, 46, .22);
    background: linear-gradient(135deg, rgba(234, 247, 238, .72), rgba(255, 255, 255, .38));
    box-shadow: 0 28px 80px rgba(14, 59, 46, .15), inset 0 0 40px rgba(255,255,255,.36);
    backdrop-filter: blur(18px);
}

.vellum-panel h2 {
    margin: 0 0 1rem;
    font-family: var(--serif);
    font-size: clamp(2.3rem, 5.8vw, 6.4rem);
    line-height: 1.02;
    font-weight: 700;
    color: #0E3B2E;
}

.vellum-panel p:not(.specimen-code) {
    margin: 0;
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    line-height: 1.8;
}

.tilted { transform: rotate(-4deg); }
.warm-glass { min-height: 108vh; padding-left: 14vw; padding-top: 18vh; }
.warm-panel { margin-left: 6vw; }

.vertical-label {
    position: absolute;
    right: 10vw;
    bottom: 13vh;
    z-index: 4;
    writing-mode: vertical-rl;
    font-family: var(--label);
    letter-spacing: .16em;
    color: #0E3B2E;
    background: rgba(191, 215, 234, .4);
    border-left: 1px solid rgba(14, 59, 46, .2);
    padding: 1rem .6rem;
}

.seed-packet {
    position: absolute;
    z-index: 3;
    right: 22vw;
    top: 50vh;
    width: 11rem;
    height: 14rem;
    padding: 1rem;
    background: linear-gradient(160deg, rgba(255,255,255,.5), rgba(255, 209, 102, .28));
    border: 1px solid rgba(14, 59, 46, .24);
    transform: rotate(12deg);
}

.seed-packet::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 45%;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    background: rgba(255, 138, 122, .2);
}

.seed-packet span { font-family: var(--mono); font-size: .7rem; }
.seed-packet strong { position: absolute; right: .6rem; bottom: .2rem; font-family: var(--display); font-size: 5rem; color: rgba(14, 59, 46, .2); }

.forking-stem { min-height: 112vh; }
.fork-node { position: absolute; left: 48%; top: 48%; z-index: 5; transform: translate(-50%, -50%); }
.route-seed { --seed-dx: 1.2rem; --seed-dy: -.5rem; }
.fork-copy { position: absolute; right: 9vw; top: 22vh; transform: rotate(3deg); }

.pollination { min-height: 106vh; }
.botanical-diagram {
    position: absolute;
    left: 8vw;
    top: 12vh;
    width: min(58vw, 48rem);
    height: min(62vh, 35rem);
    z-index: 3;
}

.botanical-diagram svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.pod {
    position: absolute;
    z-index: 5;
    width: 5.4rem;
    height: 8rem;
    border: 1px solid rgba(14, 59, 46, .3);
    border-radius: 55% 45% 50% 50% / 62% 58% 42% 38%;
    background: radial-gradient(circle at 36% 22%, rgba(234, 247, 238, .9), rgba(143, 214, 148, .48) 47%, rgba(14, 59, 46, .2));
    cursor: pointer;
    transition: transform .45s ease, box-shadow .45s ease;
}

.pod span {
    position: absolute;
    inset: 18% 42%;
    border-radius: 999px;
    background: rgba(14, 59, 46, .3);
}

.pod:hover,
.pod.open { transform: translateY(-.7rem) rotate(4deg); box-shadow: 0 0 40px rgba(255, 209, 102, .72); }
.pod.open span { background: #FFD166; box-shadow: 0 0 25px #FFD166; }
#podA { left: 6%; bottom: 8%; transform: rotate(-18deg); }
#podB { left: 46%; top: 28%; transform: rotate(8deg); }
#podC { right: 0; top: 2%; transform: rotate(23deg); }
.pollination-copy { position: absolute; right: 8vw; bottom: 16vh; max-width: 38rem; }

.aperture {
    position: absolute;
    z-index: 4;
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    right: 28vw;
    top: 18vh;
    transform: scale(0);
    background: radial-gradient(circle, #BFD7EA 0 42%, rgba(255,255,255,.55) 43% 55%, transparent 56%);
    box-shadow: 0 0 60px rgba(191, 215, 234, .75), inset 0 0 30px rgba(255,255,255,.85);
    transition: transform .7s cubic-bezier(.2,.8,.2,1);
}

.aperture.open { transform: scale(1); }

.open-sky {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 58% 7%, rgba(191, 215, 234, .96) 0 23%, transparent 24%),
        linear-gradient(135deg, #EAF7EE 0%, #BFD7EA 48%, #8FD694 100%);
}

.sky-cutout {
    position: absolute;
    right: -4vw;
    top: -5vh;
    width: min(66vw, 54rem);
    height: min(55vw, 42rem);
    border-radius: 0 0 0 70%;
    background: radial-gradient(circle at 48% 38%, rgba(255,255,255,.9), #BFD7EA 38%, rgba(191, 215, 234, .42) 64%, transparent 65%);
    box-shadow: inset 0 -28px 70px rgba(234, 247, 238, .8);
    z-index: 2;
}

.sky-cutout span {
    position: absolute;
    right: 8%;
    top: 18%;
    font-family: var(--display);
    font-size: clamp(4rem, 12vw, 12rem);
    color: rgba(14, 59, 46, .12);
}

.sky-copy { position: absolute; left: 13vw; bottom: 16vh; transform: rotate(-2deg); }

@media (max-width: 760px) {
    .seed-tray { left: .5rem; }
    .chamber { padding: 5rem 1.2rem 3rem 3rem; }
    .opening-copy { margin-left: 0; }
    .warm-glass { padding-left: 3rem; }
    .vellum-panel, .fork-copy, .pollination-copy, .sky-copy { position: relative; inset: auto; max-width: 100%; margin-top: 18vh; }
    .botanical-diagram { position: relative; width: 100%; height: 24rem; left: auto; top: auto; }
    .seed-tag { display: none; }
}
