:root {
  --slate: #241d2c;
  --slate-ink: #352c40;
  --frame: #4b3446;
  --frame-dark: #2f2030;
  --room: #160f1b;
  --chalk: #f2e8dc;
  --chalk-dim: #cbbfd2;
  --pink: #f6a6c8;
  --lilac: #c9b6ff;
  --mint: #9fe0c9;
  --plum-ink: #2a1d33;
  --paper: #ece2d4;
  --display: "Coiny", "Gaegu", "Nunito", sans-serif;
  --hand: "Gaegu", "Nunito", sans-serif;
  --body: "Nunito", "Gaegu", sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --frame-w: clamp(10px, 1.4vw, 18px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--frame) var(--room); }
body {
  margin: 0;
  background: var(--room);
  color: var(--chalk);
  font: 400 1.075rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--pink); color: var(--plum-ink); }
:focus-visible { outline: 3px dashed var(--mint); outline-offset: 4px; border-radius: 6px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.defs { position: absolute; width: 0; height: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--pink); color: var(--plum-ink); padding: .5rem .9rem; border-radius: 10px; font-weight: 800; }
.skip:focus { top: 12px; }
.chalk-hand { font-family: var(--hand); }

/* ---------- The board: one continuous slate in a painted frame ---------- */
.board {
  position: relative;
  margin: clamp(8px, 1.6vw, 22px) clamp(8px, 1.6vw, 22px) 0;
  background: var(--slate) url("img/slate-dust.webp") center top / 1600px auto repeat-y;
  border: var(--frame-w) solid var(--frame);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: inset 0 0 0 3px var(--frame-dark), inset 0 7px 0 rgba(20,14,26,.45);
  transition: background-color .8s;
}

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem var(--gutter) 0;
}
.mark { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font: 1.35rem var(--display); color: var(--pink); }
.mark svg { width: 34px; height: 27px; fill: var(--pink); }
.bar nav { display: flex; gap: clamp(.9rem, 2.4vw, 2rem); font: 700 1.3rem/1 var(--hand); }
.bar nav a { position: relative; text-decoration: none; color: var(--chalk-dim); padding: .3rem 0; transition: color .2s; }
.bar nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--pink); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.bar nav a:hover { color: var(--chalk); }
.bar nav a:hover::after { transform: scaleX(1); }

/* ---------- Top panel ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 64px - 2 * var(--frame-w) - clamp(8px, 1.6vw, 22px) - 70px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: center;
  padding: clamp(1.5rem, 4vh, 3rem) var(--gutter) clamp(1.5rem, 4vh, 2.5rem);
}
.wordmark { font: clamp(5rem, 13vw, 9.5rem)/.9 var(--display); color: var(--pink); margin: 0; letter-spacing: -.01em; }
.sub { font: 700 clamp(1.6rem, 2.8vw, 2.2rem)/1.1 var(--hand); color: var(--lilac); margin: calc(clamp(5rem, 13vw, 9.5rem) * .3) 0 1rem; }
.intro { font-size: 1.15rem; max-width: 30rem; margin: 0 0 .7rem; }
.clock { display: flex; align-items: baseline; gap: .55rem; font: 400 1.35rem/1.3 var(--hand); color: var(--chalk-dim); margin: 0 0 1.6rem; max-width: 30rem; }
.clock-icon { flex: none; width: 1.6rem; height: 1.6rem; fill: none; stroke: var(--mint); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; align-self: center; }
.icon-moon { display: none; stroke: var(--lilac); }
body[data-tod="night"] .icon-cup { display: none; }
body[data-tod="night"] .icon-moon { display: block; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.25rem .8rem;
  font: 800 1.02rem/1 var(--body); text-decoration: none;
  border-radius: 16px 20px 14px 22px / 18px 14px 20px 16px;
  transition: transform .25s var(--ease-out), background-color .2s, color .2s, border-color .2s;
}
.btn-fill { background: var(--pink); color: var(--plum-ink); }
.btn-fill:hover { transform: rotate(-1.5deg) translateY(-2px); background: #f9bbd6; }
.btn-line { border: 2.5px solid var(--chalk); color: var(--chalk); }
.btn-line:hover { transform: rotate(1.5deg) translateY(-2px); border-color: var(--pink); color: var(--pink); }
.btn-soon { border: 2.5px dashed var(--chalk-dim); color: var(--chalk-dim); cursor: default; font-weight: 700; }

/* Eraser ghost of yesterday's menu */
.ghost {
  position: absolute; left: 3%; top: 5%; margin: 0;
  font: 3.4rem/1 var(--hand); color: var(--chalk); opacity: .05; rotate: -6deg;
  pointer-events: none; user-select: none; white-space: nowrap;
}

