/* Study Chinese — homepage-specific layout. Depends on site.css + ui.css. */

/* HERO */
.hero { position: relative; overflow: clip; padding: clamp(40px, 6vw, 84px) 0 clamp(30px, 5vw, 70px); }
.hero-glow { position: absolute; inset: -14% -10% auto -10%; height: 90%; pointer-events: none; z-index: -1;
  background: radial-gradient(54% 62% at 26% 0%, rgba(24, 178, 87, .16), transparent 70%),
              radial-gradient(42% 52% at 86% 14%, rgba(244, 183, 64, .13), transparent 72%),
              radial-gradient(40% 46% at 62% 40%, rgba(14, 159, 110, .08), transparent 72%); }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-pill { display: inline-flex; align-items: center; gap: 11px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); border-radius: var(--r-pill); padding: 7px 18px 7px 8px; font-weight: 700; font-size: .88rem; color: var(--ink2); margin-bottom: 24px; }
.hero-copy h1 { font-size: clamp(2.3rem, 4.9vw, 4rem); font-weight: 800; margin-bottom: 20px; max-width: 17ch; }
.hero-copy h1 em { font-style: normal; color: var(--jade-deep); position: relative; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero-copy h1 em::after { content: ""; position: absolute; left: -.04em; right: -.04em; bottom: .05em; height: .32em; background: var(--gold); border-radius: 6px; z-index: -1; opacity: .5; }
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.24rem); color: var(--ink2); max-width: 52ch; margin-bottom: 30px; }

/* hero stage: phone + portal cards + Bao */
.hero-stage { position: relative; display: grid; place-items: center; min-height: 480px; }
.hero-hanzi { position: absolute; top: -6%; right: 0; font-family: var(--f-hanzi); font-weight: 700; font-size: clamp(9rem, 16vw, 15rem); color: var(--jade); opacity: .07; line-height: 1; pointer-events: none; }
.hero-phone { width: clamp(220px, 23vw, 272px); z-index: 1; }
/* Cards peek over the phone's edges (~20% overlap), not across it: narrower, and pushed
   outward by a viewport-scaled offset that stays clear of the copy column on the left. */
.hero-mc { position: absolute; width: min(244px, 74vw); z-index: 2; }
.hero-mc .mc-title { white-space: nowrap; }
.hero-mc-tone { top: 5%; left: calc(-1 * clamp(20px, 4vw, 58px)); width: min(262px, 74vw); }
.hero-mc-hw { bottom: 41%; right: calc(-1 * clamp(24px, 4.2vw, 60px)); }
.hero-mc-streak { bottom: -2%; left: calc(-1 * clamp(12px, 3vw, 44px)); width: 212px; }
/* Narrower stage below ~1100px: the cards can't move further out without touching the headline, so they slim down instead. */
@media (max-width: 1100px) { .hero-mc { width: min(200px, 74vw); } .hero-mc-tone { left: calc(-1 * clamp(12px, 3vw, 36px)); } .hero-mc-streak { left: calc(-1 * clamp(8px, 2.5vw, 30px)); width: 188px; } .hero-mc-hw { right: calc(-1 * clamp(16px, 3.5vw, 44px)); } .mockcard.hero-mc { padding: 12px 13px; } }
.hero-prog-note { color: var(--muted); font-size: .78rem; display: block; margin-top: 8px; }
.hero-bao { position: absolute; bottom: -2%; right: 4%; width: clamp(96px, 12vw, 150px); z-index: 3; pointer-events: auto; }
.hero-bao img { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(9, 52, 30, .26)); animation: bao-bob 5.5s var(--ease-in-out) infinite alternate; }

