/* ==========================================================================
   Childish Audio – design system
   Derived from the logo: toy blocks with a dark purple outline, soft gradients,
   a gloss highlight top left and an offset purple shadow.
   ========================================================================== */

:root {
  --ink: #4a1e6f;            /* outline purple from the logo */
  --ink-2: #6c4b8c;
  --ink-3: #8f78a6;
  --bg: #fbf8ff;
  --bg-2: #f3ecfd;
  --paper: #ffffff;
  --shadow: #d3c6e0;         /* logo shadow */
  --line: #e6dcf2;

  --pink-1: #ff92c9;  --pink-2: #ec3f8f;
  --purple-1: #c391ff; --purple-2: #8743e6;
  --blue-1: #93c7ff;  --blue-2: #428bea;

  --grad-pink: linear-gradient(170deg, var(--pink-1), var(--pink-2));
  --grad-purple: linear-gradient(170deg, var(--purple-1), var(--purple-2));
  --grad-blue: linear-gradient(170deg, var(--blue-1), var(--blue-2));

  --stroke: 3px;
  --radius: 24px;
  --radius-sm: 14px;
  --drop: 8px 9px 0 var(--shadow);
  --drop-sm: 4px 5px 0 var(--shadow);

  --font-display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
}

/* Theme per plugin – sets the accent colour */
[data-theme="purple"] { --accent-1: var(--purple-1); --accent-2: var(--purple-2); --accent: var(--grad-purple); --accent-soft: #efe4ff; }
[data-theme="pink"]   { --accent-1: var(--pink-1);   --accent-2: var(--pink-2);   --accent: var(--grad-pink);   --accent-soft: #ffe6f2; }
[data-theme="blue"]   { --accent-1: var(--blue-1);   --accent-2: var(--blue-2);   --accent: var(--grad-blue);   --accent-soft: #e3f0ff; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Block: the basic shape from the logo ---------- */
.block {
  position: relative;
  background: var(--paper);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--drop);
}
.block.gloss::before,
.gloss-tile::before {
  /* gloss arc + dot, like on the logo blocks */
  content: "";
  position: absolute;
  top: 14px; left: 14px;
  width: 44px; height: 30px;
  border-top: 5px solid rgba(255,255,255,.7);
  border-left: 5px solid rgba(255,255,255,.7);
  border-top-left-radius: 18px;
  pointer-events: none;
}
.block.gloss::after,
.gloss-tile::after {
  content: "";
  position: absolute;
  top: 12px; left: 68px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.75);
  pointer-events: none;
}
.fill-accent { background: var(--accent); color: #fff; }
.fill-pink { background: var(--grad-pink); color: #fff; }
.fill-purple { background: var(--grad-purple); color: #fff; }
.fill-blue { background: var(--grad-blue); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px;
  font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: .01em;
  text-decoration: none; color: var(--ink);
  background: var(--b-bg);
  border: var(--stroke) solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--drop-sm);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 7px 0 var(--shadow); }
.btn:active { transform: translate(3px, 4px); box-shadow: 0 0 0 var(--shadow); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: var(--drop-sm); }
.btn-primary { --b-bg: var(--accent, var(--grad-pink)); color: #fff; text-shadow: 0 1px 0 rgba(74,30,111,.25); }
.btn-pink { --b-bg: var(--grad-pink); color: #fff; }
.btn-ghost { --b-bg: transparent; box-shadow: none; }
.btn-ghost:hover { box-shadow: var(--drop-sm); background: var(--paper); }
.btn-lg { padding: 17px 30px; font-size: 21px; border-radius: 18px; }
.btn-sm { padding: 8px 14px; font-size: 15px; border-radius: 12px; box-shadow: 3px 3px 0 var(--shadow); }
.btn-block { width: 100%; }
.btn-danger { --b-bg: #fff0f3; color: #b0204f; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.chip.soft { background: var(--accent-soft, var(--bg-2)); }

/* ---------- Announcement + Header ---------- */
.announcement {
  background: var(--ink); color: #fff; text-align: center;
  font-weight: 700; font-size: 15px; padding: 9px 20px;
}
.announcement a { color: #ffc4e1; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251,248,255,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 2px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 50px; height: auto; mix-blend-mode: multiply; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: 23px; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 12px; }
.nav a:not(.btn):hover { background: var(--bg-2); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 56px 0 88px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 380px at 85% 25%, var(--accent-soft, #efe4ff), transparent 70%),
    radial-gradient(500px 340px at 5% 90%, #ffe6f2, transparent 70%);
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; align-items: center; }
.sticker {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--grad-pink);
  border: var(--stroke) solid var(--ink); border-radius: 12px;
  padding: 5px 14px; transform: rotate(-4deg);
  box-shadow: 3px 4px 0 var(--shadow);
}
.hero h1 { font-size: clamp(46px, 7vw, 84px); font-weight: 700; letter-spacing: -.025em; }
.hero h1 .accent-text { background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .tagline { font-size: clamp(19px, 2vw, 22px); margin-top: 20px; max-width: 34ch; color: var(--ink-2); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 34px; }
.price-tag { display: flex; flex-direction: column; line-height: 1.1; }
.price-tag .now { font-family: var(--font-display); font-weight: 700; font-size: 34px; }
.price-tag .was { text-decoration: line-through; color: var(--ink-3); font-weight: 700; font-size: 16px; }
.price-tag small { color: var(--ink-3); font-weight: 700; font-size: 13px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }

.hero-visual { position: relative; padding: 20px 12px 30px; }
.hero-visual .visual-card { transform: rotate(2.5deg); transition: transform .5s cubic-bezier(.3,1.4,.5,1); }
.hero-visual:hover .visual-card { transform: rotate(0deg) scale(1.01); }

/* decorative blocks */
.toy { position: absolute; width: 64px; height: 64px; border: var(--stroke) solid var(--ink); border-radius: 16px; box-shadow: 4px 5px 0 var(--shadow); display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 30px; z-index: 2; animation: bob 6s ease-in-out infinite; }
.toy svg { width: 36px; height: 36px; }
.toy.t1 { top: -6px; left: -14px; transform: rotate(-12deg); background: var(--grad-pink); }
.toy.t2 { bottom: -2px; right: -10px; transform: rotate(9deg); background: var(--grad-blue); animation-delay: -2s; width: 56px; height: 56px; }
.toy.t3 { bottom: 34%; left: -34px; transform: rotate(6deg); background: var(--grad-purple); animation-delay: -4s; width: 46px; height: 46px; font-size: 22px; border-radius: 12px; }
@keyframes bob { 50% { translate: 0 -10px; } }

/* ---------- Visual: image or generated plugin interface ---------- */
.visual-card { overflow: hidden; padding: 0; background: var(--paper); }
.visual-card > img { width: 100%; height: auto; }

.faceplate {
  --fp-bg: #2a1342;
  background: linear-gradient(180deg, #34184f, #1f0e33);
  color: #fff;
  padding: 18px 20px 22px;
  font-family: var(--font-display);
  aspect-ratio: 16 / 11;
  display: flex; flex-direction: column; gap: 16px;
}
.fp-top { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .14em; }
.fp-brand { opacity: .55; font-weight: 500; }
.fp-name { margin-left: auto; font-weight: 700; background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 15px; letter-spacing: .1em; text-align: right; }
.fp-led { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-1); box-shadow: 0 0 10px var(--accent-1); animation: led 2.4s ease-in-out infinite; }
@keyframes led { 50% { opacity: .45; } }
.fp-screen { flex: 1; border-radius: 14px; background: #120821; border: 2px solid rgba(255,255,255,.08); position: relative; overflow: hidden; min-height: 0; }
.fp-screen svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fp-screen .grid line { stroke: rgba(255,255,255,.06); stroke-width: 1; }
.fp-screen .smooth { fill: none; stroke: rgba(255,255,255,.28); stroke-width: 2; stroke-dasharray: 4 5; }
.fp-screen .crushed { fill: none; stroke-width: 3.5; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--accent-1)); }
.fp-knobs { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 10px; }
.fp-knob { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.knob {
  width: clamp(36px, 6vw, 56px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5d3a80, #2a1342 70%);
  border: 2px solid rgba(255,255,255,.12);
  position: relative;
  box-shadow: 0 0 0 4px rgba(255,255,255,.04), 0 6px 14px rgba(0,0,0,.4);
  transform: rotate(var(--r, 0deg));
  transition: transform .6s cubic-bezier(.3,1.5,.5,1);
}
.knob::after { content: ""; position: absolute; top: 12%; left: 50%; width: 4px; height: 28%; margin-left: -2px; border-radius: 4px; background: var(--accent-1); box-shadow: 0 0 6px var(--accent-1); }
.faceplate:hover .knob { transform: rotate(calc(var(--r, 0deg) + 40deg)); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.eyebrow { font-weight: 800; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2, var(--purple-2)); margin-bottom: 12px; display: block; }
.section-head h2 { font-size: clamp(34px, 4.4vw, 50px); }
.section-head p { margin-top: 14px; font-size: 19px; color: var(--ink-2); }

.about { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
.about h2 { font-size: clamp(34px, 4.4vw, 50px); }
.prose p + p { margin-top: 1em; }
.prose { font-size: 19px; color: var(--ink-2); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 26px; }
.feature { padding: 28px 26px 26px; }
.feature:nth-child(3n+1) { --f: var(--grad-pink); }
.feature:nth-child(3n+2) { --f: var(--grad-purple); }
.feature:nth-child(3n+3) { --f: var(--grad-blue); }
.feature .icon-tile { width: 52px; height: 52px; border-radius: 14px; border: var(--stroke) solid var(--ink); background: var(--f); display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 22px; margin-bottom: 18px; transform: rotate(-5deg); box-shadow: 3px 3px 0 var(--shadow); }
.feature:nth-child(even) .icon-tile { transform: rotate(5deg); }
.feature h3 { font-size: 23px; margin-bottom: 8px; }
.feature p { color: var(--ink-2); }

.media-grid { display: grid; gap: 26px; grid-template-columns: 1.5fr 1fr; align-items: start; }
.media-grid.single { grid-template-columns: 1fr; }
.video { overflow: hidden; aspect-ratio: 16/9; padding: 0; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.demos { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.demo { display: flex; flex-direction: column; gap: 8px; }
.demo strong { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.demo audio { width: 100%; }

.specs { padding: 8px 28px; }
.specs dl { margin: 0; }
.specs .row { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 2px dashed var(--line); }
.specs .row:last-child { border-bottom: 0; }
.specs dt { font-weight: 800; }
.specs dd { margin: 0; color: var(--ink-2); text-align: right; font-weight: 600; }

.cta-band { padding: 54px clamp(24px, 5vw, 64px); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; overflow: hidden; }
.cta-band h2 { font-size: clamp(32px, 4vw, 46px); color: #fff; text-shadow: 0 2px 0 rgba(74,30,111,.25); }
.cta-band p { color: rgba(255,255,255,.92); font-weight: 700; margin-top: 10px; font-size: 18px; }
.cta-band p .was { opacity: .7; }
.cta-band .btn { --b-bg: #fff; color: var(--ink); }

/* Catalog */
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 30px; }
.card { display: flex; flex-direction: column; text-decoration: none; overflow: hidden; padding: 0; transition: transform .2s cubic-bezier(.3,1.5,.5,1), box-shadow .2s; }
.card:hover { transform: translate(-3px, -4px) rotate(-.6deg); box-shadow: 12px 13px 0 var(--shadow); }
.card .card-visual { border-bottom: var(--stroke) solid var(--ink); }
.card .card-visual .faceplate { aspect-ratio: 16/10; padding: 12px 14px 14px; gap: 10px; }
.card .card-visual .fp-top { font-size: 10px; }
.card .card-visual .fp-name { font-size: 11px; }
.card .card-visual .knob { width: 30px; }
.card .card-visual .fp-knob span { display: none; }
.card .card-visual img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 24px; }
.card-body p { color: var(--ink-2); font-size: 15px; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.card-foot .p { font-family: var(--font-display); font-weight: 700; font-size: 21px; }
.card-foot .p .was { text-decoration: line-through; color: var(--ink-3); font-size: 16px; margin-right: 8px; }
.card.soon { border-style: dashed; box-shadow: none; background: transparent; align-items: center; justify-content: center; text-align: center; min-height: 300px; padding: 30px; gap: 14px; color: var(--ink-2); }
.card.soon:hover { transform: none; }
.card.soon .stack { display: flex; gap: 6px; }
.card.soon .stack i { width: 30px; height: 30px; border: var(--stroke) solid var(--ink); border-radius: 9px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; border-top: 2px solid var(--line); padding: 50px 0 40px; background: var(--paper); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px 60px; align-items: flex-start; justify-content: space-between; }
.footer-brand { display: flex; gap: 14px; align-items: center; max-width: 360px; }
.footer-brand img { width: 64px; mix-blend-mode: multiply; }
.footer-brand strong { font-family: var(--font-display); font-weight: 700; font-size: 21px; display: block; }
.footer-brand p { color: var(--ink-2); font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.footer-bottom { margin-top: 34px; font-size: 14px; color: var(--ink-3); font-weight: 600; }

/* ---------- Purchase page ---------- */
.checkout { padding: 50px 0 60px; }
.crumbs { font-weight: 700; font-size: 15px; color: var(--ink-3); margin-bottom: 26px; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { text-decoration: underline; }
.checkout-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.summary { padding: 0; overflow: hidden; }
.summary-body { padding: 26px 28px 30px; border-top: var(--stroke) solid var(--ink); }
.summary-body h1 { font-size: clamp(32px, 4vw, 44px); }
.summary-body .tagline { color: var(--ink-2); font-weight: 600; margin-top: 8px; font-size: 18px; }
.summary-body .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pay { padding: 30px 28px; position: sticky; top: 100px; }
.pay h2 { font-size: 26px; }
.pay .total { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 4px; }
.pay .total .now { font-family: var(--font-display); font-weight: 700; font-size: 44px; }
.pay .total .was { text-decoration: line-through; color: var(--ink-3); font-weight: 700; margin-right: 10px; }
.perks { list-style: none; margin: 20px 0 22px; padding: 18px 0 0; border-top: 2px dashed var(--line); display: flex; flex-direction: column; gap: 10px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.perks li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 6px; border: 2px solid var(--ink); background: var(--accent) ; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); margin-bottom: 20px; cursor: pointer; }
.consent input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--accent-2); cursor: pointer; }
.pay .fine { font-size: 13px; color: var(--ink-3); text-align: center; margin-top: 14px; font-weight: 600; }
.notice { padding: 18px 20px; border-radius: var(--radius-sm); border: var(--stroke) solid var(--ink); font-weight: 700; margin-bottom: 26px; display: flex; gap: 14px; align-items: center; }
.notice.ok { background: #e4f8ec; }
.notice.warn { background: #fff4dc; }
.notice.err { background: #ffe6ec; }
.form-error { color: #b0204f; font-weight: 700; font-size: 14px; margin-top: 12px; min-height: 1em; }

/* ---------- Empty states / legal / 404 ---------- */
.empty { text-align: center; padding: 120px 20px; }
.empty img { width: 140px; margin: 0 auto 26px; mix-blend-mode: multiply; }
.empty h1 { font-size: clamp(36px, 5vw, 56px); }
.empty p { margin: 14px auto 28px; max-width: 46ch; color: var(--ink-2); font-size: 19px; }
.legal { max-width: 780px; padding: 60px 20px 80px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 30px; }
.legal .block { padding: 32px; white-space: pre-wrap; overflow-wrap: anywhere; }

.skeleton { min-height: 70vh; display: grid; place-items: center; }
.loader { display: flex; gap: 10px; }
.loader i { width: 22px; height: 22px; border: var(--stroke) solid var(--ink); border-radius: 7px; animation: hop .9s ease-in-out infinite; }
.loader i:nth-child(1) { background: var(--grad-pink); }
.loader i:nth-child(2) { background: var(--grad-purple); animation-delay: .15s; }
.loader i:nth-child(3) { background: var(--grad-blue); animation-delay: .3s; }
@keyframes hop { 40% { transform: translateY(-12px) rotate(-10deg); } }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 30px 0 60px; }
  .hero-grid, .about, .checkout-grid, .media-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { max-width: 560px; }
  .cta-band { grid-template-columns: 1fr; }
  .pay { position: static; }
  .section { padding: 60px 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { height: 66px; }
  .brand img { width: 42px; }
  .brand span { font-size: 19px; }
  .nav a:not(.btn) { display: none; }
  .toy.t3 { display: none; }
  .fp-knob { font-size: 9px; letter-spacing: .06em; }
  .specs .row { flex-direction: column; gap: 2px; }
  .specs dd { text-align: left; }
  .btn-lg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
