/* Jimothy Saves Christmas, the build-in-public site.
   Tokens are the Figma design system's Critters mode ("Jimothy tokens").
   The Villains mode (teal, tinsel) is never used here before the reveal. */

@font-face { font-family: Fredoka; font-weight: 600; font-display: swap; src: url(/fonts/fredoka-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Fredoka; font-weight: 700; font-display: swap; src: url(/fonts/fredoka-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 400; font-display: swap; src: url(/fonts/nunito-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(/fonts/nunito-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Kalam; font-weight: 400; font-display: swap; src: url(/fonts/kalam-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Kalam; font-weight: 700; font-display: swap; src: url(/fonts/kalam-latin-700-normal.woff2) format('woff2'); }

:root {
  --night-900: #0e1630; --night-800: #17213f; --night-700: #22305a; --night-600: #2c3d6e;
  --snow-100: #eef3fa; --snow-300: #c9d6ea; --snow-500: #8fa3cc;
  --paper-100: #f6ebd3; --paper-300: #e3d0a8;
  --ink-900: #2b2116; --ink-600: #6b5640;
  --warm-400: #ffc861; --warm-600: #e89a2e;
  --scarf-red: #d2463c; --scarf-ink: #8e2a23;
  --house-red: #d94a3d; --house-blue: #3d7bd9; --house-green: #3fa35a; --house-yellow: #f2c230;
  --house-purple: #8a5bd6; --house-orange: #ef8a2e;
  --display: Fredoka, 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: Nunito, system-ui, sans-serif;
  --hand: Kalam, 'Comic Sans MS', cursive;
  --radius: 14px;
  --gutter: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--night-900); color: var(--snow-100); font: 400 1.0625rem/1.6 var(--body); }
h1, h2, h3, p, li, dd, dt, figcaption { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--warm-400); text-underline-offset: 3px; }
a:hover { color: var(--warm-600); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--warm-400); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2 * var(--gutter)); padding-block: 48px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--warm-400); color: var(--ink-900); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 8px; }
main > section, .calendar, .videos, .friends, .made, .numbers, .meet, .pitch { margin-block: clamp(56px, 8vw, 96px); }
.section-lede { color: var(--snow-300); max-width: 62ch; }
.caption, figcaption { font: 400 .95rem/1.4 var(--hand); color: var(--snow-300); margin-top: 8px; }

/* Buttons (Figma Button: Primary, Secondary, Ghost) */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px; border-radius: 12px;
  font: 600 1.05rem/1.2 var(--display); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background-color .15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--warm-400); color: var(--ink-900); border-color: var(--warm-600); box-shadow: 0 3px 0 var(--warm-600); }
.btn--primary:hover { background: var(--warm-600); color: var(--ink-900); }
.btn--secondary { background: var(--paper-100); color: var(--ink-900); border-color: var(--paper-300); box-shadow: 0 3px 0 var(--paper-300); }
.btn--secondary:hover { background: var(--paper-300); color: var(--ink-900); }
.btn--ghost { background: transparent; color: var(--snow-100); border-color: var(--snow-300); }
.btn--ghost:hover { border-color: var(--warm-400); color: var(--warm-400); }
.btn--small { min-height: 38px; padding: 6px 14px; font-size: .95rem; box-shadow: none; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--night-900) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--night-700); }
.bar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.bar__title { font: 600 1.1rem var(--display); color: var(--snow-100); text-decoration: none; }
.bar nav { display: flex; align-items: center; gap: 18px; }
.bar nav a:not(.btn) { color: var(--snow-300); text-decoration: none; font-weight: 700; }
.bar nav a:not(.btn):hover { color: var(--warm-400); }
@media (max-width: 520px) { .bar nav a:not(.btn) { display: none; } }

