/* the home page */
:root {
  color-scheme: light;
  --paper: #f7f5f0;
  --paper-2: #efece4;
  --white: #ffffff;
  --ink: #2f3e35;
  --ink-soft: #55655b;
  --muted: #7a877e;
  --sage: #8a9a8b;
  --sage-soft: #e3eae2;
  --gold: #caa24c;
  --gold-soft: #f4ead2;
  --line: rgba(47, 62, 53, .12);
  --ok: #3f8f5f;
  --warn: #c98a1b;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 1px 2px rgba(47, 62, 53, .05), 0 12px 32px rgba(47, 62, 53, .07);
  --shadow-lift: 0 4px 10px rgba(47, 62, 53, .08), 0 24px 48px rgba(47, 62, 53, .14);
  --font-body: "DM Sans", var(--cjk, "Noto Sans HK"), system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", var(--cjk, "Noto Sans HK"), system-ui, sans-serif;
  --wrap: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--paper);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.015em; line-height: 1.12; margin: 0; }
p { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600;
  letter-spacing: .08em; color: var(--ink-soft); text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--gold); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  text-decoration: none; white-space: nowrap; border: 1px solid transparent; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: 0 10px 24px rgba(47, 62, 53, .22); }
.btn-primary:hover { background: #3a4c41; }
.btn-ghost { background: rgba(255, 255, 255, .6); border-color: var(--line); color: var(--ink); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: var(--white); }
.btn svg { width: 18px; height: 18px; }
section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { max-width: 640px; margin-bottom: 44px; display: grid; gap: 14px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 84%, transparent); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.logo-mark { width: 36px; height: 36px; object-fit: contain; }
.logo small { color: var(--muted); font-weight: 500; }
.nav-links { display: flex; gap: 28px; font-size: .95rem; color: var(--ink-soft); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav .btn { padding: 10px 20px; font-size: .92rem; }
.nav-end { display: flex; align-items: center; gap: 14px; }
.nav-coach { display: none; font-size: .9rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
@media (max-width: 860px) { .nav-links { display: none; } .nav-coach { display: inline; } }
.lang-menu { position: relative; }
.lang-menu summary {
  display: flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; white-space: nowrap;
  font-size: .88rem; font-weight: 600; color: var(--ink-soft); padding: 7px 10px; border-radius: 999px;
  border: 1px solid var(--line);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--ink); border-color: var(--ink-soft); }
.lang-menu nav {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 168px; padding: 6px; z-index: 30;
  display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 32px rgb(0 0 0 / .12);
}
.lang-menu nav a { padding: 10px 12px; border-radius: 10px; text-decoration: none; font-size: .95rem; color: var(--ink); }
.lang-menu nav a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.lang-menu nav a[aria-current] { font-weight: 700; }
.lang-menu nav a[aria-current]::after { content: " ✓"; }
@media (max-width: 520px) { .lang-menu-now { display: none; } .lang-menu summary { padding: 7px; } }
@media (max-width: 400px) { .nav-coach-long { display: none; } .nav-end { gap: 10px; } }

/* ---------- hero ---------- */
.hero { padding-top: clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, var(--sage-soft), transparent 68%); z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); margin: 18px 0 22px; }
.hero h1 .nw { white-space: nowrap; }  /* break only between phrases, never inside a word */
.hero h1 em { font-style: normal; color: var(--sage); }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: var(--ink-soft); font-size: .92rem; }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { width: 17px; height: 17px; stroke: var(--ok); fill: none; stroke-width: 2.4; }

.hero-visual { position: relative; }
.hero-photo {
  border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lift);
  aspect-ratio: 4 / 4.3; background: var(--paper-2);
}
.hero-photo img, .hero-photo video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; display: block; }
.float {
  position: absolute; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 14px 16px;
  animation: bob 6s ease-in-out infinite;
}
.float-score { left: -22px; top: 16%; display: flex; align-items: center; gap: 14px; }
.ring {
  --p: 94; --c: var(--ok); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--paper-2) 0); transition: --p .4s ease;
}
.ring b {
  width: 52px; height: 52px; border-radius: 50%; background: var(--white); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.3rem;
}
.float-score small { display: block; color: var(--muted); font-size: .78rem; }
.float-score strong { font-size: .98rem; }
.float-tip { right: -16px; bottom: 18%; max-width: 230px; animation-delay: -3s; }
.float-tip .tag { font-size: .72rem; font-weight: 600; color: var(--warn); letter-spacing: .06em; }
.float-tip.good .tag { color: var(--ok); }
.float-tip p { font-weight: 600; margin-top: 4px; }
.float-tip small { color: var(--muted); }
.float-joints { left: 12%; bottom: -18px; display: flex; gap: 12px; animation-delay: -1.5s; font-size: .82rem; }
.float-joints span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.dot.warn { background: var(--warn); }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
/* phones/tablets: the cards stay on the photo but sit in the empty space either side of the
   figure — score bottom-left (over the mat), tip top-right (beside the raised hands) — so the
   face stays clear. Widths are % of the photo so the gap holds at every screen width. */
