/* nqcoding.vn — trang giới thiệu hệ sinh thái NQ Coding.
   Cùng ngôn ngữ thiết kế V5 "Chunky Cobalt" của NQOJ (assets/styles/tokens.css):
   viền 2px, bo tròn lớn, nút có gờ 4px lún xuống khi nhấn, Nunito 700–900.
   Trang tĩnh, không phụ thuộc mạng ngoài: font tự host trong ./fonts. */

/* ── Font ─────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url(fonts/nunito-normal-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url(fonts/nunito-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url(fonts/nunito-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Token (giá trị lấy từ assets/styles/tokens.css của NQOJ) ───────── */
:root {
  --bg: #FFFFFF;
  --surface-subtle: #F7F8FA;
  --border-subtle: #EEF0F3;
  --border: #E3E5EA;
  --text: #1F2430;
  --text-secondary: #4B5263;
  --text-muted: #5F6675;

  --brand: #3A4BE0;
  --brand-rim: #2633A8;
  --brand-deep: #1A2480;
  --brand-soft: #E8EBFF;
  --brand-border: #C3CAFB;
  --brand-text: #2F3FCF;
  --brand-wash: #F5F6FF;

  --class-fill: #C2185B;       /* khu "Lớp học NQ Coding" — hồng như trên NQOJ */
  --class-rim: #8A0F40;
  --class-soft: #FFE8F1;
  --class-border: #F8C8E0;
  --class-text: #A3154D;

  --course-fill: #C8620A;      /* khoá học — cam */
  --course-rim: #8F4405;
  --course-text: #A34B00;

  --success: #3CCB6B;
  --success-rim: #22A04E;
  --success-ink: #06301A;
  --success-soft: #E3F8EA;
  --success-text: #11703A;

  --gold: #FFC53D;
  --gold-rim: #D99A00;
  --gold-ink: #3B2700;
  --gold-soft: #FFF6DB;
  --gold-border: #F5D98A;
  --gold-text: #7A4E00;

  --facebook: #1877F2;
  --facebook-lip: #0F5BC4;
  --youtube: #E00000;
  --youtube-lip: #A10000;
  --youtube-text: #B00000;
  --messenger: #0866FF;
  --messenger-lip: #0548B8;

  --code-bg: #1F2430;
  --code-ink: #EEF1F7;
  --code-keyword: #FF8FAB;
  --code-func: #82AAFF;
  --code-number: #FFC078;
  --code-comment: #9AA3B8;

  --focus: #006AAE;
  --lip: 4px;
  --radius-card: 20px;
  --radius-btn: 16px;
  --container: 1200px;
  --gutter: 24px;
  --section-gap: clamp(56px, 7vw, 104px);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

/* ── Nền tảng ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 500;
}
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
a { color: var(--brand-text); }
a:hover { color: var(--brand-rim); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
svg { display: block; flex: 0 0 auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 12px; background: var(--brand); color: #FFFFFF; font-weight: 800;
}
.skip-link:focus { top: 12px; color: #FFFFFF; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-top: var(--section-gap); }

.eyebrow {
  font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-text);
}
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 720px; margin-bottom: 36px; }
.section-head h2, .h2 {
  font-size: clamp(28px, 3.4vw, 42px); line-height: 1.15; font-weight: 900; letter-spacing: -0.01em;
}
.section-head p { color: var(--text-secondary); }

/* ── Nút (khuôn nút V5: gờ dưới, lún khi nhấn) ───────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px;
  border: 2px solid transparent; border-radius: var(--radius-btn);
  font: inherit; font-size: 15px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(var(--lip)); box-shadow: none !important; }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; border-radius: 14px; }
.btn--md { min-height: 48px; padding: 0 20px; font-size: 14px; border-radius: 14px; }
.btn--primary { background: var(--brand); color: #FFFFFF; box-shadow: 0 var(--lip) 0 var(--brand-rim); }
.btn--primary:hover { color: #FFFFFF; }
.btn--secondary { background: #FFFFFF; border-color: var(--border); color: var(--brand-text); box-shadow: 0 var(--lip) 0 var(--border); }
.btn--class { background: var(--class-fill); color: #FFFFFF; box-shadow: 0 var(--lip) 0 var(--class-rim); }
.btn--class:hover { color: #FFFFFF; }
.btn--class-outline { background: #FFFFFF; border-color: var(--border); color: var(--class-text); box-shadow: 0 var(--lip) 0 var(--border); }
.btn--class-outline:hover { color: var(--class-rim); }
.btn--white { background: #FFFFFF; color: var(--brand-rim); box-shadow: 0 var(--lip) 0 var(--brand-deep); }
.btn--on-brand { background: var(--brand-rim); border-color: #8C97F5; color: #FFFFFF; box-shadow: 0 var(--lip) 0 var(--brand-deep); }
.btn--on-brand:hover { color: #FFFFFF; }

/* ── Logo ─────────────────────────────────────────────────────────── */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand__word { font-size: 22px; font-weight: 900; letter-spacing: -0.01em; line-height: 1; }
.brand__word span { color: var(--brand); }

/* ── Thanh điều hướng ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 96%);
  border-bottom: 2px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 24px; padding-block: 14px; }
.nav__links { display: flex; justify-content: center; gap: 4px; flex: 1 1 auto; font-weight: 800; font-size: 15px; }
.nav__links a {
  padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--text-secondary);
}
.nav__links a:hover { background: var(--brand-soft); color: var(--brand-rim); }
.nav__burger {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 2px solid var(--border); border-radius: 14px; background: #FFFFFF;
  box-shadow: 0 var(--lip) 0 var(--border); color: var(--text); cursor: pointer;
}
.nav__burger:active { transform: translateY(var(--lip)); box-shadow: none; }
.nav__burger .icon-close { display: none; }
.nav__burger[aria-expanded="true"] .icon-open { display: none; }
.nav__burger[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 820px) {
  .nav { gap: 10px; flex-wrap: wrap; }
  .nav > .btn { margin-left: auto; }
  /* Không có JS: menu vẫn hiện, xuống dòng bên dưới. Có JS: gập sau nút ☰. */
  .nav__links { order: 10; flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; }
  .js .nav__burger { display: inline-flex; }
  .js .nav__links { display: none; flex-direction: column; gap: 4px; padding: 6px 0 8px; }
  .js .nav__links.is-open { display: flex; }
  .js .nav__links a { padding: 12px 14px; font-size: 17px; }
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { background: var(--brand-wash); border-bottom: 2px solid var(--border); }
.hero__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
  padding-block: clamp(40px, 6vw, 88px);
}
.hero__copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: 2px solid var(--brand-border); border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-rim);
  font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 62px); line-height: 1.08; font-weight: 900; letter-spacing: -0.02em;
}
.hero h1 span { color: var(--brand); }
.hero__lead { max-width: 560px; font-size: 19px; color: var(--text-secondary); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 6px; }
.checks {
  list-style: none; padding: 8px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px;
  font-size: 15px; font-weight: 700; color: var(--text-secondary);
}
.checks li { display: flex; align-items: center; gap: 8px; }