/* Gift tags and the clock tag (Figma ClockTag) */
.clock-tag { display: inline-flex; align-items: center; gap: 10px; background: var(--paper-100); color: var(--ink-900);
  font: 700 1.05rem/1 var(--hand); padding: 10px 16px 9px 22px; border-radius: 8px 14px 14px 8px; position: relative; margin: 0 0 18px;
  box-shadow: 0 3px 0 var(--paper-300); }
.clock-tag::before { content: ''; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--night-900); }
.tag-card { background: var(--paper-100); color: var(--ink-900); border-radius: 10px 18px 18px 10px; padding: 22px 22px 20px 30px; position: relative;
  box-shadow: 0 4px 0 var(--paper-300), 0 14px 30px rgb(0 0 0 / .25); }
.tag-card::before { content: ''; position: absolute; left: 12px; top: 22px; width: 9px; height: 9px; border-radius: 50%; background: var(--night-900); box-shadow: 0 0 0 2px var(--paper-300); }
.tag-card a { color: #9a5a0c; }
.tag-card a:hover { color: var(--ink-900); }
.tag-card h3 { font-family: var(--hand); font-weight: 700; font-size: 1.45rem; }
.tag-card p { margin: 0; color: var(--ink-900); }

/* Hero: the title and the snow globe */
.hero { position: relative; isolation: isolate; overflow: hidden; margin: 0 !important; background: var(--night-900); border-bottom: 1px solid var(--night-700); }
.hero__snow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero__in { display: grid; gap: 8px 40px; align-items: center; padding-block: 40px 48px; }
@media (min-width: 900px) { .hero__in { grid-template-columns: 1fr 1.05fr; padding-block: 56px 64px; } }
.banner { display: inline-block; background: var(--scarf-red); color: var(--snow-100); font-size: clamp(2.2rem, 1.1rem + 4.2vw, 4.2rem); font-weight: 700;
  padding: .12em .45em .18em; border-radius: 18px; box-shadow: 0 6px 0 var(--scarf-ink); margin-bottom: .35em; max-width: 100%; }
.hero__line { font: 600 clamp(1.3rem, 1rem + 1.2vw, 1.8rem)/1.3 var(--display); margin-bottom: .4em; }
.hero__sub { color: var(--snow-300); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 14px; }
.hero__note { font: 400 .95rem var(--hand); color: var(--snow-300); }
@media (max-width: 899px) { .hero__globe { order: -1; } }

.globe { position: relative; aspect-ratio: 520 / 440; width: 100%; max-width: 620px; margin-inline: auto; touch-action: pan-y; }
.globe__poster { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .6s; }
.globe__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s; cursor: grab; }
.globe__canvas:active { cursor: grabbing; }
.globe--live .globe__canvas { opacity: 1; }
.globe--live .globe__poster { opacity: 0; }
.globe--shake .globe__poster { animation: globe-shake .6s ease-out; transform-origin: 40% 90%; }
@keyframes globe-shake { 20% { transform: rotate(-3deg); } 40% { transform: rotate(2.5deg); } 60% { transform: rotate(-1.5deg); } 80% { transform: rotate(.8deg); } }
.pw--new { animation: window-pop 1.2s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes window-pop { 0% { transform: scale(2.2); } 100% { transform: scale(1); } }
.globe__bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.globe__caption { text-align: center; font: 400 .95rem var(--hand); color: var(--snow-300); margin: 10px 0 0; }
@media (prefers-reduced-motion: reduce) { .globe__hint { display: none; } .globe--shake .globe__poster, .pw--new { animation: none; } }

/* Hero, second form: a walk in the woods with the real Jimothy behind the words */
.world { position: relative; overflow: hidden; background: #3a4c78; outline: none; touch-action: none; user-select: none; -webkit-user-select: none; }
.world:focus-visible { box-shadow: inset 0 0 0 3px var(--warm-400); }
.world__poster, .world__poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 66% 50%; }
.world__poster { transition: opacity .8s; }
.world__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s; cursor: grab; }
.world__canvas:active { cursor: grabbing; }
.hero--live .world__canvas { opacity: 1; }
.hero--live .world__poster { opacity: 0; }
.hero--world .hero__snow { display: none; }
.world__help { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; max-width: calc(100% - 32px); width: max-content;
  background: rgb(14 22 48 / .72); color: var(--snow-100); font: 400 .95rem/1.35 var(--hand); padding: 6px 14px; border-radius: 999px;
  text-align: center; pointer-events: none; opacity: 0; transition: opacity .6s; z-index: 2; }
