:root {
  --ink: #111111;
  --board: #f7f4ed;
  --board-alt: #fffef8;
  --accent: #ffde59;
  --accent-2: #7ec8ff;
  --accent-3: #ff6b9d;
  --shadow: rgba(17, 17, 17, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Comic Sans MS", "Chalkboard SE", "Marker Felt", cursive;
  line-height: 1.55;
  background-color: var(--board);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(17, 17, 17, 0.07) 1px, transparent 0),
    linear-gradient(180deg, #faf7f0 0%, #f0ebe2 100%);
  background-size: 22px 22px, 100% 100%;
  overflow-x: hidden;
}

#doodle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.chalk-dust {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.site {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Nav */
.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: min(1100px, calc(100% - 1.5rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1rem;
  background: var(--board-alt);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-family: "Permanent Marker", cursive;
  font-size: 1.1rem;
}

.nav-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a:not(.nav-buy)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-links a:not(.nav-buy):hover::after {
  transform: scaleX(1);
}

.nav-buy {
  background: var(--accent) !important;
  padding: 0.35rem 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
}

.nav-toggle {
  display: none;
  border: 2px solid var(--ink);
  background: var(--accent);
  font-size: 1.2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
}

/* Sections */
.section {
  width: 100%;
  padding: clamp(5rem, 10vw, 6.5rem) 1rem clamp(2.5rem, 5vw, 4rem);
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  background: var(--board-alt);
  position: relative;
}

.alt-board {
  background: #fff8d1;
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255, 222, 89, 0.35), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(126, 200, 255, 0.25), transparent 45%),
    var(--board-alt);
}

.section-inner {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.title {
  margin: 0;
  text-align: center;
  font-family: "Permanent Marker", cursive;
  font-size: clamp(2.6rem, 9vw, 4.5rem);
  letter-spacing: 2px;
  text-shadow: 3px 3px 0 var(--accent);
}

.subtitle {
  margin: 0.35rem 0 0.6rem;
  text-align: center;
  font-family: "Caveat", cursive;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
}

.eyebrow {
  text-align: center;
  margin: 0 0 0.25rem;
  font-size: 1rem;
  opacity: 0.85;
}

.section-title {
  margin: 0 0 1rem;
  font-family: "Permanent Marker", cursive;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  text-align: center;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  position: relative;
}

.hero-logo {
  width: min(260px, 72vw);
  position: relative;
  z-index: 2;
  filter: drop-shadow(6px 8px 0 rgba(17, 17, 17, 0.15));
}

.logo-ring {
  position: absolute;
  width: min(300px, 78vw);
  height: min(300px, 78vw);
  border: 3px dashed var(--ink);
  border-radius: 50%;
  animation: spin-slow 18s linear infinite;
  opacity: 0.5;
}

.hero-text {
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  text-align: center;
  max-width: 720px;
  margin: 0.75rem auto;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}

.highlight-yellow {
  background: linear-gradient(transparent 55%, var(--accent) 55%);
  display: inline-block;
  padding: 0 0.25rem;
}

.copy {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  max-width: 900px;
  margin: 0.65rem auto;
}

.copy.center {
  text-align: center;
}

.copy.loud {
  font-weight: 700;
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
}

.tags {
  text-align: center;
  font-weight: 700;
  margin-top: 1rem;
  font-family: "Permanent Marker", cursive;
}

.ca-copy {
  max-width: 720px;
  margin: 1rem auto 0;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  transform: rotate(0.5deg);
}

.ca-copy:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.ca-copy.copied {
  background: #e8ffe8;
  animation: pop 0.4s ease;
}

.ca-copy-label {
  display: block;
  text-align: center;
  font-family: "Permanent Marker", cursive;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.ca-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.ca-copy-address {
  flex: 1 1 220px;
  min-width: 0;
  word-break: break-all;
  text-align: center;
  font-size: clamp(0.75rem, 2.2vw, 0.95rem);
  background: #eeeeee;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}

.ca-copy-hint {
  display: block;
  margin-top: 0.45rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.75;
  font-family: "Caveat", cursive;
  font-size: 1.05rem;
}

.inline-ca {
  background: #eeeeee;
  border: 2px solid var(--ink);
  border-radius: 7px;
  padding: 0.15rem 0.35rem;
  font-size: 0.85rem;
}

.copy-btn {
  margin-left: 0.35rem;
  border: 2px solid var(--ink);
  background: var(--accent-2);
  border-radius: 8px;
  padding: 0.2rem 0.5rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.copy-btn.copied {
  background: #b8f5c3;
  animation: pop 0.4s ease;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.15rem;
  border: 3px solid var(--ink);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  background: #fff;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 3px 3px 0 var(--ink);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn.buy {
  background: var(--accent);
}

.btn.chart {
  background: var(--accent-2);
}

.btn.x {
  background: #d9d9d9;
}

.sketch-box {
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 1.25rem;
  background: #fff;
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(-0.4deg);
}

.badge-row {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.badge {
  padding: 0.4rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--accent);
  font-weight: 700;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.85rem;
}

.step-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}

.step-card:nth-child(odd) {
  transform: rotate(0.6deg);
}

.step-card:nth-child(even) {
  transform: rotate(-0.5deg);
}

.step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--accent-3);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: "Permanent Marker", cursive;
}

.chart-wrap {
  padding: 0.5rem;
  background: #fff;
  margin-top: 1rem;
}

.chart-frame {
  width: 100%;
  height: 520px;
  border: none;
  border-radius: 8px;
  background: #ffffff;
}

.join-banner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 1rem;
  display: block;
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: 8px 8px 0 var(--ink);
}

