/* ============================================================
   John Savage AI Tools — flame theme
   Cooper Black display + Baloo 2 body. Matches workflows site.
   True black (dark) / white (light). Self-hosted fonts only.
   ============================================================ */

@font-face {
  font-family: "Cooper Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cooper-black-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Bagel Fat One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/bagel-fat-one-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/baloo2-latin-var.woff2") format("woff2");
}

:root,
html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #000000;
  --surface: #101014;
  --surface-2: #1a1a20;
  --ink: #ffffff;
  --ink-strong: #ffffff;
  --muted: #b6b6bf;
  --faint: #98989f;
  --hairline: rgba(255, 255, 255, 0.12);
  --hairline-strong: rgba(255, 255, 255, 0.22);

  --flame-yellow: #ffc836;
  --flame-orange: #ff8a2a;
  --flame-red: #ef4b23;
  --flame-ink: #2a0f05;
  --accent: var(--flame-yellow);
  --accent-tint: rgba(255, 200, 54, 0.15);
  --accent-line: rgba(255, 200, 54, 0.45);

  --display-fill: var(--flame-yellow);
  --display-shadow: rgba(239, 75, 35, 0.6);

  --nav-bg: rgba(0, 0, 0, 0.72);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 4px 10px rgba(239, 75, 35, 0.12), 0 24px 56px rgba(0, 0, 0, 0.55);
  --spot: rgba(255, 200, 54, 0.09);
  --glow-a: rgba(255, 138, 42, 0.14);
  --glow-b: rgba(239, 75, 35, 0.1);
  --input-bg: rgba(255, 255, 255, 0.06);
  --selection-bg: #ffc836;
  --selection-ink: #2a0f05;
  --focus-ring: #ff8a2a;
  --sticker-ring: #f3ead3;
  --tape: rgba(243, 234, 211, 0.28);
  --mega-stroke: rgba(255, 200, 54, 0.16);
  --halftone-ink: rgba(255, 200, 54, 0.4);
}

html[data-theme="light"] {
  color-scheme: light;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #fff6ec;
  --ink: #1a1a1a;
  --ink-strong: #0d0d0d;
  --muted: #585858;
  --faint: #6f6f6f;
  --hairline: rgba(26, 26, 26, 0.12);
  --hairline-strong: rgba(26, 26, 26, 0.22);

  --flame-yellow: #ffc836;
  --flame-orange: #ff8a2a;
  --flame-red: #ef4b23;
  --flame-ink: #2a0f05;
  --accent: #b8371c;
  --accent-tint: rgba(255, 138, 42, 0.14);
  --accent-line: rgba(239, 75, 35, 0.45);

  --display-fill: #e8452c;
  --display-shadow: rgba(255, 200, 54, 0.9);

  --nav-bg: rgba(255, 255, 255, 0.8);
  --card-shadow: 0 1px 2px rgba(120, 60, 20, 0.06), 0 10px 28px rgba(120, 60, 20, 0.09);
  --card-shadow-hover: 0 4px 10px rgba(239, 75, 35, 0.1), 0 22px 48px rgba(120, 60, 20, 0.16);
  --spot: rgba(255, 138, 42, 0.08);
  --glow-a: rgba(255, 200, 54, 0.22);
  --glow-b: rgba(255, 138, 42, 0.12);
  --input-bg: #ffffff;
  --selection-bg: #8a2f14;
  --selection-ink: #ffffff;
  --focus-ring: #c23a1d;
  --sticker-ring: #1d1c19;
  --tape: rgba(239, 75, 35, 0.18);
  --mega-stroke: rgba(239, 75, 35, 0.18);
  --halftone-ink: rgba(239, 75, 35, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Baloo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* Barely-there grain so flat blacks/whites feel printed, not rendered */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--flame-yellow);
  color: var(--flame-ink);
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-ink);
}

