/*
  Mochi marketing site — styles.
  Palette, type, radii and shadows mirror src/constants/theme.ts so the
  page reads as the same brand as the app. Plain CSS, no build step.
*/

:root {
  /* Colour — from theme.ts */
  --bg: #FFF5F2;
  --surface: #FFF0ED;
  --surface-alt: #FFE8E4;
  --card: #FFFFFF;
  --ink: #3D2314;
  --muted: #8B6F60;
  --faint: #C4A99E;
  --border: #F5DDD7;
  --pink: #F2A0A0;
  --pink-light: #F8C4C4;
  --pink-dark: #E88B8B;
  --pink-deep: #D97070;
  --blue: #6B8DD6;
  --blue-light: #A3BEF5;
  --green: #4CAF50;
  --mint: #E8F8F0;
  --lavender: #F0E8FF;
  --sky: #E8F0FE;
  --badge: #5C7A3A;
  --tag-bg: #F0F5E8;

  /* Radii */
  --r-sm: 16px;
  --r-md: 24px;
  --r-lg: 28px;
  --r-xl: 32px;
  --r-full: 999px;

  /* Shadows — warm brown tint, like the app's cards */
  --shadow-soft: 0 2px 10px rgba(61, 35, 20, 0.05);
  --shadow-card: 0 6px 20px rgba(61, 35, 20, 0.08);
  --shadow-lift: 0 22px 48px rgba(61, 35, 20, 0.13);

  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Decorative floating blobs ------------------------------------ */
.blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.55;
  animation: float 18s var(--ease) infinite;
}
.blob--rose     { width: 360px; height: 360px; background: var(--pink-light);  top: -80px; left: -90px; }
.blob--mint     { width: 300px; height: 300px; background: var(--mint);        top: 38%;   right: -100px; animation-delay: -4s; }
.blob--sky      { width: 320px; height: 320px; background: var(--sky);         bottom: 6%; left: -110px; animation-delay: -9s; }
.blob--lavender { width: 240px; height: 240px; background: var(--lavender);    top: 64%;   right: 12%;  animation-delay: -13s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(20px, -28px) scale(1.08); }
}

/* ---- Layout helpers ----------------------------------------------- */
section { padding: 96px 24px; }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.18; }

.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--pink-deep);
  margin-bottom: 14px;
}

/* ---- Nav ----------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 48px);
  background: rgba(255, 245, 242, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.wordmark { font-size: 26px; font-weight: 900; color: var(--pink-deep); letter-spacing: -0.02em; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) { font-weight: 700; color: var(--muted); transition: color 0.2s; }
.nav__links a:not(.btn):hover { color: var(--ink); }

/* ---- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-family: inherit;
  border-radius: var(--r-full);
  padding: 15px 28px; font-size: 16px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
  cursor: pointer; border: none;
}
.btn--primary { background: var(--pink-dark); color: #fff; box-shadow: var(--shadow-card); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); background: var(--pink-deep); }
.btn--ghost { background: var(--card); color: var(--pink-deep); box-shadow: var(--shadow-soft); border: 2px solid var(--pink-light); }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--pink-dark); }
.btn--sm { padding: 10px 20px; font-size: 14px; }
.btn--lg { padding: 18px 40px; font-size: 18px; }

/* ---- Hero ---------------------------------------------------------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
  padding-top: 72px; padding-bottom: 64px;
}
.kicker {
  display: inline-block; font-size: 14px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue);
  background: var(--sky); padding: 6px 16px; border-radius: var(--r-full); margin-bottom: 22px;
}
.hero__title { font-size: clamp(46px, 8vw, 84px); font-weight: 900; line-height: 0.98; letter-spacing: -0.03em; }
.hero__title .word { display: block; opacity: 0; transform: translateY(24px); animation: pop 0.7s var(--ease) forwards; }
.hero__title .word::after { content: ''; }
.word--1 { animation-delay: 0.05s; }
.word--2 { animation-delay: 0.20s; }
.word--3 { animation-delay: 0.35s; color: var(--pink-deep); }
@keyframes pop { to { opacity: 1; transform: translateY(0); } }

.hero__sub { font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: var(--ink); margin-top: 14px; opacity: 0; animation: pop 0.7s var(--ease) 0.5s forwards; }
.hero__lede { font-size: 18px; color: var(--muted); font-weight: 500; max-width: 480px; margin-top: 20px; opacity: 0; animation: pop 0.7s var(--ease) 0.65s forwards; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; opacity: 0; animation: pop 0.7s var(--ease) 0.8s forwards; }

.hero__art { display: flex; justify-content: center; }
.mascot-ring {
  width: min(380px, 80vw); aspect-ratio: 1; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow-lift);
  display: flex; align-items: center; justify-content: center;
  position: relative; animation: bob 5s ease-in-out infinite;
}
.mascot-ring::before {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px dashed var(--pink-light); opacity: 0.7;
}
.mascot { width: 72%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ---- Why ----------------------------------------------------------- */
.why { max-width: var(--maxw); margin: 0 auto; }
.why__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.problem-card {
  background: var(--card); border-radius: var(--r-xl); padding: 38px;
  box-shadow: var(--shadow-card); border: 1px solid var(--border);
}
.problem-card__tag {
  display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 0.06em;
  color: var(--pink-deep); background: var(--surface-alt);
  padding: 6px 14px; border-radius: var(--r-full); margin-bottom: 18px;
}
.problem-card h3 { font-size: 21px; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; }
.problem-card .fix { margin-top: 16px; color: var(--muted); font-weight: 500; }
.problem-card .fix strong { color: var(--pink-deep); font-weight: 800; }

