:root {
  --paper: #faf8f5;
  --biscuit: #f4efeb;
  --white: #ffffff;
  --line: #e8e2d8;
  --line-strong: #d8d0c3;
  --forest: #1e2b27;
  --forest-2: #2a3a35;
  --text: #2b332f;
  --muted: #5d6662;
  --clay: #c2421f;
  --clay-hover: #a9310f;
  --clay-text: #a9310f;
  --honey: #fabc4d;
  --on-dark: #f2eee8;
  --on-dark-muted: #bcc7c2;
  --display: "Epilogue", "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
  --sans: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 17px/1.65 var(--sans); }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; border: 0; }
ul, ol { list-style: none; }
a { color: var(--clay-text); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

h1, h2 { font-family: var(--display); font-weight: 600; color: var(--forest); letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 1.12; }
h1 em { font-style: italic; font-weight: 500; color: var(--clay-text); white-space: nowrap; }
h2 { font-size: clamp(1.85rem, 3.6vw, 3rem); line-height: 1.2; }
h3 { font-family: var(--display); font-size: 1.28rem; font-weight: 600; line-height: 1.35; color: var(--forest); }

.wrap { width: min(1240px, 100%); margin-inline: auto; padding-inline: 32px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--forest); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tint { background: var(--biscuit); }
.section--dark { background: var(--forest); color: var(--on-dark-muted); }
.section--dark h2, .section--dark h3 { color: var(--on-dark); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--clay-text); margin-bottom: 16px; }
.section--dark .eyebrow { color: var(--honey); }
.lead { font-size: 1.14rem; color: var(--muted); }

.head-split { display: grid; grid-template-columns: 7fr 4fr; gap: 24px 64px; align-items: end; margin-bottom: 56px; }
.head-split > p { color: var(--muted); }
.section--dark .head-split > p { color: var(--on-dark-muted); }
.head-center { max-width: 760px; margin: 0 auto 64px; text-align: center; }