/* ------------------------------------------------------------
   Top navigation — sticky glass bar
   ------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.topbar-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Cooper Black", "Bagel Fat One", "Baloo 2", sans-serif;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--flame-yellow), var(--flame-orange) 55%, var(--flame-red));
  color: var(--flame-ink);
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 12px rgba(239, 75, 35, 0.3);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.06);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--accent-tint);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--accent-tint);
  transform: translateY(-2px) rotate(-4deg);
}

.social-icon {
  width: 17px;
  height: 17px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 2px solid var(--hairline);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--accent-line);
  background: var(--accent-tint);
}

.theme-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

html[data-theme="dark"] .theme-icon-moon,
html[data-theme="light"] .theme-icon-sun {
  display: none;
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4.5vh, 52px) clamp(16px, 4vw, 32px) clamp(24px, 3.5vh, 44px);
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 480px at 82% 8%, var(--glow-a), transparent 65%),
    radial-gradient(560px 460px at 6% 92%, var(--glow-b), transparent 68%);
}

.hero-compact {
  position: relative;
  width: min(1160px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 40px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--flame-yellow), var(--flame-red));
  box-shadow: 0 0 0 4px var(--accent-tint);
}

.hero h1 {
  margin: 0 0 12px;
  font-family: "Cooper Black", "Bagel Fat One", "Baloo 2", sans-serif;
  font-weight: 400;
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.08;
  letter-spacing: 0.005em;
  color: var(--display-fill);
  text-shadow:
    0 3px 0 var(--display-shadow),
    0 8px 22px var(--display-shadow);
}

.squiggle {
  position: relative;
  display: inline-block;
}

.squiggle svg {
  position: absolute;
  left: 2%;
  bottom: -0.24em;
  width: 96%;
  height: 0.24em;
  color: var(--flame-orange);
  overflow: visible;
}

.hero-text {
  margin: 0 0 12px;
  max-width: 62ch;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.55;
  font-weight: 500;
  color: var(--muted);
}

.hero-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--faint);
}

.footnote-sep {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--flame-orange);
}

/* Compact round face avatar with flame ring + curator caption */

.creator-avatar {
  position: relative;
  margin: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.creator-avatar img {
  width: clamp(88px, 9vw, 120px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 999px;
  border: 3px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(160deg, var(--flame-yellow), var(--flame-orange) 55%, var(--flame-red)) border-box;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  transform: rotate(-3deg);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

html[data-theme="light"] .creator-avatar img {
  box-shadow: 0 10px 26px rgba(120, 60, 20, 0.22);
}

.creator-avatar:hover img {
  transform: rotate(0deg) scale(1.05);
}

.creator-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
  text-align: center;
}

.creator-tag span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.creator-tag strong {
  font-family: "Cooper Black", "Bagel Fat One", "Baloo 2", sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-strong);
  white-space: nowrap;
}

/* Hand-placed sprinkles (decorative) */

.sprinkle {
  position: absolute;
  pointer-events: none;
  color: var(--flame-orange);
  opacity: 0.85;
  animation: twinkle 3.6s ease-in-out infinite;
}

.sprinkle-yellow { color: var(--flame-yellow); }
.sprinkle-red { color: var(--flame-red); }

html[data-theme="light"] .sprinkle { opacity: 0.7; }

.sprinkle:nth-of-type(2n) { animation-delay: 0.9s; animation-duration: 4.4s; }
.sprinkle:nth-of-type(3n) { animation-delay: 1.7s; animation-duration: 5s; }

@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
  50%      { transform: scale(1.25) rotate(12deg); opacity: 0.95; }
}

.scroll-hint {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: clamp(24px, 4vh, 48px) auto 0;
  border-radius: 999px;
  border: 2px solid var(--hairline);
  color: var(--muted);
  animation: hint-bob 2.4s ease-in-out infinite;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.scroll-hint:hover {
  color: var(--flame-orange);
  border-color: var(--accent-line);
}

.scroll-hint svg {
  width: 17px;
  height: 17px;
}

@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ------------------------------------------------------------
   Ticker strip
   ------------------------------------------------------------ */

.ticker {
  overflow: hidden;
  border-top: 2px solid var(--hairline);
  border-bottom: 2px solid var(--hairline);
  padding: 12px 0;
  background: var(--surface);
}

html[data-theme="light"] .ticker {
  background: var(--surface-2);
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: ticker-scroll 30s linear infinite;
}

.ticker:hover .ticker-track,
.ticker.is-paused .ticker-track {
  animation-play-state: paused;
}

/* Spacing lives inside each duplicated item so translateX(-50%) wraps seamlessly. */
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  font-family: "Cooper Black", "Bagel Fat One", "Baloo 2", sans-serif;
  font-size: 17px;
  white-space: nowrap;
  color: var(--accent);
}