.hero--live .world__help { opacity: 1; }
.world--played .world__help { opacity: 0; transition-delay: 2.5s; }
.world__touch { display: none; }
@media (pointer: coarse) { .world__keys { display: none; } .world__touch { display: inline; } }
.world__stick { position: absolute; left: 0; top: 0; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%;
  border: 2px solid rgb(238 243 250 / .6); background: rgb(238 243 250 / .08); pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 2; }
.world--stick .world__stick { opacity: 1; }
.hero--world .world { height: min(66svh, 560px); }
@media (min-width: 900px) {
  .hero--world { min-height: min(90vh, 860px); display: grid; align-items: center; }
  .hero--world .world { position: absolute; inset: 0; height: auto; }
  .hero--world::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgb(14 22 48 / .88) 0%, rgb(14 22 48 / .6) 32%, rgb(14 22 48 / 0) 56%); }
  .hero--world .hero__in { position: relative; z-index: 1; grid-template-columns: minmax(0, 560px); pointer-events: none; padding-block: 64px 96px; }
  .hero--world .hero__text { pointer-events: auto; }
  .hero--world .world__help { left: auto; right: 24px; transform: none; }
}

/* Buttons over the woods: Jump, Roll and the Skins panel */
.world__bar { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; gap: 8px; opacity: 0; pointer-events: none; transition: opacity .6s; }
.hero--live .world__bar { opacity: 1; pointer-events: auto; }
.world__btn { font: 600 .95rem/1 var(--display); color: var(--snow-100); background: rgb(14 22 48 / .72); border: 1px solid rgb(238 243 250 / .28);
  border-radius: 999px; padding: 9px 14px; min-height: 40px; cursor: pointer; touch-action: manipulation; }
.world__btn:hover { background: rgb(34 48 90 / .85); }
.world__btn[aria-expanded="true"] { background: var(--paper-100); color: var(--ink-900); border-color: var(--paper-300); }
.world__skins { position: absolute; top: 62px; right: 12px; z-index: 3; width: min(300px, calc(100% - 24px)); padding: 12px 14px 14px;
  background: rgb(14 22 48 / .88); border: 1px solid rgb(238 243 250 / .2); border-radius: var(--radius); }
.world__skins[hidden] { display: none; }
.world__skins-h { margin: 6px 0 6px; font: 400 .95rem var(--hand); color: var(--snow-300); }
.world__skins-h:first-child { margin-top: 0; }
.world__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.world__chip { font: 600 .9rem/1 var(--body); color: var(--snow-100); background: rgb(238 243 250 / .08); border: 1px solid rgb(238 243 250 / .3);
  border-radius: 999px; padding: 8px 12px; min-height: 36px; cursor: pointer; }
.world__chip[aria-pressed="true"] { background: var(--paper-100); color: var(--ink-900); border-color: var(--warm-400); box-shadow: 0 0 0 2px var(--warm-400); }
.world__chip--swatch { width: 36px; height: 36px; padding: 0; background: var(--swatch); border: 2px solid rgb(238 243 250 / .55); }
.world__chip--swatch[aria-pressed="true"] { background: var(--swatch); border-color: var(--night-900); box-shadow: 0 0 0 3px var(--warm-400); }
.world--loading .world__chips { opacity: .6; }

