/* WeLearn Parent Hub — one simple doorway to the Parent Tutorial and the two Parent Guides.
   Visual language follows the WeLearn Parent Guides: cream, navy, blue, teal, a little amber. Mobile first. */
@font-face { font-family: 'Inter'; font-weight: 400; src: url('fonts/inter-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 500; src: url('fonts/inter-500.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 600; src: url('fonts/inter-600.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 700; src: url('fonts/inter-700.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Source Serif 4'; font-weight: 600; src: url('fonts/source-serif-4-600.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Source Serif 4'; font-weight: 700; src: url('fonts/source-serif-4-700.woff2') format('woff2'); font-display: swap; }

:root {
  --cream: #FAF7F1;
  --paper: #FFFFFF;
  --line: #E7DFD1;
  --navy: #0B2E57;
  --ink: #22324A;
  --muted: #5B687B;
  --blue: #1A5BB8;
  --blue-soft: #E8F0FB;
  --teal: #12846F;
  --teal-2: #5DB792;
  --teal-soft: #E2F3EC;
  --amber: #F2A93B;
  --shadow: 0 1px 2px rgba(11, 46, 87, .06), 0 10px 30px rgba(11, 46, 87, .08);
  --shadow-hover: 0 2px 4px rgba(11, 46, 87, .08), 0 16px 40px rgba(11, 46, 87, .13);
  --sans: Inter, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Songti SC', 'Noto Serif SC', 'STSong', serif;
  --serif-zh: 'Songti SC', 'Noto Serif SC', 'STSong', 'Source Serif 4', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
[lang="zh-Hans"] { line-break: strict; }
.nw { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 10px; }

/* WeLearn colour strip (top and bottom of the page) */
.strip { display: flex; height: 8px; }
.strip span { flex: 1; }
.strip span:nth-child(1) { background: var(--blue); }
.strip span:nth-child(2) { background: var(--amber); }
.strip span:nth-child(3) { background: var(--teal-2); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px 28px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }

/* ---------- 1. hero ---------- */
.hero { text-align: center; padding: 22px 4px 20px; }
.logo { width: 104px; height: auto; margin: 0 auto 14px; }
.hero h1 { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: clamp(28px, 7.6vw, 48px);
  line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; max-width: 15em; margin: 0 auto; }
.h1-zh { font-family: var(--serif-zh); font-weight: 700; color: var(--navy); font-size: clamp(19px, 5vw, 26px); margin-top: 8px; }
.rule { display: block; width: 56px; height: 5px; border-radius: 3px; background: var(--teal-2); margin: 14px auto 12px; }
.lead { font-size: 16.5px; color: var(--ink); text-wrap: balance; }
.lead.zh { font-size: 15.5px; color: var(--muted); margin-top: 2px; }

/* ---------- 2. tutorial ---------- */
.tutorial { padding: 18px 16px 18px; display: grid; gap: 16px;
  grid-template-areas: "head" "player"; }
.tutorial-head { grid-area: head; }
.kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.kicker span { letter-spacing: .04em; }
.tutorial h2 { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 27px; line-height: 1.15; margin-top: 4px; }
.title-zh { font-family: var(--serif-zh); font-weight: 700; color: var(--navy); font-size: 19px; margin-top: 2px; }

.player { grid-area: player; position: relative; }
.player video { width: 100%; aspect-ratio: 9 / 16; max-height: 78vh; max-height: 78svh; margin: 0 auto;
  background: var(--navy); border-radius: 18px; object-fit: contain; }
.player-off { border: 1px dashed var(--line); border-radius: 18px; padding: 28px 18px; text-align: center; color: var(--muted); }
.fallback { padding: 16px; color: var(--paper); }
.fallback a { text-decoration: underline; }

.chapters { display: none; grid-area: chapters; }
.chapters-label { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.chapters ol { list-style: none; display: grid; gap: 2px; }
.chapters li { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-weight: 600; color: var(--navy); }
.chapters li:first-child { border-top: 0; }
.chapters .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--teal-soft); color: var(--teal);
  font-size: 13px; font-weight: 700; display: grid; place-items: center; transform: translateY(-1px); }
.chapters .zh { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }

/* ---------- 3. guides ---------- */
.guides { margin-top: 28px; }
.section-title { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 23px; margin: 0 4px 12px; }
.section-title span { font-family: var(--serif-zh); font-size: .86em; color: var(--muted); }
.guide-grid { display: grid; gap: 14px; }
.guide { display: grid; grid-template-columns: 96px 1fr; grid-template-areas: "cover text" "cta cta"; column-gap: 16px; row-gap: 14px;
  align-items: center; padding: 14px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.guide:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #D9CDB8; }
.guide:focus-visible { border-radius: 24px; }
.cover { grid-area: cover; display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 6px 16px rgba(11, 46, 87, .10); background: var(--paper); }
.cover img { width: 100%; height: auto; }
.guide-text { grid-area: text; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.lang { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue);
  background: var(--blue-soft); border-radius: 999px; padding: 3px 10px; }
.guide-title { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 21px; line-height: 1.2; margin-top: 8px; }
.guide[lang="zh-Hans"] .guide-title { font-family: var(--serif-zh); }
.guide-meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.cta { grid-area: cta; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 16px; color: var(--paper);
  background: var(--blue); border-radius: 999px; padding: 11px 18px; white-space: nowrap; }
.arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .18s ease; }
.guide:hover .arrow { transform: translateX(3px); }
.guide.pending { opacity: .6; pointer-events: none; }
.guide.pending .cta { background: var(--muted); }

/* ---------- 4. help ---------- */
.help { margin-top: 28px; padding: 18px; display: flex; gap: 16px; align-items: center; }
.help-icon { flex: none; width: 52px; height: 52px; border-radius: 16px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; }
.help-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.help-text { flex: 1; min-width: 0; }
.help h2 { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 21px; line-height: 1.25; }
.help h2 .zh { font-family: var(--serif-zh); font-size: .85em; white-space: nowrap; }
.help p { color: var(--ink); text-wrap: pretty; }
.help p.zh { color: var(--muted); }
.qr { display: none; }                            /* never on phones: the Parent is already here */

.foot { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 26px; }
.foot strong { color: var(--navy); font-weight: 600; }

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  .wrap { padding: 0 28px 36px; }
  .hero { padding: 40px 0 30px; }
  .logo { width: 140px; }
  .tutorial { padding: 26px; }
  .guide-grid { grid-template-columns: 1fr 1fr; }
  .guide { grid-template-columns: 120px 1fr; grid-template-areas: "cover text" "cover cta"; align-items: start; }
  .guide-text { align-self: end; }
  .cta { justify-self: start; align-self: start; padding: 10px 18px; }
}

/* ---------- tablet + desktop: video beside its title and contents ---------- */
@media (min-width: 720px) {
  .tutorial { grid-template-columns: minmax(0, 300px) 1fr; grid-template-areas: "player head" "player chapters";
    grid-template-rows: auto 1fr; column-gap: 32px; row-gap: 20px; padding: 26px 30px 26px 26px; align-items: start; }
  .tutorial-head { padding-top: 8px; }
  .tutorial h2 { font-size: 32px; }
  .title-zh { font-size: 21px; }
  .player video { max-height: 560px; }
  .chapters { display: block; }
}

@media (min-width: 900px) {
  .hero { padding: 48px 0 36px; }
  .logo { width: 150px; margin-bottom: 22px; }
  .lead { font-size: 18px; }
  .tutorial { grid-template-columns: minmax(0, 360px) 1fr; column-gap: 44px; row-gap: 22px; padding: 32px 40px 32px 32px; }
  .tutorial-head { padding-top: 10px; }
  .tutorial h2 { font-size: 36px; }
  .title-zh { font-size: 23px; }
  .player video { max-height: 640px; }
  .guides { margin-top: 40px; }
  .section-title { font-size: 26px; }
  .guide { grid-template-columns: 150px 1fr; padding: 18px; gap: 22px; }
  .guide-title { font-size: 24px; }
  .help { margin-top: 36px; padding: 22px 26px; }
  .qr:not([hidden]) { display: flex; align-items: center; gap: 14px; padding-left: 22px; border-left: 1px solid var(--line); }
  .qr p { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
  .qr-code { width: 92px; height: 92px; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
  .qr-code svg { width: 100%; height: 100%; display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .guide:hover { transform: none; }
}