.ticker-item .tick-alt {
  color: var(--flame-orange);
}

html[data-theme="light"] .ticker-item .tick-alt {
  color: #c23a1d;
}

.tick-star {
  color: var(--flame-red);
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
}

@keyframes ticker-scroll {
  to { transform: translateX(-50%); }
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.25s ease, background-color 0.25s ease,
    border-color 0.25s ease, color 0.25s ease, filter 0.25s ease;
}

.button:active {
  transform: scale(0.95);
}

.button-icon {
  width: 14px;
  height: 14px;
}

.button-primary {
  background: linear-gradient(180deg, var(--flame-yellow), var(--flame-orange) 55%, var(--flame-red));
  color: var(--flame-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 24px rgba(239, 75, 35, 0.3);
}

.button-primary:hover {
  transform: translateY(-2px) rotate(-1deg);
  filter: brightness(1.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 12px 30px rgba(239, 75, 35, 0.4);
}

.button-ghost {
  background: transparent;
  border-color: var(--hairline-strong);
  color: var(--ink);
}

.button-ghost:hover {
  transform: translateY(-2px) rotate(1deg);
  border-color: var(--accent-line);
  background: var(--accent-tint);
}

/* Click confetti bits */

.burst-bit {
  position: fixed;
  z-index: 1000;
  width: 9px;
  height: 9px;
  border-radius: 2.5px;
  pointer-events: none;
  background: var(--clr, var(--flame-yellow));
  animation: burst 0.7s cubic-bezier(0.15, 0.8, 0.3, 1) forwards;
}

@keyframes burst {
  from {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(var(--dx, 0), var(--dy, -60px)) rotate(var(--rot, 180deg)) scale(0.5);
  }
}

/* ------------------------------------------------------------
   Catalog — search, filters, tool grid
   ------------------------------------------------------------ */

.catalog {
  position: relative;
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2.5vh, 28px) clamp(16px, 4vw, 32px) 72px;
  scroll-margin-top: 62px;
}

/* Giant ghost word running down the right edge of the list */
.mega-word {
  position: absolute;
  top: 10px;
  right: 0;
  z-index: 0;
  writing-mode: vertical-rl;
  font-family: "Cooper Black", "Bagel Fat One", "Baloo 2", sans-serif;
  font-size: clamp(110px, 15vw, 210px);
  line-height: 0.82;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 2px var(--mega-stroke);
  pointer-events: none;
  user-select: none;
}

/* Halftone print-dot patches */
.halftone {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--halftone-ink) 1.3px, transparent 1.4px);
  background-size: 13px 13px;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
}

.halftone-a {
  top: -30px;
  left: -60px;
  width: 260px;
  height: 200px;
}

.halftone-b {
  bottom: 40px;
  right: 18%;
  width: 220px;
  height: 180px;
}

/* Tape strip over the section heading */
.tape {
  position: absolute;
  top: -14px;
  left: -18px;
  width: 74px;
  height: 26px;
  background: var(--tape);
  border-left: 2px dashed rgba(255, 255, 255, 0.12);
  border-right: 2px dashed rgba(255, 255, 255, 0.12);
  transform: rotate(-8deg);
  pointer-events: none;
}

html[data-theme="light"] .tape {
  border-left-color: rgba(26, 26, 26, 0.1);
  border-right-color: rgba(26, 26, 26, 0.1);
}

.catalog-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.catalog-head .eyebrow {
  margin-bottom: 8px;
}