/* Cedar Row tonight: the snow globe, when the hero is the woods */
.street { display: grid; gap: 8px 40px; align-items: center; }
@media (min-width: 900px) { .street { grid-template-columns: 1fr 1.2fr; } }
.street__text p { color: var(--snow-300); max-width: 46ch; }

/* Pitch */
.tags-row { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.tags-row .tag-card:nth-child(2) { transform: rotate(.6deg); }
.tags-row .tag-card:nth-child(3) { transform: rotate(-.5deg); }

/* Meet Jimothy */
.meet { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .meet { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.meet__art img { border-radius: var(--radius); border: 3px solid var(--night-700); }
.facts { margin: 0; display: grid; gap: 14px; }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--night-700); }
.facts dt { font: 700 1.1rem var(--hand); color: var(--warm-400); }
.facts dd { margin: 0; color: var(--snow-300); }

/* Numbers */
.counters { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.counters li { background: var(--night-800); border: 1px solid var(--night-700); border-radius: var(--radius); padding: 16px 18px; }
.counters__v { display: block; font: 700 2.2rem/1.1 var(--display); color: var(--warm-400); font-variant-numeric: tabular-nums; }
.counters__l { color: var(--snow-300); }

/* The advent calendar */
.doors { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.door { position: relative; min-width: 0; }
.door > a { display: block; color: inherit; text-decoration: none; }
.door__frame { display: block; position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--night-800);
  border: 2px solid var(--night-700); perspective: 600px; }
.door__thumb, .door__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.door__thumb--plain { background: var(--paper-300); }
.door__leaf { position: absolute; inset: 0; display: grid; place-items: center; background: var(--paper-100); color: var(--ink-900);
  transform-origin: left center; transition: transform .3s cubic-bezier(.3, .7, .3, 1); backface-visibility: hidden;
  box-shadow: inset -6px 0 0 var(--paper-300); }
.door__leaf::after { content: ''; position: absolute; left: 6px; right: 6px; top: 0; height: 9px; border-radius: 0 0 8px 8px; background: var(--snow-100); opacity: .9; }
.door__n { font: 700 clamp(1.6rem, 1rem + 2vw, 2.4rem) var(--display); }
.door--open .door__leaf { transform: rotateY(-78deg); }
.door--open a:hover .door__leaf, .door--open a:focus-visible .door__leaf { transform: rotateY(-95deg); }
.door--open .door__leaf .door__n { opacity: 0; }
.door--future .door__leaf { background: var(--night-700); color: var(--snow-500); box-shadow: inset -6px 0 0 var(--night-600); }
.door--future .door__leaf::after { background: var(--snow-300); opacity: .6; }
.door--missed .door__leaf { background: var(--night-700); color: var(--snow-500); box-shadow: inset -6px 0 0 var(--night-600); }
.door--today .door__frame { border-color: var(--warm-400); box-shadow: 0 0 0 3px rgb(255 200 97 / .25), 0 0 28px rgb(255 200 97 / .45); }
.door--waiting .door__leaf { background: var(--warm-400); }
.door--sealed .door__leaf { background: var(--night-700); color: var(--snow-500); box-shadow: inset -6px 0 0 var(--night-600); }
.seal { position: absolute; width: 44%; aspect-ratio: 1; bottom: 14%; right: 12%; border-radius: 46% 54% 50% 50% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 50% 50%, var(--scarf-red) 52%, var(--scarf-ink) 54%, var(--scarf-red) 58%); box-shadow: 0 3px 0 var(--scarf-ink); }
.door__meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; font: 700 .95rem var(--hand); color: var(--snow-300); }
.door__meta .shape { width: 12px; height: 12px; fill: var(--snow-300); }
.door__date { white-space: nowrap; }
.door__new { margin-left: auto; background: var(--warm-400); color: var(--ink-900); border-radius: 999px; padding: 0 8px; font-size: .85rem; }
.door__title { display: block; font-weight: 700; line-height: 1.3; font-size: .95rem; margin-top: 2px; overflow-wrap: anywhere; }
.door--open a:hover .door__title { color: var(--warm-400); }
.door--future .door__meta, .door--missed .door__title, .door--sealed .door__title { color: var(--snow-500); }
@media (max-width: 480px) {
  .doors { grid-template-columns: repeat(4, 1fr); gap: 10px 8px; }
  .door__frame { aspect-ratio: 1; }
  .door__meta { font-size: .85rem; flex-wrap: wrap; }
  .door__title { font-size: .85rem; }
  .door--future .door__meta { display: none; }
}
@media (prefers-reduced-motion: reduce) { .door__leaf { transition: none; } html { scroll-behavior: auto; } }