/* Stacked layout: the phone sits centred with only the side gutters free, so each card is
   sized from that gutter (half of what the phone leaves, plus ~40px of overlap) and the
   type shrinks with it. Fixed widths here used to cover half of the phone's screen. */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { min-height: 0; margin-top: 8px; padding-bottom: 40px; --hero-phone-w: 220px; }
  .hero-mc, .hero-mc-tone, .hero-mc-streak { width: clamp(128px, calc((100% - var(--hero-phone-w)) / 2 + 40px), 210px); }
  .mockcard.hero-mc { padding: 9px 10px; }
  .hero-mc .mc-head { gap: 6px; margin-bottom: 6px; }
  .hero-mc .mc-title { gap: 6px; font-size: .78rem; }
  .hero-mc .mc-title .ic { width: 14px; height: 14px; }
  .hero-mc .mc-tag { font-size: .62rem; padding: 2px 7px; }
  .hero-mc .mc-row { gap: 8px; padding: 4px 0; font-size: .78rem; }
  .hero-mc .mc-row .mc-ic { display: none; }
  .hero-mc .mc-row small, .hero-prog-note { font-size: .7rem; }
  .hero-mc-tone { left: 0; top: 3%; }
  .hero-mc-hw { right: 0; bottom: 40%; }
  .hero-mc-streak { left: 0; bottom: 0; }
}
@media (max-width: 480px) {
  .hero-stage { --hero-phone-w: 190px; }
  .hero-phone { width: var(--hero-phone-w); }
  /* ~130px cards: keep title, value and bar; the tag chip and sub-line no longer fit. */
  .hero-mc .mc-tag, .hero-mc .mc-row small { display: none; }
  .hero-mc .mc-head { margin-bottom: 2px; }
  .hero-mc-streak { display: none; }
  .hero-bao { right: 0; }
}

/* JadeClass grid tweaks */
.prog-grid { align-items: stretch; }
.prog-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; font-weight: 600; color: var(--muted); font-size: .93rem; }
.prog-more .badge { transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.prog-more .badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.prog-more .link-arrow { margin-left: 6px; }

/* centred button row under a section */
.cta-row-center { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: clamp(26px, 4vw, 40px); }
/* ============ PROOF STRIP (true numbers, no invented stats) ============ */
.proof { padding: clamp(22px, 3.5vw, 36px) 0; }
.proof-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 18px; margin: 0; padding: 0; list-style: none; }
.proof-row li { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 4px 16px; border-left: 2px solid var(--border-mint); min-width: 0; }
.proof-row b { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.1rem, 1.7vw, 1.45rem); color: var(--jade-deep); letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.proof-row span { font-size: .8rem; font-weight: 600; color: var(--ink2); line-height: 1.3; }
@media (max-width: 900px) { .proof-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .proof-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ============ APP FEATURE BENTO ============ */
/* Real captures in a frameless crop: the screenshot peeks up from the tile's floor so the
   grid reads as one composition instead of twelve phone frames. */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(238px, auto); gap: 16px; }
.bento-tile { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s; }
@media (hover: hover) and (pointer: fine) {
  .bento-tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--border-mint); }
  .bento-tile:hover .bt-shot img { transform: translateY(calc(-7.6% - 8px)); }
}
.bt-shot { position: relative; overflow: hidden; height: 184px; padding: 18px 22px 0; box-shadow: inset 0 -1px 0 var(--border-mint); display: flex; align-items: flex-start; justify-content: center; background: linear-gradient(180deg, var(--mint), var(--jade-soft)); }
/* The top safe-area band (about 7% of a capture) is cropped away with a rounded clip so each tile opens on the screen itself. */
.bt-shot img { width: min(76%, 188px); clip-path: inset(7.6% 0 0 0 round 20px 20px 0 0); transform: translateY(-7.6%); transition: transform .4s var(--ease-out); }
.bt-copy { padding: 15px 20px 19px; }
.bt-copy h3 { font-size: 1.06rem; font-weight: 700; margin-bottom: 6px; }
.bt-copy p { color: var(--ink2); font-size: .89rem; line-height: 1.5; }
.bt-kicker { display: inline-block; font-family: var(--f-display); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--jade-deep); margin-bottom: 10px; }
.bento-hero { grid-column: span 2; grid-row: span 2; grid-template-rows: none; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); background: linear-gradient(150deg, #fff 0%, var(--mint) 100%); }
.bento-hero .bt-copy { padding: clamp(22px, 3vw, 38px); align-self: center; }
.bento-hero .bt-copy h3 { font-size: clamp(1.5rem, 2.4vw, 2.15rem); line-height: 1.05; margin-bottom: 12px; }
.bento-hero .bt-copy p { font-size: .98rem; margin-bottom: 18px; }
.bento-hero .bt-shot { height: 100%; min-height: 380px; padding: 34px 26px 0; background: transparent; align-items: flex-start; }
.bento-hero .bt-shot img { width: min(90%, 262px); clip-path: inset(7.6% 0 0 0 round 30px 30px 0 0); }
.bento-wide { grid-column: span 2; grid-template-rows: none; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.bento-wide .bt-copy { align-self: center; padding: 22px 24px; }
.bento-wide .bt-shot { height: 100%; min-height: 220px; padding-top: 24px; }
.bt-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--jade-soft); color: var(--jade-deep); }
.bt-ic .ic { width: 22px; height: 22px; }
.bt-ic.gold { background: var(--gold-soft); color: var(--gold-deep); }
.bt-ic.red { background: var(--cinnabar-soft); color: var(--cinnabar); }
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-hero { grid-row: auto; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 12px; }
  .bento-hero .bt-shot, .bento-wide .bt-shot { height: 210px; min-height: 0; }
  .bento-hero, .bento-wide { grid-column: auto; grid-template-columns: 1fr; }
  .bento-hero .bt-shot, .bento-wide .bt-shot { order: -1; min-height: 190px; }
  .bt-shot { min-height: 150px; }
}

