/* ==========================================================
   finance.kids — Shared stylesheet v1
   ========================================================== */

:root {
  --ink: #0B1F3A;
  --ink-soft: #1a3356;
  --mint: #2DD4BF;
  --mint-deep: #0d9488;
  --gold: #FACC15;
  --gold-warm: #F59E0B;
  --coral: #F472B6;
  --violet: #A78BFA;
  --blue: #3B82F6;
  --paper: #FAF9F5;
  --paper-warm: #F3EDE0;
  --line: rgba(11, 31, 58, 0.1);

  /* Mascot colors */
  --c-zee: #F472B6;
  --c-mira: #2DD4BF;
  --c-kai: #3B82F6;
  --c-ada: #A78BFA;
  --c-sol: #FACC15;
  --c-atlas: #16A34A;
  --c-pi: #FB923C;
  --c-neo: #06B6D4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(45, 212, 191, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 85% 10%, rgba(250, 204, 21, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(244, 114, 182, 0.04) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.85' /%3E%3CfeColorMatrix values='0 0 0 0 0.04 0 0 0 0 0.12 0 0 0 0 0.23 0 0 0 0.4 0' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}

main { flex: 1; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

.wrap-narrow {
  max-width: 860px;
}

/* ======= TYPOGRAPHY UTILITIES ======= */
.display-font { font-family: 'Fraunces', serif; font-variation-settings: 'opsz' 144; }
.script-font { font-family: 'Caveat', cursive; }
.brand-font { font-family: 'Fredoka', sans-serif; }

/* ======= NAV ======= */
nav.site-nav {
  position: sticky;
  top: 0;
  background: rgba(250, 249, 245, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  border-bottom: 1px solid var(--line);
}

nav.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.logo .coin-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  margin: 0 1px;
  transform: translateY(6px);
  animation: spin-coin 8s ease-in-out infinite;
}

.logo .kids { color: var(--mint-deep); }

@keyframes spin-coin {
  0%, 100% { transform: translateY(6px) rotateY(0); }
  50% { transform: translateY(6px) rotateY(360deg); }
}

nav.site-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

nav.site-nav ul a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s ease;
  position: relative;
}

nav.site-nav ul a:hover { color: var(--mint-deep); }
nav.site-nav ul a.active { color: var(--mint-deep); font-weight: 600; }

nav.site-nav ul a.cta {
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 100px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

nav.site-nav ul a.cta:hover {
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(11, 31, 58, 0.4);
}

/* ======= BUTTONS ======= */
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  padding: 16px 28px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 2px solid var(--ink);
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -12px rgba(11, 31, 58, 0.4);
  color: var(--paper);
}

.btn-primary .arrow { transition: transform 0.25s ease; }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  color: var(--ink);
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease;
}

.btn-ghost:hover { border-color: var(--ink); }

/* ======= COMING SOON BADGE ======= */
.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  background: var(--paper-warm);
  color: var(--ink-soft);
  border-radius: 100px;
  border: 1px solid var(--line);
}

.coming-soon::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--coral);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.disabled-link {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

/* ======= SECTION ======= */
section.page {
  padding: 100px 0;
  position: relative;
}

.section-head {
  margin-bottom: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: end;
}

.section-head.centered {
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-kicker {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 26px;
  color: var(--coral);
  display: block;
  margin-bottom: 12px;
  line-height: 1;
}

.section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: 'opsz' 144;
}

.section-head h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--mint-deep);
}

.section-head p {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 440px;
}

.section-head.centered p {
  margin-left: auto;
  margin-right: auto;
  font-size: 20px;
}

/* ======= PAGE HEADER (for inner pages) ======= */
.page-header {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--line);
}

.page-header .page-kicker {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 28px;
  color: var(--coral);
  display: block;
  margin-bottom: 10px;
}

.page-header h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(52px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-variation-settings: 'opsz' 144;
  max-width: 820px;
  margin-bottom: 24px;
}

.page-header h1 em {
  font-style: italic;
  color: var(--mint-deep);
  font-weight: 400;
}

.page-header .lede {
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 620px;
  line-height: 1.55;
}

/* ======= FORMS ======= */
.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--line);
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.25s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--mint-deep);
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
  font-family: 'DM Sans', sans-serif;
  line-height: 1.5;
}

.form-message {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.5;
}

.form-message.success {
  background: rgba(45, 212, 191, 0.12);
  color: var(--mint-deep);
  border: 1px solid rgba(45, 212, 191, 0.4);
}