/* Seals that crack on their unlock day */
.seal--crack { z-index: 2; background: none; box-shadow: none; display: block; }
.seal--crack span { position: absolute; top: 0; bottom: 0; width: 50%; background: var(--scarf-red); box-shadow: 0 3px 0 var(--scarf-ink); }
.seal--crack span:first-child { left: 0; border-radius: 50% 0 0 50%; clip-path: polygon(0 0, 100% 0, 80% 35%, 100% 60%, 85% 100%, 0 100%); }
.seal--crack span:last-child { right: 0; border-radius: 0 50% 50% 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 5% 100%, -15% 60%, 0 35%); }
.door--crack .door__leaf { transform: rotateY(0); }
.door--cracking .seal--crack span:first-child { animation: crack-l .7s ease-in forwards; }
.door--cracking .seal--crack span:last-child { animation: crack-r .7s ease-in forwards; }
.door--cracking .door__leaf { transform: rotateY(-78deg); transition-delay: .45s; }
.door--cracking .door__frame::after { content: ''; position: absolute; inset: 20%; border-radius: 50%; background: var(--snow-100); opacity: 0; animation: puff .8s ease-out .15s; z-index: 3; }
.door--cracked .seal--crack { display: none; }
.door--cracked .door__leaf { transform: rotateY(-78deg); }
@keyframes crack-l { 30% { transform: translateX(-2px) rotate(-6deg); } 100% { transform: translate(-30px, 40px) rotate(-40deg); opacity: 0; } }
@keyframes crack-r { 30% { transform: translateX(2px) rotate(6deg); } 100% { transform: translate(30px, 40px) rotate(40deg); opacity: 0; } }
@keyframes puff { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.6); } }

/* Tags: one house colour and one shape each */
.tag { display: inline-flex; align-items: center; gap: 5px; font: 700 .9rem var(--hand); padding: 1px 10px 0; border-radius: 999px; color: var(--ink-900); vertical-align: middle; }
.tag .shape { width: 11px; height: 11px; fill: currentColor; }
.tag--blue { background: #a9c6f2; } .tag--green { background: #a8dcb5; } .tag--yellow { background: #f7df8e; }
.tag--purple { background: #cdb5f0; } .tag--orange { background: #f8c393; } .tag--red { background: #f2aaa3; }
.tier { font: 700 .9rem var(--hand); padding: 1px 10px 0; border-radius: 999px; border: 2px dashed var(--snow-300); color: var(--snow-300); }

/* Videos */
.player { max-width: 880px; }
.player__btn { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 3px solid var(--night-700); border-radius: var(--radius); overflow: hidden; background: var(--night-800); cursor: pointer; }
.player__btn img { width: 100%; height: 100%; object-fit: cover; }
.player__play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--warm-400); box-shadow: 0 4px 0 var(--warm-600); }
.player__play::after { content: ''; position: absolute; left: 30px; top: 22px; border-left: 24px solid var(--ink-900); border-block: 16px solid transparent; }
.player iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.player__title { font-weight: 700; margin-top: 10px; }
.shelf-empty { background: var(--night-800); border: 2px dashed var(--night-600); border-radius: var(--radius); padding: 28px; max-width: 640px; }
.shelf-empty__tag { font: 700 1.3rem var(--hand); color: var(--warm-400); margin-bottom: 4px; }
.shelf-empty p:last-child { margin: 0; color: var(--snow-300); }

