/* =====================================================================
   MOTION — the "ease" styles (used with assets/js/smooth.js)
   Linked on every page. You won't need to touch this.
   ===================================================================== */

/* Libre Caslon Display: the serif for your name and project titles */
@import url("https://fonts.googleapis.com/css2?family=Libre+Caslon+Display&display=swap");

/* Eased scroll (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Fade-up: starts a little low and see-through, eases into place */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.is-in { opacity: 1; transform: none; }

/* The Caslon look: one weight only, so a hair-thin outline makes it a touch heavier */
.serif {
  font-family: "Libre Caslon Display", Georgia, serif;
  font-weight: 400;
  -webkit-text-stroke: 0.018em currentColor;   /* ✏️ 0 = lighter, 0.03em = heavier */
}

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ---------- CUSTOM CURSOR (see assets/js/cursor.js) ---------- */
html.has-cursor,
html.has-cursor * { cursor: none !important; }      /* hide the normal arrow, laptops only */

.cur {
  position: fixed; left: 0; top: 0; z-index: 9999;
  pointer-events: none;
  mix-blend-mode: difference;                         /* flips colour over anything */
}
.cur::before {                                        /* the dot / ring */
  content: ""; position: absolute;
  width: 12px; height: 12px; left: -6px; top: -6px;   /* ✏️ dot size */
  border-radius: 50%;
  background: #fff;
  transition: width .35s cubic-bezier(.16,1,.3,1), height .35s cubic-bezier(.16,1,.3,1),
              left .35s cubic-bezier(.16,1,.3,1), top .35s cubic-bezier(.16,1,.3,1), transform .15s;
}
.cur.is-link::before { width: 56px; height: 56px; left: -28px; top: -28px; }   /* ✏️ ring size on links */
.cur.has-label::before { width: 76px; height: 76px; left: -38px; top: -38px; }
.cur.is-down::before { transform: scale(.8); }
.cur-label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  font-family: "DM Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; white-space: nowrap;
  color: #000;                                        /* shows as dark on the light ring */
  opacity: 0; transition: opacity .2s;
}
.cur.has-label .cur-label { opacity: 1; }

/* ✦ click burst */
.cur-star {
  position: fixed; z-index: 9998; pointer-events: none;
  animation: cur-burst .8s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes cur-burst {
  0%   { transform: translate(0,0) rotate(0) scale(.4); opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); opacity: 0; }
}

/* ---------- Sleepy buddy who follows the cursor (on every page — see assets/js/peek-buddy.js) ---------- */
.buddy {
  position: fixed; top: 0; left: 0; z-index: 9997; pointer-events: none;
  font-family: "DM Mono", monospace; font-size: 15px; line-height: 1; white-space: nowrap;
  color: #3b3a2e;                                   /* ✏️ his colour */
  opacity: 0; transition: opacity .3s ease;
  /* cream halo so he still shows up on dark images + videos */
  text-shadow: 0 0 2px #fff9f7, 0 0 4px #fff9f7, 0 0 6px #fff9f7;
}
.buddy.is-on { opacity: 1; }
.buddy.is-awake { animation: buddy-bop .32s ease-in-out infinite alternate; }
@keyframes buddy-bop { to { margin-top: -4px; } }
.buddy-puff {
  text-shadow: 0 0 3px #fff9f7, 0 0 5px #fff9f7;
  position: fixed; z-index: 9996; pointer-events: none; line-height: 1;
  font-family: "DM Mono", monospace;
  animation: buddy-float 1.6s ease-out forwards;
}
.buddy-puff.is-z { color: #9a9784; }               /* ✏️ sleepy grey z's */
.buddy-puff.is-note:nth-child(4n)   { color: #EF529C; }   /* ✏️ note colours */
.buddy-puff.is-note:nth-child(4n+1) { color: #4369B4; }
.buddy-puff.is-note:nth-child(4n+2) { color: #30AB68; }
.buddy-puff.is-note:nth-child(4n+3) { color: #d9a400; }
@keyframes buddy-float {
  0%   { opacity: 0; transform: translate(0, 0) scale(.7); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(-10deg); }
}