/* Thẻ bài nộp minh hoạ */
.judge-card {
  flex: 1 1 400px; min-width: 0; max-width: 520px; margin-inline: auto;
  display: flex; flex-direction: column; gap: 16px; padding: 20px;
  background: #FFFFFF; border: 2px solid var(--border); border-radius: 24px; box-shadow: 0 6px 0 var(--border);
}
.judge-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.judge-card__kicker { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.judge-card__title { display: block; font-size: 18px; font-weight: 900; }
.chip { padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-rim); font-size: 13px; font-weight: 800; white-space: nowrap; }
.code {
  margin: 0; padding: 16px 18px; border-radius: 16px; overflow-x: auto;
  background: var(--code-bg); color: var(--code-ink);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.65;
}
.code .k { color: var(--code-keyword); }
.code .f { color: var(--code-func); }
.code .n { color: var(--code-number); }
.code .c { color: var(--code-comment); }
.tests { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: 14px; font-weight: 700; }
.tests li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: var(--success-soft); color: var(--success-text); }
.verdict {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-radius: 16px;
  background: var(--success); box-shadow: 0 var(--lip) 0 var(--success-rim); color: var(--success-ink);
  font-weight: 900;
}
.verdict__label { font-size: 18px; letter-spacing: .08em; text-transform: uppercase; }

