/* =============================================
   MONTY MATH — STYLESHEET
   Playful math, named after a cat.
   Theme: warm white + #ff7a00 orange, lavender accents
============================================= */

:root {
  --bg:           #fffdfa;
  --bg-soft:      #fff6ee;
  --bg-cream:     #fdf0e3;
  --bg-lav:       #f3eefc;
  --bg-dark:      #221a33;
  --orange:       #ff7a00;
  --orange-dark:  #e85d00;
  --orange-pale:  #fff2e6;
  --purple:       #8b72d6;
  --purple-dark:  #6c52bd;
  --purple-pale:  #b9a4ee;
  --ink:          #2b2138;
  --ink-mid:      #4d4360;
  --ink-light:    #8c84a0;
  --ink-faint:    rgba(43, 33, 56, 0.10);
  --radius:       18px;
  --radius-lg:    28px;
  --ease:         0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink-mid);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .nav-logo, .footer-logo {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.3rem, 5.5vw, 4.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--ink); }
p  { margin-bottom: 1.2rem; }
em { color: var(--orange-dark); font-style: normal; font-weight: 700; }
strong { color: var(--ink); font-weight: 800; }
ul { padding-left: 1.4rem; margin-bottom: 1.2rem; }
li { margin-bottom: 0.4rem; }
a  { color: var(--orange); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--orange-dark); }

.container       { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.content-narrow  { max-width: 720px; margin: 0 auto; }

/* ---- NAV ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 2.5rem;
  background: rgba(255,253,250,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-faint);
  box-shadow: 0 2px 18px rgba(43,33,56,0.05);
}
.nav-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.4rem; font-weight: 600; color: var(--ink); letter-spacing: 0;
}
.nav-logo .logo-mark { width: 34px; height: 34px; flex-shrink: 0; }
.nav-logo:hover { color: var(--orange); }
.nav-logo:hover .logo-mark { transform: rotate(-6deg); }
.nav-logo .logo-mark { transition: transform var(--ease); }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a { font-family: 'Fredoka', sans-serif; font-weight: 500; font-size: 0.92rem; letter-spacing: 0.02em; color: var(--ink-light); }
.nav-links a:hover, .nav-links a.active { color: var(--orange); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; color: var(--ink); cursor: pointer; }

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: space-between; gap: 4rem;
  padding: 8rem 2.5rem 4rem;
  max-width: 1180px; margin: 0 auto;
}
.hero-content { flex: 1; max-width: 540px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'Fredoka', sans-serif; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--purple-dark);
  background: var(--bg-lav); padding: 0.35rem 0.85rem; border-radius: 999px;
  margin-bottom: 1.3rem; opacity: 0; animation: fadeUp 0.7s ease 0.1s forwards;
}
.hero-content h1 { margin-bottom: 1.4rem; opacity: 0; animation: fadeUp 0.7s ease 0.25s forwards; }
.hero-sub { font-size: 1.12rem; color: var(--ink-mid); margin-bottom: 2.3rem; opacity: 0; animation: fadeUp 0.7s ease 0.4s forwards; }

/* ---- BUTTONS ---- */
.download-buttons { display: flex; gap: 1rem; flex-wrap: wrap; opacity: 0; animation: fadeUp 0.7s ease 0.55s forwards; }

.btn {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 0.98rem;
  transition: all var(--ease); text-decoration: none; border: 2px solid transparent;
}
.btn-store {
  background: var(--orange); color: #fff; border-color: var(--orange);
  box-shadow: 0 6px 22px rgba(255,122,0,0.32);
}
.btn-store:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,122,0,0.4); }
.btn-android { background: #fff; color: var(--ink-mid); border-color: var(--ink-faint); box-shadow: 0 2px 10px rgba(43,33,56,0.07); }
.btn-android:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }
.btn-store svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-store span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.btn-store span small { font-size: 0.62rem; font-weight: 400; opacity: 0.85; }

.btn-outline {
  display: inline-block; background: transparent; color: var(--purple-dark);
  border: 2px solid var(--purple); border-radius: 999px;
  padding: 0.7rem 1.5rem; font-family: 'Fredoka', sans-serif;
  font-weight: 600; font-size: 0.92rem; transition: all var(--ease);
}
.btn-outline:hover { background: var(--purple); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 22px rgba(139,114,214,0.3); }

