/* ================= 1 · HERO: a living poster =================
   Layers, back to front: paper, arch, paint, "Blan", tools and snapshots, mascot, "canvas", copy, ribbons. */
.hero { --big: min(17.5vw, 28svh); --floor: clamp(86px, 13svh, 128px); position: relative; height: 100svh; min-height: 660px; overflow: hidden; isolation: isolate; background:
  repeating-linear-gradient(0deg, transparent 0 3px, rgb(21 19 26 / .022) 3px 4px),
  repeating-linear-gradient(90deg, transparent 0 3px, rgb(21 19 26 / .022) 3px 4px), var(--paper); }

.arch { position: absolute; left: 50%; bottom: 0; width: min(37vw, 70svh); height: calc(100svh - 150px); min-height: 500px; translate: -50% 0; border: 4px solid var(--ink); border-bottom: 0; border-radius: 999px 999px 0 0; background: var(--cobalt); overflow: hidden; box-shadow: 16px 0 0 var(--sun), -16px 0 0 var(--tomato); }
.arch i { position: absolute; left: 50%; top: 46%; width: 260%; aspect-ratio: 1; translate: -50% -50%; background: repeating-conic-gradient(rgb(255 255 255 / .13) 0 7deg, transparent 7deg 18deg); animation: turn 60s linear infinite; }
@keyframes turn { to { rotate: 360deg; } }
body.ready .arch { animation: rise .9s var(--spring) .15s backwards; }
@keyframes rise { from { translate: -50% 100%; } }

#paint { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; touch-action: pan-y; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M3 37c1-8 4-13 10-13l5 5c0 6-6 9-15 8z' fill='%23ff4b2b' stroke='%2315131a' stroke-width='2'/%3E%3Cpath d='M13 24 33 3c2-2 6 2 4 4L18 29z' fill='%23ffc414' stroke='%2315131a' stroke-width='2'/%3E%3C/svg%3E") 3 37, crosshair; }

.title { margin: 0; }
.word { position: absolute; display: flex; white-space: nowrap; pointer-events: none; user-select: none; -webkit-user-select: none; }
.word-a { left: 2.4vw; top: 74px; z-index: 2; font-weight: 800; font-stretch: 75%; font-size: var(--big); line-height: .9; letter-spacing: -.02em; text-transform: uppercase; }
.word-b { right: 2.2vw; bottom: calc(var(--floor) - 1svh); z-index: 5; font: 400 min(13vw, 22svh)/1.1 var(--chunk); }
.ch { display: inline-block; pointer-events: auto; touch-action: pan-y; cursor: grab; color: var(--ink-ch, var(--ink)); -webkit-text-stroke: .045em var(--paper); paint-order: stroke fill; transition: transform .8s var(--spring), color .25s, scale .25s var(--spring); }
.word-b .ch { color: var(--ink-ch, var(--tomato)); -webkit-text-stroke: .07em var(--ink); text-shadow: .035em .045em 0 var(--ink); }
.ch:nth-child(even) { rotate: 2deg; }
.ch:hover { scale: 1.07; }
.ch.held { cursor: grabbing; transition: color .25s; }
body.loading .word, body.loading .hero-mascot, body.loading .floater img, body.loading .snap, body.loading .badge, body.loading .hero-copy { visibility: hidden; }
body.ready .ch { animation: letter-in .9s var(--spring) backwards; animation-delay: calc(var(--i) * 70ms + .45s); }
body.ready .word-b .ch { animation-delay: calc(var(--i) * 60ms + .75s); }
@keyframes letter-in { from { translate: 0 -70vh; rotate: -40deg; } }

