/* The Lickability Index — cats.interrobang.ro
   Figma: FLpSPiIDGRWzq0ufwaR3se (Desktop 6:2, Mobile 11:541) */

:root {
  --cream: #FFF9EA;
  --rust: #933F25;
  --ink: #1C1A17;
  --sand: #F5EBD3;
  --dot: #D9C9A6;
  --navy: #11022D;
  --black: #000;

  /* moonblossom + tomarik-introvert come from the Adobe Fonts kit skl6wvl (index.html). */
  --font-display: "moonblossom", "MOONBLOSSOM", "Patrick Hand SC", cursive;
  --font-body: "tomarik-introvert", "Patrick Hand", cursive;
  --font-mono: "Victor Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.35;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.m-only, .m-header { display: none; }

/* ───────────── Hero ───────────── */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  touch-action: pan-y;
}
/* The stage keeps the Figma frame's proportions and always fits the first screen. */
.stage {
  position: relative;
  width: min(100vw, calc(100svh * 1440 / 900));
  aspect-ratio: 1440 / 900;
  margin: 0 auto;
  container-type: inline-size;
}
.el {
  position: absolute;
  left: calc(var(--x) / 1440 * 100%);
  top: calc(var(--y) / 900 * 100%);
  width: calc(var(--w) / 1440 * 100%);
  margin: 0;
}
:where(.el > img) { width: 100%; height: auto; }
:where(img.el) { height: auto; }
.logo-link img { width: 100%; height: auto; }

.spectrum { height: calc(var(--h) / 900 * 100%); }
.spectrum img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }

.cat { user-select: none; -webkit-user-select: none; cursor: url("/assets/cursor01.svg") 2 2, crosshair; }
.cat > img { width: 100%; height: auto; }
.eye {
  position: absolute;
  left: calc(var(--ex) * 100%);
  top: calc(var(--ey) * 100%);
  width: calc(var(--ew) * 100%);
  pointer-events: none;
}
.eye svg { width: 100%; height: auto; overflow: visible; }

.tongue-wrap { will-change: transform; pointer-events: none; }
.tongue { position: relative; width: 100%; aspect-ratio: 221 / 271; transform: scaleX(-1); }
.tongue img { position: absolute; height: auto; }
.tongue-body { left: calc(60 / 221 * 100%); top: 0; width: calc(161 / 221 * 100%); transform-origin: 45% 100%; animation: lick 1.8s ease-in-out infinite; }
.tongue-spit.s1 { left: 0; top: calc(140 / 271 * 100%); width: calc(49 / 221 * 100%); animation: spit 1.8s ease-out infinite; }
.tongue-spit.s2 { left: calc(10 / 221 * 100%); top: calc(169 / 271 * 100%); width: calc(42 / 221 * 100%); animation: spit 1.8s ease-out .15s infinite; }
/* A lick: the tongue stretches up and flicks, then settles */
@keyframes lick {
  0%, 55%, 100% { transform: rotate(0) scaleY(1); }
  15% { transform: rotate(-7deg) scaleY(1.07); }
  30% { transform: rotate(5deg) scaleY(.97); }
  42% { transform: rotate(-2deg) scaleY(1.02); }
}
/* Spit flies off with each lick */
@keyframes spit {
  0%, 12% { transform: translate(0, 0) scale(1); opacity: 1; }
  32% { transform: translate(-28%, -10%) scale(1.12); opacity: 1; }
  55% { transform: translate(-48%, -16%) scale(.9); opacity: 0; }
  56% { transform: translate(18%, 4%) scale(.7); opacity: 0; }
  80%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
}

.hint {
  display: flex;
  align-items: center;
  gap: calc(10 / 1440 * 100cqw);
  font-family: var(--font-mono);
  font-size: calc(12 / 1440 * 100cqw);
  line-height: 1.33;
  color: var(--ink);
  opacity: .75;
}
.hint span { white-space: nowrap; }
.hint-cursor { width: calc(22 / 1440 * 100cqw); flex: none; }

/* Looping sparkles (clean end) and flies (dirty end) */
.floaters .sparkle { animation: twinkle 2.4s ease-in-out var(--d) infinite; }
.floaters .fly { animation: buzz 1.6s ease-in-out var(--d) infinite; }
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
  40% { transform: scale(.55) rotate(-20deg); opacity: .45; }
  60% { transform: scale(1.15) rotate(10deg); opacity: 1; }
}
@keyframes buzz {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(8%, -14%) rotate(8deg); }
  45% { transform: translate(-10%, -4%) rotate(-6deg); }
  70% { transform: translate(5%, 10%) rotate(5deg); }
}

/* Cursor effects (spawned by main.js) */
.fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fx img { position: absolute; left: 0; top: 0; }
/* Cursor sparkles sit on orange fur, so they get a dark hand-drawn outline to stand out */
.fx .fx-sparkle {
  animation: pop .8s ease-out forwards;
  filter: drop-shadow(1.2px 0 0 var(--ink)) drop-shadow(-1.2px 0 0 var(--ink)) drop-shadow(0 1.2px 0 var(--ink)) drop-shadow(0 -1.2px 0 var(--ink));
}
@keyframes pop {
  0% { opacity: 0; scale: .2; rotate: -30deg; }
  30% { opacity: 1; scale: 1.15; }
  100% { opacity: 0; scale: .6; rotate: 25deg; }
}
.fx .fx-fly { transition: opacity .35s; opacity: 0; }