/* ---- Loop (four skills) ------------------------------------------- */
.loop { max-width: var(--maxw); margin: 0 auto; }
.loop__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.skill-card {
  position: relative; border-radius: var(--r-lg); padding: 30px 26px;
  box-shadow: var(--shadow-soft); border: 1px solid rgba(61, 35, 20, 0.04);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.skill-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.skill-card--rose     { background: var(--surface-alt); }
.skill-card--mint     { background: var(--mint); }
.skill-card--sky      { background: var(--sky); }
.skill-card--lavender { background: var(--lavender); }
/* Feature demo media slot — swap the inner content for a gif/video later.
   A dropped-in <img> or <video> fills the frame; the placeholder shows until then. */
.media-ph {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed rgba(61, 35, 20, 0.16);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--pink-deep);
  margin-bottom: 18px;
  overflow: hidden;
}
.media-ph__icon { opacity: 0.85; line-height: 0; }
.media-ph__label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.media-ph img, .media-ph video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.skill-card--mint .media-ph { color: var(--green); }
.skill-card--sky .media-ph  { color: var(--blue); }
.skill-card--lavender .media-ph { color: #8B6FC4; }
.skill-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.skill-card p { font-size: 15px; color: var(--muted); font-weight: 500; line-height: 1.5; }
.skill-card--soon { opacity: 0.92; }
.skill-badge {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue); background: var(--card);
  padding: 4px 11px; border-radius: var(--r-full); box-shadow: var(--shadow-soft);
}
.skill-badge--soon { color: var(--faint); }

/* Speak demo — characters unlock green one by one */
.demo {
  margin-top: 44px; background: var(--card); border-radius: var(--r-xl);
  padding: 40px 32px; box-shadow: var(--shadow-card); text-align: center;
  border: 1px solid var(--border);
}
.demo__cap { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-bottom: 22px; }
.demo__sentence { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.demo__sentence .hz {
  position: relative;
  font-size: clamp(34px, 7vw, 52px); font-weight: 800; line-height: 1.5;
  color: var(--faint); padding: 4px 10px 26px; border-radius: 12px;
  animation: light 6s steps(1) infinite;
}
.demo__sentence .hz small {
  position: absolute; bottom: 4px; left: 0; right: 0;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.demo__sentence .hz:nth-child(1) { animation-delay: 0.0s; }
.demo__sentence .hz:nth-child(2) { animation-delay: 0.5s; }
.demo__sentence .hz:nth-child(3) { animation-delay: 1.0s; }
.demo__sentence .hz:nth-child(4) { animation-delay: 1.5s; }
.demo__sentence .hz:nth-child(5) { animation-delay: 2.0s; }
.demo__sentence .hz:nth-child(6) { animation-delay: 2.5s; }
@keyframes light {
  0%      { color: var(--faint); background: transparent; transform: scale(1); }
  6%      { color: var(--green); background: var(--mint); transform: scale(1.12); }
  12%, 92%{ color: var(--green); background: var(--mint); transform: scale(1); }
  100%    { color: var(--faint); background: transparent; }
}
.demo__note { margin-top: 24px; font-size: 17px; font-weight: 800; color: var(--green); }

/* ---- Built around you --------------------------------------------- */
.built { max-width: var(--maxw); margin: 0 auto; }
.built__inner {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-alt) 100%);
  border-radius: var(--r-xl); padding: clamp(36px, 6vw, 64px);
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.built__copy h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 16px; }
.built__copy p { color: var(--muted); font-weight: 500; font-size: 17px; }
.built__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.hsk, .topic {
  font-weight: 800; font-size: 15px; padding: 9px 16px; border-radius: var(--r-full);
  background: var(--card); box-shadow: var(--shadow-soft); color: var(--muted);
}
.hsk--on { background: var(--pink-dark); color: #fff; transform: scale(1.06); }
.topic { background: var(--tag-bg); color: var(--badge); }

/* ---- Proof --------------------------------------------------------- */
.proof { max-width: 720px; margin: 0 auto; text-align: center; }
.proof__inner { display: flex; flex-direction: column; align-items: center; }
.proof__mascot { width: 120px; margin-bottom: 8px; }
.proof h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.18; margin-bottom: 16px; }
.proof p { color: var(--muted); font-weight: 500; font-size: 18px; max-width: 520px; }
.proof p em { font-style: normal; font-weight: 800; color: var(--pink-deep); }
.quote {
  margin-top: 30px; font-size: clamp(20px, 2.6vw, 26px); font-weight: 800;
  color: var(--ink); line-height: 1.4; max-width: 560px;
  padding-top: 26px; border-top: 2px dashed var(--border);
}