.catalog-head h2 {
  position: relative;
  margin: 0;
  font-family: "Cooper Black", "Bagel Fat One", "Baloo 2", sans-serif;
  font-weight: 400;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  color: var(--display-fill);
  text-shadow: 0 3px 0 var(--display-shadow);
  transform: rotate(-1deg);
}

.result-count {
  margin: 8px 0 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--faint);
}

.catalog-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  display: block;
  width: min(320px, 100%);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 11px 18px 11px 44px;
  border-radius: 999px;
  border: 2px solid var(--hairline);
  background: var(--input-bg);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.search-wrap input::placeholder {
  color: var(--faint);
}

.search-wrap input:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-tint);
}

.search-wrap input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Filter pills */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
}

.filter-button {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid var(--hairline);
  background: transparent;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease, transform 0.2s ease;
}

.filter-button:hover {
  color: var(--ink);
  border-color: var(--hairline-strong);
  transform: translateY(-2px) rotate(-1deg);
}

.filter-button[aria-pressed="true"] {
  background: linear-gradient(180deg, var(--flame-yellow), var(--flame-orange) 60%, var(--flame-red));
  border-color: transparent;
  color: var(--flame-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 18px rgba(239, 75, 35, 0.28);
}

/* Tool cards */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

/* Die-cut sticker cards: cream ring on black, alternating tilts */
.tool-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  background: var(--surface);
  border: 2px solid var(--hairline);
  box-shadow: 0 0 0 3px var(--sticker-ring), var(--card-shadow);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.3s ease, border-color 0.3s ease;
}

.tool-card:nth-child(4n + 1) { transform: rotate(-0.6deg); }
.tool-card:nth-child(4n + 2) { transform: rotate(0.5deg); }
.tool-card:nth-child(4n + 3) { transform: rotate(0.4deg); }
.tool-card:nth-child(4n + 4) { transform: rotate(-0.5deg); }

html[data-theme="light"] .tool-card {
  border-color: transparent;
}

.tool-card:hover {
  transform: translateY(-4px) rotate(0deg) scale(1.01);
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--sticker-ring), var(--card-shadow-hover);
}

.tool-card.card-animate {
  animation: card-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-0.5deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

/* Cursor-tracking sheen (pointer devices only) */
@media (hover: hover) and (pointer: fine) {
  .tool-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 65%);
    transition: opacity 0.3s ease;
  }

  .tool-card:hover::after {
    opacity: 1;
  }
}

/* Giant ghost numeral bleeding off each sticker */
.tool-number {
  position: absolute;
  right: 52px;
  bottom: -26px;
  z-index: 0;
  font-family: "Cooper Black", "Bagel Fat One", "Baloo 2", sans-serif;
  font-size: 92px;
  line-height: 1;
  color: var(--ink);
  opacity: 0.06;
  pointer-events: none;
}

html[data-theme="light"] .tool-number {
  opacity: 0.07;
}

.logo-tile,
.tool-copy,
.arrow {
  position: relative;
  z-index: 1;
}

.logo-tile {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tool-card:hover .logo-tile {
  transform: rotate(-4deg) scale(1.06);
}

.logo-tile img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.tool-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.tool-copy strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink-strong);
}

.tool-copy small {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
}

.arrow {
  margin-left: auto;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid var(--hairline);
  color: var(--muted);
  font-size: 17px;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
    background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.tool-card:hover .arrow {
  transform: translateX(4px) rotate(-45deg);
  background: linear-gradient(180deg, var(--flame-yellow), var(--flame-orange) 55%, var(--flame-red));
  border-color: transparent;
  color: var(--flame-ink);
}

.empty {
  margin: 48px auto;
  max-width: 44ch;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--muted);
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */

.footer {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 32px) 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 2px solid var(--hairline);
  font-size: 14px;
  font-weight: 600;
  color: var(--faint);
}

/* Lagging cursor companion (fine pointers only; JS-driven) */
#cursorDot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 998;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--flame-orange);
  opacity: 0;
  pointer-events: none;
  transition: width 0.2s ease, height 0.2s ease, opacity 0.3s ease, background-color 0.2s ease;
}