/* ---- HERO VISUAL: MONTY CARD ---- */
.hero-visual { flex: 0 0 auto; opacity: 0; animation: fadeIn 1s ease 0.8s forwards; }
.monty-card {
  position: relative;
  width: 320px; height: 320px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 30% 25%, var(--bg-lav), var(--bg-cream));
  border: 1px solid var(--ink-faint);
  box-shadow: 0 30px 70px rgba(43,33,56,0.16);
  display: flex; align-items: center; justify-content: center;
}
.monty-card .monty-hero {
  width: 200px; height: 200px;
  filter: drop-shadow(0 16px 28px rgba(255,122,0,0.32));
  animation: bob 5s ease-in-out infinite;
}
.float-chip {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  min-width: 48px; height: 48px; padding: 0 0.7rem;
  background: #fff; border-radius: 14px;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.25rem;
  color: var(--purple-dark);
  box-shadow: 0 8px 20px rgba(43,33,56,0.12);
  animation: bob 4.5s ease-in-out infinite;
}
.chip-1 { top: -18px; left: 12%; color: var(--orange); animation-delay: 0.2s; }
.chip-2 { top: 22%; right: -22px; animation-delay: 0.8s; }
.chip-3 { bottom: 14%; left: -22px; color: var(--orange-dark); animation-delay: 1.2s; }
.chip-4 { bottom: -16px; right: 16%; font-size: 1rem; animation-delay: 0.5s; }

/* ---- FEATURES ---- */
.features {
  padding: 5.5rem 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
}
.feature-row {
  display: flex; align-items: center; gap: 4rem;
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--ink-faint);
}
.feature-row:last-child { border-bottom: none; }
.feature-row-reverse { flex-direction: row-reverse; }
.feature-row-text { flex: 0 0 35%; }
.feature-row-image { flex: 1; }
.feature-screenshot {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 14px 44px rgba(43,33,56,0.14);
  border: 1px solid rgba(43,33,56,0.06);
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-screenshot:hover { transform: translateY(-5px) rotate(-0.5deg); box-shadow: 0 22px 56px rgba(43,33,56,0.2); }
.feature-row-text .feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--orange-pale); color: var(--orange);
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.7rem;
  margin-bottom: 1rem; line-height: 1;
}
.feature-row-text h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }

/* ---- DONATE BANNER ---- */
.donate-banner {
  background: linear-gradient(120deg, var(--orange-pale), var(--bg-lav));
  border-top: 1px solid rgba(255,122,0,0.16);
  border-bottom: 1px solid rgba(139,114,214,0.16);
  padding: 2.3rem 2.5rem; text-align: center;
}
.donate-banner p { font-family: 'Fredoka', sans-serif; font-weight: 500; font-size: 1rem; color: var(--ink-mid); margin: 0 0 1.1rem; }
.btn-donate {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--orange); color: #fff; border-radius: 999px;
  padding: 0.75rem 1.7rem; font-family: 'Fredoka', sans-serif;
  font-weight: 600; font-size: 0.98rem; transition: all var(--ease);
  box-shadow: 0 6px 22px rgba(255,122,0,0.3); text-decoration: none;
}
.btn-donate:hover { background: var(--orange-dark); color: #fff; transform: translateY(-2px); }

/* ---- PAGE HERO ---- */
.page-hero { padding: 9rem 2.5rem 3.5rem; background: linear-gradient(150deg, var(--bg-soft), var(--bg-lav)); border-bottom: 1px solid var(--ink-faint); text-align: center; }
.page-hero .page-mark { width: 76px; height: 76px; margin: 0 auto 1.3rem; filter: drop-shadow(0 10px 20px rgba(255,122,0,0.28)); }
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero-sub { font-size: 1.12rem; color: var(--ink-mid); max-width: 600px; margin: 0 auto; }
.hero-eyebrow-plain {
  font-family: 'Fredoka', sans-serif; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple-dark);
  margin-bottom: 0.8rem;
}

/* ---- CONTENT ---- */
.content-section { padding: 4.5rem 2.5rem; background: var(--bg); }
.lead { font-size: 1.18rem; color: var(--ink); line-height: 1.8; margin-bottom: 1.4rem; }
.divider { border: none; border-top: 1px solid var(--ink-faint); margin: 2.5rem 0; }