/* ---------- floating studio tools ---------- */
.floater { position: absolute; z-index: 3; width: var(--w); translate: var(--px, 0) var(--py, 0); transition: translate .5s ease-out; pointer-events: none; }
.floater img { width: 100%; filter: drop-shadow(0 18px 14px rgb(21 19 26 / .25)); animation: bob var(--t, 6s) ease-in-out infinite alternate; }
body.ready .floater { animation: pop-in .7s var(--spring) backwards; animation-delay: var(--d, 1s); }
@keyframes pop-in { from { scale: 0; rotate: -90deg; } }
@keyframes bob { from { translate: 0 -9px; rotate: -7deg; } to { translate: 0 11px; rotate: 8deg; } }
.f-pencil { --w: min(7vw, 12svh); --d: .9s; left: calc(2.4vw + var(--big) * 1.86); top: 72px; }
.f-scissors { --w: min(7.4vw, 13svh); --t: 7s; --d: 1.15s; left: 62.5%; top: 47%; }
.f-brush { --w: min(9vw, 16svh); --t: 5s; --d: 1.05s; left: 30.5%; top: 56%; }
.f-swatches { --w: min(8vw, 14svh); --t: 8s; --d: 1.25s; right: 1.6vw; top: 86px; }
.f-tube { --w: min(7vw, 12svh); --t: 6.6s; --d: 1.35s; right: 1.4vw; top: 52%; }
.f-splat { --w: min(6.5vw, 11svh); --t: 9s; --d: 1.45s; left: 36%; top: 17%; }

/* ---------- work snapshots taped to the canvas ---------- */
.snap { position: absolute; z-index: 3; width: var(--w); padding: 7px 7px 0; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 8px; color: var(--ink); text-decoration: none; text-align: center; box-shadow: 7px 9px 0 rgb(21 19 26 / .85); rotate: var(--r); translate: var(--px, 0) var(--py, 0); transition: translate .5s ease-out, rotate .3s var(--spring), scale .3s var(--spring); }
.snap::before { content: ""; position: absolute; left: 50%; top: -13px; width: 56%; height: 22px; translate: -50% 0; rotate: -4deg; background: rgb(255 214 120 / .88); }
.snap img { width: 100%; aspect-ratio: var(--ar, 1); object-fit: cover; border-radius: 3px; }
.snap span { display: block; font: 1.15rem/1.9 var(--hand); }
.snap:hover, .snap:focus-visible { rotate: 0deg; scale: 1.09; z-index: 8; }
body.ready .snap { animation: pop-in .8s var(--spring) backwards; animation-delay: var(--d); }
.snap-1 { --w: min(10.5vw, 18svh); --r: -7deg; --ar: 2 / 3; --d: 1s; left: 70%; top: 31%; }
.snap-2 { --w: min(11vw, 19svh); --r: 6deg; --d: 1.15s; right: 3.6vw; top: calc(86px + 11svh); }
.snap-3 { --w: min(8vw, 14svh); --r: -5deg; --ar: 3 / 4; --d: 1.3s; left: 27%; top: 25%; display: none; }

/* ---------- spinning badge ---------- */
.badge { position: absolute; z-index: 6; left: calc(50% + min(10vw, 19svh)); top: 80px; width: min(10.5vw, 18svh); min-width: 112px; border-radius: 50%; transition: scale .3s var(--spring); }
.badge:hover { scale: 1.1; }
.badge svg { display: block; width: 100%; filter: drop-shadow(5px 6px 0 var(--ink)); }
.badge circle { fill: var(--sun); stroke: var(--ink); stroke-width: 4; }
.badge text { font: 800 14.5px var(--sans); letter-spacing: .04em; fill: var(--ink); }
.badge-spin { transform-origin: 80px 80px; animation: turn 16s linear infinite; }
.badge-arrow { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- mascot ---------- */
.hero-mascot { position: absolute; left: 50%; bottom: calc(var(--floor) - 1.5svh); z-index: 4; height: min(calc(100svh - var(--floor) - 66px), 66vw); aspect-ratio: 941 / 1672; translate: -48% 0; pointer-events: none; }
.mascot-stack { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; pointer-events: auto; transform-origin: 50% 100%; transform: translateX(var(--shift, 0)) rotate(var(--lean, 0deg)); transition: transform .5s ease-out; }
body.ready .mascot-stack { animation: arrive 1s var(--spring) .5s backwards; }
.mascot-stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; transform-origin: 50% 100%; animation: breathe 4s ease-in-out infinite; filter: drop-shadow(0 18px 16px rgb(0 0 0 / .32)); }
.mascot-stack .m-blink { filter: none; }
@keyframes breathe { 50% { scale: 1.004 1.011; } }
@keyframes arrive { from { translate: 0 110%; } }
.bubble-hero { position: absolute; left: 76%; top: 24%; z-index: 2; width: max-content; max-width: 200px; pointer-events: auto; }
.bubble-hero::after { left: -10px; bottom: 18px; rotate: 135deg; }

