/* site.css — kanchinese.app, the site in front of the app.
 *
 * Built from the Figma export (2026-09-20). Five real pages rather than one
 * script-driven screen: the point of the site is to be found, and a search
 * engine indexes /lessons, not a tab that only exists once JavaScript runs.
 *
 * Breakpoints: 820 is where the nav collapses into the menu, 620 is where the
 * cards lie down and the phone-sized layout starts. */

:root {
  --ink: #172133;
  --grey: #5E6678;
  --mint: #2BD19E;
  --mint-deep: #218C6B;
  --mint-pale: #E8FAF2;
  --line: #EDF4F1;
  --bg-soft: #F7FAFA;
  --grad: linear-gradient(90deg, #4DC28A 0%, #6EE3B5 100%);
  --shadow: 0 10px 30px rgba(20, 41, 31, .08);
  --shadow-up: 0 18px 40px rgba(20, 41, 31, .14);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --wrap: 1240px;
  --gut: clamp(20px, 5vw, 100px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 500 16px/1.5 Manrope, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* width/height attributes are on every <img> so nothing jumps while it loads;
   height:auto is what keeps them from stretching once CSS sets the width. */
img { max-width: 100%; height: auto; }
a { color: var(--mint-deep); text-decoration: none; }
a:hover { color: #1a6f55; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

.zh { font-family: "Noto Sans SC", Manrope, sans-serif; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: clamp(44px, 5.5vw, 80px) var(--gut); }
.wrap--tight { max-width: 1040px; }

/* ------------------------------------------------------------------ header */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease;
}
.hdr.is-stuck { box-shadow: 0 6px 24px rgba(20, 41, 31, .08); }
.hdr__bar { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gut); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); transition: opacity .2s ease; }
.brand:hover { opacity: .75; color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 10px; display: block; }
.brand span { font-weight: 700; font-size: 22px; line-height: 1; }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.nav a { font-weight: 500; font-size: 16px; color: var(--grey); white-space: nowrap; transition: color .2s ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.btn {
  display: inline-block; border: 0; border-radius: 99px; background: var(--grad);
  color: #fff; font: 700 15px/1 Manrope, sans-serif; padding: 12px 20px; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s ease;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(45, 180, 130, .35); }
.btn:active { transform: translateY(0); }
.burger {
  margin-left: auto; width: 44px; height: 44px; border: 0; background: none; border-radius: 12px;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
}
.burger span { width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s ease, opacity .25s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu { display: none; border-top: 1px solid var(--line); background: #fff; padding: 14px var(--gut) 22px; animation: fade .25s ease both; }
.menu.is-open { display: block; }
.menu a { display: block; padding: 14px 2px; font-weight: 700; font-size: 17px; color: var(--ink); border-bottom: 1px solid #F2F6F4; }
.menu .btn { display: block; margin-top: 14px; text-align: center; padding: 15px 20px; font-size: 16px; }

/* -------------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; }
.hero__in {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--gut) clamp(40px, 5vw, 70px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: clamp(24px, 4vw, 60px);
  /* Top-aligned, not centred: the phone is twice the height of the words, and
     centring the pair pushed the headline half a screen down (09-20). */
  align-items: start;
}
.pillnew { display: inline-flex; align-items: center; gap: 8px; border-radius: 99px; background: var(--mint-pale); padding: 7px 14px 7px 8px; margin-bottom: 22px; }
.pillnew i { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; font-style: normal; font-weight: 700; font-size: 12px; color: var(--mint-deep); }
.pillnew b { font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--mint-deep); }
h1 { margin: 0; font-weight: 800; font-size: clamp(36px, 5vw, 60px); line-height: 1.12; letter-spacing: -.015em; }
h1 em { font-style: normal; color: var(--mint-deep); }
.lede { margin: 26px 0 0; font-size: 19px; line-height: 1.55; color: var(--grey); max-width: 520px; }
.badge { display: inline-block; margin: 30px 0 0; transition: transform .25s var(--ease); }
.badge:hover { transform: translateY(-3px); }
.badge img { width: 230px; height: 89px; object-fit: contain; display: block; }
.fineprint { margin: 6px 0 0; font-size: 14px; color: var(--grey); }
.trust { margin-top: 42px; max-width: 540px; display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px 24px; }
.tick { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--grey); }
.tick::before { content: "✓"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--mint); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.shot { position: relative; display: flex; justify-content: center; min-width: 0; margin-top: 6px; }
.shot__blob { position: absolute; width: min(470px, 100%); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #E8FAF2 0%, #F3FCF8 60%, rgba(243, 252, 248, 0) 100%); top: 2%; right: -6%; }
.phone { position: relative; background: #141A1F; border-radius: 42px; padding: 11px; width: min(300px, 100%); box-shadow: 0 30px 60px rgba(20, 41, 31, .22); }
.phone img { width: 100%; display: block; border-radius: 32px; }
.phone--sm { border-radius: 36px; padding: 9px; width: min(250px, 100%); box-shadow: none; }
.phone--sm img { border-radius: 28px; }
.mascot { position: absolute; left: -4%; bottom: -6%; width: clamp(130px, 26%, 200px); pointer-events: none; animation: float 6s ease-in-out infinite; }

/* ------------------------------------------------------------------- stats */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #FBFEFD; }
.stats__in { max-width: var(--wrap); margin: 0 auto; padding: 34px var(--gut); display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 24px; }
.stats b { display: block; font-weight: 800; font-size: 30px; line-height: 1; }
.stats span { display: block; margin-top: 8px; font-size: 14px; color: var(--grey); }

/* ---------------------------------------------------------------- sections */
.eyebrow { text-align: center; font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mint-deep); }
h2 { margin: 14px 0 0; font-weight: 800; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -.01em; }
h2.center, .sub.center { text-align: center; }
.sub { margin: 16px 0 0; font-size: 18px; color: var(--grey); }
.band { background: var(--mint-pale); }
.grid { margin-top: 46px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.card {
  border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 30px 24px 34px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-up); border-color: #CDEBDD; }
.card img { flex: none; width: 72px; height: 72px; object-fit: contain; display: block; }
.card--sm img { width: 56px; height: 56px; }
.card b { display: block; font-weight: 700; font-size: 19px; }
.card p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--grey); }
.card--sm b { font-size: 18px; }
.card--sm p { font-size: 14px; }

.split {
  max-width: var(--wrap); margin: 0 auto; padding: clamp(30px, 4vw, 60px) var(--gut);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(30px, 5vw, 70px); align-items: center;
}
.split__shot { position: relative; display: flex; justify-content: center; min-width: 0; }
.split__shot .blob { position: absolute; width: min(380px, 100%); aspect-ratio: 1; border-radius: 50%; background: var(--mint-pale); left: -2%; top: 6%; }
.split h2 { font-size: clamp(28px, 3.2vw, 38px); }
.split p { margin: 20px 0 0; font-size: 17px; line-height: 1.6; color: var(--grey); max-width: 520px; }
.bullets { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.bullets .tick { font-size: 16px; }
.more { display: inline-block; margin-top: 26px; font-weight: 700; font-size: 16px; transition: transform .2s ease; }
.more:hover { transform: translateX(4px); }

/* ---------------------------------------------------------------- timeline */
.timecard { border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(20, 41, 31, .1); padding: 36px 30px 28px; }
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.timeline > div { display: flex; flex-direction: column; align-items: center; }
.timeline .chip { width: 100%; border-radius: 14px; background: var(--mint-pale); padding: 10px 6px 12px; text-align: center; }
.timeline .chip i { display: block; font-style: normal; font-size: 12px; color: var(--grey); }
.timeline .chip b { display: block; margin-top: 6px; font-weight: 700; font-size: 22px; }
.timeline .rail { width: calc(100% + 18px); height: 3px; background: #D4F0E3; margin: 26px -9px 0; position: relative; }
.timeline .rail::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -7px 0 0 -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--mint); animation: pulse 2.6s ease-in-out infinite; }
.timeline .when { margin-top: 14px; font-size: 13px; color: var(--grey); }

/* ------------------------------------------------------------------- clips */
.clip { border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(20, 41, 31, .1); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s ease; }
.clip:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(20, 41, 31, .18); }
.clip__top { position: relative; overflow: hidden; }
.clip__top img { width: 100%; aspect-ratio: 380/214; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.clip:hover .clip__top img { transform: scale(1.05); }
.clip__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.clip__play i { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 6px 18px rgba(0, 0, 0, .22); display: flex; align-items: center; justify-content: center; }
.clip__play i::after { content: ""; width: 0; height: 0; margin-left: 4px; border-left: 15px solid var(--ink); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.clip__dur { position: absolute; left: 16px; bottom: 14px; background: rgba(0, 0, 0, .6); border-radius: 8px; padding: 5px 9px; font-weight: 700; font-size: 12px; color: #fff; }
.clip__txt { padding: 18px 20px 20px; }
.clip__txt i { display: block; font-style: normal; font-size: 13px; color: var(--grey); }
.clip__txt b { display: block; margin-top: 6px; font-weight: 700; font-size: 20px; }
.tag { display: inline-block; margin-top: 14px; border-radius: 7px; background: var(--mint-pale); padding: 5px 10px; font-weight: 700; font-size: 12px; color: var(--mint-deep); }

/* --------------------------------------------------------------------- faq */
.faq { margin-top: 34px; display: flex; flex-direction: column; gap: 14px; }
.faq details { border-radius: 14px; background: var(--bg-soft); transition: background .25s ease; }
.faq details[open] { background: var(--mint-pale); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 28px; display: flex; align-items: center; gap: 16px; font-weight: 700; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-weight: 500; font-size: 20px; color: var(--grey); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0; padding: 0 28px 22px; font-size: 15px; line-height: 1.6; color: var(--grey); animation: fade .3s ease both; }

/* ----------------------------------------------------------------- lessons */
.lesson { border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 30px; display: flex; gap: 22px; align-items: flex-start; transition: transform .3s var(--ease), box-shadow .3s ease; }
.lesson:hover { transform: translateY(-5px); box-shadow: var(--shadow-up); }
.lesson.is-ready { background: #F3FCF8; border-color: #B9E7D3; }
.lesson__no { flex: none; width: 60px; height: 60px; border-radius: 50%; background: #F1F5F4; color: #8C94A4; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px; }
.lesson.is-ready .lesson__no { background: var(--mint); color: #fff; }
.lesson__head { display: flex; align-items: center; gap: 12px; }
.lesson__label { flex: 1; font-weight: 700; font-size: 12px; letter-spacing: .08em; color: var(--grey); }
.lesson__tag { flex: none; border-radius: 99px; background: #F1F5F4; color: var(--grey); padding: 6px 13px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.lesson.is-ready .lesson__tag { background: var(--mint-pale); color: var(--mint-deep); }
.lesson__zh { margin-top: 12px; font-weight: 700; font-size: 24px; line-height: 1.3; }
.lesson__py { margin-top: 6px; font-size: 14px; color: var(--grey); }
.lesson__en { margin-top: 8px; font-size: 15px; }
.word { border-radius: 16px; background: #fff; padding: 16px 10px 18px; text-align: center; transition: transform .25s var(--ease), box-shadow .25s ease; }
.word:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(20, 41, 31, .12); }
.word i { display: block; font-style: normal; font-size: 13px; color: var(--grey); }
.word b { display: block; margin-top: 8px; font-weight: 700; font-size: 26px; }
.words { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; }

/* ---------------------------------------------------------------- download */
.dl { margin-top: 50px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.dl__card { border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(20, 41, 31, .1); padding: 46px 30px 40px; text-align: center; }
.dl__card h2 { margin: 0; font-size: 28px; }
.dl__card p { margin: 12px 0 0; font-size: 16px; color: var(--grey); }
.dl__card .badge { margin-top: 22px; }
.dl__qr { width: 120px; height: 120px; border-radius: 8px; display: block; margin: 12px auto 0; }
.dl__card .mascot { position: static; width: 150px; margin: 14px auto 0; display: block; }
.news { margin-top: 32px; border-radius: 20px; background: var(--mint-pale); padding: 40px clamp(24px, 4vw, 60px); }
.news b { font-weight: 800; font-size: 24px; }
.news div { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px 40px; }

/* ----------------------------------------------------------------- contact */
.contact { border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(20, 41, 31, .1); padding: 36px 26px 34px; text-align: center; transition: transform .3s var(--ease), box-shadow .3s ease; }
.contact:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(20, 41, 31, .16); }
.contact img { width: 72px; height: 72px; object-fit: contain; display: block; margin: 0 auto; }
.contact b { display: block; margin-top: 22px; font-weight: 700; font-size: 22px; }
.contact p { margin: 12px 0 0; font-size: 15px; line-height: 1.55; color: var(--grey); }
.contact a { display: inline-block; margin-top: 20px; font-weight: 700; font-size: 16px; }
.report { margin-top: 32px; border-radius: 22px; background: var(--mint-pale); padding: 46px clamp(24px, 4vw, 60px); display: flex; gap: 24px; align-items: center; justify-content: center; flex-wrap: wrap; }
.report div { flex: 1; min-width: 280px; max-width: 760px; text-align: center; }
.report b { font-weight: 800; font-size: clamp(22px, 2.4vw, 28px); }
.report p { margin: 16px 0 0; font-size: 17px; line-height: 1.55; color: var(--grey); }
.report img { flex: none; width: 140px; align-self: flex-end; margin-bottom: -46px; animation: float 6s ease-in-out infinite; }

/* --------------------------------------------------------------------- cta */
.cta { background: var(--grad); position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 18% 0%, rgba(255, 255, 255, .30) 0%, rgba(255, 255, 255, 0) 60%), radial-gradient(50% 100% at 85% 100%, rgba(13, 102, 74, .22) 0%, rgba(13, 102, 74, 0) 70%); pointer-events: none; }
.cta__in { position: relative; max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 6vw, 70px) var(--gut); text-align: center; }
.cta b { font-weight: 800; font-size: clamp(26px, 3vw, 34px); color: #fff; letter-spacing: -.01em; }
.cta p { margin: 16px 0 0; font-size: 17px; color: #fff; }
.cta .badge img { width: 190px; height: 74px; }
.cta__mascot { position: absolute; right: clamp(10px, 4vw, 100px); bottom: 0; width: 150px; animation: float 6s ease-in-out infinite; }

/* ------------------------------------------------------------------ footer */
.foot { background: var(--bg-soft); }
.foot__in { max-width: var(--wrap); margin: 0 auto; padding: 56px var(--gut) 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.foot__brand { display: flex; align-items: center; gap: 12px; }
.foot__brand img { width: 34px; height: 34px; border-radius: 10px; }
.foot__brand span { font-weight: 700; font-size: 20px; }
.foot p { margin: 12px 0 0; font-size: 14px; color: var(--grey); }
.foot h3 { margin: 0; font-weight: 700; font-size: 15px; }
.foot ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot ul a { font-weight: 500; font-size: 14px; color: var(--grey); transition: color .2s ease; }
.foot ul a:hover { color: var(--ink); }
.foot__base { max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gut) 40px; }
.foot__base div { border-top: 1px solid #E3EBE8; padding-top: 22px; font-size: 14px; color: var(--grey); }

/* ----------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .55; } }

/* ------------------------------------------------------------ phone sizes */
@media (max-width: 820px) {
  .nav { display: none; }
  .burger { display: flex; }
  .cta__mascot { display: none; }
}

@media (max-width: 620px) {
  /* A screenshot that fills the whole screen is a picture of an app, not a
     page about one: the phone gets a share of the fold, not all of it. */
  .phone { width: min(248px, 72%); border-radius: 34px; padding: 8px; }
  .phone img { border-radius: 27px; }
  .phone--sm { width: min(230px, 68%); }
  .mascot { width: 108px; left: 0; bottom: -2%; }
  .trust { margin-top: 30px; gap: 10px 18px; }
  .hero__in { gap: 18px; }
  .stats__in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .stats b { font-size: 26px; }
  .card { flex-direction: row; align-items: center; text-align: left; gap: 18px; padding: 22px 20px; }
  .card img { width: 52px; height: 52px; }
  .card--sm img { width: 46px; height: 46px; }
  .grid { margin-top: 32px; gap: 16px; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
  .lede { font-size: 17px; }
  .badge img { width: 190px; height: 74px; }
  .lesson { padding: 22px 20px; gap: 16px; }
  .lesson__no { width: 48px; height: 48px; font-size: 17px; }
  .lesson__zh { font-size: 21px; }
  .timecard { padding: 26px 20px 22px; }
  .report img { width: 120px; }
  .dl__card { padding: 34px 22px 30px; }
  .news { padding: 30px 22px; }
}

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