/* ---- TUTORIAL CARDS ---- */
.tutorial-card {
  display: flex; gap: 1.6rem; align-items: flex-start;
  margin-bottom: 1.2rem; padding: 1.5rem;
  background: var(--bg-soft); border-radius: var(--radius);
  border: 1px solid var(--ink-faint);
  transition: transform var(--ease), box-shadow var(--ease);
}
.tutorial-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(43,33,56,0.1); }
.tutorial-number {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px;
  background: var(--bg-lav); color: var(--purple-dark);
  font-family: 'Fredoka', sans-serif; font-size: 1.2rem; font-weight: 600; line-height: 1;
}

/* ---- PRIVACY HIGHLIGHT ---- */
.privacy-highlight {
  background: var(--bg-lav); border: 1px solid rgba(139,114,214,0.25);
  border-radius: var(--radius); padding: 1.3rem 1.5rem;
  margin-bottom: 2.5rem; color: var(--purple-dark); font-size: 1rem;
}
.privacy-highlight strong { color: var(--purple-dark); }

/* ---- FOOTER ---- */
.footer { background: var(--bg-dark); padding: 3rem 0 0; }
.footer-inner { display: grid; grid-template-columns: 1fr auto auto; gap: 3rem; align-items: start; padding-bottom: 2.5rem; max-width: 1100px; margin: 0 auto; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 0.55rem; font-size: 1.35rem; font-weight: 600; color: #fff; margin-bottom: 0.4rem; }
.footer-brand .footer-logo .logo-mark { width: 30px; height: 30px; }
.footer-brand p { font-family: 'Fredoka', sans-serif; font-size: 0.78rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.08em; }
.footer-links { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-links a { font-family: 'Fredoka', sans-serif; font-size: 0.9rem; color: rgba(255,255,255,0.5); font-weight: 500; }
.footer-links a:hover { color: var(--orange); }
.footer-social { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.45); transition: all var(--ease); }
.footer-social a:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }
.footer-social svg { width: 15px; height: 15px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 1.2rem 2rem; text-align: center; }
.footer-bottom p { font-family: 'Fredoka', sans-serif; font-size: 0.78rem; color: rgba(255,255,255,0.3); letter-spacing: 0.02em; }

/* ---- VIDEO SECTION ---- */
.video-section {
  padding: 5.5rem 0;
  background: var(--bg-cream);
  border-top: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
}
.section-title { text-align: center; }
.video-wrapper {
  max-width: 700px; margin: 2rem auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(43,33,56,0.16);
  aspect-ratio: 16/9;
  border: 1px solid var(--ink-faint);
}
.video-wrapper iframe { width: 100%; height: 100%; display: block; }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .hero-eyebrow, .hero-content h1, .hero-sub, .download-buttons, .hero-visual { opacity: 1 !important; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 860px) {
  .hero { flex-direction: column; text-align: center; padding-top: 7rem; gap: 3rem; }
  .hero-eyebrow { margin-left: auto; margin-right: auto; }
  .download-buttons { justify-content: center; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; padding-left: 2rem; padding-right: 2rem; }
  .footer-social { flex-direction: row; }
}
@media (max-width: 720px) {
  .feature-row, .feature-row-reverse { flex-direction: column; gap: 1.5rem; padding: 2.5rem 0; }
  .feature-row-text { flex: none; width: 100%; }
}
@media (max-width: 600px) {
  .nav { padding: 0.8rem 1.4rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 1.4rem; gap: 1rem; border-bottom: 1px solid var(--ink-faint); box-shadow: 0 8px 24px rgba(43,33,56,0.1); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 6rem 1.4rem 2.5rem; }
  .monty-card { width: 270px; height: 270px; }
  .monty-card .monty-hero { width: 168px; height: 168px; }
  .download-buttons { flex-direction: column; align-items: center; }
  .tutorial-card { flex-direction: column; gap: 0.8rem; }
  .content-section { padding: 3rem 1.4rem; }
  .page-hero { padding: 7rem 1.4rem 2.5rem; }
  .donate-banner { padding: 1.9rem 1.4rem; }
}
