/* ============================================================
   BrainyFred / Freddyverse - Design System
   Premium, warm, child-magical, investor-ready, offline-capable.
   Hand-crafted (no framework, no build step). UTF-8, no BOM.
   ============================================================ */

/* Online: rounded display + clean body. Offline: graceful fallback. */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;500;600;700;800&family=Cairo:wght@400;500;600;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
  /* Master + accents */
  --violet:   #6d4ed8;
  --violet-d: #4f33b3;
  --violet-l: #9a7cf0;
  --magenta:  #e0559e;
  --gold:     #f6b43c;
  --teal:     #2bb6a6;
  --coral:    #ff8a5c;
  --green:    #4fb477;
  --blue:     #4f8ff0;
  --indigo:   #6f6ae0;
  --plum:     #8a5cc4;
  --rose:     #f08aa6;
  --amber:    #f2a23c;

  /* Surfaces */
  --ink:      #2a2342;
  --ink-soft: #5a5172;
  --cream:    #fbf7ff;
  --lav-1:    #f3edff;
  --lav-2:    #efe7ff;
  --card:     rgba(255,255,255,0.72);
  --card-solid:#ffffff;
  --line:     rgba(109,78,216,0.12);

  /* Effects */
  --radius:   28px;
  --radius-sm:16px;
  --radius-lg:40px;
  --shadow-sm: 0 6px 20px rgba(79,51,179,0.08);
  --shadow:    0 18px 50px rgba(79,51,179,0.14);
  --shadow-lg: 0 30px 80px rgba(79,51,179,0.22);
  --ease:      cubic-bezier(.2,.8,.2,1);
  --ease-soft: cubic-bezier(.34,1.56,.64,1);

  --maxw: 1180px;
  --font-display: 'Fredoka', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  background:
    radial-gradient(1200px 600px at 12% -8%, #efe3ff 0%, transparent 55%),
    radial-gradient(1000px 700px at 95% 0%, #ffe7f4 0%, transparent 50%),
    radial-gradient(900px 900px at 80% 110%, #e4f7f3 0%, transparent 55%),
    var(--cream);
  background-attachment: fixed;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; color: var(--ink); line-height: 1.1; margin: 0 0 .4em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -0.4px; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); }
p { margin: 0 0 1rem; color: var(--ink-soft); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 64px 0; }
.center { text-align: center; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 60ch; }
.center .lead { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600;
  font-size: .82rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--violet-d);
  background: rgba(109,78,216,0.10);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 18px;
}
.gradient-text {
  background: linear-gradient(100deg, var(--violet) 0%, var(--magenta) 60%, var(--gold) 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 14px 26px; border-radius: 999px;
  transition: transform .25s var(--ease-soft), box-shadow .25s var(--ease), filter .25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.98); }