/* ---------- words ---------- */
.hero-copy { position: absolute; left: 2.6vw; top: calc(74px + var(--big) * .9 + 1.2svh); z-index: 6; display: flex; flex-direction: column; align-items: flex-start; gap: clamp(.5rem, 1.6svh, 1rem); width: min(29vw, 460px); pointer-events: none; }
@media (min-width: 1181px) { .hero-copy { width: 27vw; } }
.hero-copy > * { pointer-events: auto; }
body.ready .hero-copy { animation: slide-in .8s var(--spring) .9s backwards; }
@keyframes slide-in { from { translate: -110% 0; } }
.tagline { font-weight: 800; font-size: min(2.3vw, 3.8svh); line-height: 1.15; }
.tagline em { display: inline-block; font: 400 1.02em/1.5 var(--chunk); color: var(--ink); background: var(--sun); padding: 0 .45em; rotate: -2deg; border: 2.5px solid var(--ink); border-radius: .35em; }
.intro { max-width: 38ch; font-weight: 500; font-size: clamp(.86rem, min(1.15vw, 2.1svh), 1.1rem); background: rgb(255 254 251 / .9); border-radius: 10px; padding: .2rem .3rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: .35rem 1.2rem; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); font-weight: 750; font-size: .95rem; text-decoration: none; box-shadow: 5px 5px 0 var(--ink); transition: translate .2s var(--spring), box-shadow .2s; }
.btn:hover { translate: -2px -3px; box-shadow: 8px 9px 0 var(--ink); }
.btn:active { translate: 4px 4px; box-shadow: 1px 1px 0 var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: 5px 5px 0 var(--tomato); }
.btn-ink:hover { box-shadow: 8px 9px 0 var(--tomato); }