#cursorDot.is-active {
  opacity: 0.55;
}

#cursorDot.is-hovering {
  width: 34px;
  height: 34px;
  background: var(--flame-yellow);
  opacity: 0.28;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (pointer: coarse) {
  .icon-button,
  .theme-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .nav-links a {
    padding: 11px 13px;
  }
}

@media (max-width: 960px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .hero {
    padding-bottom: 20px;
  }

  .hero-compact {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-text {
    margin-bottom: 0;
  }

  /* The benefit chips repeat the ticker on mobile — trade them for above-fold tools. */
  .hero-footnote {
    display: none;
  }

  .catalog {
    padding-top: 18px;
  }

  .catalog-head {
    margin-bottom: 16px;
  }

  .filters {
    margin-bottom: 20px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .nav-links {
    display: none;
  }

  .social-links .icon-button:nth-child(n + 4) {
    display: none;
  }

  .theme-label {
    display: none;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
  }

  .hero {
    padding-top: 28px;
  }

  .catalog-head {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-tools {
    width: 100%;
  }

  .search-wrap {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .tool-card {
    padding: 16px;
    gap: 14px;
  }

  .tool-number {
    display: none;
  }

  .scroll-hint {
    display: none;
  }

  .ticker-item {
    font-size: 15px;
  }

  .sprinkle-mobile-hide,
  .mega-word,
  .halftone-a {
    display: none;
  }

  .tool-number {
    font-size: 72px;
    right: 44px;
    bottom: -20px;
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: 38px;
  }

  .brand-name {
    display: none;
  }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ticker-track {
    animation: none;
  }
}

/* ------------------------------------------------------------
   Newsletter signup (band + modal)
   ------------------------------------------------------------ */

.nav-newsletter {
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--flame-ink, #2a0f05);
  background: linear-gradient(135deg, var(--flame-yellow), var(--flame-orange));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-newsletter:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 138, 42, 0.35);
}

.signup {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) 72px;
  scroll-margin-top: 62px;
}

.signup-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(28px, 5vw, 52px);
  border: 2px solid var(--hairline-strong);
  border-radius: 26px;
  background:
    radial-gradient(560px 260px at 12% 0%, var(--glow-a), transparent 70%),
    radial-gradient(520px 300px at 92% 110%, var(--glow-b), transparent 72%),
    var(--surface);
  box-shadow: var(--card-shadow);
}

.signup-card .eyebrow {
  margin-bottom: 8px;
}

.signup-copy h2 {
  margin: 0;
  font-family: "Cooper Black", "Bagel Fat One", "Baloo 2", sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.12;
  color: var(--display-fill);
  text-shadow: 0 3px 0 var(--display-shadow);
}

.signup-text {
  margin: 12px 0 0;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--muted);
  max-width: 46ch;
}

.signup-embed {
  display: flex;
  justify-content: center;
}

.signup-embed iframe {
  width: 100%;
  max-width: 420px;
  height: 64px;
  border: 0;
  background: transparent;
  color-scheme: light;
}

@media (max-width: 860px) {
  .signup-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .signup-text {
    margin-inline: auto;
  }
}

.newsletter-modal {
  width: min(520px, calc(100vw - 32px));
  padding: clamp(24px, 5vw, 40px);
  border: 2px solid var(--hairline-strong);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.newsletter-modal::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
}

.newsletter-modal .eyebrow {
  justify-content: center;
  margin-bottom: 8px;
}

.newsletter-modal h2 {
  margin: 0;
  font-family: "Cooper Black", "Bagel Fat One", "Baloo 2", sans-serif;
  font-weight: 400;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.12;
  color: var(--display-fill);
  text-shadow: 0 3px 0 var(--display-shadow);
}

.newsletter-modal .signup-text {
  margin: 10px auto 18px;
}

.newsletter-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.newsletter-modal-close:hover {
  color: var(--ink);
  background: var(--accent-tint);
}