.join-section {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 107, 157, 0.12), transparent 55%),
    var(--board-alt);
}

.sticky-note {
  position: absolute;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  border: 2px solid var(--ink);
  font-family: "Caveat", cursive;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
  animation: float-note 4s ease-in-out infinite;
  pointer-events: none;
}

.note-1 {
  top: 18%;
  left: 4%;
  transform: rotate(-8deg);
}

.note-2 {
  bottom: 12%;
  right: 5%;
  transform: rotate(6deg);
  animation-delay: -1.5s;
}

.carousel {
  width: 100%;
  overflow: hidden;
  border-top: 3px dashed var(--ink);
  border-bottom: 3px dashed var(--ink);
  background: #fff8d1;
}

.carousel.reverse .track {
  animation-direction: reverse;
}

.track {
  display: flex;
  width: max-content;
  animation: ticker 22s linear infinite;
}

.item {
  white-space: nowrap;
  padding: 0.75rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: "Permanent Marker", cursive;
}

.footer {
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
  background: var(--board);
  border-top: 3px solid var(--ink);
}

.scribble-border {
  border-radius: 14px;
}

/* Animations */
@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes float-bob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(2deg);
  }
}

@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes wobble-title {
  0%,
  100% {
    transform: rotate(-1deg) skewX(-1deg);
  }
  50% {
    transform: rotate(1deg) skewX(1deg);
  }
}

@keyframes wobble-slow {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}

@keyframes marker-swing {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

@keyframes float-note {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-10px) rotate(-4deg);
  }
}

@keyframes pop {
  50% {
    transform: scale(1.08);
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-3deg);
  }
  75% {
    transform: rotate(3deg);
  }
}

.float-bob {
  animation: float-bob 3.2s ease-in-out infinite;
}

.wobble-title {
  animation: wobble-title 3s ease-in-out infinite;
}

.wobble-slow {
  animation: wobble-slow 5s ease-in-out infinite;
}

.marker-swing {
  display: inline-block;
  animation: marker-swing 2.5s ease-in-out infinite;
}

.wiggle {
  animation: wiggle 2.2s ease-in-out infinite;
}

.shake-hover:hover {
  animation: shake-btn 0.45s ease-in-out;
}

@keyframes shake-btn {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px) rotate(-2deg);
  }
  40% {
    transform: translateX(4px) rotate(2deg);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(3px);
  }
}

.pop-in {
  animation: pop-in 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.85) rotate(-3deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible {
  opacity: 1;
  transform: translateX(0);
}

body.chaos-mode {
  animation: hue-spin 2s linear infinite;
}

@keyframes hue-spin {
  to {
    filter: hue-rotate(360deg);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--board-alt);
    border: 3px solid var(--ink);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .nav-links.open {
    display: flex;
  }

  .sticky-note {
    display: none;
  }

  .chart-frame {
    height: 380px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
