/* Creative layer — additive only, does not override core layout */

/* Pencil cursor on interactive areas */
.doodle-card,
.fab,
.pill,
.toolbar-btn,
.lightbox-arrow,
.icon-btn {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23f97316' d='M3 21l3.75-1 11-11-2.75-2.75-11 11L3 21z'/%3E%3Cpath fill='%2322d3ee' d='M14.5 6.5l2.75 2.75L18 8.5 15.25 5.75z'/%3E%3C/svg%3E") 2 22, pointer;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  z-index: 300;
  pointer-events: none;
  transition: width 0.1s linear;
}

/* Doodle of the day banner */
.doodle-day {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: var(--border-sketch);
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-4) 15%, var(--bg-card)), var(--bg-card));
  box-shadow: var(--shadow-sketch);
  transform: rotate(-0.4deg);
  animation: wobbleIn 0.6s ease both;
}

.doodle-day-emoji {
  font-size: 2rem;
  animation: bobble 3s ease-in-out infinite;
}

.doodle-day-text {
  flex: 1;
}

.doodle-day-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  font-weight: 700;
}

.doodle-day-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.2;
}

.doodle-day-btn {
  padding: 0.5rem 1rem;
  border: var(--border-sketch);
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: all var(--transition);
  white-space: nowrap;
}

.doodle-day-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent-2);
}

/* Floating sketch stickers */
.sticker-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sketch-sticker {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.12;
  animation: floatSticker 12s ease-in-out infinite;
  filter: grayscale(0.3);
}

.sketch-sticker:nth-child(1) { top: 12%; left: 4%; animation-delay: 0s; }
.sketch-sticker:nth-child(2) { top: 28%; right: 6%; animation-delay: -3s; font-size: 2rem; }
.sketch-sticker:nth-child(3) { bottom: 22%; left: 8%; animation-delay: -6s; }
.sketch-sticker:nth-child(4) { bottom: 35%; right: 4%; animation-delay: -9s; font-size: 1.75rem; }
.sketch-sticker:nth-child(5) { top: 55%; left: 2%; animation-delay: -1.5s; }

/* Wobbly sketch border on cards */
.doodle-card::before {
  content: "";
  position: absolute;
  inset: -3px;
  border: 2px dashed transparent;
  border-radius: var(--radius);
  pointer-events: none;
  transition: border-color 0.3s ease;
  z-index: 1;
}

.doodle-card:hover::before {
  border-color: var(--accent-2);
  animation: dashRotate 4s linear infinite;
}

/* Sparkle on card hover */
.doodle-card::after {
  content: "✦";
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.9rem;
  color: var(--accent-3);
  opacity: 0;
  transform: scale(0) rotate(0deg);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.doodle-card:hover::after {
  opacity: 1;
  transform: scale(1) rotate(20deg);
}

/* Typewriter cursor on hero */
.hero-tagline.typing::after {
  content: "|";
  color: var(--accent);
  animation: blink 0.7s step-end infinite;
  margin-left: 2px;
}

/* Scroll reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Share button (injected) */
.creative-share-btn {
  padding: 0.5rem 1rem;
  border: var(--border-sketch);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink-muted);
  transition: all var(--transition);
}

.creative-share-btn:hover {
  background: var(--accent-2);
  color: var(--bg);
}

.creative-share-btn.copied {
  background: var(--accent-3);
  color: var(--ink);
}

/* Easter egg toast */
.easter-toast {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.75rem 1.25rem;
  border: var(--border-sketch);
  border-radius: 999px;
  background: var(--accent-4);
  color: white;
  font-family: var(--font-display);
  font-size: 1.25rem;
  box-shadow: 4px 4px 0 var(--ink);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.easter-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tag-cloud-btn {
  padding: 0.3rem 0.75rem;
  border: 1px dashed var(--ink-muted);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.tag-cloud-btn:hover,
.tag-cloud-btn.active {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  transform: rotate(-2deg);
}

/* Sketch scribble under section title */
.section-title {
  position: relative;
  display: inline-block;
}

.section-title .scribble-underline {
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 8px;
  overflow: visible;
}

.section-title .scribble-underline path {
  stroke: var(--accent);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 1s ease;
}

.section-title.is-visible .scribble-underline path {
  stroke-dashoffset: 0;
}

@keyframes wobbleIn {
  from { opacity: 0; transform: rotate(-2deg) translateY(10px); }
  to { opacity: 1; transform: rotate(-0.4deg) translateY(0); }
}

@keyframes bobble {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(5deg); }
}

@keyframes floatSticker {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-18px) rotate(8deg); }
  66% { transform: translateY(8px) rotate(-5deg); }
}