.btn--primary { color: #fff; background: linear-gradient(120deg, var(--violet), var(--magenta)); box-shadow: 0 12px 30px rgba(124,58,170,0.35); }
.btn--primary:hover { box-shadow: 0 18px 40px rgba(124,58,170,0.45); filter: saturate(1.1); }
.btn--ghost { color: var(--violet-d); background: rgba(255,255,255,0.7); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.btn--ghost:hover { background: #fff; }
.btn--light { color: var(--violet-d); background: #fff; box-shadow: var(--shadow-sm); }
.btn--lg { padding: 17px 34px; font-size: 1.08rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row { justify-content: center; }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 500; font-size: .82rem;
  padding: 7px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(43,182,166,0.18); }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__icon {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 18px; color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  box-shadow: 0 10px 24px rgba(124,58,170,0.3);
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: .98rem; }

/* ---------- Top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), backdrop-filter .3s;
}
.nav.scrolled {
  background: rgba(251,247,255,0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(79,51,179,0.08);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 100px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.brand__logo { width: 40px; height: 40px; border-radius: 12px; box-shadow: var(--shadow-sm); }
.brand--logo { gap: 0; }
.brand__img { height: 76px; width: auto; display: block; }
.brand b { color: var(--violet-d); }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  font-weight: 600; font-size: .92rem; color: var(--ink-soft);
  padding: 9px 13px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav__links a:hover, .nav__links a.active { color: var(--violet-d); background: rgba(109,78,216,0.09); }
.nav__links a.nav__cta { margin-left: 8px; color: #fff; }
.nav__links a.nav__cta:hover, .nav__links a.nav__cta.active { color: #fff; background: linear-gradient(120deg, var(--violet), var(--magenta)); }
.nav__burger { display: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.7); box-shadow: var(--shadow-sm); font-size: 1.3rem; color: var(--violet-d); }
.nav__drawer { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 60px 0 90px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .lead { font-size: clamp(1.1rem, 1.7vw, 1.35rem); margin-bottom: 28px; }
.hero__stage { position: relative; min-height: 460px; display: grid; place-items: center; }
.hero__halo {
  position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,85,158,0.28), rgba(109,78,216,0.18) 45%, transparent 70%);
  filter: blur(6px); animation: pulse 7s var(--ease) infinite;
}
.hero__hero-img {
  position: relative; z-index: 2; width: min(78%, 360px);
  border-radius: 28px;
  box-shadow: 0 30px 50px rgba(79,51,179,0.35), inset 0 0 0 3px rgba(255,255,255,0.6);
  animation: floaty 6s ease-in-out infinite;
}
.hero__ring {
  position: absolute; inset: 0; margin: auto; width: 380px; height: 380px;
  border: 2px dashed rgba(109,78,216,0.25); border-radius: 50%;
  animation: spin 40s linear infinite;
}
.orbit-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px;
  background: var(--card-solid); padding: 9px 15px; border-radius: 999px;
  box-shadow: var(--shadow); font-family: var(--font-display); font-weight: 600; font-size: .85rem;
  animation: floaty 5s ease-in-out infinite;
}
.orbit-chip .emoji { font-size: 1.1rem; }
.orbit-chip--a { top: 8%; left: -4%; animation-delay: .4s; }
.orbit-chip--b { top: 34%; right: -8%; animation-delay: 1.2s; }
.orbit-chip--c { bottom: 12%; left: 2%; animation-delay: 2s; }
.orbit-chip--d { bottom: 24%; right: -2%; animation-delay: .8s; }
.hero__stats { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--violet-d); line-height: 1; }
.stat span { font-size: .85rem; color: var(--ink-soft); }

/* floating soft particles layer */
.particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.particle { position: absolute; border-radius: 50%; opacity: .5; animation: drift linear infinite; }

/* ---------- Section headers ---------- */
.sec-head { max-width: 64ch; margin-bottom: 52px; }
.center.sec-head { margin-left: auto; margin-right: auto; }

/* ---------- Character cards ---------- */
.char-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.char-card {
  position: relative; border-radius: var(--radius); padding: 24px 22px 26px; cursor: pointer;
  background: var(--card-solid); box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid rgba(255,255,255,0.7);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.char-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 130px;
  background: var(--tint-grad, linear-gradient(135deg, var(--violet), var(--magenta)));
  opacity: .16; transition: opacity .4s;
}
.char-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.char-card:hover::before { opacity: .28; }
.char-card__imgwrap {
  position: relative; z-index: 1; height: 180px; margin-bottom: 14px;
  border-radius: 20px; overflow: hidden;
  background: var(--tint-grad, linear-gradient(135deg, var(--violet), var(--magenta)));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5), 0 10px 24px rgba(79,51,179,0.16);
}
.char-card__img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .6s var(--ease-soft); }
.char-card:hover .char-card__img { transform: scale(1.07); }
.char-card__role { font-family: var(--font-display); font-weight: 600; font-size: .76rem; letter-spacing: .4px; color: var(--tint-color, var(--violet-d)); text-transform: uppercase; }
.char-card h3 { font-size: 1.25rem; margin: 2px 0 6px; }
.char-card__skill { font-size: .9rem; color: var(--ink-soft); margin-bottom: 12px; min-height: 2.6em; }
.char-card__tag {
  display: inline-block; font-size: .72rem; font-weight: 700; font-family: var(--font-display);
  color: var(--tint-color, var(--violet-d)); background: var(--tint-soft, rgba(109,78,216,0.1));
  padding: 5px 11px; border-radius: 999px;
}

/* filter chips */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.filter-chip {
  font-family: var(--font-display); font-weight: 600; font-size: .85rem;
  padding: 9px 16px; border-radius: 999px; color: var(--ink-soft);
  background: rgba(255,255,255,0.7); box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: all .2s;
}
.filter-chip:hover { color: var(--violet-d); }
.filter-chip.active { color: #fff; background: linear-gradient(120deg, var(--violet), var(--magenta)); box-shadow: 0 8px 20px rgba(124,58,170,0.3); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(42,35,66,0.55); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop.open { display: flex; animation: fadein .3s var(--ease); }
.modal {
  position: relative; width: min(640px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--card-solid); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  animation: pop .35s var(--ease-soft);
}
.modal__head { position: relative; padding: 36px 36px 24px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.modal__head::before { content: ""; position: absolute; inset: 0; background: var(--tint-grad); opacity: .2; }
.modal__head-inner { position: relative; display: flex; gap: 22px; align-items: center; }
.modal__img { width: 130px; height: 130px; object-fit: cover; object-position: center top; border-radius: 22px; box-shadow: 0 16px 26px rgba(79,51,179,0.3), inset 0 0 0 3px rgba(255,255,255,0.6); flex: none; }
.modal__close { position: absolute; top: 16px; right: 18px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); font-size: 1.2rem; color: var(--ink); }
.modal__body { padding: 8px 36px 36px; }
.modal__row { padding: 16px 0; border-top: 1px solid var(--line); }
.modal__row:first-child { border-top: none; }
.modal__row .k { font-family: var(--font-display); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--tint-color, var(--violet-d)); margin-bottom: 4px; }
.modal__row .v { color: var(--ink); margin: 0; }
.modal__quote { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); font-style: italic; }

/* ---------- Methodology triangle / pillars ---------- */
.method-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.teb {
  position: relative; aspect-ratio: 1; max-width: 420px; margin: 0 auto; width: 100%;
}
.teb__node {
  position: absolute; width: 150px; height: 150px; border-radius: 50%;
  display: grid; place-items: center; text-align: center; color: #fff;
  box-shadow: var(--shadow); animation: floaty 6s ease-in-out infinite;
}
.teb__node b { font-family: var(--font-display); font-size: 1.15rem; display: block; }
.teb__node span { font-size: .78rem; opacity: .92; }
.teb__node--t { top: 0; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--violet), var(--indigo)); }
.teb__node--e { bottom: 4%; left: 0; background: linear-gradient(135deg, var(--magenta), var(--rose)); animation-delay: 1s; }
.teb__node--b { bottom: 4%; right: 0; background: linear-gradient(135deg, var(--teal), var(--green)); animation-delay: 2s; }
.teb__core { position: absolute; inset: 0; margin: auto; width: 90px; height: 90px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--coral)); display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; box-shadow: var(--shadow); }
.teb__line { position: absolute; inset: 0; z-index: -1; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar { padding: 22px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.pillar .num { font-family: var(--font-display); font-weight: 700; color: var(--violet-l); font-size: .9rem; }
.pillar h4 { margin: 4px 0 6px; font-size: 1.02rem; }
.pillar p { font-size: .88rem; margin: 0; }

/* ---------- Ecosystem orbit ---------- */
.orbit-wrap { position: relative; aspect-ratio: 1; max-width: 560px; margin: 0 auto; width: 100%; }
.orbit-core {
  position: absolute; inset: 0; margin: auto; width: 150px; height: 150px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--magenta)); color: #fff;
  display: grid; place-items: center; text-align: center; box-shadow: var(--shadow-lg); z-index: 2;
  font-family: var(--font-display); font-weight: 700;
}
.orbit-track { position: absolute; inset: 0; border: 1.5px dashed rgba(109,78,216,0.22); border-radius: 50%; }
.orbit-track--1 { inset: 14%; }
.orbit-track--2 { inset: 0; }
.orbit-node {
  position: absolute; transform: translate(-50%, -50%);
  background: var(--card-solid); padding: 12px 16px; border-radius: 16px; box-shadow: var(--shadow);
  font-family: var(--font-display); font-weight: 600; font-size: .82rem; text-align: center; min-width: 96px;
  border: 1px solid rgba(255,255,255,0.7);
  transition: transform .3s var(--ease-soft);
}
.orbit-node:hover { transform: translate(-50%, -50%) scale(1.08); z-index: 5; }
.orbit-node .emoji { display: block; font-size: 1.4rem; margin-bottom: 2px; }
.orbit-node small { display: block; font-weight: 500; font-size: .68rem; color: var(--ink-soft); }