/* ── Thẻ (hệ sinh thái, cộng đồng) ────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid--community { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.tile {
  display: flex; flex-direction: column; gap: 14px; padding: 26px;
  background: #FFFFFF; border: 2px solid var(--border); border-radius: var(--radius-card);
  box-shadow: 0 var(--lip) 0 var(--border);
  color: var(--text); text-decoration: none;
  transition: border-color .12s ease, transform .12s ease;
}
.tile:hover { color: var(--text); border-color: var(--brand-border); transform: translateY(-2px); }
.tile:active { transform: translateY(2px); }
.tile h3 { font-size: 22px; font-weight: 900; line-height: 1.25; }
.tile p { font-size: 16px; color: var(--text-secondary); }
.tile ul { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--text-secondary); }
.tile__more { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tile--sm { gap: 12px; padding: 24px; }
.tile--sm h3 { font-size: 19px; }
.tile--sm p { font-size: 15px; }

.icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 16px;
}
.tile--sm .icon-tile { width: 52px; height: 52px; border-radius: 14px; }
.icon-tile--brand { background: var(--brand); box-shadow: 0 var(--lip) 0 var(--brand-rim); }
.icon-tile--course { background: var(--course-fill); box-shadow: 0 var(--lip) 0 var(--course-rim); }
.icon-tile--class { background: var(--class-fill); box-shadow: 0 var(--lip) 0 var(--class-rim); }
.icon-tile--facebook { background: var(--facebook); box-shadow: 0 var(--lip) 0 var(--facebook-lip); }
.icon-tile--youtube { background: var(--youtube); box-shadow: 0 var(--lip) 0 var(--youtube-lip); }
.icon-tile--messenger { background: var(--messenger); box-shadow: 0 var(--lip) 0 var(--messenger-lip); }
.more--brand { color: var(--brand-text); }
.more--course { color: var(--course-text); }
.more--class { color: var(--class-text); }
.more--facebook { color: var(--facebook-lip); }
.more--youtube { color: var(--youtube-text); }
.more--messenger { color: var(--messenger-lip); }

/* Khoá học tự học: thẻ lấy từ NQOJ, ảnh bìa nếu khoá có. */
.course-card__image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; border: 2px solid var(--border); background: var(--surface-subtle); }
.grid--courses { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.section-more { margin-top: 28px; text-align: center; }
.class-table__empty { padding: 28px 24px; font-size: 16px; color: var(--text-secondary); }
img.avatar { object-fit: cover; }

/* ── Lộ trình ─────────────────────────────────────────────────────── */
.path { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.step {
  display: flex; flex-direction: column; gap: 12px; padding: 24px;
  border-radius: var(--radius-card); background: var(--surface-subtle); border: 2px solid var(--border-subtle);
}
.step h3 { font-size: 20px; font-weight: 900; }
.step p { font-size: 15px; color: var(--text-secondary); }
.step__node {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 var(--lip) 0 var(--brand-rim);
  color: #FFFFFF; font-size: 24px; font-weight: 900;
}
.step--goal { background: var(--gold-soft); border-color: var(--gold-border); }
.step--goal .step__node { background: var(--gold); box-shadow: 0 var(--lip) 0 var(--gold-rim); color: var(--gold-ink); }

/* ── Lớp học ──────────────────────────────────────────────────────── */
.classes {
  margin-top: var(--section-gap);
  background: var(--class-soft);
  border-block: 2px solid var(--class-border);
}
.classes__inner {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px;
  padding-block: clamp(48px, 6vw, 88px);
}
.classes__copy { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.classes__copy .eyebrow { color: var(--class-text); }
.classes__copy > p { color: var(--text-secondary); }
.perks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; font-weight: 700; }
.perks li { display: flex; align-items: center; gap: 12px; }
.perks__mark {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 10px; background: var(--class-fill); color: #FFFFFF; font-size: 15px;
}
.class-table {
  flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; padding: 8px;
  background: #FFFFFF; border: 2px solid var(--class-border); border-radius: 22px;
  box-shadow: 0 var(--lip) 0 var(--class-border);
}
.class-table__scroll { overflow-x: auto; }
.class-table table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 15px; }
.class-table thead th {
  padding: 14px 16px; text-align: left; font-size: 12px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
}
.class-table tbody tr { border-top: 2px solid var(--border-subtle); }
.class-table tbody th, .class-table td { padding: 16px; text-align: left; vertical-align: top; }
.class-table tbody th { font-weight: 900; }
.class-table tbody th a { color: var(--text); }
.class-table td { color: var(--text-secondary); }
.class-table__sub { display: block; font-weight: 600; font-size: 13px; color: var(--text-muted); }
.class-table__fee { font-weight: 800; color: var(--text) !important; }
.level { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--class-soft); color: var(--class-text); font-weight: 800; font-size: 13px; white-space: nowrap; }
.class-table__actions {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px;
  padding: 14px 12px 12px; border-top: 2px solid var(--border-subtle);
}