/* Nút */
.btn { display: inline-block; background: var(--clay); color: #fff; border: 1px solid var(--clay); border-radius: 10px; padding: 12px 22px; font-weight: 600; text-decoration: none; transition: background .15s, transform .15s; }
.btn:hover { background: var(--clay-hover); transform: translateY(-1px); }
.btn:active { transform: none; box-shadow: inset 0 1px 2px rgba(24, 34, 30, .2); }
.btn--small { padding: 8px 16px; font-size: .92rem; }
.btn--dark { background: var(--forest); border-color: var(--forest); }
.btn--dark:hover { background: var(--forest-2); }
.btn--quiet { background: var(--white); color: var(--forest); border-color: var(--line-strong); }
.btn--quiet:hover { background: var(--paper); }

/* Thanh trên */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(250, 248, 245, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 24px; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 1.32rem; color: var(--forest); text-decoration: none; }
.logo__mark { width: 28px; height: 28px; fill: none; stroke: var(--clay); stroke-width: 2.6; }
.logo--light { color: var(--on-dark); }
.logo--light .logo__mark { stroke: var(--honey); }
.topnav { display: flex; gap: 26px; margin-left: auto; }
.topnav a { color: var(--text); font-size: .94rem; font-weight: 500; text-decoration: none; }
.topnav a:hover { color: var(--clay-text); }
.menu { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 12px; font-size: .9rem; }

/* Khung ảnh và video chờ bổ sung */
.ph { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: flex-end; background: var(--biscuit); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.ph::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 72% 30%, rgba(217, 83, 47, .13), transparent 42%), radial-gradient(circle at 25% 70%, rgba(250, 188, 77, .16), transparent 40%); }
.ph figcaption { position: relative; padding: 18px 20px; display: grid; gap: 2px; }
.ph strong { color: var(--forest); font-size: .98rem; font-weight: 600; }
.ph span { color: var(--muted); font-size: .84rem; }
.ph--wide { aspect-ratio: 16 / 9; max-height: 620px; width: 100%; align-items: center; justify-content: center; text-align: center; }
.media { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.media--wide { aspect-ratio: 16 / 9; }

/* Mở đầu */
.hero { padding-block: clamp(48px, 7vw, 96px) 0; }
.hero__grid { display: grid; grid-template-columns: 8fr 4fr; gap: 24px 56px; align-items: end; margin-bottom: 48px; }
.entry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.entry a { position: relative; display: grid; align-content: start; gap: 2px; padding: 22px 56px 22px 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.entry a:hover { border-color: var(--clay); transform: translateY(-2px); }
.entry small { color: var(--muted); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.entry strong { font-family: var(--display); font-size: 1.28rem; font-weight: 600; color: var(--forest); }
.entry span { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.entry i { position: absolute; top: 22px; right: 22px; font-style: normal; color: var(--clay-text); font-size: 1.2rem; }

/* Gia đình robot */
.robots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.robot { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.robot .ph { border: 0; border-bottom: 1.5px dashed var(--line-strong); border-radius: 0; }
.robot__body { padding: 26px 26px 30px; display: grid; gap: 14px; align-content: start; }
.robot__for { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--clay-text); }
.robot__body h3 { margin-top: -8px; font-size: 1.5rem; }
.robot__note { padding: 12px 14px; background: var(--biscuit); border-radius: 10px; font-size: .9rem; line-height: 1.55; color: var(--muted); }
.ticks { display: grid; gap: 9px; font-size: .96rem; line-height: 1.5; }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .58em; width: 8px; height: 8px; border-radius: 50%; background: var(--clay); }

.next-robot { display: flex; gap: 24px; align-items: center; margin-top: 24px; padding: 28px 32px; border: 1.5px dashed var(--line-strong); border-radius: 20px; }
.next-robot__plus { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--biscuit); color: var(--clay-text); font-size: 1.7rem; line-height: 1; }
.next-robot p { color: var(--muted); max-width: 62em; margin-top: 4px; }

/* Một ngày */
.day { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; border-top: 1px solid var(--forest); }
.day li { position: relative; padding-top: 28px; }
.day li::before { content: ""; position: absolute; top: -6px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--clay); }
.day__time { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--clay-text); margin-bottom: 10px; }
.day li > p:last-child { margin-top: 8px; color: var(--muted); font-size: .98rem; }

/* Nền tảng */
.platform { display: grid; grid-template-columns: 6fr 5fr; gap: 40px 72px; align-items: center; margin-bottom: 64px; }
.platform__text > p:not(.eyebrow) { margin-top: 18px; color: var(--muted); }
.hub { width: 100%; height: auto; }
.hub__lines path { stroke: var(--line-strong); stroke-width: 1.5; fill: none; }
.hub__lines .is-next { stroke-dasharray: 5 6; }
.hub__halo { fill: rgba(217, 83, 47, .12); }
.hub__core { fill: var(--clay); }
.hub__core-text { fill: #fff; font: 600 22px var(--display); }
.hub__node circle { fill: var(--white); stroke: var(--forest); stroke-width: 1.5; }
.hub__node text { fill: var(--forest); font: 500 14px var(--sans); }
.hub__node.is-next circle { fill: var(--paper); stroke: var(--line-strong); stroke-dasharray: 5 5; }
.hub__node.is-next text { fill: var(--muted); }

.match { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--biscuit); border: 1px solid var(--line); border-radius: 20px; }
.match__col { padding: 28px; display: grid; gap: 16px; align-content: start; }
.match__col + .match__col { border-left: 1px solid var(--line-strong); }
.match__col h3 { font-size: 1.05rem; }
.match__tasks { display: grid; gap: 8px; }
.match__tasks button { text-align: left; padding: 10px 14px; background: var(--white); border: 1px solid var(--line-strong); border-radius: 10px; font-weight: 500; font-size: .96rem; transition: background .15s, color .15s; }
.match__tasks button:hover { border-color: var(--forest); }
.match__tasks button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--on-dark); }
.match__caps { display: flex; flex-wrap: wrap; gap: 8px; }
.match__caps li { padding: 5px 13px; border: 1px solid var(--line-strong); border-radius: 99px; font-size: .9rem; color: var(--muted); transition: background .15s, color .15s; }
.match__caps li.is-on { background: var(--clay); border-color: var(--clay); color: #fff; }
.match__robots { display: grid; gap: 8px; }
.match__robots li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 11px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; opacity: .72; }
.match__robots strong { color: var(--forest); font-size: .96rem; }
.match__robots span { grid-row: 2; font-size: .86rem; color: var(--muted); }
.match__robots em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: .82rem; color: var(--muted); }
.match__robots li.is-match { opacity: 1; background: var(--white); border-color: var(--forest); }
.match__robots li.is-match em { color: var(--clay-text); font-weight: 600; }
.match__note { margin-top: 12px; font-size: .86rem; color: var(--muted); }