/* ---- Final CTA ----------------------------------------------------- */
.cta { max-width: var(--maxw); margin: 0 auto; }
.cta__inner {
  background: linear-gradient(160deg, var(--pink-light) 0%, var(--pink) 100%);
  border-radius: var(--r-xl); padding: clamp(48px, 8vw, 88px) 32px;
  text-align: center; box-shadow: var(--shadow-card);
}
.cta__mascot { width: 130px; margin: 0 auto 18px; }
.cta__title { font-size: clamp(34px, 6vw, 60px); font-weight: 900; letter-spacing: -0.03em; color: var(--ink); line-height: 1.0; }
.cta__sub { font-size: clamp(18px, 2.6vw, 24px); font-weight: 800; color: #fff; margin-top: 12px; margin-bottom: 30px; }
.cta .btn--primary { background: var(--ink); }
.cta .btn--primary:hover { background: #2b1810; }

/* ---- Footer -------------------------------------------------------- */
.footer {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 40px 24px 60px; border-top: 1px solid var(--border);
}
.footer__mark { font-size: 22px; font-weight: 900; color: var(--pink-deep); }
.footer__links { display: flex; gap: 24px; }
.footer__links a { color: var(--muted); font-weight: 700; transition: color 0.2s; }
.footer__links a:hover { color: var(--ink); }
.footer__copy { color: var(--faint); font-weight: 600; font-size: 14px; }

/* ---- Reveal on scroll --------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive ---------------------------------------------------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
  .hero__copy { order: 2; }
  .hero__art { order: 1; }
  .hero__lede { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .why__grid { grid-template-columns: 1fr; }
  .loop__grid { grid-template-columns: 1fr 1fr; }
  .built__inner { grid-template-columns: 1fr; text-align: center; }
  .built__chips { justify-content: center; }
}
@media (max-width: 560px) {
  section { padding: 64px 20px; }
  .nav__links a:not(.btn) { display: none; }
  .loop__grid { grid-template-columns: 1fr; }
}

/* ---- Reduced motion ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__title .word, .hero__sub, .hero__lede, .hero__actions { opacity: 1; }
}

/* ---- Legal pages (privacy / terms) -------------------------------- */
.legal { max-width: 760px; margin: 0 auto; padding: 56px clamp(20px, 5vw, 24px) 96px; }
.legal__header { text-align: center; margin-bottom: 36px; }
.legal h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 900; letter-spacing: -0.02em; }
.legal__updated { color: var(--faint); font-weight: 700; font-size: 14px; margin-top: 10px; }
.legal h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 40px 0 12px; }
.legal h3 { font-size: 17px; font-weight: 800; color: var(--ink); margin: 24px 0 6px; }
.legal p, .legal li { color: var(--muted); font-weight: 500; font-size: 16px; line-height: 1.75; }
.legal p { margin-bottom: 14px; }
.legal ul { padding-left: 22px; margin: 6px 0 18px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--pink-deep); font-weight: 700; }
.legal a:hover { text-decoration: underline; }
.legal strong { color: var(--ink); font-weight: 800; }
a.footer__mark:hover { color: var(--pink); }
