/* ═══════════════════════════════════════════════════════════════════════════
   world-adventure-time.css — SCENE 03 · the Land of Ooo

   A day out in an animated world: layered sky, drifting clouds, cut-out cast,
   a print stuck to the hillside, and field notes on paper. The world's own
   chrome is a warm Bakelite bar, not the void's.
   ═══════════════════════════════════════════════════════════════════════════ */

.world--at {
    position: relative;
    min-height: 100svh;
    overflow: clip;
    color: var(--scene-ink);
}

/* ── scenery ───────────────────────────────────────────────────────────── */
.at__scenery { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.at__sky {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg,
            oklch(80% 0.075 235) 0%,
            oklch(90% 0.045 225) 34%,
            oklch(97% 0.020 100) 58%,
            oklch(93% 0.045 96) 72%,
            oklch(83% 0.075 138) 100%);
}
.at__sun {
    position: absolute; right: 12%; top: 12%;
    width: clamp(80px, 11vw, 148px); aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, oklch(99% 0.10 100) 0 42%, oklch(98% 0.09 96 / 0.5) 60%, transparent 74%);
}
.at__clouds { position: absolute; inset: 0; }
.at__clouds i {
    position: absolute;
    display: block;
    width: 96px; height: 32px;
    border-radius: 40px;
    background: oklch(100% 0 0 / 0.92);
    box-shadow:
        30px 6px 0 -4px oklch(100% 0 0 / 0.92),
        -28px 8px 0 -8px oklch(100% 0 0 / 0.92),
        6px -10px 0 -6px oklch(100% 0 0 / 0.92);
    animation: cloud-drift 150s linear infinite;
}
.at__clouds--far i { opacity: 0.62; scale: 0.8; }
.at__clouds i:nth-child(1) { top: 14%; left: -20%; animation-duration: 190s; }
.at__clouds i:nth-child(2) { top: 26%; left: -60%; scale: 1.25; animation-duration: 240s; animation-delay: -60s; }
.at__clouds i:nth-child(3) { top: 8%; left: -90%; scale: 0.7; animation-duration: 210s; animation-delay: -120s; }
.at__clouds--near i:nth-child(1) { top: 34%; left: -40%; scale: 0.9; animation-duration: 170s; animation-delay: -30s; }
.at__clouds--near i:nth-child(2) { top: 20%; left: -80%; scale: 0.65; animation-duration: 200s; animation-delay: -150s; }
@keyframes cloud-drift {
    from { transform: translateX(0); }
    to { transform: translateX(180vw); }
}

.at__hills {
    position: absolute; left: -12%; right: -12%; bottom: 0;
    border-radius: 50% 50% 0 0 / 62% 62% 0 0;
}
.at__hills--far {
    height: 46%;
    bottom: 18%;
    background: oklch(78% 0.10 150);
    opacity: 0.75;
}
.at__hills--far::before {
    content: ''; position: absolute; left: 46%; right: -20%; bottom: 0;
    height: 74%;
    border-radius: 50% 50% 0 0 / 90% 90% 0 0;
    background: oklch(74% 0.10 160);
    opacity: 0.8;
}
.at__hills--near {
    height: 38%;
    bottom: 6%;
    background: oklch(68% 0.13 145);
}
.at__hills--near::before {
    content: ''; position: absolute; left: -16%; right: 40%; bottom: 0;
    height: 82%;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: oklch(72% 0.13 140);
}
.at__grass {
    position: absolute; left: 0; right: 0; bottom: 0; height: 9%;
    background: oklch(58% 0.14 146);
}
.at__grass::before {
    content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 20px;
    background: radial-gradient(circle at 10px 10px, oklch(58% 0.14 146) 0 10px, transparent 10.5px) repeat-x 0 0 / 20px 20px;
}

/* ── the world's chrome: a warm bar and a hand-lettered wordmark ───────── */
.world--at .scene-bar {
    background: oklch(100% 0 0 / 0.62);
    border-bottom: 2px dashed oklch(29% 0.045 280 / 0.3);
    color: var(--scene-ink);
}
.world--at .scene-bar__word { font-family: var(--font-toon); letter-spacing: 0.06em; font-size: var(--text-2xs); text-transform: none; }
.world--at .scene-bar__mark:hover .scene-bar__sigil svg { stroke: var(--scene-accent); }
.world--at .tool { border-color: oklch(29% 0.045 280 / 0.22); color: var(--scene-ink); }
.world--at .tool:hover { background: oklch(100% 0 0 / 0.7); }