@keyframes dashRotate {
  to { stroke-dashoffset: -20; }
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ── Gumroad shop banner ────────────────────────────────────── */
.gumroad-shop {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border: var(--border-sketch);
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-2) 35%, var(--bg-card)) 0%, var(--bg-card) 100%);
  box-shadow: var(--shadow-sketch);
  text-decoration: none;
  color: var(--ink);
  transform: rotate(0.3deg);
  transition: all var(--transition);
}

.gumroad-shop:hover {
  transform: rotate(0deg) translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--accent);
}

.gumroad-shop-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.gumroad-shop-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.gumroad-shop-text strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.gumroad-shop-text span {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ── Buy Me a Coffee — floating coaster ─────────────────────── */
.bmc-float {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.65rem 0.85rem 0.5rem;
  border: var(--border-sketch);
  border-radius: 50% 50% 45% 45% / 40% 40% 55% 55%;
  background: radial-gradient(ellipse at 50% 60%, #3d2b1f 0%, #2a1f14 70%);
  box-shadow: 4px 4px 0 var(--accent-3), inset 0 2px 8px rgba(255, 210, 63, 0.15);
  text-decoration: none;
  color: #f5e6c8;
  transition: all var(--transition);
  transform: rotate(-6deg);
}

.bmc-float:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.05);
  box-shadow: 6px 6px 0 var(--accent), inset 0 2px 8px rgba(255, 210, 63, 0.25);
}

.bmc-cup {
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4));
}

.bmc-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--accent-3);
  white-space: nowrap;
}

.bmc-steam {
  display: flex;
  gap: 3px;
  margin-bottom: -4px;
}

.bmc-steam span {
  display: block;
  width: 4px;
  height: 12px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink-muted) 40%, transparent);
  animation: steamRise 2s ease-in-out infinite;
}

.bmc-steam span:nth-child(1) { animation-delay: 0s; margin-top: 2px; }
.bmc-steam span:nth-child(2) { animation-delay: 0.4s; height: 16px; }
.bmc-steam span:nth-child(3) { animation-delay: 0.8s; margin-top: 4px; }

@keyframes steamRise {
  0%, 100% { opacity: 0; transform: translateY(4px) scaleX(1); }
  50% { opacity: 0.6; transform: translateY(-6px) scaleX(1.3); }
}

/* ── Buy Me a Coffee — sticky note in about ─────────────────── */
.bmc-sticky {
  display: block;
  margin-top: 1.25rem;
  padding: 1rem 1.1rem 0.85rem;
  max-width: 220px;
  border: none;
  background: var(--accent-3);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink-muted);
  transform: rotate(2.5deg);
  transition: all var(--transition);
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.bmc-sticky::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: color-mix(in srgb, var(--accent-3) 60%, var(--ink-muted));
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.bmc-sticky:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 5px 5px 0 var(--accent);
}

.bmc-sticky-pin {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.1rem;
}

.bmc-sticky-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.bmc-sticky-body {
  display: block;
  font-size: 0.82rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 80%, transparent);
  margin-bottom: 0.5rem;
}

.bmc-sticky-cta {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: white;
}

@media (max-width: 600px) {
  .bmc-float {
    bottom: 5.5rem;
    left: 1rem;
    padding: 0.5rem 0.65rem 0.4rem;
  }
  .bmc-label { font-size: 0.7rem; }
  .bmc-cup { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bmc-steam span { animation: none; opacity: 0.3; }
  .sketch-sticker,
  .doodle-day-emoji,
  .doodle-card::before {
    animation: none !important;
  }
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}