/* Clu ($CLU). Banana yellow page, black ink, white bubbles holding the real quotes. Clean edges, heavy type. */
:root {
  --page: #ffcd1f;
  --ink: #14110f;
  --white: #fffdf6;
  --night: #2a2166;
  --shade: #d99e00;   /* shadows are a darker yellow, so a shadow never reads as more black border */
  --display: "Dela Gothic One", "Arial Black", system-ui, sans-serif;
  --text: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; position: relative; touch-action: manipulation; overflow-x: hidden;
  background: var(--page); color: var(--ink); font: 600 1.125rem/1.35 var(--text);
  cursor: default;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
main { position: relative; z-index: 2; max-width: 1120px; margin: 0 auto; padding: clamp(18px, 4vw, 44px) clamp(16px, 4vw, 32px) 0; }

/* ---------- title: C L U + the dog as the fourth letter ---------- */
.mast { position: relative; }
.title {
  margin: 0; display: flex; align-items: center; flex-wrap: nowrap; gap: 0.03em; position: relative;
  font: 400 min(20vw, 15rem)/0.95 var(--display); letter-spacing: -0.02em;
  color: var(--ink); text-shadow: 0.035em 0.04em 0 var(--shade);
  user-select: none;
}
.title > span { display: inline-block; transform-origin: 50% 90%; }
.js .title > span { animation: plop 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.js .title > span:nth-child(2) { animation-delay: 0.07s; }
.js .title > span:nth-child(3) { animation-delay: 0.14s; }
@keyframes plop { from { transform: translateY(-0.4em) scale(0.7, 1.2); opacity: 0; } to { transform: none; opacity: 1; } }

.mug {
  flex: none; width: 1.36em; height: 1.36em; margin-left: 0.12em; padding: 0; border: 4px solid var(--ink); border-radius: 50%;
  overflow: hidden; background: var(--night); cursor: pointer; font: inherit; color: inherit;
  box-shadow: 0.05em 0.055em 0 var(--shade);
  animation: bob 3.4s ease-in-out infinite;
}
.mug img { width: 100%; height: 100%; object-fit: cover; }
.mug.boing { animation: boing 0.55s cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(3deg); } 50% { transform: translateY(-0.03em) rotate(-2deg); } }
@keyframes boing { 0% { transform: scale(1); } 30% { transform: scale(1.14, 0.84); } 60% { transform: scale(0.93, 1.08); } 100% { transform: scale(1) rotate(3deg); } }

.tick { display: inline-block; margin-right: 0.35em; padding: 0.12em 0.5em 0.16em; border-radius: 7px; background: var(--ink); color: var(--page); font: 400 0.82em/1.2 var(--display); rotate: -2deg; }

.who { margin: clamp(14px, 2vw, 24px) 0 0; max-width: 33em; font-size: clamp(1.1rem, 1.9vw, 1.45rem); font-weight: 700; }
.who a { text-decoration-thickness: 3px; text-underline-offset: 3px; }

.acts { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }

/* the CA is a banana */
.banana {
  position: relative; display: inline-flex; align-items: center; gap: 0.55em; max-width: 100%;
  padding: 0.72em 1.3em 0.72em 1.1em; border: 4px solid var(--ink); border-radius: 999px;
  background: #ffe873; color: var(--ink); cursor: pointer; rotate: -1deg;
  font: 700 clamp(0.66rem, 2.75vw, 1.02rem)/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: -0.01em;
  transition: rotate 0.15s, scale 0.15s, background 0.15s;
}
.banana::before, .banana::after {
  content: ""; position: absolute; top: 34%; height: 32%; width: 13px; background: #6b4423; border: 3px solid var(--ink);
}
.banana::before { left: -12px; border-radius: 6px 0 0 6px; border-right: 0; }
.banana::after { right: -9px; width: 9px; border-radius: 0 5px 5px 0; border-left: 0; }
.banana .ico { flex: none; width: 1.35em; height: 1.35em; }
.banana .ca-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banana:hover { rotate: 0.6deg; scale: 1.03; }
.banana:active { scale: 0.96; }
.banana.done { background: #b8ec6a; }
.banana.done .ca-text { flex: 1; text-align: center; }

.btn {
  display: inline-block; padding: 0.62em 1.15em 0.66em; border-radius: 12px; background: var(--ink); color: var(--page);
  font: 400 1.05rem/1 var(--display); text-decoration: none; transition: translate 0.15s, scale 0.15s;
}
.btn:hover { translate: 0 -3px; }
.btn:active { scale: 0.95; }

/* ---------- panels, tags, bubbles ---------- */
.panel { position: relative; margin: 0; }
.frame { position: relative; aspect-ratio: 1; overflow: hidden; border: 4px solid var(--ink); border-radius: 16px; background: var(--white); box-shadow: 8px 9px 0 var(--shade); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.cap {
  position: absolute; left: -8px; top: -14px; z-index: 2; max-width: calc(100% - 8px); padding: 0.4em 0.75em 0.44em;
  border-radius: 7px; background: var(--ink); color: var(--page);
  font-size: 0.9rem; font-weight: 700; line-height: 1.15; text-decoration: none; rotate: -1.5deg;
}
a.cap { transition: rotate 0.15s, scale 0.15s; }
a.cap:hover { rotate: 0deg; scale: 1.05; }
a.cap::after { content: " ↗"; }

.bubble {
  position: relative; margin: 0; padding: 0.7em 1em 0.78em; border: 4px solid var(--ink); border-radius: 22px;
  background: var(--white); font-size: 1.08rem; font-weight: 600; line-height: 1.28;
}
.bubble::before, .bubble::after { content: ""; position: absolute; width: 0; height: 0; border-style: solid; border-color: transparent; }
/* small bubbles sit under a photo, tail up at the dog */
.panel .bubble { width: fit-content; max-width: 92%; margin: -24px 0 0 auto; z-index: 2; }
.panel:nth-child(even) .bubble { margin-left: 4%; margin-right: auto; }
.panel .bubble::before { top: -26px; left: 32%; border-width: 0 6px 26px 20px; border-bottom-color: var(--ink); }
.panel .bubble::after { top: -15px; left: calc(32% + 5px); border-width: 0 4px 18px 13px; border-bottom-color: var(--white); }
.panel:nth-child(even) .bubble::before { left: auto; right: 30%; border-width: 0 20px 26px 6px; }
.panel:nth-child(even) .bubble::after { left: auto; right: calc(30% + 5px); border-width: 0 13px 18px 4px; }

.js .panel .frame { opacity: 0; transform: translateY(26px) scale(0.96); transition: opacity 0.35s, transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1); }
.js .panel.in .frame { opacity: 1; transform: none; }
.js .panel .bubble, .js .panel .cap { opacity: 0; scale: 0.7; transition: opacity 0.25s 0.3s, scale 0.4s 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
.js .panel.in .bubble, .js .panel.in .cap { opacity: 1; scale: 1; }

/* ---------- Magnus's post ---------- */
.post { margin-top: clamp(40px, 7vw, 84px); }
.say { max-width: 44rem; margin: 0 auto 34px 4%; padding: 0.85em 1.2em 0.95em; border-radius: 28px; font-size: clamp(1.25rem, 2.7vw, 1.9rem); font-weight: 700; line-height: 1.2; z-index: 3; }
.say p { margin: 0; }
.say::before { bottom: -38px; left: 16%; border-width: 38px 26px 0 6px; border-top-color: var(--ink); }
.say::after { bottom: -26px; left: calc(16% + 5px); border-width: 28px 18px 0 4px; border-top-color: var(--white); }
.say .by { display: inline-block; margin-top: 0.6em; font-size: 0.58em; font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.say .by::after { content: " ↗"; }
.js .say { opacity: 0; scale: 0.8; transform-origin: 20% 100%; transition: opacity 0.25s, scale 0.45s cubic-bezier(0.3, 1.5, 0.5, 1); }
.js .say.in { opacity: 1; scale: 1; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 36px); }
.pair .tl { rotate: -1deg; }
.pair .tr { rotate: 1deg; margin-top: clamp(10px, 3vw, 40px); }
.pair .cap { font-size: clamp(0.92rem, 1.8vw, 1.2rem); }

/* ---------- 2018 ---------- */
.blog { margin-top: clamp(70px, 10vw, 130px); }
.blog-head { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); flex-wrap: wrap; }
.year {
  font: 400 clamp(4.2rem, 13vw, 9rem)/0.95 var(--display); letter-spacing: -0.02em; color: var(--ink); text-shadow: 0.035em 0.04em 0 var(--shade);
}
.blog-head p { margin: 0; }
.fact { font-size: clamp(1.2rem, 2.3vw, 1.6rem); font-weight: 800; }
.gone { margin-top: 0.45em !important; display: flex; align-items: center; gap: 0.5em; font-size: 1.02rem; }
.gone svg { flex: none; width: 1.8em; height: 1.8em; }

.strip { margin-top: clamp(40px, 5vw, 60px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 54px clamp(20px, 3vw, 36px); align-items: start; }
.strip .panel:nth-child(3n + 2) { margin-top: 46px; }

/* ---------- banana peels ---------- */
#peels { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.peel { position: absolute; width: 96px; height: 96px; overflow: visible; }
.lay.p1 { right: max(2vw, calc(50% - 700px)); top: 520px; rotate: 18deg; }
.lay.p2 { left: max(-18px, calc(50% - 690px)); top: 980px; rotate: -24deg; width: 120px; height: 120px; }
.lay.p3 { right: max(-10px, calc(50% - 680px)); top: 1840px; rotate: 30deg; width: 84px; height: 84px; }
.lay.p4 { left: max(1vw, calc(50% - 660px)); top: 2500px; rotate: 10deg; }
.thrown { rotate: var(--turn); animation: land 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes land { from { transform: translateY(-70px) scale(1.5) rotate(-50deg); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }

.foot { position: relative; z-index: 2; margin-top: clamp(70px, 9vw, 120px); padding: 22px 16px 34px; text-align: center; font-size: 0.92rem; background: var(--ink); color: var(--page); }
.foot p { margin: 0; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  body { font-size: 1.05rem; }
  .pair { grid-template-columns: 1fr; gap: 46px; }
  .pair .tr { margin-top: 0; }
  .say { margin-left: 0; }
  .strip { grid-template-columns: 1fr; gap: 50px; }
  .strip .panel:nth-child(3n + 2) { margin-top: 0; }
  .frame { box-shadow: 6px 7px 0 var(--shade); }
  .lay.p1 { top: 300px; right: -34px; }
  .lay.p2, .lay.p4 { left: -44px; }
  .lay.p3 { right: -30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .panel .frame, .js .panel .bubble, .js .panel .cap, .js .say { opacity: 1; scale: 1; transform: none; }
}