/* No-bundle fallback: tiles cascade with the legacy CSS reveal. */
.js:not(.gsap-motion) .bento-tile.reveal:nth-child(2) { transition-delay: 60ms; }
.js:not(.gsap-motion) .bento-tile.reveal:nth-child(3) { transition-delay: 120ms; }
.js:not(.gsap-motion) .bento-tile.reveal:nth-child(4) { transition-delay: 180ms; }
.js:not(.gsap-motion) .bento-tile.reveal:nth-child(n+5) { transition-delay: 240ms; }

/* ============ LAUNCH: now on iOS + Android ============ */
.launch { padding-block: clamp(28px, 5vw, 56px) clamp(8px, 2vw, 20px); }
.launch-panel { position: relative; overflow: clip; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(28px, 4.5vw, 56px); border-radius: var(--r-xl); background: radial-gradient(90% 120% at 0% 0%, var(--forest-2), var(--forest) 70%); color: var(--on-dark); box-shadow: var(--shadow-xl); }
.launch-panel::after { content: "上线"; position: absolute; right: -2%; bottom: -18%; font-family: var(--f-hanzi); font-weight: 700; font-size: clamp(8rem, 18vw, 15rem); line-height: 1; color: #fff; opacity: .04; pointer-events: none; }
.launch-kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.launch-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(244, 183, 64, .18); }
.launch h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; margin-bottom: 16px; }
.launch h2 em { font-style: normal; color: #8FE6B0; }
.launch-copy p { color: var(--on-dark2); font-size: 1.04rem; max-width: 46ch; }
.launch-copy p b { color: var(--on-dark); }
.launch-stores { position: relative; z-index: 1; display: grid; gap: 14px; }
.launch-store { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 16px 16px 16px 20px; border-radius: var(--r-md); background: rgba(255, 255, 255, .06); border: 1px solid rgba(236, 248, 239, .14); }
.launch-store > .ic { width: 30px; height: 30px; color: #8FE6B0; }
.launch-store b { display: block; font-family: var(--f-display); font-size: 1.08rem; color: #fff; }
.launch-store > div small { color: var(--on-dark2); font-size: .86rem; }
.is-android .launch-store-play { order: -1; }
.is-android .launch-store [data-playstore] { order: 0; }
@media (max-width: 900px) {
  .launch-panel { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .launch-store { grid-template-columns: auto 1fr; }
  .launch-store .store-btn { grid-column: 1 / -1; justify-content: center; }
}

/* ============ 2026-11 trim: fewer sections, one job each ============ */
.section-tight { padding-block: clamp(34px, 5vw, 64px); }
.new-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--jade-soft); color: var(--jade-deep); font-family: var(--f-body); font-size: .68rem; font-weight: 800; letter-spacing: .02em; vertical-align: middle; white-space: nowrap; }

/* Taller peeks: half of each screen shows, so a capture reads without a tap. */
.bento .bento-tile:not(.bento-hero):not(.bento-wide) .bt-shot { height: 236px; }
.bento .bento-tile:not(.bento-hero):not(.bento-wide) .bt-shot img { width: min(80%, 204px); }
/* Screens whose point sits lower (the tone curve, the answer side of a card) start further down. */
/* A margin does the extra shift, so the resting transform stays the one the reveal animates to. */
/* The image stops growing at 204px, so the shift is capped with it. */
.bt-shot.shot-lower img { margin-top: max(-11.5%, -26px); clip-path: inset(13.4% 0 0 0 round 20px 20px 0 0); }
/* The lead tile stacks: claim on top, the map rising from the floor below it. */
.bento-hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.bento-hero .bt-copy { align-self: start; padding-bottom: 8px; }
.bento-hero .bt-copy h3 { max-width: 22ch; text-wrap: balance; }
.bento-hero .bt-copy p { max-width: 46ch; }
/* The map is taken out of flow so it cannot stretch the rows: it overflows the floor instead. */
.bento-hero .bt-shot { min-height: 300px; padding: 0; }
.bento-hero .bt-shot img { position: absolute; top: 22px; left: 0; right: 0; margin-inline: auto; width: min(72%, 340px); }
.bento-wide .bt-copy h3 { font-size: 1.3rem; line-height: 1.15; }
.bento-wide .bt-shot img { width: min(78%, 214px); }
@media (max-width: 640px) {
  .bento .bento-tile:not(.bento-hero):not(.bento-wide) .bt-shot { height: 230px; }
  .bento-hero .bt-shot, .bento-wide .bt-shot { height: 260px; min-height: 0; }
  .bento-hero .bt-shot img, .bento-wide .bt-shot img { width: min(70%, 230px); }
}
/* The new captures carry no iOS status bar, so the frame draws the island itself. */
.hero-phone::after { content: ""; position: absolute; top: calc(9px + 1.5%); left: 50%; width: 29%; aspect-ratio: 126 / 37; transform: translateX(-50%); border-radius: 999px; background: #0b0f0d; z-index: 1; }

/* the exam tile has no capture: icon, claim, and the HSK 3.0 date */
.bento-exam { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px; padding: 24px 26px; background: linear-gradient(150deg, #fff 0%, var(--gold-soft) 130%); }
.bento-exam h3 { font-size: 1.16rem; font-weight: 700; margin-bottom: 6px; }
.bento-exam p { color: var(--ink2); font-size: .92rem; line-height: 1.5; }
.bento-exam a { color: var(--jade-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.bento-exam .bt-ic { width: 56px; height: 56px; border-radius: 18px; }
.bento-exam .bt-ic .ic { width: 28px; height: 28px; }
@media (max-width: 640px) { .bento-exam { grid-template-columns: 1fr; gap: 12px; padding: 20px; } }
.also-row { margin-top: 22px; }

/* audiences: one panel, three ways in */
.aud-title { text-align: center; font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: clamp(18px, 3vw, 28px); }
.aud-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.aud-cell { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-content: start; padding: clamp(18px, 2.6vw, 28px); transition: background .2s var(--ease-out); }
.aud-cell + .aud-cell { border-left: 1px solid var(--border); }
.aud-cell .bt-ic { grid-row: span 3; }
.aud-cell h3 { font-size: 1.08rem; font-weight: 700; align-self: center; }
.aud-cell p { color: var(--ink2); font-size: .9rem; line-height: 1.5; }
.aud-cell .link-arrow { margin-top: 6px; font-size: .9rem; justify-self: start; }
/* the whole cell is the link's hit area */
.aud-cell .link-arrow::after { content: ""; position: absolute; inset: 0; }
.aud-cell:hover { background: var(--mint); }
/* Keyboard focus rings the whole cell, in the site's focus colour. */
.aud-cell .link-arrow:focus-visible { outline: none; }
.aud-cell:has(.link-arrow:focus-visible) { box-shadow: inset 0 0 0 3px var(--ring); }
@media (max-width: 820px) {
  .aud-panel { grid-template-columns: 1fr; }
  .aud-cell + .aud-cell { border-left: 0; border-top: 1px solid var(--border); }
}

/* FAQ: answers are paragraphs with links */
.faq .faq-a a { color: var(--jade-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.faq summary { min-height: 44px; }

/* closing download panel */
.launch-final { padding-block: clamp(10px, 2vw, 24px) clamp(48px, 7vw, 96px); }
.launch-copy .launch-alt { margin-top: 16px; font-size: .96rem; }
.launch-alt a { color: #8FE6B0; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