/* ── the head ──────────────────────────────────────────────────────────── */
.at__head {
    position: relative; z-index: 10;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: clamp(var(--space-3), 1.6vh, var(--space-6)) var(--page-gutter) 0;
}
.at__eyebrow {
    font-family: var(--font-mono); font-size: var(--text-2xs);
    letter-spacing: var(--tracking-caps); text-transform: uppercase;
    color: oklch(40% 0.055 285);
}
.at__name {
    margin: var(--space-1) 0 var(--space-1);
    font-family: var(--font-toon);
    font-weight: 400;
    font-size: clamp(2.6rem, 6.6vw, 5.4rem);
    line-height: 0.95;
    color: oklch(30% 0.05 285);
    text-shadow: 3px 3px 0 oklch(100% 0 0 / 0.92), -1px -1px 0 oklch(100% 0 0 / 0.92);
    transform: rotate(-1.4deg);
    transform-origin: left center;
}
.at__sub {
    font-family: var(--font-toon);
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    color: oklch(38% 0.075 340);
}

/* ── the stage ─────────────────────────────────────────────────────────── */
.at__stage {
    position: relative; z-index: 10;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: var(--space-3) var(--page-gutter) var(--space-6);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: end;
    gap: var(--space-3) clamp(var(--space-6), 4vw, var(--space-12));
    min-height: 0;
}

.at__hint {
    position: static;
    grid-column: 1 / -1;
    justify-self: start;
    align-self: start;
    padding: 8px 16px;
    background: oklch(98% 0.03 92);
    border: 2px solid oklch(30% 0.05 285);
    border-radius: 6px;
    font-family: var(--font-toon);
    font-size: var(--text-sm);
    color: oklch(30% 0.05 285);
    cursor: pointer;
    transform: rotate(-2deg);
    box-shadow: 4px 4px 0 oklch(30% 0.05 285 / 0.22);
    transition: transform var(--dur-fast) var(--ease-toon), box-shadow var(--dur-fast) var(--ease-toon);
}
.at__hint:hover { transform: rotate(-2deg) translateY(-2px); box-shadow: 6px 6px 0 oklch(30% 0.05 285 / 0.24); }
.at__hint:active { transform: rotate(-2deg) translateY(1px); box-shadow: 2px 2px 0 oklch(30% 0.05 285 / 0.2); }

.at__print {
    position: relative;
    grid-column: 1;
    margin: 0;
    padding: 12px 12px 8px;
    background: oklch(100% 0 0);
    border-radius: var(--radius-sticker);
    box-shadow: 0 18px 40px -18px oklch(30% 0.05 285 / 0.55);
    transform: rotate(-2.2deg);
    max-width: min(400px, 44vw);
    transition: transform var(--dur-base) var(--ease-toon);
    cursor: pointer;
}
.at__print:hover { transform: rotate(-1deg) translateY(-4px); }
.at__print-inner { display: block; overflow: hidden; border-radius: 4px; }
.at__print img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.at__caption {
    padding-top: 8px;
    font-family: var(--font-toon);
    font-size: var(--text-sm);
    text-align: center;
    color: oklch(32% 0.05 285);
}

.at__cast { display: flex; align-items: end; justify-content: flex-end; gap: 0; grid-column: 2; }
.at__doll {
    position: relative;
    display: grid; justify-items: center;
    gap: 4px;
    cursor: pointer;
    transform-origin: bottom center;
    transition: transform var(--dur-base) var(--ease-toon);
}
.at__doll:nth-child(2) { margin-left: -34px; }
.at__doll-art { display: block; width: clamp(96px, 12vw, 168px); }
.at__doll-art img { filter: drop-shadow(0 12px 14px oklch(30% 0.05 285 / 0.32)); }
.at__doll-name {
    font-family: var(--font-toon);
    font-size: var(--text-sm);
    padding: 2px 10px;
    background: oklch(100% 0 0 / 0.92);
    border: 2px solid oklch(30% 0.05 285 / 0.5);
    border-radius: 20px;
    color: oklch(30% 0.05 285);
}
.at__doll:hover, .at__doll:focus-visible { transform: translateY(-8px) rotate(-2deg); }
.at__doll:nth-child(2):hover, .at__doll:nth-child(2):focus-visible { transform: translateY(-8px) rotate(2deg); }