/* ── Cảm nhận ─────────────────────────────────────────────────────── */
.quote {
  display: flex; flex-direction: column; gap: 18px; padding: 26px;
  background: #FFFFFF; border: 2px solid var(--border); border-radius: var(--radius-card);
}
.quote blockquote { font-size: 17px; }
.quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; line-height: 1.3; }
.quote figcaption b { display: block; font-weight: 900; }
.quote figcaption span { font-size: 14px; color: var(--text-muted); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 50%; font-weight: 900;
}
.avatar--brand { background: var(--brand-soft); color: var(--brand-rim); }
.avatar--class { background: var(--class-soft); color: var(--class-text); }
.avatar--gold { background: var(--gold-soft); color: var(--gold-text); }

/* ── Dải kêu gọi ──────────────────────────────────────────────────── */
.cta { padding-block: var(--section-gap); }
.cta__band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
  padding: clamp(32px, 4.5vw, 56px); border-radius: 28px;
  background: var(--brand); box-shadow: 0 6px 0 var(--brand-rim); color: #FFFFFF;
}
.cta__copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cta__copy h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; font-weight: 900; }
.cta__copy p { font-size: 18px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ── Chân trang ───────────────────────────────────────────────────── */
.site-footer { background: var(--surface-subtle); border-top: 2px solid var(--border); }
.footer__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px;
  padding-block: 48px 28px;
}
.footer__about { display: flex; flex-direction: column; gap: 12px; }
.footer__about p { font-size: 15px; color: var(--text-secondary); }
.footer__col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 700; }
.footer__col h2 { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.footer__col a { color: var(--text); text-decoration: none; }
.footer__col a:hover { color: var(--brand-text); text-decoration: underline; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding-block: 18px 32px; border-top: 2px solid var(--border);
  font-size: 14px; color: var(--text-muted);
}

@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .nav .brand__word { font-size: 20px; }
  .nav > .btn { padding: 0 14px; }
  .hero__actions .btn, .cta__actions .btn { flex: 1 1 100%; }
  .judge-card { padding: 14px; }
  .code { font-size: 12.5px; padding: 14px; }
}