/* ---------- Portal preview tabs ---------- */
.tabs { display: inline-flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,0.7); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.tab { font-family: var(--font-display); font-weight: 600; padding: 11px 22px; border-radius: 999px; color: var(--ink-soft); transition: all .25s; }
.tab.active { color: #fff; background: linear-gradient(120deg, var(--violet), var(--magenta)); box-shadow: 0 8px 18px rgba(124,58,170,0.3); }
.tabpanel { display: none; }
.tabpanel.active { display: block; animation: fadein .4s var(--ease); }

/* device mock */
.device {
  position: relative; width: 280px; border-radius: 38px; padding: 14px;
  background: linear-gradient(160deg, #2a2342, #4f33b3); box-shadow: var(--shadow-lg);
  margin: 0 auto;
}
.device__screen { border-radius: 26px; background: var(--cream); overflow: hidden; min-height: 460px; padding: 18px; }
.device__notch { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 90px; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.4); }

/* mission / activity list rows */
.mini-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card-solid); box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.mini-row .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.1rem; color: #fff; flex: none; }
.mini-row b { font-family: var(--font-display); font-size: .92rem; display: block; }
.mini-row small { color: var(--ink-soft); font-size: .78rem; }

/* ---------- Bridge / steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; position: relative; }
.step { text-align: center; }
.step__num { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, var(--violet), var(--magenta)); box-shadow: var(--shadow); }
.step:nth-child(2) .step__num { background: linear-gradient(135deg, var(--magenta), var(--coral)); }
.step:nth-child(3) .step__num { background: linear-gradient(135deg, var(--teal), var(--green)); }

/* ---------- Safety list ---------- */
.safe-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.safe-item { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.safe-item .check { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--teal), var(--green)); font-size: 1rem; }
.safe-item b { font-family: var(--font-display); display: block; margin-bottom: 3px; }
.safe-item p { font-size: .88rem; margin: 0; }