/* Friends postcards (Figma FriendCard: Ready, Locked) */
.postcards { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.postcard { position: relative; border-radius: 12px; padding: 18px; min-height: 190px; }
.postcard--down { background: repeating-linear-gradient(135deg, var(--night-800) 0 14px, var(--night-700) 14px 28px); border: 2px solid var(--night-700); display: flex; flex-direction: column; justify-content: flex-end; }
.postcard--down .postcard__stamp { border-color: var(--snow-500); }
.postcard__date { font: 700 1.25rem var(--hand); color: var(--snow-100); margin: 0; }
.postcard__hint { margin: 0; color: var(--snow-500); font-size: .95rem; }
.postcard--up { background: var(--paper-100); color: var(--ink-900); box-shadow: 0 4px 0 var(--paper-300); }
.postcard--up h3 { font-family: var(--hand); font-weight: 700; font-size: 1.6rem; margin-bottom: 0; }
.postcard__home { font-weight: 700; color: var(--ink-600); }
.postcard--up p { margin: 0 0 .5em; }
.postcard__stamp { position: absolute; right: 14px; top: 14px; width: 44px; height: 52px; border: 3px dotted var(--paper-300); border-radius: 4px; }
.postcard--red .postcard__stamp { background: var(--house-red); } .postcard--orange .postcard__stamp { background: var(--house-orange); }
.postcard--yellow .postcard__stamp { background: var(--house-yellow); } .postcard--blue .postcard__stamp { background: var(--house-blue); }
.postcard--green .postcard__stamp { background: var(--house-green); }

/* How it's made */
.pipeline { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); counter-reset: step; }
.pipeline li { background: var(--night-800); border: 1px solid var(--night-700); border-radius: var(--radius); padding: 18px; position: relative; counter-increment: step; }
.pipeline li::before { content: counter(step); font: 700 .95rem var(--display); color: var(--ink-900); background: var(--warm-400); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 10px; }
.pipeline p { color: var(--snow-300); margin: 0; }

