/* ==========================================================================
   Mitten — marketing + legal site
   Display: Baloo 2 (closest Google Fonts match to the app's rounded wordmark)
   Body:    Nunito  (humanist, rounded terminals, stays legible in long legal text)
   Style:   "Modern Dark" — deep navy ground, ambient glow, candy accents.
   ========================================================================== */

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

:root {
  /* Brand ground — taken from the real app icon, not a generic palette */
  --navy-900: #070d4d;
  --navy-800: #0b1470;
  --navy-700: #0e1a97;
  --navy-600: #1b45a7;
  --navy-500: #2563c9;

  /* Candy accents — sampled from the wordmark letters */
  --c-purple: #8b5cf6;
  --c-yellow: #ffc61b;
  --c-cyan:   #35c4e8;
  --c-pink:   #ec4899;
  --c-green:  #7bc62d;
  --c-orange: #f97316;
  --c-mitten: #f9a23c;

  --text:       #f2f5ff;
  --text-muted: #b9c4e8;   /* 7.1:1 on --navy-900 */
  --text-dim:   #8f9dcd;   /* 4.8:1 on --navy-900 */

  --surface:        rgba(255, 255, 255, 0.045);
  --surface-hover:  rgba(255, 255, 255, 0.075);
  --border:         rgba(255, 255, 255, 0.11);
  --border-strong:  rgba(255, 255, 255, 0.2);

  --radius-sm: 12px;
  --radius:    20px;
  --radius-lg: 28px;

  /* Spacious scale (density 3/10) */
  --s-1: 8px;  --s-2: 16px; --s-3: 24px; --s-4: 40px;
  --s-5: 64px; --s-6: 96px; --s-7: 140px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Nunito, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--navy-900);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient light — the atmosphere the whole design rests on */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120vw 90vh at 50% -18%, var(--navy-600) 0%, transparent 62%),
    radial-gradient(70vw 60vh at 88% 12%, rgba(53, 196, 232, 0.14) 0%, transparent 60%),
    radial-gradient(60vw 55vh at 6% 40%, rgba(139, 92, 246, 0.13) 0%, transparent 60%),
    var(--navy-900);
}

/* Fine grain so the large flat areas do not band */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ---------- typography ---------- */

h1, h2, h3, h4 {
  font-family: 'Baloo 2', ui-rounded, system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s-2);
}

h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 700; }

p { margin: 0 0 var(--s-2); }
strong { font-weight: 700; color: #fff; }

a { color: var(--c-cyan); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: #7bdcf5; }

:focus-visible {
  outline: 3px solid var(--c-yellow);
  outline-offset: 3px;
  border-radius: 6px;
}

.lede { font-size: clamp(1.08rem, 2vw, 1.28rem); color: var(--text-muted); max-width: 56ch; }
.eyebrow {
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--c-yellow);
  margin: 0 0 var(--s-1);
}

/* ---------- layout ---------- */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-3); }
section { padding: var(--s-6) 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 13, 77, 0.72);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-2); min-height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.35rem;
  color: #fff; text-decoration: none; letter-spacing: -0.01em;
}
.brand img { width: 38px; height: 38px; border-radius: 10px; display: block; }
.site-nav { display: flex; align-items: center; gap: var(--s-3); }
.site-nav a {
  color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.97rem;
  transition: color 180ms var(--ease);
}
.site-nav a:hover { color: #fff; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 30px;
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.05rem;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms var(--ease);
}
.btn-primary {
  color: #2a1400;
  background: linear-gradient(135deg, var(--c-yellow), var(--c-orange));
  box-shadow: 0 10px 30px -8px rgba(249, 115, 22, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -8px rgba(249, 115, 22, 0.72); color: #2a1400; }
.btn-ghost {
  color: #fff; background: var(--surface); border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-hover); transform: translateY(-2px); color: #fff; }

/* ---------- hero ---------- */

.hero { padding: var(--s-6) 0 var(--s-5); }
.hero-grid {
  display: grid; grid-template-columns: 1.08fr 0.92fr;
  gap: var(--s-5); align-items: center;
}
.hero h1 { margin-bottom: var(--s-2); }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--c-purple), var(--c-cyan) 32%, var(--c-yellow) 62%, var(--c-orange));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.hero-note { margin-top: var(--s-2); font-size: 0.95rem; color: var(--text-dim); }

.hero-art { position: relative; justify-self: center; max-width: 380px; }
.hero-art img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75);
}

/* Floating letter tiles — the icon's own motif */
.tile {
  position: absolute; display: grid; place-items: center;
  width: 62px; height: 62px; border-radius: 18px;
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.5rem; color: #fff;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.6);
  animation: bob 6s ease-in-out infinite;
}
.tile-a { background: var(--c-pink);   top: 6%;  left: -34px; animation-delay: 0s; }
.tile-b { background: var(--c-cyan);   top: 44%; right: -30px; animation-delay: 1.4s; }
.tile-c { background: var(--c-green);  bottom: 8%; left: -22px; animation-delay: 2.6s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-14px) rotate(5deg); }
}

/* ---------- cards ---------- */

.grid { display: grid; gap: var(--s-3); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-3);
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), background 220ms var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-hover); }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--text-muted); margin: 0; font-size: 0.98rem; }

.card-icon {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center; margin-bottom: var(--s-2);
}
.card-icon svg { width: 26px; height: 26px; stroke-width: 2; }

/* Numbered steps */
.step-num {
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 2.6rem;
  line-height: 1; color: transparent;
  -webkit-text-stroke: 2px var(--border-strong);
  margin-bottom: var(--s-1);
}

/* ---------- callout ---------- */

.callout {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(140deg, rgba(139, 92, 246, 0.18), rgba(27, 69, 167, 0.28));
  padding: var(--s-4);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--s-4) 0 var(--s-4);
  margin-top: var(--s-5);
  color: var(--text-dim);
  font-size: 0.94rem;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- legal / prose pages ---------- */

.prose-head { padding: var(--s-5) 0 var(--s-3); }
.prose {
  max-width: 74ch;
  padding-bottom: var(--s-5);
}
.prose h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  margin-top: var(--s-4);
  padding-top: var(--s-2);
  border-top: 1px solid var(--border);
}
.prose h2:first-of-type { border-top: 0; margin-top: var(--s-2); }
.prose ul { padding-left: 1.15rem; color: var(--text-muted); }
.prose li { margin: 10px 0; }
.prose p { color: var(--text-muted); }
.updated { color: var(--text-dim); font-size: 0.95rem; margin: 0; }

.note {
  border-left: 3px solid var(--c-yellow);
  background: rgba(255, 198, 27, 0.08);
  padding: var(--s-2) var(--s-3);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--s-3) 0;
}
.note p:last-child { margin-bottom: 0; }

/* ---------- entrance motion ---------- */

.reveal { opacity: 0; transform: translateY(22px); animation: rise 800ms var(--ease) forwards; }
.d1 { animation-delay: 60ms; }  .d2 { animation-delay: 160ms; }
.d3 { animation-delay: 260ms; } .d4 { animation-delay: 360ms; }

@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .hero-art { order: -1; max-width: 300px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  section { padding: var(--s-5) 0; }
  .site-nav { gap: var(--s-2); }
  .site-nav a.nav-hide-sm { display: none; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .tile { width: 50px; height: 50px; font-size: 1.2rem; }
  .btn { width: 100%; }
}

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