@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Baloo+2:wght@600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --violet: #7c3aed;
  --violet-d: #5b21b6;
  --cyan: #06d6f5;
  --cyan-d: #0891b2;
  --pink: #ff4d9d;
  --pink-d: #d11f6f;
  --gold: #ffc715;
  --gold-d: #e0a300;
  --orange: #ff7a18;
  --mint: #3df0b0;
  --ink: #2a1a4a;
  --ink-soft: #6b5b95;
  --cream: #fff7ef;
  --white: #ffffff;
  --r: 26px;
  --clay-shadow: 0 12px 0 rgba(124, 58, 237, .10), 0 24px 40px rgba(124, 58, 237, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Nunito', 'Be Vietnam Pro', system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 12% 0%, #ffe3f3 0%, transparent 55%),
    radial-gradient(900px 700px at 95% 8%, #d8f6ff 0%, transparent 55%),
    radial-gradient(800px 700px at 50% 120%, #fff0c9 0%, transparent 55%),
    linear-gradient(180deg, #fdf4ff 0%, #f3ecff 50%, #eafbff 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display, .title {
  font-family: 'Baloo 2', 'Nunito', cursive, sans-serif;
  color: var(--ink);
}

.fred, .btn, .btn3d, .btn-demo, .btn-ws, .btn-sim, .tt-btn, .cat, .eyebrow, .section-kicker, .pill {
  font-family: 'Fredoka', 'Nunito', sans-serif;
}

/* Floating pastel clay blobs */
.clay-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(65px);
  opacity: .42;
  animation: clay-drift 16s ease-in-out infinite;
}
.blob.b1 { width: 380px; height: 380px; background: var(--pink); top: -80px; left: -60px; }
.blob.b2 { width: 420px; height: 420px; background: var(--cyan); top: 30%; right: -120px; animation-delay: -5s; }
.blob.b3 { width: 360px; height: 360px; background: var(--gold); bottom: -100px; left: 20%; animation-delay: -9s; }
@keyframes clay-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(28px, -28px) scale(1.07); }
}

header, main, section, footer, .content, .announcement {
  position: relative;
  z-index: 2;
}

/* Announcement ticker */
.announcement, .notice {
  background: linear-gradient(90deg, #ffd84d, var(--gold), #ffd84d);
  color: #5c3b00;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid rgba(255, 255, 255, .65);
}
.announcement { overflow: hidden; }
.notice { text-align: center; padding: 9px 16px; }
.announcement a { color: var(--violet-d); font-weight: 700; text-decoration: underline; }
.announcement-track {
  display: flex;
  width: max-content;
  animation: announcement-scroll 24s linear infinite;
}
.announcement-track span {
  display: block;
  flex: none;
  min-width: 100vw;
  padding: 9px 32px;
  text-align: center;
  white-space: nowrap;
}
@keyframes announcement-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .announcement-track { animation: none; width: 100%; }
  .announcement-track span { min-width: 0; width: 100%; white-space: normal; }
  .announcement-track span[aria-hidden="true"] { display: none; }
}

/* Clay Header / Topbar */
.topbar, .header {
  background: linear-gradient(135deg, #2a1a4a, #5b21b6);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(91, 33, 182, .28), 0 -3px 0 rgba(255, 255, 255, .18) inset;
}
.nav-inner, .header .nav {
  max-width: 1240px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px;
}
.brand img, .header nav img {
  display: block;
  width: min(210px, 46vw);
  height: auto;
}
.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}
.nav-links a:not(.nav-cta), .header a.back, .header .nav-link, .header nav a:not(:first-child) {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #efe7ff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  transition: .16s;
  white-space: nowrap;
}
.nav-links a:not(.nav-cta):hover, .header a.back:hover, .header .nav-link:hover {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  transform: translateY(-1px);
}

/* 3D Clay Buttons */
.btn, .btn3d, .btn-demo, .btn-ws, .btn-sim, .tt-btn, .nav-cta, .hero-btn, .donate-button, .donate-close, .open, .button, button {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-weight: 600;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform .12s ease, box-shadow .12s ease, filter .15s ease;
}