/* Sky doodles: the board changes with the visitor's hour */
.sky { position: absolute; right: calc(var(--gutter) * .6); top: 4.5rem; width: 54px; height: 54px; fill: none; stroke: var(--chalk); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: .55; display: none; }
.sky .star { fill: var(--chalk); stroke: none; }
body[data-tod="night"] .sky-moon, body[data-tod="evening"] .sky-moon { display: block; }
body[data-tod="morning"] .sky-sun, body[data-tod="day"] .sky-sun { display: block; stroke: var(--pink); }

/* ---------- Specials menu ---------- */
.menu { position: relative; }
.menu-title { font: clamp(2.3rem, 4.4vw, 3.4rem)/1 var(--display); color: var(--chalk); margin: 0; }
.swash { width: min(320px, 70%); height: 18px; margin: .1rem 0 1.4rem; overflow: visible; }
.swash path { fill: none; stroke: var(--mint); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 330; stroke-dashoffset: 0; }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(.8rem, 2vh, 1.4rem); }
.menu-item { display: grid; grid-template-columns: clamp(96px, 11vw, 150px) 1fr; align-items: center; gap: clamp(1rem, 2vw, 1.6rem); text-decoration: none; }
.menu-item .polaroid { transition: transform .35s var(--ease-out); }
.menu-item:hover .polaroid { transform: rotate(0deg) scale(1.06); }
.menu-text { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: .6rem; }
.menu-name { font: 800 clamp(1.15rem, 1.7vw, 1.45rem)/1.2 var(--body); color: var(--chalk); transition: color .2s; }
.leader { border-bottom: 3px dotted var(--chalk-dim); opacity: .55; transform: translateY(-.3em); }
.menu-price { font: 700 1.4rem/1 var(--hand); color: var(--pink); white-space: nowrap; }
.menu-desc { grid-column: 1 / -1; font: 400 1.35rem/1.25 var(--hand); color: var(--chalk-dim); margin-top: .15rem; }
.menu-item:hover .menu-name { color: var(--pink); }

/* ---------- Polaroids ---------- */
.polaroid { position: relative; background: var(--paper); padding: 6% 6% 0; margin: 0; box-shadow: 0 6px 14px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.4); }
.polaroid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--slate-ink); }
.polaroid figcaption { font: 700 clamp(1.1rem, 1.6vw, 1.4rem)/1 var(--hand); color: #4b3a55; text-align: center; padding: .55em .3em .7em; }
.menu-item .polaroid { padding: 7% 7% 18%; }
.tilt-l { transform: rotate(-3deg); }
.tilt-l2 { transform: rotate(-1.5deg); }
.tilt-r { transform: rotate(2.5deg); }
.tilt-r2 { transform: rotate(1.2deg); }
.tape { position: absolute; top: -10px; left: 50%; width: 42%; height: 20px; translate: -50% 0; rotate: -4deg; opacity: .85; z-index: 1;
  clip-path: polygon(0 10%, 4% 0, 8% 12%, 12% 0, 100% 0, 96% 90%, 100% 100%, 4% 100%, 0 90%); }
.tape-pink { background: var(--pink); }
.tape-mint { background: var(--mint); }
.tape-lilac { background: var(--lilac); }

/* ---------- The rail between the two panels: the cat's spot ---------- */
.ledge {
  position: relative;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  height: 70px;
  margin: 0 calc(-1 * var(--frame-w));
  padding: 0 calc(var(--gutter) + var(--frame-w));
}
.ledge::before { content: ""; position: absolute; left: 0; right: 0; bottom: 18px; height: 70px; background: url("img/ledge-dust.webp") center bottom / 1600px 70px repeat-x; pointer-events: none; }
.ledge::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px;
  background: var(--frame);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.06), inset 0 -4px 0 var(--frame-dark), 0 6px 12px rgba(0,0,0,.35);
}
.chalk-sticks { position: relative; z-index: 1; width: clamp(200px, 20vw, 290px); height: auto; margin-bottom: 10px; }
.tally { position: relative; z-index: 1; margin: 0 0 22px; font-size: 1.2rem; color: var(--chalk-dim); }
.tally [data-found] { color: var(--mint); font-weight: 700; }
.house-cat {
  position: absolute; z-index: 1; right: clamp(150px, 28vw, 400px); bottom: 12px;
  width: clamp(150px, 15vw, 210px); aspect-ratio: 220 / 120;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.house-cat svg { width: 100%; height: 100%; overflow: visible; }
.house-cat .eyes-open, .house-cat .nightcap { opacity: 0; }
.house-cat .tail { transform-origin: 172px 92px; animation: swish 4.5s ease-in-out infinite; }
.house-cat .head { transform-origin: 56px 100px; transition: transform .5s var(--ease-out); }
.house-cat .zzz { position: absolute; left: 4%; top: -18%; font: 700 1.3rem/1 var(--hand); color: var(--lilac); letter-spacing: .2em; animation: drift 3.2s ease-in-out infinite; }
.house-cat .bubble { position: absolute; left: 34%; top: -44%; padding: .2rem .7rem .3rem; border: 2.5px solid var(--chalk); border-radius: 16px 18px 16px 4px; font-size: 1.45rem; color: var(--chalk); opacity: 0; transform: translateY(6px) scale(.9); transition: opacity .25s, transform .35s var(--ease-out); white-space: nowrap; }
.house-cat.awake .eyes-open { opacity: 1; }
.house-cat.awake .eyes-closed, .house-cat.awake .zzz { opacity: 0; }
.house-cat.awake .head { transform: rotate(-6deg) translateY(-6px); }
.house-cat.awake .bubble { opacity: 1; transform: none; }
.house-cat.awake .tail { animation-duration: 1.4s; }
@keyframes swish { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-14deg); } }
@keyframes drift { 0%, 100% { transform: translateY(0); opacity: .55; } 50% { transform: translateY(-6px); opacity: 1; } }

