/* The logo font: Neue Montreal Bold. It is licensed, so it is not bundled: an installed copy is used,
   otherwise the file you put in assets/fonts/ (see README). */
@font-face {
  font-family: "Blancanvas Logo";
  src: local("PP Neue Montreal Bold"), local("PPNeueMontreal-Bold"), local("Neue Montreal Bold"), local("NeueMontreal-Bold"),
    url("../assets/fonts/PPNeueMontreal-Bold.woff2") format("woff2"),
    url("../assets/fonts/PPNeueMontreal-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

/* Tokens pulled from the mascot: shirt blue, cap tan, sneaker orange and sage, plus studio paints. */
:root {
  --logo: "Blancanvas Logo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --paper: #fffefb;
  --ink: #15131a;
  --cobalt: #2845f0;
  --tomato: #ff4b2b;
  --sun: #ffc414;
  --pink: #ff77b7;
  --leaf: #17a862;
  --lime: #a6e22e;
  --sky: #8fb8f2;
  --tan: #e6cba8;
  --sans: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --chunk: "Shrikhand", "Cooper Black", Georgia, serif;
  --hand: "Gochi Hand", "Marker Felt", cursive;
  --gut: clamp(1.1rem, 5vw, 5rem);
  --spring: cubic-bezier(.2, 1.6, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 clamp(1rem, .94rem + .3vw, 1.18rem)/1.5 var(--sans); overflow-x: clip; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .35; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; box-shadow: 0 0 0 6px var(--paper); }

.skip { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .7rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }

.display { font-weight: 800; font-stretch: 78%; font-size: clamp(3.3rem, 9.5vw, 8.6rem); line-height: .86; letter-spacing: -.025em; text-wrap: balance; }
.display em { font: 400 .82em/1 var(--chunk); letter-spacing: 0; }
.hand { font-family: var(--hand); font-size: 1.3em; line-height: 1.15; }

.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .35rem 1.1rem; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); color: var(--ink); font-weight: 650; font-size: .95rem; line-height: 1.1; box-shadow: 0 4px 0 var(--ink); transition: transform .15s var(--spring), box-shadow .15s; }
.pill:hover:not(:disabled) { transform: translateY(-2px) rotate(-1.5deg); box-shadow: 0 6px 0 var(--ink); }
.pill:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.pill-ink { background: var(--ink); color: var(--paper); box-shadow: 0 4px 0 rgb(0 0 0 / .28); }
.pill-ink:hover:not(:disabled) { box-shadow: 0 6px 0 rgb(0 0 0 / .28); }
.round { width: 56px; height: 56px; flex: none; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 1.4rem; box-shadow: 0 4px 0 var(--ink); transition: transform .15s var(--spring); }
.round:hover:not(:disabled) { transform: scale(1.1) rotate(-6deg); }

/* ---------- speech bubbles ---------- */
.bubble { position: relative; background: var(--paper); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 22px; padding: .7rem 1rem; font-family: var(--hand); font-size: 1.22rem; line-height: 1.2; }
.bubble::after { content: ""; position: absolute; width: 16px; height: 16px; background: inherit; border: solid var(--ink); border-width: 0 2.5px 2.5px 0; bottom: -10px; left: 28px; rotate: 45deg; }
.bubble.pop { animation: pop .45s var(--spring); }
@keyframes pop { from { scale: .7; } }

/* ---------- blink layer ---------- */
.m-blink { opacity: 0; pointer-events: none; }
.m-blink.shut { opacity: 1; }

/* ---------- corner guide ---------- */
.buddy { position: fixed; left: clamp(8px, 1.4vw, 20px); bottom: max(clamp(8px, 1.4vw, 20px), env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; pointer-events: none; transition: translate .4s var(--spring); }
.buddy.away { translate: 0 160%; visibility: hidden; transition: translate .4s, visibility 0s .4s; }
.buddy button { pointer-events: auto; padding: 0; border: 0; background: none; border-radius: 50%; transition: scale .25s var(--spring), rotate .25s var(--spring); }
.buddy button:hover { scale: 1.1; rotate: -7deg; }
.porthole { position: relative; display: block; width: 88px; aspect-ratio: 1; overflow: hidden; border-radius: 50%; border: 3px solid var(--ink); background: var(--sun); }
.porthole img { position: absolute; top: 2%; left: 0; max-width: none; }
.buddy-bubble, .bubble-buddy { max-width: min(250px, 66vw); opacity: 0; translate: 0 10px; scale: .9; transform-origin: bottom left; transition: .3s var(--spring); }
.bubble-buddy.show { opacity: 1; translate: 0; scale: 1; }
.buddy.dizzy button { animation: dizzy .9s; }
@keyframes dizzy { to { rotate: 1080deg; } }

/* ---------- project file ---------- */
.file { width: min(1040px, 94vw); max-width: none; max-height: 90svh; padding: 0; border: 3px solid var(--ink); border-radius: 28px; background: var(--paper); overflow: auto; overscroll-behavior: contain; }
.file[open] { display: grid; grid-template-columns: 1.05fr 1fr; animation: unfold .45s var(--spring); }
.file::backdrop { background: rgb(21 19 26 / .72); }
@keyframes unfold { from { scale: .85; rotate: -3deg; opacity: 0; } }
.file-close { position: absolute; right: 14px; top: 14px; z-index: 2; }
.file-art { display: grid; place-items: center; padding: clamp(1rem, 3vw, 2.2rem); background: var(--world, var(--sun)); }
.file-art img { max-height: min(72svh, 680px); width: auto; border-radius: 8px; box-shadow: 0 24px 40px -18px rgb(0 0 0 / .55); rotate: -1.2deg; }
.file-body { padding: clamp(1.3rem, 3.5vw, 2.8rem); display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; }
.file-kind { font-weight: 650; font-size: .95rem; margin-top: 2.2rem; }
.file-body h3 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); }
.file-mood { color: var(--cobalt); }
.file dt { font: 400 1.25rem/1.4 var(--chunk); margin-top: .6rem; }
.file dd { max-width: 46ch; }
.file-tag { font-size: .82rem; font-weight: 600; border: 1.5px dashed var(--ink); border-radius: 6px; padding: .15rem .55rem; margin-top: .4rem; }
.file-nav { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: auto; padding-top: 1rem; }

/* ---------- effects ---------- */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 90; pointer-events: none; }
.rain { position: fixed; top: -140px; width: 90px; z-index: 80; pointer-events: none; animation: fall 2.6s cubic-bezier(.4, .1, .8, .6) both; }
@keyframes fall { to { translate: 0 calc(100vh + 280px); rotate: var(--spin); } }
.noscript { padding: 2rem; text-align: center; }

@media (max-width: 760px) {
  .porthole { width: 62px; }
  .bubble-buddy { font-size: 1.05rem; }
  .file[open] { grid-template-columns: 1fr; }
  .file-art img { max-height: 46svh; }
  .file-kind { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
