/* =================================================================
   Coco Math — landing page styles · sunny theme (from the app)
   ================================================================= */
:root {
  --bg: #FFF7EC;
  --bg-warm: #FFEFD9;
  --accent: #FF8A3D;
  --accent2: #FFC93C;
  --accent-press: #C7611C;
  --ink: #4A3621;
  --ink-soft: #9C7B53;
  --card: #FFFFFF;
  --line: rgba(199,97,28,.12);
  --cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --shadow-card: 0 18px 44px rgba(199,97,28,.10);
  --shadow-press: 0 7px 0 rgba(199,97,28,.20);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Fredoka", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.zh { font-family: var(--cjk); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .brand,
html[dir="rtl"] .btn,
html[dir="rtl"] .appstore,
html[dir="rtl"] .strip .item,
html[dir="rtl"] .feat-list li { flex-direction: row-reverse; }
html[dir="rtl"] .hero-copy,
html[dir="rtl"] .row .copy { text-align: right; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ---------- background floaters ---------- */
.bg-symbol { position: absolute; color: #fff; pointer-events: none; z-index: 0; }
.bg-symbol svg { display: block; }

/* =================================================================
   HEADER
   ================================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,247,236,.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 16px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 13px; font-weight: 600; flex: none; }
.brand .name { font-size: 25px; letter-spacing: -.4px; color: var(--accent-press); white-space: nowrap; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 17px; font-weight: 500; color: var(--ink-soft); transition: color .15s; white-space: nowrap; }
.nav-links a:hover { color: var(--accent-press); }
.nav-links a .s { font-family: var(--cjk); opacity: .7; margin-left: 5px; font-size: 14px; }
.lang-control {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  color: var(--ink-soft); font-size: 14px; font-weight: 500;
}
.lang-control select {
  appearance: none; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); font: inherit; font-size: 14px;
  padding: 9px 30px 9px 14px; min-width: 118px; cursor: pointer;
  box-shadow: 0 5px 0 rgba(255,201,108,.28);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-press) 50%),
    linear-gradient(135deg, var(--accent-press) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.lang-control select:focus-visible {
  outline: 3px solid rgba(255,138,61,.28);
  outline-offset: 3px;
}
html[dir="rtl"] .nav-links { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .lang-control select {
  padding: 9px 14px 9px 30px;
  background-position: 17px 50%, 12px 50%;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font-family: inherit; font-weight: 600; font-size: 17px; cursor: pointer;
  border: 0; border-radius: 100px; padding: 13px 26px;
  background: var(--accent); color: #fff;
  box-shadow: var(--shadow-press); transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { background: #ff7a26; }
.btn:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(199,97,28,.20); }
.btn.ghost { background: #fff; color: var(--accent-press); box-shadow: 0 7px 0 rgba(255,201,108,.45); }
.btn.ghost:hover { background: #fff; }
.btn.lg { font-size: 20px; padding: 18px 36px; }
.nav .btn { padding: 11px 22px; font-size: 16px; flex: none; }

/* =================================================================
   HERO
   ================================================================= */
.hero { position: relative; padding: 58px 0 44px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(70% 60% at 88% 0%, var(--bg-warm) 0%, rgba(255,239,217,0) 60%),
    radial-gradient(60% 50% at 0% 100%, #FFEAD0 0%, rgba(255,234,208,0) 55%);
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 0.92fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600; letter-spacing: .04em;
  color: var(--accent-press); background: #fff;
  padding: 9px 18px; border-radius: 100px; box-shadow: 0 6px 0 rgba(255,201,108,.4);
}
.hero h1 {
  margin: 22px 0 0; font-size: 56px; line-height: 1.04; font-weight: 700;
  letter-spacing: -1px; color: var(--accent-press); text-wrap: balance;
}
.hero h1 .zh { display: block; font-size: 36px; color: var(--ink); margin-top: 12px; letter-spacing: 0; }
.hero p.lead {
  margin: 20px 0 0; font-size: 20px; line-height: 1.52; font-weight: 400; color: var(--ink-soft);
  max-width: 510px; text-wrap: pretty;
}
.hero p.lead .zh { display: block; margin-top: 6px; font-size: 18px; }
.hero .cta { margin-top: 30px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* App Store badge (drawn) */
.appstore {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--ink); color: #fff; border-radius: 16px; padding: 13px 24px 13px 22px;
  box-shadow: 0 12px 26px rgba(74,54,33,.28); transition: transform .12s;
}
.appstore:hover { transform: translateY(-2px); }
.appstore .apple { width: 32px; height: 32px; flex: none; }
.appstore .t { line-height: 1.1; }
.appstore .t small { display: block; font-size: 12px; opacity: .8; font-weight: 400; }
.appstore .t b { font-size: 21px; font-weight: 600; letter-spacing: -.3px; }

/* hero icon art */
.hero-art { position: relative; display: grid; place-items: center; min-height: 390px; }
.hero-art .halo {
  position: absolute; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,201,108,.5), rgba(255,201,108,0) 70%);
}
.icon-float { position: relative; animation: bob 5s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(2deg); } }

/* =================================================================
   APP ICON (CSS shapes)
   ================================================================= */
.app-icon { position: relative; overflow: hidden; display: inline-block; vertical-align: top;
  background: radial-gradient(120% 100% at 50% -10%, #FFD56A 0%, #FF9E3C 46%, #FF7A2F 100%);
  box-shadow: 0 30px 60px rgba(199,97,28,.32), inset 0 2px 0 rgba(255,255,255,.4);
}
.app-icon .glow { position: absolute; left: 50%; top: 40%; width: 120%; height: 120%; transform: translate(-50%,-50%);
  background: radial-gradient(closest-side, rgba(255,255,255,.45), rgba(255,255,255,0) 70%); }
.app-icon .deco { position: absolute; color: #fff; opacity: .26; }
.app-icon .mascot-wrap { position: absolute; left: 50%; top: 53%; transform: translate(-50%,-50%);
  filter: drop-shadow(0 18px 30px rgba(120,55,10,.28)); }
.icon-rounded { border-radius: 23%; }

/* mascot */
.mascot { position: relative; display: inline-block; vertical-align: top; width: var(--m,120px); height: var(--m,120px); flex: none; }
.mascot .ear { position:absolute; top:2%; width:34%; height:38%; background:var(--fur,#FF8A3D); border-radius:46% 46% 30% 30% / 70% 70% 30% 30%; }
.mascot .ear.l { left:6%; transform:rotate(-18deg); } .mascot .ear.r { right:6%; transform:rotate(18deg); }
.mascot .ear::after { content:""; position:absolute; inset:30% 28% 14% 28%; background:var(--inner,#FFD9B8); border-radius:50% 50% 40% 40%; }
.mascot .head { position:absolute; left:8%; right:8%; top:16%; bottom:4%; background:var(--fur,#FF8A3D); border-radius:48% 48% 46% 46%; }
.mascot .face { position:absolute; left:16%; right:16%; bottom:6%; top:44%; background:var(--face,#FFF3E2); border-radius:50%; }
.mascot .eye { position:absolute; top:40%; width:12%; height:15%; background:#3a2417; border-radius:50%; z-index:3; }
.mascot .eye.l { left:33%; } .mascot .eye.r { right:33%; }
.mascot .eye::after { content:""; position:absolute; top:14%; left:22%; width:38%; height:38%; background:#fff; border-radius:50%; }
.mascot .nose { position:absolute; left:50%; top:60%; transform:translateX(-50%); width:11%; height:8%; background:#3a2417; border-radius:50%; z-index:3; }
.mascot .cheek { position:absolute; top:60%; width:12%; height:8%; background:#FF9C9C; border-radius:50%; opacity:.85; z-index:2; }
.mascot .cheek.l { left:19%; } .mascot .cheek.r { right:19%; }

/* =================================================================
   QUICK STRIP
   ================================================================= */
.strip { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip .wrap { display: flex; justify-content: center; gap: 56px; padding: 26px 32px; flex-wrap: wrap; }
.strip .item { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; color: var(--ink); }
.strip .item .zh { color: var(--ink-soft); font-size: 15px; }
.strip .item .ic { color: var(--accent); display: grid; place-items: center; }

/* =================================================================
   SHOWCASE ROWS
   ================================================================= */
.section { padding: 96px 0; position: relative; overflow: hidden; }
.section.alt { background: var(--bg-warm); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 16px; position: relative; z-index: 2; }
.kicker { font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.section-head h2 { margin: 14px 0 0; font-size: 44px; font-weight: 700; letter-spacing: -1px; color: var(--accent-press); }
.section-head h2 .zh { font-size: 30px; color: var(--ink); }

.row { position: relative; z-index: 2; display: grid; grid-template-columns: 1.08fr 1fr; gap: 70px; align-items: center; margin-top: 64px; }
.row:first-of-type { margin-top: 56px; }
.row.flip .copy { order: 2; }
.row.flip .shot { order: 1; }
.row .copy .num {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: #fff; color: var(--accent-press); font-size: 24px; font-weight: 600; box-shadow: var(--shadow-card);
}
.row .copy h3 { margin: 22px 0 0; font-size: 36px; font-weight: 700; letter-spacing: -.6px; color: var(--ink); }
.row .copy h3 .zh { display: block; font-size: 24px; color: var(--accent-press); margin-top: 6px; }
.row .copy p { margin: 18px 0 0; font-size: 19px; line-height: 1.6; color: var(--ink-soft); max-width: 460px; }
.row .copy p .zh { display: block; margin-top: 6px; font-size: 16px; }
.feat-list { margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 13px; }
.feat-list li { display: flex; align-items: center; gap: 13px; font-size: 17px; font-weight: 500; color: var(--ink); }
.feat-list li .tick { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }

/* iPad landscape mockup */
.ipad {
  position: relative; background: #2a2320; border-radius: 30px; padding: 13px;
  box-shadow: 0 40px 70px rgba(120,60,15,.26), inset 0 0 0 2px rgba(255,255,255,.06), inset 0 0 0 9px #15110e;
  transform: rotate(-1.4deg); transition: transform .3s;
}
.row.flip .ipad { transform: rotate(1.4deg); }
.ipad:hover { transform: rotate(0deg) translateY(-6px); }
.ipad .screen { border-radius: 19px; overflow: hidden; background: var(--bg); aspect-ratio: 1194 / 834; }
.ipad .screen img { width: 100%; height: 100%; object-fit: cover; }

/* =================================================================
   FAMILY GRID
   ================================================================= */
.cards { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 60px; }
.card {
  background: var(--card); border-radius: 26px; padding: 36px 32px; box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
}
.card .badge {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(150deg, #FFE7B8, #FFC93C); color: var(--accent-press); margin-bottom: 22px;
}
.card h4 { margin: 0; font-size: 23px; font-weight: 600; color: var(--ink); }
.card h4 .zh { display: block; font-size: 17px; color: var(--accent-press); margin-top: 3px; }
.card p { margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-soft); }

/* =================================================================
   PRIVACY
   ================================================================= */
.privacy-section { background: #fff; }
.privacy-panel {
  margin-top: 54px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 44px;
  box-shadow: var(--shadow-card);
}
.privacy-intro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.privacy-intro p {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.privacy-date {
  white-space: nowrap;
  font-size: 14px !important;
  color: var(--accent-press) !important;
  font-weight: 600;
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: 0 5px 0 rgba(255,201,108,.36);
}
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 30px;
}
.privacy-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.privacy-item h3 {
  margin: 0;
  font-size: 20px;
  color: var(--ink);
  font-weight: 600;
}
.privacy-item p {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-soft);
}
.privacy-item a {
  color: var(--accent-press);
  font-weight: 600;
  border-bottom: 2px solid rgba(199,97,28,.22);
}

/* =================================================================
   CONTACT
   ================================================================= */
.contact { padding: 110px 0; position: relative; overflow: hidden; }
.contact-card {
  position: relative; z-index: 2; max-width: 920px; margin: 0 auto; text-align: center;
  background: radial-gradient(120% 130% at 50% -20%, #FFD56A 0%, #FF9E3C 55%, #FF7F30 100%);
  border-radius: 40px; padding: 76px 56px; color: #fff;
  box-shadow: 0 40px 80px rgba(199,97,28,.34);
  overflow: hidden;
}
.contact-card .c-sym { position: absolute; color: #fff; opacity: .18; }
.contact-card h2 { position: relative; margin: 0; font-size: 46px; font-weight: 700; letter-spacing: -1px; }
.contact-card h2 .zh { display: block; font-size: 30px; margin-top: 10px; opacity: .95; }
.contact-card p { position: relative; margin: 20px auto 0; font-size: 20px; line-height: 1.55; max-width: 560px; opacity: .94; }
.contact-card p .zh { display: block; margin-top: 5px; font-size: 17px; }
.contact-card .mail { position: relative; margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.btn.white { background: #fff; color: var(--accent-press); box-shadow: 0 10px 0 rgba(160,72,15,.35); }
.btn.white:hover { background: #fff; }
.contact-card .addr { position: relative; font-size: 17px; opacity: .9; }
.contact-card .addr a { font-weight: 600; border-bottom: 2px solid rgba(255,255,255,.5); padding-bottom: 1px; }

/* =================================================================
   FOOTER
   ================================================================= */
.footer { background: var(--ink); color: rgba(255,255,255,.7); }
.footer .wrap { display: flex; align-items: center; gap: 18px; padding: 36px 32px; flex-wrap: wrap; }
.footer .brand .name { color: #fff; }
.footer .f-right { margin-left: auto; display: flex; align-items: center; gap: 28px; font-size: 15px; }
.footer .f-right a:hover { color: #fff; }
.footer .copy { font-size: 14px; opacity: .65; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 900px) {
  .wrap { padding: 0 24px; }
  .nav-links { display: none; }
  .nav .wrap { min-height: 76px; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .brand { gap: 10px; }
  .brand .name { font-size: 22px; }
  .lang-control { margin-left: auto; }
  .lang-control span { display: none; }
  .lang-control select { min-width: 92px; max-width: 118px; padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
  .nav .btn { padding: 10px 18px; font-size: 15px; }
  .nav-cta { display: none; }
  .hero { padding: 30px 0 28px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 22px; }
  .hero-art { order: -1; min-height: 220px; }
  .hero-art .halo { width: 320px; height: 320px; }
  .icon-float { width: 210px !important; height: 210px !important; }
  .icon-float .mascot { --m: 150px !important; }
  .eyebrow { font-size: 14px; padding: 8px 14px; }
  .hero h1 { margin-top: 18px; font-size: 38px; line-height: 1.07; }
  .hero h1 .zh { font-size: 25px; margin-top: 10px; }
  .hero p.lead { margin-top: 18px; font-size: 17px; line-height: 1.5; }
  .hero p.lead .zh { font-size: 14px; }
  .hero .cta { margin-top: 22px; gap: 12px; }
  .appstore { border-radius: 14px; padding: 11px 18px 11px 16px; gap: 11px; }
  .appstore .apple { width: 27px; height: 27px; }
  .appstore .t b { font-size: 18px; }
  .btn.lg { font-size: 17px; padding: 15px 24px; }
  .row, .row.flip .copy, .row.flip .shot { grid-template-columns: 1fr; }
  .row .copy, .row .shot { order: unset !important; }
  .row { gap: 36px; }
  .cards { grid-template-columns: 1fr; }
  .privacy-panel { margin-top: 36px; padding: 26px; border-radius: 22px; }
  .privacy-intro { grid-template-columns: 1fr; gap: 16px; }
  .privacy-date { white-space: normal; width: fit-content; }
  .privacy-grid { grid-template-columns: 1fr; gap: 16px; }
  .privacy-item { padding: 22px; }
  .section { padding: 64px 0; }
  .section-head h2 { font-size: 34px; }
  .contact-card { padding: 52px 28px; }
  .contact-card h2 { font-size: 34px; }
}