/* ---------- Investor metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.metric { text-align: center; padding: 28px 18px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.metric b { font-family: var(--font-display); font-size: 2rem; color: var(--violet-d); display: block; line-height: 1; }
.metric span { font-size: .85rem; color: var(--ink-soft); }

/* ---------- Testimonial ---------- */
.quote-card { padding: 40px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,0.6); }
.quote-card p { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); line-height: 1.4; }
.quote-card .who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.quote-card .who .av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--magenta)); }
.quote-card .who b { font-family: var(--font-display); }
.quote-card .who small { color: var(--ink-soft); display: block; }

/* ---------- Worlds strip ---------- */
.world-card { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; cursor: default; }
.world-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.world-card:hover img { transform: scale(1.07); }
.world-card__cap { position: absolute; inset: auto 0 0 0; padding: 22px; background: linear-gradient(to top, rgba(42,35,66,0.8), transparent); color: #fff; }
.world-card__cap b { font-family: var(--font-display); font-size: 1.2rem; display: block; }
.world-card__cap small { opacity: .85; }
.world-card__lock { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,0.85); padding: 6px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700; font-family: var(--font-display); color: var(--violet-d); }

/* ---------- Banner / CTA band ---------- */
.cta-band {
  border-radius: var(--radius-lg); padding: 64px 48px; text-align: center; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--violet-d), var(--violet) 45%, var(--magenta));
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.9); }
.cta-band::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,0.12); top: -120px; right: -80px; }