/* Late night: the board dims, the cat wears its nightcap and sleeps deeper */
body[data-tod="night"] .board { background-color: #19141f; }
body[data-tod="night"] .house-cat .nightcap { opacity: 1; }
body[data-tod="night"] .house-cat .zzz { font-size: 1.6rem; animation-duration: 4.6s; }


/* ---------- Hidden cats ---------- */
.hidden-cat { position: absolute; width: 26px; height: 21px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--chalk); opacity: .14; transition: opacity .25s, transform .4s var(--ease-out), color .2s; }
.hidden-cat svg { width: 100%; height: 100%; fill: currentColor; }
.hidden-cat:hover, .hidden-cat:focus-visible { opacity: .5; }
.hidden-cat.found { color: var(--mint); opacity: .9; transform: scale(1.35) rotate(-8deg); cursor: default; }
.hero .hidden-cat { left: 2%; bottom: 6%; }
.special .hidden-cat { right: 3%; top: .6rem; }
.note .hidden-cat { right: 1.4rem; bottom: 1.2rem; color: var(--plum-ink); opacity: .16; }
.note .hidden-cat.found { color: #3f7d69; }

/* ---------- Lower panel: the specials, chalked in full ---------- */
.specials { padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) 1rem; max-width: 1240px; margin: 0 auto; }
.special { position: relative; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.special-head { max-width: 46rem; margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }
.special h2 { font: clamp(2.4rem, 5.4vw, 4.2rem)/1 var(--display); color: var(--chalk); margin: 0 0 .7rem; text-wrap: balance; }
.title-price { display: inline-block; margin-left: .35em; font: 700 clamp(1.3rem, 2vw, 1.75rem)/1 var(--hand); color: var(--mint); rotate: -4deg; vertical-align: .55em; white-space: nowrap; }
.pinboard { position: relative; }
.chalk-note { position: absolute; z-index: 2; margin: 0; display: flex; align-items: flex-start; gap: .2rem; font: 700 clamp(1.3rem, 1.8vw, 1.6rem)/1 var(--hand); color: var(--chalk); pointer-events: none; white-space: nowrap; }
.chalk-note svg { flex: none; width: 78px; height: 57px; fill: none; stroke: var(--chalk); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
/* notes are chalked on the slate just above each photo; the arrow crosses onto its subject */
.pinboard:has(.chalk-note) { margin-top: 3.2rem; }
.note-coat { left: 33%; top: -3.6rem; }
.note-yarn { left: 30%; top: -3.6rem; }
.note-kitty { left: 37%; top: -3.6rem; }
.pitch { font: 700 clamp(1.55rem, 2.6vw, 2.15rem)/1.15 var(--hand); color: var(--pink); margin: 0; }
.special-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.special.flip .special-head { margin-left: auto; text-align: right; }
.special.flip .special-body { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.special.flip .pinboard { order: 2; }
.special-copy p { margin: 0 0 1.4rem; max-width: 34rem; }
.pinboard-3 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2.4vw, 2rem); align-items: start; }
.pinboard-3 .big { grid-column: 1 / -1; }
.pinboard-3 .big img { aspect-ratio: 16 / 8; }
.pinboard-3.alt .big img, .pinboard-1 .big img { aspect-ratio: 16 / 9; }

.divider { display: block; width: min(560px, 70%); height: 24px; margin: 0 auto; overflow: visible; }
.divider path { fill: none; stroke: var(--chalk); stroke-width: 3; stroke-linecap: round; opacity: .3; }

.ingredients { margin: 0 0 1.6rem; padding: 0; display: grid; gap: .45rem; }
.ingredients div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .8rem; align-items: baseline; padding-bottom: .45rem; border-bottom: 2px dotted rgba(203,191,210,.28); }
.ingredients dt { font: 700 1.3rem/1 var(--hand); color: var(--lilac); }
.ingredients dd { margin: 0; font-weight: 700; }