/* ---------- paint tray ---------- */
.tools { position: absolute; left: 2.6vw; bottom: calc(var(--floor) - 1svh); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; width: min(30vw, 440px); min-width: 330px; padding: .45rem .7rem .65rem; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); }
.tools-hint { width: 100%; font-size: 1.05rem; }
.pots { display: flex; gap: .35rem; margin-right: auto; }
.pot { width: 34px; height: 36px; padding: 0; border: 2.5px solid var(--ink); border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%; background: var(--c); transition: translate .2s var(--spring), rotate .2s var(--spring); }
.pot:hover { translate: 0 -4px; rotate: -10deg; }
.pot[aria-pressed="true"] { translate: 0 -4px; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--ink); }
.tools .pill { min-height: 38px; padding-inline: .8rem; font-size: .85rem; }
.meter { flex: 1; min-width: 80px; height: 12px; border: 2px solid var(--ink); border-radius: 9px; overflow: hidden; }
.meter b { display: block; height: 100%; background: linear-gradient(90deg, var(--cobalt), var(--pink), var(--sun)); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.meter-label { font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- crossing ribbons ---------- */
.ribbons { position: absolute; left: -3vw; right: -3vw; bottom: 0; z-index: 7; height: var(--floor); pointer-events: none; }
.ribbon { position: absolute; left: 0; right: 0; overflow: hidden; border-block: 3px solid var(--ink); }
.ribbon p { display: inline-block; white-space: nowrap; font: 400 clamp(.95rem, 2.3svh, 1.4rem)/1.75 var(--chunk); animation: marquee 30s linear infinite; }
.ribbon-a { bottom: 47%; rotate: -.8deg; background: var(--sun); color: var(--ink); }
.ribbon-b { bottom: 5%; rotate: .7deg; background: var(--ink); color: var(--paper); }
/* the hero closes with its ribbons, so the next scene needs no torn edge */
.meet::before { display: none; }
.ribbon-b p { animation-direction: reverse; animation-duration: 36s; }
@keyframes marquee { to { translate: -50% 0; } }

/* Narrower laptops and tablets: fewer ornaments, copy gets the room it needs. */
@media (min-width: 761px) and (max-width: 1180px) {
  .hero { --big: min(17vw, 24svh); }
  .arch { left: 57%; width: min(40vw, 62svh); }
  .hero-mascot { left: 57%; }
  .badge { left: calc(57% + 11vw); }
  .hero-copy { width: 34vw; }
  .tagline { font-size: min(3vw, 3.4svh); }
  .f-brush, .f-splat, .snap-1 { display: none; }
  .f-scissors { left: 72%; top: 42%; }
  .bubble-hero { left: -34%; top: 12%; }
  .bubble-hero::after { left: auto; right: -10px; rotate: -45deg; }
}
/* upright tablets: the arch shrinks to frame the mascot instead of towering over it */
@media (min-width: 761px) and (max-width: 1180px) and (orientation: portrait) {
  .arch { left: 67%; width: 46vw; height: 64svh; min-height: 0; }
  .hero-mascot { left: 67%; height: min(64svh, 82vw); }
  .tagline { font-size: 2.6vw; }
  .badge { left: auto; right: 22vw; }
  .snap-2 { top: 20svh; }
}
@media (min-width: 761px) and (max-height: 760px) {
  .intro { max-width: 36ch; font-size: .84rem; line-height: 1.4; }
  .btn { min-height: 38px; font-size: .85rem; }
  .tools-hint { display: none; }
}

/* ---------- phones: the poster stacks, painting tools stay on the first screen ---------- */
@media (max-width: 760px) {
  .hero { --big: min(40vw, 20svh); --floor: 0px; height: auto; min-height: 0; display: flex; flex-direction: column; padding-top: calc(100svh - 168px); }
  .arch { left: 63%; bottom: auto; top: 31svh; width: 66vw; height: calc(69svh - 200px); min-height: 220px; translate: -50% 0; box-shadow: 8px 0 0 var(--sun), -8px 0 0 var(--tomato); border-radius: 999px 999px 24px 24px; border-bottom: 4px solid var(--ink); }
  body.ready .arch { animation-name: pop-in-arch; }
  .word-a { left: 3vw; top: 66px; }
  .hero-mascot { left: 66%; bottom: auto; top: 22svh; height: calc(78svh - 205px); min-height: 280px; translate: -50% 0; }
  .word-b { right: auto; left: 50%; translate: -50% 0; bottom: auto; top: calc(100svh - 266px); font-size: min(21vw, 11svh); }
  .hero-copy { display: contents; }
  body.loading .tagline, body.loading .intro, body.loading .hero-cta { visibility: hidden; }
  .tagline { position: absolute; left: 4vw; top: calc(66px + var(--big) * .9 + 4px); z-index: 6; font-size: min(4.6vw, 2.6svh); max-width: 52vw; }
  .tagline em { font-size: .9em; }
  .tools { order: 1; position: relative; left: auto; bottom: auto; margin: 0 auto; width: calc(100% - 24px); max-width: 430px; min-width: 0; }
  .tools-hint { text-align: center; }
  .pots { width: 100%; justify-content: space-between; padding: .25rem .4rem; }
  .intro { order: 2; max-width: 40ch; margin: 1.6rem auto 0; padding: 0 1.2rem; text-align: center; font-size: 1.08rem; background: none; }
  .hero-cta { order: 3; position: relative; z-index: 6; justify-content: center; margin: 1.2rem auto 0; }
  .ribbons { order: 4; position: relative; left: auto; right: auto; height: 130px; margin: 1rem -3vw 0; }
  .ribbon-a { bottom: 44%; }
  .ribbon-b { bottom: 18%; }
  .badge { left: auto; right: 3vw; top: calc(100svh - 360px); width: 92px; min-width: 0; }
  .snap-1 { display: none; }
  .snap-2 { --w: 22vw; right: 4vw; top: 84px; }
  .snap { padding: 5px 5px 0; }
  .snap span { font-size: .82rem; }
  .snap-2 span { font-size: .9rem; }
  .snap-3 { display: block; --w: 21vw; left: 4vw; top: 54svh; }
  .f-pencil, .f-tube, .f-splat { display: none; }
  .f-scissors { --w: 15vw; left: auto; right: 2vw; top: 33svh; }
  .f-brush { display: none; }
  .f-swatches { --w: 14vw; right: 27vw; top: 17svh; display: none; }
  .bubble-hero { left: auto; right: 84%; top: 24%; max-width: 34vw; font-size: 1rem; padding: .45rem .6rem; }
  .bubble-hero::after { left: auto; right: -10px; rotate: -45deg; }
}
@keyframes pop-in-arch { from { scale: .2; } }
@media (max-width: 760px) and (max-height: 700px) {
  .bubble-hero, .snap-3 { display: none; }
}
