@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-display: swap;
}

:root {
  --bg: #000000;
  --ink: #f4efe6;
  --ink-soft: #b7ab97;
  --tan: #c9a97e;
  --tan-deep: #9c7d54;
  --porcelain: #e9eaec;
  --water: #2f7fc0;
  --card: #141210;
  --line: #2a2620;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---- intro overlay (audio gate) ---- */
.intro {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #17130d 0%, #000 70%);
  text-align: center; padding: 24px;
  transition: opacity .5s ease;
}
.intro.gone { opacity: 0; pointer-events: none; }
.intro-inner { max-width: 30ch; }
.intro-mark {
  display: block; font-size: clamp(90px, 22vw, 160px); font-weight: 700;
  color: var(--tan); line-height: 1;
  animation: bob 3.4s ease-in-out infinite;
}
@keyframes bob { 0%,100%{transform:translateY(0) rotate(-3deg)} 50%{transform:translateY(-10px) rotate(3deg)} }
.intro-line {
  font-size: clamp(22px, 5vw, 32px); font-weight: 600; color: var(--ink);
  margin: 18px 0 28px;
}
.intro-btn {
  display: inline-flex; align-items: center; gap: 12px;
  border: 0; cursor: pointer; font-family: inherit; font-weight: 700;
  font-size: 20px; color: #2a2013; background: var(--tan);
  padding: 15px 32px; border-radius: 999px;
  box-shadow: 0 10px 0 var(--tan-deep);
  transition: transform .12s, box-shadow .12s;
}
.intro-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 0 var(--tan-deep); }
.intro-btn:active { transform: translateY(6px); box-shadow: 0 4px 0 var(--tan-deep); }
.play-tri {
  width: 0; height: 0; display: inline-block;
  border-left: 15px solid #2a2013;
  border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
.intro-skip {
  display: block; margin: 20px auto 0; border: 0; background: none;
  color: var(--ink-soft); font-family: inherit; font-size: 14px;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.intro-skip:hover { color: var(--tan); }

/* ---- floating audio toggle ---- */
.audio-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 150;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--card);
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s, border-color .15s;
}
.audio-toggle:hover { transform: scale(1.06); border-color: var(--tan); }
.audio-toggle .bars { display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.audio-toggle .bars i {
  width: 4px; height: 100%; background: var(--tan); border-radius: 2px;
  transform-origin: bottom; animation: eq 900ms ease-in-out infinite;
}
.audio-toggle .bars i:nth-child(2) { animation-delay: .18s; }
.audio-toggle .bars i:nth-child(3) { animation-delay: .36s; }
@keyframes eq { 0%,100%{transform:scaleY(.35)} 50%{transform:scaleY(1)} }
/* paused: freeze the bars flat */
.audio-toggle.paused .bars i { animation: none; transform: scaleY(.3); background: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .intro-mark, .audio-toggle .bars i { animation: none; }
}

/* soft paper grain over the black, keeps it from feeling flat */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .06;
  background-image: radial-gradient(circle at 50% 50%, #fff 0.6px, transparent 0.7px);
  background-size: 4px 4px;
}

header, main, footer { position: relative; z-index: 1; }

/* ---- top bar ---- */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 980px; margin: 0 auto; padding: 22px 24px;
}
.brand {
  font-weight: 700; font-size: 26px; letter-spacing: .5px;
  color: var(--ink); text-decoration: none;
}
.links { display: flex; gap: 20px; }
.links a {
  color: var(--ink-soft); text-decoration: none; font-weight: 600;
  font-size: 16px; transition: color .15s;
}
.links a:hover { color: var(--tan); }

/* ---- hero ---- */
.hero {
  max-width: 720px; margin: 0 auto; padding: 20px 24px 40px;
  text-align: center;
}
.mascot {
  width: min(92%, 520px); height: auto;
  filter: drop-shadow(0 22px 44px rgba(201,169,126,.16));
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-1.2deg); }
}
.title {
  font-size: clamp(52px, 12vw, 96px); font-weight: 700;
  line-height: .95; margin: 4px 0 12px;
}
.tag {
  font-size: clamp(17px, 3.4vw, 21px); color: var(--ink);
  max-width: 30ch; margin: 0 auto 26px;
}
.tag .soft { color: var(--tan); display: inline-block; }