/* ---------- Press note ---------- */
.notes { display: grid; place-items: center; padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(4rem, 9vw, 6.5rem); }
.note { position: relative; width: min(560px, 100%); padding: 2.4rem clamp(1.4rem, 4vw, 2.6rem) 2.2rem; background: var(--lilac); color: var(--plum-ink); transform: rotate(-1.2deg); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.note .tape { top: -12px; width: 30%; }
.note-title { font: 1.9rem/1.05 var(--display); margin: 0 0 1rem; }
.note ul { margin: 0 0 1.3rem; padding-left: 1.2rem; font-weight: 700; }
.note li { margin-bottom: .45rem; }
.note li::marker { color: #7b5aa6; }
.note-mail { font: 700 1.5rem/1 var(--hand); color: var(--plum-ink); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- The counter (footer): the frame's bottom rail, wide ---------- */
.counter {
  margin: 0 clamp(8px, 1.6vw, 22px) clamp(8px, 1.6vw, 22px);
  background: var(--frame);
  border-radius: 0 0 8px 8px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.06), inset 0 -5px 0 var(--frame-dark), 0 18px 40px rgba(0,0,0,.45);
  padding: clamp(2.8rem, 6vw, 4.5rem) var(--gutter) 2.2rem;
  text-align: center;
}
.counter-inner { max-width: 40rem; margin: 0 auto; }
.counter-title { font: clamp(2.6rem, 6vw, 4rem)/1 var(--display); color: var(--pink); margin: 0 0 .7rem; }
.counter p { margin: 0 0 1.6rem; }
.counter .legal { margin: 2.4rem 0 0; font-size: .95rem; color: #dccbd8; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 22px; translate: -50% 0; padding: .55rem 1.1rem .65rem; border-radius: 16px; background: var(--slate); border: 2.5px solid var(--mint); color: var(--chalk); font-size: 1.35rem; box-shadow: 0 10px 24px rgba(0,0,0,.45); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .4s var(--ease-out); z-index: 20; }
.toast.show { opacity: 1; transform: none; }

/* ---------- Entrance: the specials are chalked in once ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .swash path { stroke-dashoffset: 330; animation: draw 1.1s .35s var(--ease-out) forwards; }
  .js .menu-list li { animation: pin .6s var(--ease-out) both; }
  .js .menu-list li:nth-child(2) { animation-delay: .12s; }
  .js .menu-list li:nth-child(3) { animation-delay: .24s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pin { from { opacity: .001; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .ghost { display: none; }
  .special-body, .special.flip .special-body { grid-template-columns: 1fr; }
  .special.flip .pinboard { order: 0; }
  .special.flip .special-head { margin-left: 0; text-align: left; }
  .house-cat { right: auto; left: 50%; translate: -50% 0; }
  .ledge { height: 92px; }
  .tally { font-size: 1.05rem; text-align: right; max-width: 6.5rem; line-height: 1.1; }
  .chalk-note { display: none; }
}
@media (max-width: 560px) {
  .bar { flex-wrap: wrap; row-gap: .4rem; }
  .bar nav { gap: .9rem; font-size: 1.2rem; }
  .menu-item { grid-template-columns: 92px 1fr; }
  .menu-text { grid-template-columns: 1fr; }
  .leader { display: none; }
  .menu-price { font-size: 1.2rem; }
  .chalk-sticks { width: 168px; }
  .house-cat { left: auto; right: 6px; translate: none; width: 132px; }
  .ledge { height: 104px; }
  .tally { position: absolute; right: calc(var(--gutter) + var(--frame-w)); top: -.4rem; margin: 0; max-width: none; text-align: right; }
  .house-cat .bubble { left: 46%; }
  .house-cat .zzz { left: -30%; top: 6%; }
  .sky { top: 3.6rem; width: 40px; height: 40px; }
}