/* ── field notes ───────────────────────────────────────────────────────── */
.at__notes {
    position: fixed; z-index: var(--z-panel);
    right: var(--page-gutter); top: calc(var(--bar-height) + 12px);
    width: min(320px, calc(100vw - 2 * var(--space-4)));
    animation: notes-in var(--dur-base) var(--ease-toon) both;
}
@keyframes notes-in {
    from { opacity: 0; transform: translateY(-8px) rotate(2deg); }
    to { opacity: 1; transform: rotate(-1deg); }
}
.at__notes-inner {
    padding: var(--space-5);
    background: oklch(99% 0.02 95);
    border: 3px solid oklch(30% 0.05 285);
    border-radius: 14px;
    box-shadow: 8px 8px 0 oklch(30% 0.05 285 / 0.18);
    color: oklch(28% 0.05 285);
    display: grid; gap: var(--space-2);
}
.at__notes-kicker {
    font-family: var(--font-mono); font-size: var(--text-3xs);
    letter-spacing: var(--tracking-caps); text-transform: uppercase;
    color: oklch(45% 0.08 340);
}
.at__titlecard { font-family: var(--font-toon); font-size: var(--text-lg); line-height: 1.15; }
.at__stars { color: oklch(72% 0.14 80); letter-spacing: 0.18em; font-size: var(--text-sm); }
.at__notes-line { font-size: var(--text-sm); color: oklch(38% 0.05 300); }
.at__meter {
    margin-top: var(--space-2);
    font-family: var(--font-mono); font-size: var(--text-2xs);
    letter-spacing: 0.1em; text-transform: uppercase;
    color: oklch(42% 0.05 300);
}
.at__meter b { font-size: var(--text-lg); color: oklch(45% 0.15 340); }
.at__meter span { opacity: 0.7; }
.at__stamp {
    margin-top: var(--space-2);
    padding: 8px 10px;
    border: 2px dashed oklch(45% 0.15 340);
    border-radius: 8px;
    font-family: var(--font-toon);
    font-size: var(--text-sm);
    color: oklch(42% 0.14 340);
    text-align: center;
    animation: stamp-in var(--dur-slow) var(--ease-toon) both;
}
@keyframes stamp-in {
    from { opacity: 0; transform: scale(1.3) rotate(-6deg); }
    to { opacity: 1; transform: none; }
}
.at__close {
    justify-self: start;
    margin-top: var(--space-2);
    min-height: var(--control-md);
    padding: 0 14px;
    border: 2px solid oklch(30% 0.05 285);
    border-radius: 20px;
    font-family: var(--font-toon);
    font-size: var(--text-sm);
    color: oklch(30% 0.05 285);
    cursor: pointer;
    background: oklch(100% 0 0 / 0.6);
}
.at__close:hover { background: oklch(100% 0 0); }

/* ── a cast card ───────────────────────────────────────────────────────── */
.at__card {
    position: fixed; z-index: calc(var(--z-panel) + 1);
    left: 50%; bottom: clamp(var(--space-6), 6vh, var(--space-12));
    translate: -50% 0;
    display: flex; align-items: center; gap: var(--space-4);
    width: min(420px, calc(100vw - 2 * var(--space-4)));
    padding: var(--space-4);
    background: oklch(99% 0.02 95);
    border: 3px solid oklch(30% 0.05 285);
    border-radius: 14px;
    box-shadow: 10px 10px 0 oklch(30% 0.05 285 / 0.2);
    animation: card-in var(--dur-base) var(--ease-toon) both;
}
@keyframes card-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
.at__card-art { display: block; width: 96px; flex: 0 0 96px; }
.at__card-art img { width: 100%; height: auto; }
.at__card-body { display: grid; gap: 2px; }
.at__card-kicker {
    font-family: var(--font-mono); font-size: var(--text-3xs);
    letter-spacing: var(--tracking-caps); text-transform: uppercase;
    color: oklch(45% 0.08 340);
}
.at__card-name {
    font-family: var(--font-toon);
    font-size: var(--text-2xl);
    line-height: 1;
    color: oklch(28% 0.05 285);
}


/* ── entry device: three pastel circles bloom ──────────────────────────── */
.entry--at { background: oklch(97% 0.02 100); }
.entry--at .entry__word {
    font-family: var(--font-toon);
    color: oklch(32% 0.07 340);
    text-shadow: 2px 2px 0 oklch(100% 0 0);
}
.entry--at .entry__orbs span {
    position: absolute; left: 50%; top: 50%;
    width: 40vmin; aspect-ratio: 1; border-radius: 50%;
    translate: -50% -50%;
    animation: orb-bloom 1.4s var(--ease-toon) forwards;
}
.entry--at .entry__orbs span:nth-child(1) { background: oklch(86% 0.09 230); }
.entry--at .entry__orbs span:nth-child(2) { background: oklch(80% 0.12 140); animation-delay: 0.08s; }
.entry--at .entry__orbs span:nth-child(3) { background: oklch(84% 0.11 350); animation-delay: 0.16s; }
@keyframes orb-bloom {
    0% { transform: scale(0); opacity: 0.9; }
    60% { transform: scale(2.6); opacity: 0.75; }
    100% { transform: scale(5.4); opacity: 0; }
}

/* ── narrow ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .at__stage {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        gap: var(--space-4);
        padding-bottom: var(--space-8);
    }
    .at__hint { position: static; justify-self: start; }
    .at__print { grid-column: 1; max-width: none; width: 100%; transform: rotate(-1.2deg); }
    .at__cast { grid-column: 1; justify-content: flex-start; }
    .at__notes { top: 50%; translate: 0 -50%; right: var(--space-4); }
    .at__notes-inner { max-height: 76svh; overflow: auto; }
}