/* Follow */
.follow { width: min(720px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.follow__card h2 { font-family: var(--hand); font-weight: 700; }
.follow__card > p { margin-bottom: 18px !important; }
.subscribe form { display: grid; gap: 14px; }
.subscribe label { font-weight: 700; display: grid; gap: 6px; }
.subscribe input[type=email], .subscribe select { font: inherit; color: var(--ink-900); background: #fffaf0; border: 2px solid var(--paper-300); border-radius: 10px; min-height: 48px; padding: 8px 12px; width: 100%; }
.subscribe input:focus-visible, .subscribe select:focus-visible { outline: 3px solid var(--warm-600); outline-offset: 1px; }
.subscribe fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.subscribe legend { font-weight: 700; margin-bottom: 6px; }
.subscribe .choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.subscribe .choice input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--warm-600); flex: none; }
.subscribe .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.subscribe .msg { margin: 0; font-weight: 700; }
.subscribe .msg--bad { color: var(--scarf-ink); }
.subscribe .small { font-size: .92rem; color: var(--ink-600); margin: 0; }
.ribbons { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px !important; }
.ribbons legend { grid-column: 1 / -1; }
.ribbon { position: relative; display: grid !important; justify-items: center; gap: 4px !important; padding: 8px 4px; border: 2px solid var(--paper-300); border-radius: 10px; cursor: pointer; font-weight: 700; font-size: .9rem; background: #fffaf0; }
.ribbon input { position: absolute; opacity: 0; pointer-events: none; }
.ribbon:has(input:checked) { border-color: var(--ink-900); box-shadow: 0 3px 0 var(--ink-600); }
.ribbon:has(input:focus-visible) { outline: 3px solid var(--warm-600); outline-offset: 2px; }
.ribbon__swatch { width: 30px; height: 22px; border-radius: 4px; background: var(--paper-100); border: 2px solid var(--paper-300); position: relative; }
.ribbon__swatch::before, .ribbon__swatch::after { content: ''; position: absolute; background: var(--rib); }
.ribbon__swatch::before { left: 0; right: 0; top: 50%; height: 5px; margin-top: -2.5px; }
.ribbon__swatch::after { top: 0; bottom: 0; left: 50%; width: 5px; margin-left: -2.5px; }
.ribbon--red { --rib: #d94a3d; } .ribbon--blue { --rib: #3d7bd9; } .ribbon--green { --rib: #3fa35a; } .ribbon--yellow { --rib: #f2c230; }
.ribbon--pink { --rib: #ef7fb0; } .ribbon--purple { --rib: #8a5bd6; } .ribbon--orange { --rib: #ef8a2e; } .ribbon--white { --rib: #b8c0cc; }
.subscribe .linkish { background: none; border: 0; padding: 0; font: inherit; color: #9a5a0c; text-decoration: underline; cursor: pointer; }

/* Entry pages */
.entry { padding-block: 40px 24px; max-width: 760px; }
.entry__head h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
.entry__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--snow-300); }
.entry__summary { font-size: 1.2rem; color: var(--snow-300); }
.prose { margin-top: 28px; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose figure { margin: 28px 0; }
.prose figure img { border-radius: var(--radius); border: 3px solid var(--night-700); }
.prose code { background: var(--night-800); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.prose pre { background: var(--night-800); border: 1px solid var(--night-700); padding: 16px; border-radius: var(--radius); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1em 0; padding-left: 16px; border-left: 4px solid var(--warm-400); color: var(--snow-300); }
.entry__nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; }
.entry__nav .btn { max-width: 100%; text-align: left; }

/* Archive */
.archive { padding-block: 40px; }
.archive__list { list-style: none; padding: 0; display: grid; gap: 14px; }
.archive__list > li { background: var(--night-800); border: 1px solid var(--night-700); border-radius: var(--radius); padding: 16px 18px; }
.archive__list a { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; text-decoration: none; }
.archive__day { font: 700 1rem var(--hand); color: var(--snow-300); }
.archive__title { font: 600 1.2rem var(--display); color: var(--snow-100); }
.archive__list a:hover .archive__title { color: var(--warm-400); }
.archive__list p { margin: 6px 0 0; color: var(--snow-300); }

/* Toast (Figma Toast: Delivered) */
.toast { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20; display: flex; gap: 12px; align-items: center; max-width: min(380px, 100vw - 32px);
  background: var(--paper-100); color: var(--ink-900); border: 3px solid var(--house-green); border-radius: 14px; padding: 12px 14px; box-shadow: 0 12px 30px rgb(0 0 0 / .35);
  animation: toast-in .3s ease-out; }
.toast__dot { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--house-green); }
.toast b { display: block; font-family: var(--display); font-weight: 600; }
.toast a { color: var(--ink-900); }
.toast button { margin-left: auto; background: none; border: 0; font-size: 1.4rem; color: var(--ink-600); cursor: pointer; padding: 4px 8px; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* Footer */
.foot { border-top: 1px solid var(--night-700); padding-block: 32px calc(32px + env(safe-area-inset-bottom)); margin-top: 72px; color: var(--snow-300); }
.foot p { margin-bottom: .6em; }
.foot__small { font-size: .9rem; color: var(--snow-500); }

/* The cast: live rigged models over their poster renders */
.viewer { margin: 0; }
.viewer__stage { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; border: 3px solid var(--night-700);
  background: radial-gradient(90% 70% at 50% 85%, var(--night-600), var(--night-800) 70%); touch-action: pan-y; }
.viewer__stage::after { content: ''; position: absolute; inset: auto 0 0; height: 18%; background: linear-gradient(transparent, rgb(201 214 234 / .14)); pointer-events: none; }
.viewer__poster img { width: 100%; height: 100%; object-fit: contain; transition: opacity .5s; }
.viewer__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s; cursor: grab; z-index: 1; }
.viewer__canvas:active { cursor: grabbing; }
.viewer--live .viewer__canvas { opacity: 1; }
.viewer--live .viewer__poster img { opacity: 0; }
.viewer__hint { position: absolute; z-index: 2; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; font: 700 .95rem var(--hand); color: var(--snow-300);
  background: color-mix(in srgb, var(--night-900) 70%, transparent); padding: 4px 12px; border-radius: 999px; opacity: 0; transition: opacity .4s; pointer-events: none; }
.viewer--live .viewer__hint { opacity: 1; }
.viewer__stage.viewer--held .viewer__hint { opacity: 0; }
.viewer__clips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; min-height: 40px; }
.pose-btn { font: 600 .95rem/1 var(--display); color: var(--snow-100); background: var(--night-800); border: 2px solid var(--night-600); border-radius: 999px;
  padding: 9px 16px; min-height: 40px; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.pose-btn:hover { border-color: var(--warm-400); color: var(--warm-400); }
.pose-btn[aria-pressed="true"] { background: var(--warm-400); border-color: var(--warm-600); color: var(--ink-900); }
.meet__render img { border-radius: var(--radius); border: 3px solid var(--night-700); background: radial-gradient(90% 70% at 50% 85%, var(--night-600), var(--night-800) 70%); }

.cast-hero { display: flex; flex-direction: column; align-items: flex-start; margin-block: clamp(24px, 4vw, 48px) 0 !important; }
.cast-hero .banner { margin-bottom: 16px; }
.cast-star { display: grid; gap: 28px; align-items: center; margin-top: 28px !important; }
@media (min-width: 900px) { .cast-star { grid-template-columns: 1.2fr 1fr; gap: 48px; } }
.cast-star__text h2 { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); margin-bottom: .1em; }
.cast-star .cast-card__kind { color: var(--warm-400); }
.cast-cards { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cast-card { border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; min-height: 320px; }
.cast-card--up { background: var(--paper-100); color: var(--ink-900); box-shadow: 0 4px 0 var(--paper-300), 0 14px 30px rgb(0 0 0 / .25); }
.cast-card--up .viewer__stage { border: 0; border-radius: 0; }
.cast-card--up .viewer__clips { padding: 0 12px; }
.cast-card--up .pose-btn { background: var(--paper-300); color: var(--ink-900); border-color: var(--paper-300); }
.cast-card__text { padding: 14px 18px 18px; }
.cast-card h3 { font: 700 1.7rem/1.1 var(--hand); margin-bottom: 2px; }
.cast-card__kind { font-weight: 700; color: var(--ink-600); margin-bottom: .5em; }
.cast-card__date { font: 700 1rem var(--hand); color: var(--ink-600); margin: 0; }
.cast-card--down { background: repeating-linear-gradient(135deg, var(--night-800) 0 14px, var(--night-700) 14px 28px); border: 2px solid var(--night-700); }
.cast-card--down h3 { color: var(--snow-100); font-size: 1.35rem; }
.cast-card--down .cast-card__date { color: var(--snow-100); font-size: 1.3rem; }
.cast-card__count { color: var(--snow-500); margin: 0; }
.cast-card__envelope { flex: 1; position: relative; display: grid; place-items: center; min-height: 190px; }
.cast-card__q { font: 700 5rem/1 var(--display); color: var(--night-600); }
.cast-card__stamp { position: absolute; right: 16px; top: 16px; width: 44px; height: 52px; border: 3px dotted var(--snow-500); border-radius: 4px; }
.postcard__art img { width: 120px; height: auto; margin: -6px 0 6px -6px; }
