/* CleverKids public site — kế thừa màu/font của Learning Hub (CleverWorld), giao diện cho phụ huynh. */
:root {
  --ink: #172033;
  --ink-soft: #4a5568;
  --sea: #0369a1;
  --sea-hover: #075985;
  --sea-deep: #0c4a6e;
  --sea-tint: #e0f2fe;
  --sand: #fff8ec;
  --sand-deep: #fde7b0;
  --sun: #f59e0b;
  --sun-deep: #b45309;
  --leaf: #166534;
  --berry: #be185d;
  --card: #ffffff;
  --line: #ecdcbc;
  --focus: #7c3aed;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 0 #ecdcbc, 0 10px 24px rgba(120, 84, 20, .08);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Baloo 2", "Nunito", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--ink); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sea); text-underline-offset: 3px; }
a:hover { color: var(--sea-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3, .h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow-text { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--ink-soft); font-size: .95rem; }
.center { text-align: center; }
.eyebrow { font-weight: 800; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--sun-deep); margin-bottom: .4em; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 680px; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin: .35em 0; }

.uat-bar { background: var(--berry); color: #fff; text-align: center; font-weight: 700; font-size: .9rem; padding: 6px 16px; }
.pending { display: inline-block; background: #fef3c7; color: #7c2d12; border: 1.5px dashed #d97706; border-radius: 8px; padding: 1px 8px; font-size: .9rem; font-weight: 700; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, transform .15s; }
.btn-primary { background: var(--sun); color: #1f1300; box-shadow: 0 3px 0 var(--sun-deep); }
.btn-primary:hover { background: #fbbf24; color: #1f1300; }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sun-deep); }
.btn-primary[disabled] { opacity: .65; cursor: progress; }
.btn-ghost { background: #fff; color: var(--sea-deep); border-color: var(--sea); }
.btn-ghost:hover { background: var(--sea-tint); color: var(--sea-deep); }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1.15rem; }

/* header */
.site-header { background: #fff; border-bottom: 1px solid #eef0f3; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand img { height: 44px; width: auto; }
.main-nav { display: none; gap: 4px; margin-left: 16px; }
.main-nav a, .mobile-nav nav a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 10px 12px; border-radius: 10px; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--sea); background: var(--sea-tint); }
.header-actions { display: none; margin-left: auto; align-items: center; gap: 12px; }
.link-hub { font-weight: 700; text-decoration: none; padding: 10px; }
.mobile-nav { margin-left: auto; }
.mobile-nav summary { list-style: none; cursor: pointer; font-weight: 800; padding: 10px 16px; min-height: 44px; border: 2px solid var(--sea); border-radius: 999px; color: var(--sea-deep); }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav[open] nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid #e5e7eb; box-shadow: 0 12px 24px rgba(0,0,0,.08); display: flex; flex-direction: column; padding: 8px 16px 16px; z-index: 50; }
.site-header .wrap { position: relative; }
@media (min-width: 960px) {
  .main-nav, .header-actions { display: flex; }
  .mobile-nav { display: none; }
}
@media (max-width: 959px) {
  .site-header { position: relative; }
  .mobile-cta { display: block; }
}

/* sections */
.section { padding: 56px 0; }
.section-sand { background: var(--sand); }
.section-sea { background: var(--sea-tint); }
.page-head { background: linear-gradient(180deg, var(--sand) 0%, #fff 100%); padding: 48px 0 32px; }
.crumbs { font-size: .95rem; color: var(--ink-soft); }
.hero { background: linear-gradient(160deg, var(--sand) 0%, #fff 55%, var(--sea-tint) 100%); padding: 40px 0 56px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }
.hero-note { color: var(--ink-soft); font-size: .95rem; }
.hero-art img { border-radius: var(--radius); box-shadow: var(--shadow); }
figure { margin: 0; }
figcaption { font-size: .92rem; color: var(--ink-soft); margin-top: 10px; }
.two-col { display: grid; gap: 32px; align-items: center; }
@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
  .two-col { grid-template-columns: 1fr 1fr; }
}

.story { padding-left: 1.2em; }
.story li { margin: .55em 0; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card-link { display: block; text-decoration: none; color: var(--ink); transition: transform .15s; }
.card-link:hover { transform: translateY(-2px); color: var(--ink); }
.card p:last-child { margin-bottom: 0; }
.more { display: inline-block; margin-top: 8px; font-weight: 800; color: var(--sea); text-decoration: none; }
.cards3, .cards2 { display: grid; gap: 18px; margin: 24px 0; }
@media (min-width: 760px) { .cards3 { grid-template-columns: repeat(3, 1fr); } .cards2 { grid-template-columns: repeat(2, 1fr); } }

.cycle { list-style: none; padding: 0; display: grid; gap: 18px; margin: 24px 0; counter-reset: none; }
.cycle li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.cycle-n { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: var(--sea); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 10px; }
.cycle p { margin: 0; color: var(--ink-soft); }
@media (min-width: 760px) { .cycle { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .cycle { grid-template-columns: repeat(4, 1fr); } }

.tag { display: inline-block; font-size: .78rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: #eef2f7; color: #334155; margin-right: 6px; vertical-align: middle; }
.tag-demo { background: var(--sea-tint); color: var(--sea-deep); }
.tag-student { background: #dcfce7; color: var(--leaf); }
.legend { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }

.shot img { border-radius: var(--radius-sm); border: 1px solid #dfe5ec; box-shadow: var(--shadow); background: #fff; }
.shot.narrow { max-width: 860px; margin: 32px auto 0; }

/* demo */
.demo-frame { position: relative; aspect-ratio: 485 / 402; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #0c4a6e, #0369a1 60%, #38bdf8); box-shadow: var(--shadow); }
.demo-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.demo-play { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-family: var(--font-display); font-size: 1.3rem; }
.demo-play-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--sun); color: #1f1300; display: flex; align-items: center; justify-content: center; font-size: 2rem; box-shadow: 0 4px 0 var(--sun-deep); padding-left: 6px; }
.demo-play-text { display: flex; flex-direction: column; text-align: center; }
.demo-play-text small { font-family: var(--font); font-size: .9rem; opacity: .9; }
.demo-play:hover .demo-play-icon { background: #fbbf24; }
.demo figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.demo-grid { display: grid; gap: 24px; margin-top: 24px; }
@media (min-width: 760px) { .demo-grid { grid-template-columns: repeat(2, 1fr); } }

.avatars { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.avatars img { width: 120px; height: 120px; border-radius: 50%; background: var(--sand); border: 3px solid var(--sand-deep); }
.avatars p { flex-basis: 100%; text-align: center; }

/* programs */
.program-list { display: grid; gap: 20px; margin-bottom: 24px; }
@media (min-width: 900px) { .program-list { grid-template-columns: repeat(3, 1fr); } }
.program-card h2 { font-size: 1.45rem; }
.program-card h2 a { color: var(--ink); text-decoration: none; }
.program-card h2 a:hover { color: var(--sea); }
.tagline { font-weight: 700; color: var(--sea-deep); }
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-left: 30px; margin: .55em 0; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: var(--leaf); font-weight: 800; font-size: .8rem; display: flex; align-items: center; justify-content: center; margin-top: 3px; }
.facts dl { margin: 0; }
.facts dt { font-weight: 800; margin-top: 12px; }
.facts dd { margin: 2px 0 0; color: var(--ink-soft); }
.stages { list-style: none; padding: 0; display: grid; gap: 16px; margin: 20px 0 0; }
.stages li { background: #fff; border-radius: var(--radius); padding: 20px; border-left: 6px solid var(--sea); }
.stages p { margin-bottom: .4em; }
@media (min-width: 760px) { .stages { grid-template-columns: repeat(2, 1fr); } }

.journey { list-style: none; padding: 0; display: grid; gap: 16px; }
.journey-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; border-top: 6px solid var(--sea); }
.journey-future { border-top-color: #cbd5e1; background: #f8fafc; }
@media (min-width: 900px) { .journey { grid-template-columns: repeat(4, 1fr); } }
.timeline { padding-left: 1.2em; }
.timeline li { margin: .5em 0; }

.empty { border: 2px dashed var(--line); border-radius: var(--radius); padding: 24px; background: #fffdf7; max-width: 760px; }

/* CTA band */
.cta-band { background: var(--sea-deep); color: #fff; padding: 48px 0; }
.cta-inner { display: grid; gap: 20px; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbeafe; max-width: 720px; margin: 0; }
@media (min-width: 860px) { .cta-inner { grid-template-columns: 1fr auto; } }

/* form */
.form-layout { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .form-layout { grid-template-columns: 1.4fr 1fr; } }
.consult-form { max-width: 620px; }
.form-hint { color: var(--ink-soft); }
.field { margin: 0 0 18px; border: 0; padding: 0; }
.field label, .field legend { display: block; font-weight: 800; margin-bottom: 6px; }
.field input:not([type=radio]):not([type=checkbox]), .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink); background: #fff; border: 2px solid #94a3b8; border-radius: var(--radius-sm); }
.field textarea { min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sea); outline: 3px solid var(--sea-tint); }
.field [aria-invalid="true"] { border-color: #b91c1c !important; }
.field-help { font-size: .92rem; color: var(--ink-soft); margin: 6px 0 0; }
.field-error { color: #b91c1c; font-weight: 700; font-size: .95rem; margin: 6px 0 0; }
.field-error::before { content: "⚠ "; }
.req { color: #b91c1c; }
.choices { display: flex; gap: 20px; flex-wrap: wrap; }
.choices label, .consent label { font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.choices input, .consent input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--sea); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-weight: 700; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.success { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius); padding: 28px; max-width: 620px; }
.success h2 { color: var(--leaf); }
.aside ol { padding-left: 1.2em; }

/* footer */
.site-footer { background: #0f1b2d; color: #cbd5e1; padding: 48px 0 24px; font-size: .95rem; }
.site-footer a { color: #e0f2fe; }
.footer-grid { display: grid; gap: 28px; }
.footer-logo { background: #fff; border-radius: 10px; padding: 6px; height: 56px; width: auto; margin-bottom: 12px; }
.footer-h { font-family: var(--font); font-size: 1rem; color: #fff; margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid #22324a; margin-top: 32px; padding-top: 16px; color: #94a3b8; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.class-card h3 a { color: var(--ink); text-decoration: none; }
.class-card h3 a:hover { color: var(--sea); }
.mini { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 18px; }
.mini dt { font-weight: 800; }
.mini dd { margin: 0; color: var(--ink-soft); }
.note { background: var(--sea-tint); border-radius: var(--radius-sm); padding: 14px 16px; color: var(--sea-deep); }
.tag-new { background: #fef3c7; color: #92400e; }

/* trang chủ lớp đang tuyển (2026-11-16) */
.hero-facts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-facts li { background: #fff; border: 1.5px solid var(--sea); color: var(--sea-deep); border-radius: 999px; padding: 4px 14px; font-weight: 800; font-size: .95rem; }
.class-info-list { display: grid; gap: 20px; margin: 20px 0; }
@media (min-width: 900px) { .class-info-list:has(> :nth-child(2)) { grid-template-columns: repeat(2, 1fr); } }
.class-info { background: #fff; border: 2px solid var(--sea); border-radius: var(--radius); padding: 24px; }
.class-info h3 { font-size: 1.35rem; }
.class-info dl { display: grid; gap: 0; margin: 12px 0 20px; }
.class-info dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.class-info dt { font-weight: 800; }
.class-info dd { margin: 0; min-width: 0; }
@media (min-width: 760px) { .class-info dl { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.cycle-3 { list-style: none; }
@media (min-width: 1080px) { .cycle.cycle-3 { grid-template-columns: repeat(3, 1fr); } }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 800; padding: 14px 44px 14px 18px; min-height: 44px; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--sea); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--ink-soft); }
.choices-col { flex-direction: column; gap: 10px; }
.more-fields { margin: 0 0 18px; border: 1px dashed #94a3b8; border-radius: var(--radius-sm); padding: 0 14px; }
.more-fields summary { cursor: pointer; font-weight: 800; padding: 12px 0; min-height: 44px; color: var(--sea-deep); }
.more-fields[open] { padding-bottom: 4px; }
.sticky-cta { display: none; }
@media (max-width: 959px) {
  .sticky-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: center; align-items: center;
    min-height: 56px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--sun); color: #1f1300;
    font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; text-decoration: none; box-shadow: 0 -4px 16px rgba(0,0,0,.12); }
  .sticky-cta[hidden] { display: none; }
}
#dang-ky { scroll-margin-top: 16px; }
/* 4 bước nằm trong cột nửa trang (trang chủ): tối đa 2 cột */
.two-col .cycle { grid-template-columns: 1fr; }
@media (min-width: 560px) { .two-col .cycle { grid-template-columns: repeat(2, 1fr); } }

/* Vì sao Scratch: khối lệnh thật + so sánh code chữ */
.why-scratch { max-width: 860px; }
.blocks-grid { display: grid; gap: 20px; margin: 20px 0 28px; }
@media (min-width: 900px) { .blocks-grid { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.block-fig { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.block-fig img { width: 100%; height: auto; max-height: 260px; object-fit: contain; object-position: left center; }
.block-fig figcaption { color: var(--ink); }
.code-compare { align-items: start; }
.code { margin: 0; background: #0f1b2d; color: #e2e8f0; border-radius: var(--radius-sm); padding: 18px 20px; overflow-x: auto; font: 14.5px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; min-width: 0; }
.code b { color: #fbbf24; font-weight: 700; }
.code .c { color: #7dd3fc; }

/* Trang chủ v0.7: khung lớp đang tuyển trong hero */
.hero-class { margin-top: 22px; background: #fff; border: 2px solid var(--sea); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.hero-class-title { font-weight: 800; margin: 0 0 8px; color: var(--sea-deep); }
.hero-class-list > li { margin: 0 0 10px; }
.hero-class .hero-facts { margin-top: 8px; }
.hero-class .hero-actions { margin: 16px 0 0; align-items: center; }
.hero-more { font-weight: 800; text-decoration: none; }
.entry-links { margin-top: 8px; color: var(--ink-soft); }
.steps-mini { padding-left: 1.2em; }
.steps-mini li { margin: .5em 0; }
.aside .faq summary { font-size: .98rem; padding-top: 12px; padding-bottom: 12px; }
.aside .faq details p { font-size: .95rem; }

/* Ảnh lớp học từ Hub */
.photo-grid { display: grid; gap: 18px; margin-top: 20px; }
@media (min-width: 700px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-art img { width: 100%; height: auto; }