/* Tự học */
.learn { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: step; }
.learn li { counter-increment: step; padding: 0 22px 8px; border-left: 1px solid rgba(242, 238, 232, .2); }
.learn li::before { content: counter(step); display: block; font: 500 2.4rem/1 var(--display); color: var(--honey); margin-bottom: 18px; }
.learn h3 { font-size: 1.06rem; }
.learn p { margin-top: 8px; font-size: .94rem; line-height: 1.58; }
.learn__notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; padding-top: 32px; border-top: 1px solid rgba(242, 238, 232, .2); font-size: .96rem; }
.learn__notes strong { display: block; color: var(--on-dark); margin-bottom: 4px; font-weight: 600; }

/* An toàn */
.safety { display: grid; grid-template-columns: 5fr 6fr; gap: 48px 80px; align-items: start; }
.limits { margin-top: 32px; padding: 22px 24px; background: var(--biscuit); border-left: 3px solid var(--clay); border-radius: 0 12px 12px 0; }
.limits h3 { font-size: 1.04rem; margin-bottom: 6px; }
.limits p { font-size: .96rem; color: var(--muted); }
.safety__list li { padding-block: 22px; border-top: 1px solid var(--line-strong); }
.safety__list li:last-child { border-bottom: 1px solid var(--line-strong); }
.safety__list p { margin-top: 6px; color: var(--muted); }