.btn-demo, .hero-btn:not(.secondary), .nav-cta, .open, button.donate {
  background: linear-gradient(180deg, #ffd84d, var(--gold));
  color: #5c3b00 !important;
  box-shadow: 0 6px 0 var(--gold-d);
}
.btn-ws {
  background: linear-gradient(180deg, #34e0fb, var(--cyan));
  color: #053b46 !important;
  box-shadow: 0 6px 0 var(--cyan-d);
}
.btn.primary, .button, .donate-close, button[type="submit"], #sendChat {
  background: linear-gradient(180deg, #9a63f5, var(--violet));
  color: #fff !important;
  box-shadow: 0 6px 0 var(--violet-d);
}
.tt-go {
  background: linear-gradient(180deg, #ff79b8, var(--pink));
  color: #fff !important;
  box-shadow: 0 6px 0 var(--pink-d);
}
.tt-stop {
  background: linear-gradient(180deg, #64748b, #475569);
  color: #fff !important;
  box-shadow: 0 6px 0 #334155;
}
.btn-sim, .btn:not(.primary):not(.btn-demo):not(.btn-ws), .hero-btn.secondary, button.secondary {
  background: #f3ecff;
  color: var(--violet-d) !important;
  box-shadow: 0 5px 0 #ded0ff;
  border: 2px solid #fff;
}
.donate-button {
  background: linear-gradient(180deg, #34e0fb, var(--cyan));
  color: #053b46 !important;
  box-shadow: 0 5px 0 var(--cyan-d);
  padding: 9px 16px;
  font-size: 14px;
}

.btn:active, .btn3d:active, .btn-demo:active, .btn-ws:active, .btn-sim:active,
.tt-btn:active, .nav-cta:active, .hero-btn:active, .donate-button:active,
.donate-close:active, .open:active, .button:active, button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .22) !important;
}

/* Clay Cards & Containers */
.card, .tt-bar, main section, .donate-dialog, .stat-card {
  background: #ffffff;
  border: 2px solid #ffffff;
  border-radius: var(--r);
  box-shadow: var(--clay-shadow);
}

.grid .card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.grid .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 0 rgba(124, 58, 237, .12), 0 30px 46px rgba(124, 58, 237, .18);
}
.thumb {
  aspect-ratio: 16/10;
  background: #f3ecff;
  position: relative;
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(42, 26, 74, .78);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-size: 11px;
  font-weight: 600;
  border: 1.5px solid rgba(255, 255, 255, .45);
}
.body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.title { font-size: 18px; font-weight: 800; line-height: 1.2; }
.meta { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.tag {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
a.btn { font-size: 13px; padding: 9px 11px; flex: 1; white-space: nowrap; }
.btn-sim { flex: 0 0 auto; padding: 9px 13px; }

/* Inputs & Selects */
input:not([type="checkbox"]):not([type="file"]), select {
  background: #faf7ff;
  border: 2px solid #e6dcff;
  border-radius: 14px;
  padding: 11px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:not([type="checkbox"]):not([type="file"]):focus, select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .14);
}

/* Category Pills */
.cats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.cat {
  background: #ffffff;
  border: 2px solid #f0e6ff;
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 5px 0 #e7d9ff;
}
.cat.active {
  background: linear-gradient(180deg, #9a63f5, var(--violet));
  border-color: var(--violet);
  color: #fff;
  box-shadow: 0 5px 0 var(--violet-d);
}

/* Eyebrow & Pills */
.eyebrow, .section-kicker {
  display: inline-block;
  background: #fff;
  border: 2px solid #f0e6ff;
  border-radius: 999px;
  color: var(--violet);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 15px;
  box-shadow: 0 5px 0 #e7d9ff;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Hero Clay Visual */
.hero {
  background: transparent;
  padding: 18px 0 10px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-visual {
  background: linear-gradient(145deg, #7c3aed, #5b21b6 60%, #0891b2);
  border: 3px solid rgba(255, 255, 255, .45);
  border-radius: 32px;
  padding: 24px;
  box-shadow: 0 18px 0 #4c1d95, 0 34px 60px rgba(91, 33, 182, .32);
  transform: rotate(2deg);
}
.visual-grid img {
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, .3);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .2);
}

/* Footer */
.bottom, .footer {
  background: linear-gradient(135deg, #2a1a4a, #4c1d95);
  color: #e9d9ff;
  padding: 26px 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border-top: 3px solid rgba(255, 255, 255, .2);
}
.bottom strong, .footer b { color: #fff; }