/* ───────────── Did you know? ───────────── */
.facts { max-width: 1440px; margin: 0 auto; padding: 80px 120px 120px; }
.facts-title { display: flex; justify-content: center; margin-bottom: 56px; }
.facts-title img { width: 520px; height: auto; }
.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 72px 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.fact img { width: 100%; height: 280px; object-fit: contain; margin-bottom: 14px; }
.fact h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 14px;
}
.fact p { font-size: 20px; }

/* Fade in as it scrolls into view (main.js adds .is-in; only when JS runs) */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity .8s ease, translate .8s ease; transition-delay: var(--delay, 0s); }
.js .reveal.is-in { opacity: 1; translate: 0 0; }

/* ───────────── Wear the index + CTA ───────────── */
.wear { background: var(--sand); }
.wear-inner { max-width: 1440px; margin: 0 auto; padding: 96px 120px 120px; }
.h2 { font-family: var(--font-display); font-weight: 400; font-size: 56px; line-height: 1.15; color: var(--rust); text-transform: uppercase; }
.intro { font-size: 22px; max-width: 760px; margin-top: 24px; }

.slider { margin-top: 32px; }
.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline-offset: 4px;
}
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; aspect-ratio: 3 / 2; scroll-snap-align: start; }
/* The image box hugs the photo; a rough-edged mask lets the sand background
   bite into the edges, so each photo gets a torn, hand-drawn border. */
.slide img {
  width: 100%; height: 100%; object-fit: cover;
  -webkit-mask: url("/assets/rough-edge.svg") center / 100% 100% no-repeat;
  mask: url("/assets/rough-edge.svg") center / 100% 100% no-repeat;
}.slider-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; }
.progress { display: flex; align-items: center; gap: 8px; }
.progress button {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 3px;
  background: var(--dot); cursor: pointer;
  transition: width .35s ease, background-color .35s ease;
}
.progress button[aria-selected="true"] { width: 40px; background: var(--rust); }
.arrows { display: flex; }
.arrow {
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--rust); color: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: transform .15s ease;
}
.arrow:hover { transform: scale(1.06); }
.arrow:disabled { opacity: .35; cursor: default; transform: none; }
.arrow svg { width: 18px; height: 18px; fill: currentColor; }

.cta { display: flex; align-items: center; justify-content: center; gap: 72px; margin-top: 120px; }
.cta-art { position: relative; width: 446px; aspect-ratio: 446 / 402; flex: none; }
.cta-art img {
  position: absolute;
  left: calc(var(--x) / 446 * 100%);
  top: calc(var(--y) / 402 * 100%);
  width: calc(var(--w) / 446 * 100%);
  height: calc(var(--h) / 402 * 100%);
  transform-origin: 0 0;
  transform: rotate(var(--r));
}
.cta-copy { max-width: 540px; }
.cta-title { font-size: 48px; }
.cta-copy p { font-size: 22px; margin: 20px 0; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px; border-radius: 999px;
  background: var(--rust); color: #fff; text-decoration: none;
  font-family: var(--font-body); font-size: 18px;
  transition: transform .15s ease;
}
.button:hover { transform: translateY(-2px); }
.button svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* ───────────── Footer ───────────── */
.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 40px 90px;
  background: var(--black); color: #fff;
  font-family: var(--font-mono); font-size: 13px;
}
.footer p { opacity: .8; }
.footer nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

/* ───────────── Mobile (Figma 390 frame) ───────────── */
@media (max-width: 700px) {
  .d-only { display: none; }
  .m-only { display: inline; }
  .m-header { display: flex; justify-content: center; align-items: center; height: 72px; }
  .m-header img { width: 140px; height: auto; }
  .hero { min-height: calc(100svh - 72px); }
  .stage {
    width: min(100vw, calc((100svh - 72px) * 390 / 772));
    aspect-ratio: 390 / 772;
  }
  .el {
    left: calc(var(--mx) / 390 * 100%);
    top: calc(var(--my) / 772 * 100%);
    width: calc(var(--mw) / 390 * 100%);
  }
  .spectrum { height: calc(var(--mh) / 772 * 100%); }
  .hint { font-size: calc(11 / 390 * 100cqw); gap: calc(8 / 390 * 100cqw); }
  .hint-cursor { width: calc(17.6 / 390 * 100cqw); }

  .facts { padding: 48px 27px 72px; }
  .facts-title { margin-bottom: 40px; }
  .facts-title img { width: 260px; }
  .facts-grid { grid-template-columns: 1fr; gap: 40px; }
  .fact { text-align: center; }
  .fact img { height: 240px; }
  .fact h3 { font-size: 24px; }
  .fact p { font-size: 18px; }

  .wear-inner { padding: 56px 27px 72px; }
  .h2 { font-size: 40px; }
  .intro { font-size: 19px; margin-top: 16px; }
  .slider { margin-top: 20px; }
  .slide { aspect-ratio: 4 / 5; }
  .slider-controls { margin-top: 20px; }
  .arrow { width: 41px; height: 41px; }
  .cta { flex-direction: column; gap: 20px; margin-top: 48px; padding: 24px; align-items: stretch; }
  .cta-art { width: 290px; margin: 0 auto; }
  .cta-title { font-size: 34px; }
  .cta-copy p { font-size: 19px; }
  .button { width: 100%; justify-content: center; }

  .footer { flex-direction: column-reverse; text-align: center; padding: 36px 27px; }
  .footer nav { justify-content: center; gap: 10px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .floaters .sparkle, .floaters .fly, .tongue-body, .tongue-spit { animation: none; }
  .fx { display: none; }
  .progress button, .button, .arrow { transition: none; }
}