.form-message.error {
  background: rgba(244, 114, 182, 0.12);
  color: #be185d;
  border: 1px solid rgba(244, 114, 182, 0.4);
}

/* ======= FOOTER ======= */
footer.site-footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand { max-width: 320px; }

.footer-tagline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.4;
  margin-top: 20px;
}

.footer-col h5 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.footer-col a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--mint-deep); }

.footer-col a.disabled {
  color: var(--ink-soft);
  opacity: 0.6;
  cursor: not-allowed;
}

.footer-col a.disabled::after {
  content: ' · soon';
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.footer-social a:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ======= MASCOT IMAGE STYLES (v2 — real image assets) ======= */
.mascot-pic {
  position: relative;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mascot-pic img {
  filter: drop-shadow(0 8px 16px rgba(11, 31, 58, 0.12));
}

/* Subtle per-mascot animations — each has a unique drift that reflects its personality.
   Real images can't be rigged like SVGs, so we animate the whole figure with character-appropriate motion. */

/* Mira — slow, patient breath */
.mascot-pic.mascot-mira { animation: mascot-breathe 5s ease-in-out infinite; }
@keyframes mascot-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.015); }
}

/* Zee — bouncy, enthusiastic */
.mascot-pic.mascot-zee { animation: mascot-bounce 2s ease-in-out infinite; }
@keyframes mascot-bounce {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}

/* Kai — steady, analytical float */
.mascot-pic.mascot-kai { animation: mascot-drift 6s ease-in-out infinite; }
@keyframes mascot-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Ada — sharp, slight sway (skeptical) */
.mascot-pic.mascot-ada { animation: mascot-sway 4s ease-in-out infinite; }
@keyframes mascot-sway {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(2px) translateY(-2px); }
  75% { transform: translateX(-2px) translateY(-2px); }
}

/* Sol — warm, gentle pulse */
.mascot-pic.mascot-sol { animation: mascot-warm 4.5s ease-in-out infinite; }
@keyframes mascot-warm {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.02) translateY(-3px); }
}

/* Atlas — steady, like the economist he is */
.mascot-pic.mascot-atlas { animation: mascot-drift 7s ease-in-out infinite; }

/* Pi — curious, investigative tilt */
.mascot-pic.mascot-pi { animation: mascot-tilt 5s ease-in-out infinite; }
@keyframes mascot-tilt {
  0%, 100% { transform: rotate(0) translateY(0); }
  50% { transform: rotate(1.5deg) translateY(-3px); }
}

/* Neo — futuristic, slight hover-float with tiny glow pulse */
.mascot-pic.mascot-neo {
  animation: mascot-hover 3s ease-in-out infinite;
}
.mascot-pic.mascot-neo img {
  filter: drop-shadow(0 8px 16px rgba(6, 182, 212, 0.25));
}
@keyframes mascot-hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Hover — scale up, pop the shadow */
.mascot-pic:hover {
  transform: scale(1.05) !important;
  animation-play-state: paused;
}
.mascot-pic:hover img {
  filter: drop-shadow(0 16px 28px rgba(11, 31, 58, 0.2));
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .mascot-pic, .mascot-pic.mascot-mira, .mascot-pic.mascot-zee,
  .mascot-pic.mascot-kai, .mascot-pic.mascot-ada, .mascot-pic.mascot-sol,
  .mascot-pic.mascot-atlas, .mascot-pic.mascot-pi, .mascot-pic.mascot-neo {
    animation: none !important;
  }
}


/* ======= MARQUEE ======= */
.marquee {
  padding: 24px 0;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  position: relative;
}

.marquee-track {
  display: flex;
  gap: 40px;
  animation: scroll-left 40s linear infinite;
  white-space: nowrap;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  font-variation-settings: 'opsz' 144;
}

.marquee-track span {
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 40px;
}

.marquee-track span::after {
  content: '✦';
  color: var(--gold);
  font-size: 16px;
  font-style: normal;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ======= RESPONSIVE ======= */
@media (max-width: 1024px) {
  .section-head { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  nav.site-nav .wrap { padding-top: 14px; padding-bottom: 14px; }
  nav.site-nav ul { gap: 14px; font-size: 13px; }
  nav.site-nav ul a:not(.cta) { display: none; }
  section.page { padding: 64px 0; }
  .section-head h2 { font-size: 36px; }
  .page-header { padding: 56px 0 40px; }
  .page-header h1 { font-size: 40px; }
  .page-header .lede { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}