@media (max-width: 900px) {
  .hero-visual { max-width: 560px; width: 100%; margin-inline: auto; }
  .hero-photo { aspect-ratio: 1 / 1; }
  .float { animation: none; padding: 10px 12px; border-radius: 14px; }
  .float-score { left: 10px; top: auto; bottom: 10px; max-width: 46%; gap: 10px; }
  .float-tip { right: 10px; top: 10px; bottom: auto; max-width: 40%; }
  .float-joints { display: none; }
  .ring { width: 46px; height: 46px; flex: none; }
  .ring b { width: 37px; height: 37px; font-size: 1rem; }
  .float-score small, .float-tip small { font-size: .7rem; line-height: 1.35; }
  .float-score strong { font-size: .86rem; line-height: 1.3; display: block; }
  .float-tip .tag { font-size: .66rem; }
  .float-tip p { font-size: .86rem; line-height: 1.35; margin-top: 2px; }
}

/* ---------- intro ---------- */
.intro { background: var(--white); border-block: 1px solid var(--line); }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; } }
.intro h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-top: 14px; }
.intro-list { display: grid; gap: 22px; }
.intro-item { display: grid; grid-template-columns: 48px 1fr; gap: 16px; }
.intro-icon {
  width: 48px; height: 48px; border-radius: 14px; background: var(--sage-soft); display: grid; place-items: center;
}
.intro-icon svg { width: 24px; height: 24px; stroke: var(--ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.intro-item h3 { font-size: 1.12rem; margin-bottom: 4px; }
.intro-item p { color: var(--ink-soft); }

/* ---------- steps ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 860px) { .steps-grid { grid-template-columns: 1fr; } }
.step {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow); position: relative; counter-increment: step;
}
.step::before {
  content: "0" counter(step); font-family: var(--font-display); font-size: .95rem; font-weight: 700;
  color: var(--gold); display: block; margin-bottom: 18px;
}
.step h3 { font-size: 1.3rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); }

/* ---------- cards: chips + "go" link ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: .74rem; padding: 3px 10px; border-radius: 999px; background: var(--sage-soft); color: var(--ink); }
.pose-go { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; }
.pose-go svg { width: 16px; height: 16px; transition: transform .2s ease; }

/* ---------- cta + footer ---------- */
.cta {
  text-align: center; border-radius: var(--radius-xl); padding: clamp(48px, 8vw, 88px) 24px;
  background: radial-gradient(600px 300px at 50% 0%, var(--gold-soft), transparent 70%), var(--white);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cta h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 720px; margin: 14px auto 16px; }
.cta p { color: var(--ink-soft); max-width: 520px; margin: 0 auto 30px; }
footer { padding: 48px 0 40px; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 28px; }
footer nav { display: flex; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

@media (max-width: 520px) {
  section { padding: 56px 0; }
  .nav .wrap { height: 62px; }
  .logo { font-size: 1.05rem; }
  .logo-mark { width: 32px; height: 32px; }
  .nav .btn { padding: 9px 16px; }
  .hero h1 { font-size: clamp(1.9rem, 8.6vw, 2.25rem); margin: 14px 0 16px; }
  .hero-cta { margin-top: 24px; }
  .hero-cta .btn { flex: 1 1 100%; padding: 15px 24px; }
  .trust { margin-top: 22px; gap: 8px 16px; font-size: .88rem; }
  .section-head { margin-bottom: 28px; }
  .step { padding: 22px; }
  .cta .btn { width: 100%; padding: 15px 24px; }
  footer .wrap { flex-direction: column; }
  footer nav { flex-wrap: wrap; gap: 10px 20px; }
}
body { overflow-x: clip; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- home: coach → class picker (home.js) ---------- */
.hero-visual.narrow { max-width: 360px; width: 100%; margin-inline: auto; }
.flush { padding-top: 0; }

/* the hero's mock class screen: same look as the real player (static/play/player.css) */
.phone {
  position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 36px; overflow: hidden; background: #14110e;
  border: 8px solid #1d1a17; box-shadow: var(--shadow-lift); color: #fff; text-decoration: none;
  font-family: var(--cjk, "Noto Sans HK"), var(--font-body);
}
.phone-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.phone-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, transparent 22%, transparent 60%, rgba(10, 8, 6, .8) 100%);
}
.phone-top { position: absolute; inset: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 18px 14px 0; }
.phone-progress { position: absolute; left: 14px; right: 14px; top: 8px; display: flex; gap: 3px; }
.phone-progress i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
.phone-progress i.done { background: #e2bd6b; }
.phone-progress i.now { background: rgba(226, 189, 107, .6); }
.phone-info { flex: 1; display: grid; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); line-height: 1.3; }
.phone-info small { font-size: .72rem; opacity: .85; }
.phone-info b { font-size: 1.05rem; }
.phone-info em { font-style: normal; font-size: .72rem; color: #e2bd6b; }
.phone-timer { position: relative; width: 52px; height: 52px; flex: none; }
.phone-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.phone-timer circle { fill: none; stroke-width: 5; }
.phone-timer .track { stroke: rgba(255, 255, 255, .2); }
.phone-timer .bar { stroke: #e2bd6b; stroke-linecap: round; stroke-dasharray: 188.5; transition: stroke-dashoffset .25s linear; }
.phone-timer b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .86rem; font-variant-numeric: tabular-nums; }
.phone-pip {
  position: absolute; right: 10px; top: 84px; width: 42%; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden;
  border: 2px solid rgba(226, 189, 107, .9); background: #000; box-shadow: 0 8px 22px rgba(0, 0, 0, .5);
}
.phone-pip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pip-label {
  position: absolute; inset: 0 0 auto; padding: 5px 6px; font-size: .62rem; font-weight: 700; text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent);
}
.pip-score {
  position: absolute; left: 6px; top: 24px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-size: .82rem; font-weight: 700; background: rgba(0, 0, 0, .55); border: 3px solid #4cc38a; font-variant-numeric: tabular-nums;
}
.pip-tip {
  position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 4px 6px; border-radius: 8px; font-size: .66rem; font-weight: 700;
  text-align: center; background: rgba(20, 17, 14, .75); border: 1px solid rgba(255, 255, 255, .18);
}
.pip-tip.good { color: #4cc38a; }
.pip-tip.fix { color: #e2bd6b; }
.phone-say {
  position: absolute; left: 12px; right: 12px; bottom: 16px; padding: 9px 12px; border-radius: 16px; font-size: .82rem;
  line-height: 1.5; text-align: center; background: rgba(20, 17, 14, .5); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
}
.phone-say b { color: #e2bd6b; margin-right: 4px; }
.float-callout { display: grid; gap: 2px; padding: 10px 14px; }
.float-callout b { font-size: .9rem; }
.float-callout small { color: var(--muted); font-size: .76rem; }
.float-callout::before {
  content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}
.callout-ai { right: -150px; top: 30%; }
.callout-ai::before { left: -18px; top: 16px; }
.callout-coach { left: -170px; bottom: 26%; animation-delay: -3s; }
.callout-coach::before { right: -18px; top: 16px; }
@media (max-width: 1100px) {
  .callout-ai { right: -40px; top: auto; bottom: 24%; }
  .callout-coach { display: none; }
}
@media (max-width: 900px) {
  .hero-visual.narrow { max-width: 320px; }
  .float-callout { display: none; }
}
.classes { background: linear-gradient(180deg, var(--paper) 0%, var(--sage-soft) 100%); }
[hidden] { display: none !important; }
.coach-tabs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.coach-tab {
  display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--white); color: var(--ink); font: inherit; text-align: left;
  box-shadow: var(--shadow); transition: border-color .2s ease, background .2s ease;
}
.coach-tab img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.coach-tab b { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.coach-tab small { color: var(--ink-soft); font-size: .82rem; }
.coach-tab[aria-pressed="true"] { border-color: var(--ink); background: var(--gold-soft); }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.class-card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow); text-decoration: none; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.class-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.class-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.class-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; transition: transform .4s ease; }
.class-card:hover .class-img img { transform: scale(1.04); }
.class-badge {
  position: absolute; left: 12px; top: 12px; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: rgba(255, 255, 255, .92); color: var(--ink);
}
.class-body { padding: 18px 20px 20px; display: grid; gap: 8px; flex: 1; }
.class-body h3 { font-size: 1.3rem; }
.class-body p { color: var(--ink-soft); font-size: .95rem; }
.class-card:hover .pose-go svg { transform: translateX(3px); }
.ai-title { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin: 14px 0 28px; }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .more-grid { grid-template-columns: 1fr; } }
.more-card {
  display: grid; gap: 10px; padding: 28px; border-radius: var(--radius-lg); background: var(--white);
  border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none;
}
.more-card h3 { font-size: 1.3rem; }
.more-card p { color: var(--ink-soft); }