/* CA chip */
.ca {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 8px 8px 16px;
  max-width: 100%; margin-bottom: 22px;
}
.ca-label { color: var(--ink-soft); font-weight: 700; font-size: 13px; }
.ca code {
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 13px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 42vw;
}
.copy {
  border: 0; cursor: pointer; border-radius: 999px;
  background: var(--tan); color: #2a2013; font-weight: 700;
  font-family: inherit; font-size: 13px; padding: 7px 14px;
  transition: transform .12s, background .15s;
}
.copy:hover { background: #d9bb90; }
.copy:active { transform: scale(.94); }
.copy.done { background: #7fb26a; color: #12240c; }

/* CTA */
.cta {
  display: inline-block; text-decoration: none;
  background: var(--tan); color: #2a2013; font-weight: 700;
  font-size: 19px; padding: 14px 34px; border-radius: 999px;
  box-shadow: 0 10px 0 var(--tan-deep);
  transition: transform .12s, box-shadow .12s;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 0 var(--tan-deep); }
.cta:active { transform: translateY(6px); box-shadow: 0 4px 0 var(--tan-deep); }
.cta.small { font-size: 16px; padding: 11px 24px; box-shadow: 0 8px 0 var(--tan-deep); }

/* ---- flush zone ---- */
.flush-zone { text-align: center; padding: 30px 24px 50px; }
.section-kicker {
  text-transform: lowercase; letter-spacing: 3px; font-weight: 600;
  color: var(--ink-soft); font-size: 14px; margin-bottom: 14px;
}
.toilet-btn {
  position: relative; border: 0; background: none; cursor: pointer;
  padding: 0; display: inline-block; line-height: 0;
  transition: transform .12s;
}
.toilet-btn:active { transform: scale(.97); }
.toilet-img { width: min(56%, 240px); height: auto; }
.toilet-btn.flushing .toilet-img { animation: shake .5s ease-in-out; }
@keyframes shake {
  0%,100% { transform: rotate(0); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}
.flush-count { margin-top: 18px; color: var(--ink-soft); font-size: 15px; }
.flush-count b { color: var(--tan); font-size: 18px; }

/* flying water droplets (JS-spawned, fixed to viewport) */
.droplet {
  position: fixed; z-index: 50; pointer-events: none;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 30%, #7fc0ee 0%, #3f97d8 45%, #2f7fc0 100%);
  box-shadow: 0 0 6px rgba(63,151,216,.5);
  will-change: transform, opacity;
}

/* ---- theme song ---- */
.song { max-width: 620px; margin: 0 auto; padding: 10px 24px 50px; text-align: center; }
.song-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 26px; padding: 30px 28px;
}
.song .verse, .song .chorus {
  font-size: clamp(16px, 3.4vw, 19px); line-height: 1.7;
}
.song .verse { color: var(--ink); }
.song .chorus { color: var(--tan); margin-top: 18px; }
.song .chorus b { color: var(--ink); font-weight: 700; letter-spacing: .5px; }
.song-note { margin-top: 20px; color: var(--ink-soft); font-size: 14px; }

/* ---- equation ---- */
.equation { text-align: center; padding: 20px 24px 50px; }
.equation img { width: min(92%, 760px); height: auto; }
.fine {
  color: var(--ink-soft); max-width: 40ch; margin: 8px auto 0;
  font-size: 15px;
}

/* ---- buy strip ---- */
.buystrip {
  max-width: 720px; margin: 0 auto; padding: 20px 24px 60px;
  display: flex; align-items: center; gap: 26px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 28px; margin-bottom: 40px;
  margin-left: auto; margin-right: auto;
}
.buystrip { max-width: 720px; }
.dancer { width: 160px; height: auto; flex: none; }
.buystrip-text h2 { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.buystrip-text p { color: var(--ink-soft); margin-bottom: 16px; max-width: 34ch; }

/* ---- footer ---- */
.foot {
  text-align: center; padding: 30px 24px 50px;
  border-top: 1px solid var(--line); max-width: 720px; margin: 0 auto;
}
.foot a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--tan); }
.foot .dot { color: var(--line); margin: 0 8px; }
.madeby { margin-top: 16px; color: #6b6255; font-size: 13px; max-width: 40ch; margin-left: auto; margin-right: auto; }

/* ---- mobile ---- */
@media (max-width: 560px) {
  .ca code { max-width: 46vw; }
  .buystrip { flex-direction: column; text-align: center; }
  .buystrip-text p { margin-left: auto; margin-right: auto; }
  .links { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .mascot { animation: none; }
}