/* Theo nhóm */
.who { display: grid; grid-template-columns: 6fr 5fr; gap: 32px 56px; align-items: center; padding: 40px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; }
.who + .who { margin-top: 24px; }
.who--flip { grid-template-columns: 5fr 6fr; }
.who--flip .who__text { order: 2; }
.who__text { display: grid; gap: 16px; justify-items: start; }
.who__text .eyebrow { margin-bottom: -6px; }
.who h3 { font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.25; }
.who__text > p:not(.eyebrow) { color: var(--muted); }
.who__call { padding-left: 14px; border-left: 2px solid var(--clay); font-size: .96rem; }
.who__call strong { color: var(--forest); font-weight: 600; }
.ticks b { font-weight: 600; color: var(--forest); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.stats div { padding: 14px 16px; background: var(--biscuit); border-radius: 12px; }
.stats dt { font: 600 1.35rem/1.3 var(--display); color: var(--clay-text); }
.stats dd { font-size: .86rem; line-height: 1.45; color: var(--muted); }
.source { font-size: .82rem; color: var(--muted) !important; margin-top: -8px; }

/* Hỏi đáp */
.faq { display: grid; grid-template-columns: 4fr 7fr; gap: 32px 64px; align-items: start; }
.faq__list details { border-top: 1px solid var(--line-strong); }
.faq__list details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq__list summary { position: relative; padding: 18px 36px 18px 0; font-weight: 600; color: var(--forest); cursor: pointer; list-style: none; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.4rem; font-weight: 400; color: var(--clay-text); }
.faq__list details[open] summary::after { content: "–"; }
.faq__list details p { padding-bottom: 20px; color: var(--muted); }

/* Liên hệ */
.contact { display: grid; grid-template-columns: 5fr 6fr; gap: 40px 72px; align-items: start; }
.contact > div > p:not(.eyebrow) { margin-top: 16px; }
.contact__todo { margin-top: 28px; display: grid; gap: 8px; color: var(--on-dark); }
.contact__todo mark { background: rgba(250, 188, 77, .18); color: var(--honey); padding: 1px 8px; border-radius: 6px; }
.form { display: grid; gap: 16px; padding: 32px; background: var(--paper); border-radius: 20px; color: var(--text); }
.form > label, .form legend { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; color: var(--forest); }
.form input[type="text"], .form textarea { width: 100%; padding: 11px 13px; background: var(--white); border: 1px solid var(--line-strong); border-radius: 10px; font-weight: 400; font-size: 1rem; }
.form input[type="text"]:focus, .form textarea:focus { outline: 2px solid var(--forest); outline-offset: 0; }
.form .is-invalid { border-color: #ba1a1a; }
.form__roles { display: flex; flex-wrap: wrap; gap: 8px; }
.form__roles legend { margin-bottom: 8px; padding: 0; }
.form__roles label { cursor: pointer; }
.form__roles input { position: absolute; opacity: 0; }
.form__roles span { display: block; padding: 7px 14px; background: var(--white); border: 1px solid var(--line-strong); border-radius: 99px; font-size: .92rem; }
.form__roles input:checked + span { background: var(--forest); border-color: var(--forest); color: var(--on-dark); }
.form__roles input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: 2px; }
.form .btn { justify-self: start; cursor: pointer; }
.form__status { min-height: 1.4em; font-size: .92rem; font-weight: 500; }
.form__status.is-error { color: #ba1a1a; }
.form__status.is-warn { color: #7b5500; }
.form__status.is-ok { color: #1f6b4a; }
.form__fine { font-size: .82rem; color: var(--muted); margin-top: -8px; }

/* Chân trang */
.footer { background: var(--forest); color: var(--on-dark-muted); border-top: 1px solid rgba(242, 238, 232, .15); padding-block: 28px; font-size: .88rem; }
.footer__in { display: flex; align-items: center; justify-content: space-between; gap: 16px 40px; flex-wrap: wrap; }

@media (max-width: 1080px) {
  .topnav { gap: 18px; }
  .learn { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .robots { grid-template-columns: repeat(2, 1fr); }
  .robots .robot:first-child { grid-column: 1 / -1; flex-direction: row; }
  .robots .robot:first-child .ph { flex: 0 0 46%; aspect-ratio: auto; border-bottom: 0; border-right: 1.5px dashed var(--line-strong); }
  .day { grid-template-columns: repeat(2, 1fr); border-top: 0; row-gap: 40px; }
  .day li { border-top: 1px solid var(--forest); }
}

@media (max-width: 860px) {
  .wrap { padding-inline: 20px; }
  .menu { display: block; }
  .topbar__in { gap: 10px; }
  .topnav { display: none; position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; gap: 0; margin: 0; padding: 8px 20px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .topnav.is-open { display: flex; }
  .topnav a { padding: 10px 0; font-size: 1rem; }
  .hero__grid, .head-split, .platform, .safety, .who, .who--flip, .faq, .contact { grid-template-columns: 1fr; }
  .who--flip .who__text { order: 0; }
  .who { padding: 24px; }
  .head-split { margin-bottom: 36px; }
  .head-center { text-align: left; margin-bottom: 36px; }
  .entry, .robots, .match, .learn__notes { grid-template-columns: 1fr; }
  .robots .robot:first-child { flex-direction: column; }
  .robots .robot:first-child .ph { flex: none; aspect-ratio: 4 / 3; border-right: 0; border-bottom: 1.5px dashed var(--line-strong); }
  .entry { gap: 12px; }
  .match__col + .match__col { border-left: 0; border-top: 1px solid var(--line-strong); }
  .learn { grid-template-columns: 1fr; row-gap: 28px; }
  .learn li { padding: 0 0 0 18px; }
  .next-robot { flex-direction: column; align-items: flex-start; padding: 24px; }
  .form { padding: 22px; }
  .hub { max-width: 440px; margin-inline: auto; }
}

@media (max-width: 560px) {
  .day { grid-template-columns: 1fr; row-gap: 28px; }
  .stats { grid-template-columns: 1fr; }
}

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