/* ---------- Forms ---------- */
.field { display: flex; gap: 10px; flex-wrap: wrap; max-width: 520px; }
.center .field { margin: 0 auto; justify-content: center; }
.input { flex: 1; min-width: 220px; padding: 15px 20px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-family: var(--font-body); font-size: 1rem; color: var(--ink); box-shadow: var(--shadow-sm); }
.input:focus { outline: 2px solid var(--violet-l); }
.form-grid { display: grid; gap: 14px; max-width: 560px; }
.form-grid .input, .form-grid textarea { width: 100%; }
textarea.input { border-radius: var(--radius-sm); resize: vertical; min-height: 120px; }
.note { font-size: .82rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer { margin-top: 40px; padding: 64px 0 32px; background: linear-gradient(180deg, transparent, rgba(109,78,216,0.06)); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); }
.footer a { display: block; color: var(--ink-soft); padding: 5px 0; font-size: .92rem; transition: color .2s; }
.footer a:hover { color: var(--violet-d); }
.footer__bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: var(--ink-soft); }
.disclaimer { background: rgba(109,78,216,0.06); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 22px; font-size: .85rem; color: var(--ink-soft); margin-top: 22px; }
.disclaimer b { color: var(--ink); }

/* ---------- Page hero (subpages) ---------- */
.page-hero { padding: 70px 0 30px; text-align: center; }
.page-hero .lead { margin: 0 auto 28px; }
.kids-hero .container{position:relative;z-index:1;}.kids-hero__row{display:flex;align-items:center;justify-content:center;gap:clamp(6px,2.2vw,44px);}.kids-hero__text{text-align:center;max-width:520px;}.kids-hero__char{height:clamp(220px,30vw,380px);width:auto;flex:none;filter:drop-shadow(0 16px 20px rgba(79,51,179,.22));pointer-events:none;user-select:none;}@media(max-width:820px){.kids-hero__row{flex-wrap:wrap;gap:0 5vw;}.kids-hero__text{order:-1;flex-basis:100%;margin-bottom:6px;}.kids-hero__char{height:clamp(150px,40vw,215px);}}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }

/* ---------- Keyframes ---------- */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes pulse  { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes spin   { to { transform: rotate(360deg); } }
@keyframes drift  { from { transform: translateY(0) translateX(0); } to { transform: translateY(-120vh) translateX(40px); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop    { from { opacity: 0; transform: scale(.9) translateY(20px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__stage { min-height: 380px; }
  .method-hero { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .char-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav__links { display: none; }
  .nav__burger { display: grid; place-items: center; }
  .nav__drawer.open { display: block; position: absolute; top: 100px; left: 0; right: 0; background: rgba(251,247,255,0.97); backdrop-filter: blur(16px); box-shadow: var(--shadow); padding: 16px 24px 24px; }
  .nav__drawer.open a { display: block; padding: 13px 8px; font-weight: 600; font-family: var(--font-display); color: var(--ink); border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .pillars, .steps, .safe-list { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .cta-band { padding: 44px 24px; }
  .hero__stats { gap: 18px; }
}

/* ---------- Language switcher ---------- */
.lang-switch { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(109,78,216,0.08); margin: 0 4px; }
.lang-btn {
  font-family: var(--font-display); font-weight: 600; font-size: .78rem; letter-spacing: .3px;
  padding: 6px 10px; border-radius: 999px; color: var(--ink-soft); transition: all .2s; line-height: 1;
}
.lang-btn:hover { color: var(--violet-d); }
.lang-btn.active { color: #fff; background: linear-gradient(120deg, var(--violet), var(--magenta)); box-shadow: 0 4px 12px rgba(124,58,170,0.3); }
.nav__drawer .lang-switch { margin-top: 14px; }

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] body { font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif; letter-spacing: normal; }
/* letter-spacing and uppercase break Arabic letter-joining */
[dir="rtl"] .eyebrow, [dir="rtl"] .char-card__role, [dir="rtl"] .badge,
[dir="rtl"] .lang-btn, [dir="rtl"] .footer h4, [dir="rtl"] .tab, [dir="rtl"] .filter-chip {
  letter-spacing: normal; text-transform: none;
}
[dir="rtl"] .lead, [dir="rtl"] .footer__bottom { text-align: inherit; }
[dir="rtl"] .btn { direction: rtl; }
[dir="rtl"] .nav__burger { transform: scaleX(-1); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
