/* VMeal School — trang giới thiệu. Màu và chữ lấy từ assets/theme.css (dùng chung với bản demo). */
@import url("assets/theme.css");
:root {
  --ink: var(--vm-ink);
  --ink-2: #192445;
  --ink-3: var(--vm-ink-2);
  --red: var(--vm-red);
  --red-hi: var(--vm-red-hi);
  --red-deep: var(--vm-red-ink);
  --red-soft: var(--vm-red-soft);
  --amber: #dd7f08;
  --amber-line: #f6dfc2;
  --line: var(--vm-line);
  --bg: var(--vm-surface);
  --tint: var(--vm-surface-2);
  --shadow: 0 10px 30px rgba(18, 28, 54, .08), 0 2px 6px rgba(18, 28, 54, .05);
  --font: var(--vm-font);
  --gutter: clamp(16px, 3.4vw, 52px);
  --max: 1440px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.red { color: var(--red); }
.ink { color: var(--ink); }

:focus-visible { outline: var(--vm-focus-ring); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap;
  background: var(--red) var(--vm-btn-red);
  border-radius: var(--vm-radius-sm);
  box-shadow: var(--vm-btn-shadow);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn svg { width: .78em; height: .78em; flex: none; }
.btn:hover { filter: brightness(1.06); box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 10px 22px rgba(168, 9, 29, .3); }
.btn:active { transform: translateY(1px); }
.btn--sm { font-size: 20px; height: 46px; padding: 0 20px; }
.btn--lg { font-size: clamp(22px, 1.95vw, 30px); height: clamp(54px, 4.25vw, 66px); padding: 0 1.25em 0 1.1em; border-radius: var(--vm-radius); letter-spacing: -.01em; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.97);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid rgba(10, 18, 56, .06);
  padding-top: env(safe-area-inset-top, 0px);
}
.nav__inner {
  max-width: 1536px; margin: 0 auto; height: 64px;
  padding: 0 clamp(16px, 1.5vw, 24px) 0 clamp(16px, 4vw, 62px);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: .5em; text-decoration: none; flex: none; font-size: clamp(22px, 2vw, 31px); }
.brand__mark { width: var(--vm-mark-w); height: var(--vm-mark-h); color: var(--red); flex: none; }
.brand__name { font-size: 1em; font-weight: var(--vm-word-weight); letter-spacing: var(--vm-word-track); color: var(--ink); }

.nav__menu { flex: 1; display: flex; justify-content: center; height: 100%; }
.nav__list { display: flex; align-items: stretch; gap: clamp(18px, 3.6vw, 56px); height: 100%; }
.nav__list > li { position: relative; display: flex; }
.nav__list > li > a {
  display: inline-flex; align-items: center; gap: 6px; height: 100%;
  font-size: clamp(16px, 1.32vw, 20.5px); font-weight: 600; letter-spacing: -.015em; color: var(--ink);
  text-decoration: none; white-space: nowrap; position: relative;
}
.nav__list > li > a:hover { color: var(--red); }
.chev { width: 18px; height: 18px; margin-left: 2px; }
.nav__list > li.is-active > a { color: var(--red); }
.nav__list > li.is-active > a::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--red);
}
.sub {
  position: absolute; top: calc(100% - 6px); left: -14px; min-width: 240px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.sub--end { left: auto; right: -14px; }
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: translateY(0); }
.sub a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: 16px; color: var(--ink); }
.sub a:hover, .sub a:focus-visible { background: var(--red-soft); color: var(--red); }
.nav__cta { flex: none; }
.btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  color: var(--ink); background: rgba(255, 255, 255, .92); text-decoration: none; font-weight: var(--vm-btn-weight); white-space: nowrap;
  border: 2px solid var(--vm-line-2); border-radius: var(--vm-radius);
  transition: border-color .15s ease, color .15s ease;
}
.btn-line svg { width: .8em; height: .8em; flex: none; color: var(--red); }
.btn-line:hover { border-color: var(--red); color: var(--red); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: clamp(22px, 2.2vw, 34px); }

.mnav { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 70% at 88% 8%, rgba(132, 178, 92, .16), transparent 60%),
    radial-gradient(45% 55% at 58% 30%, rgba(236, 228, 214, .55), transparent 70%),
    linear-gradient(180deg, #fbfbfa 0%, #f6f6f5 70%, #f3f3f4 100%);
}
.hero::before { /* soft window-light bands, echo of the blurred canteen backdrop */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 120px, rgba(255,255,255,.55) 120px 150px, rgba(255,255,255,0) 150px 260px);
  filter: blur(18px); opacity: .7;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 100%);
}
.hero__inner {
  position: relative; max-width: 1536px; margin: 0 auto;
  padding: clamp(28px, 2.6vw, 40px) 0 clamp(72px, 6vw, 92px) clamp(16px, 3.45vw, 53px);
  display: grid; grid-template-columns: minmax(0, 50%) minmax(0, 50%); align-items: start;
  min-height: clamp(540px, 40.9vw, 628px);
}
.hero__copy { position: relative; z-index: 2; padding-right: 8px; grid-column: 1; }
.pill {
  display: inline-block; background: var(--red-soft); color: var(--red);
  font-weight: 700; font-size: clamp(17px, 1.6vw, 25px); letter-spacing: -.025em;
  padding: .12em .9em .16em; border-radius: 999px;
}
.hero__title {
  margin-top: clamp(14px, 1.5vw, 22px);
  font-size: clamp(34px, 3.62vw, 56px); line-height: 1.16; font-weight: 800; letter-spacing: -.05em;
}
.hero__title span { display: block; text-wrap: balance; }
@media (min-width: 1025px) { .hero__title span { white-space: nowrap; } }
.hero__lede {
  margin-top: clamp(10px, 1.05vw, 16px);
  font-size: clamp(17px, 1.6vw, 25px); color: var(--ink-2); letter-spacing: -.01em; font-weight: 400;
}

.quick { display: flex; flex-wrap: wrap; align-items: center; margin-top: clamp(26px, 2.75vw, 42px); }
.quick li { display: flex; align-items: center; }
.quick li + li::before { content: ""; width: 1px; height: 38px; background: #d9dbe2; margin: 0 clamp(14px, 1.7vw, 26px); }
.quick a {
  display: inline-flex; align-items: center; gap: clamp(8px, .9vw, 14px);
  font-weight: 600; font-size: clamp(16px, 1.36vw, 21px); letter-spacing: -.02em; text-decoration: none; color: var(--ink);
  padding: 6px 0; border-radius: 8px;
}
.quick a:hover { color: var(--red); }
.q-ic { width: clamp(36px, 3.3vw, 52px); height: clamp(32px, 2.9vw, 46px); color: var(--red); }
.q-ic--truck { width: clamp(40px, 3.5vw, 54px); }

.hero__media {
  /* Desktop: the photo-backed device render bleeds to the right edge, feathered into the hero on the left.
     Geometry from target: devices span x≈550–1500 of 1536, top ≈ nav bottom. */
  position: absolute; z-index: 1; margin: 0;
  right: 0; top: -1.3vw; width: 66.8%;
  aspect-ratio: 1400 / 933;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 9%, #000 22%), linear-gradient(180deg, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 9%, #000 22%), linear-gradient(180deg, #000 78%, transparent 100%);
          mask-composite: intersect;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: 2;
}

/* CSS fallback panel (used only while/if the device render is missing) */
.fallback { position: absolute; inset: 14% 3% 18% 26%; display: grid; z-index: 1; }
.fb-app {
  display: grid; grid-template-columns: 26% 1fr; border-radius: 14px; overflow: hidden;
  background: #fff; border: 10px solid #15171c; box-shadow: 0 30px 60px rgba(10,18,56,.18);
  font-size: clamp(9px, .86vw, 13px);
}
.fb-side { background: linear-gradient(180deg, var(--vm-red), var(--vm-red-deep)); color: #fff; padding: 1.2em .9em; display: flex; flex-direction: column; gap: .55em; }
.fb-side span { padding: .35em .7em; border-radius: 6px; opacity: .92; }
.fb-side span.on { background: rgba(255,255,255,.2); opacity: 1; font-weight: 700; }
.fb-logo { display: flex; align-items: center; gap: .5em; font-weight: 800; font-size: 1.15em; margin-bottom: .6em; }
.fb-logo svg { width: 2em; height: 1.7em; color: #fff; }
.fb-main { padding: 1.4em 1.4em; display: flex; flex-direction: column; gap: .9em; background: #fafbfc; }
.fb-h { font-weight: 800; font-size: 1.45em; letter-spacing: -.02em; }
.fb-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7em; }
.fb-kpis div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .8em; display: grid; gap: .2em; }
.fb-kpis b { font-size: 1.55em; letter-spacing: -.03em; }
.fb-kpis small { color: var(--ink-3); font-size: .9em; }
.fb-kpis .warn b { color: var(--red); font-size: 1.25em; }
.fb-sub { font-weight: 700; }
.fb-row { display: grid; grid-template-columns: 1fr auto auto; gap: 1em; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .7em .9em; }
.fb-row b { font-variant-numeric: tabular-nums; }
.fb-row em { font-style: normal; font-weight: 700; padding: .2em .6em; border-radius: 999px; font-size: .92em; }
.fb-row .ok { background: var(--vm-ok-soft); color: var(--vm-ok); }
.fb-row .amber { background: var(--vm-warn-soft); color: var(--vm-warn); }

/* ---------- Six-module strip ---------- */
.strip-wrap {
  position: relative; z-index: 3;
  max-width: 1536px; margin: calc(-1 * clamp(48px, 4vw, 62px)) auto 0;
  padding: 0 clamp(16px, 2.3vw, 35px);
}
.strip {
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: #fff; border-radius: 22px; box-shadow: 0 14px 40px rgba(15, 22, 60, .09), 0 1px 3px rgba(15, 22, 60, .06);
  border: 1px solid rgba(10,18,56,.05);
  padding: 9px 14px;
}
.strip li { position: relative; display: flex; }
.strip li + li::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1.5px; background: var(--amber-line);
}
.strip li:nth-child(2)::before { display: none; } /* active cell already separates first pair */
.strip a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(6px, .7vw, 12px);
  min-height: clamp(84px, 6.9vw, 106px); border-radius: 16px; text-decoration: none;
  font-weight: 700; font-size: clamp(16px, 1.6vw, 25px); letter-spacing: -.025em; color: var(--ink);
  transition: background .15s ease, color .15s ease;
}
.strip svg { width: clamp(36px, 3.6vw, 56px); height: clamp(32px, 3.1vw, 48px); color: var(--amber); }
.strip a:hover { background: #fff6f6; color: var(--red); }
.strip a.is-current { background: var(--red-soft); color: var(--red); }
.strip a.is-current svg { color: var(--red); }

/* ---------- Sections ---------- */
.section { padding: clamp(32px, 2.6vw, 40px) 0 clamp(48px, 4.5vw, 72px); }
.section--tint { background: var(--tint); }
.wrap { max-width: 1536px; margin: 0 auto; padding: 0 clamp(16px, 2.3vw, 35px); }
.wrap--narrow { max-width: 980px; }
.h2 { font-size: clamp(30px, 3.05vw, 48px); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; color: var(--ink); padding-left: clamp(0px, 1.4vw, 22px); }
.lede { margin-top: 8px; font-size: clamp(16px, 1.5vw, 23px); color: var(--ink-2); padding-left: clamp(0px, 1.4vw, 22px); max-width: 60ch; }
.wrap--narrow .lede { max-width: none; }

.cards { display: grid; grid-template-columns: 1.04fr 1fr 1fr; gap: clamp(14px, 1.3vw, 20px); margin-top: clamp(18px, 1.6vw, 26px); }
.card {
  display: flex; align-items: flex-start; gap: clamp(14px, 1.8vw, 28px);
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(18px, 1.6vw, 24px) clamp(18px, 2.4vw, 38px) clamp(20px, 1.9vw, 28px);
  box-shadow: 0 4px 14px rgba(15, 22, 60, .04);
}
.card__ic { width: clamp(40px, 3.3vw, 52px); height: clamp(40px, 3.3vw, 52px); color: var(--red); flex: none; margin-top: 2px; }
.card h3 { font-size: clamp(18px, 1.46vw, 22.5px); font-weight: 700; letter-spacing: -.035em; line-height: 1.25; }
.card p { margin-top: clamp(8px, .9vw, 13px); font-size: clamp(15px, 1.17vw, 18px); color: var(--ink-2); letter-spacing: -.015em; }
.card--col { display: block; }
.card--col h3 { color: var(--red); }

.scenario {
  margin-top: clamp(20px, 2vw, 30px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  background: var(--red-soft); border-radius: 14px; padding: 14px clamp(16px, 2vw, 28px);
}
.scenario__tag { font-weight: 700; color: var(--red); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.scenario__text { flex: 1 1 420px; font-size: clamp(15px, 1.2vw, 18px); color: var(--ink-2); }
.scenario__text strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--red); text-decoration: none;
  font-size: 17px; padding: 6px 0;
}
.link-arrow::after { content: "→"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }
.link-arrow svg { width: 20px; height: 20px; }
#co-so-phap-ly .link-arrow { margin-top: 18px; padding-left: clamp(0px, 1.4vw, 22px); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.3vw, 20px); margin-top: clamp(22px, 2.4vw, 38px); counter-reset: s; }
.steps li {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: grid; gap: 4px;
  box-shadow: 0 4px 14px rgba(15, 22, 60, .04);
}
.steps b { font-size: clamp(24px, 2.2vw, 34px); font-weight: 800; letter-spacing: -.035em; color: var(--red); }
.steps span { color: var(--ink-2); font-size: 17px; }

.faq { margin-top: 22px; display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 18px; color: var(--ink-2); font-size: 16.5px; }

.foot { border-top: 1px solid var(--line); padding: 26px 0 calc(26px + env(safe-area-inset-bottom, 0px)); }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot p { color: var(--ink-3); font-size: 15px; flex: 1; }
.brand--sm { font-size: 20px; }
.foot__links { display: flex; gap: 22px; }
.foot__links a { font-weight: 600; text-decoration: none; }
.foot__links a:hover { color: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .nav__list { gap: 18px; }
  .chev { width: 15px; height: 15px; }
}
@media (max-width: 1100px) {
  .nav__inner { gap: 16px; }
  .nav__list { gap: 14px; }
  .nav__list > li > a { font-size: 15px; }
  .btn--sm { font-size: 17px; padding: 0 16px; }
}
@media (max-width: 1024px) {
  .nav__menu, .nav__cta { display: none; }
  .nav__inner { justify-content: space-between; }
  .mnav { display: block; position: relative; }
  .mnav summary {
    list-style: none; cursor: pointer; width: 46px; height: 46px; border-radius: 10px;
    display: grid; place-items: center; border: 1px solid var(--line); background: #fff;
  }
  .mnav summary::-webkit-details-marker { display: none; }
  .mnav__bars, .mnav__bars::before, .mnav__bars::after { display: block; width: 20px; height: 2.4px; border-radius: 2px; background: var(--ink); position: relative; }
  .mnav__bars::before, .mnav__bars::after { content: ""; position: absolute; left: 0; }
  .mnav__bars::before { top: -6.5px; }
  .mnav__bars::after { top: 6.5px; }
  .mnav[open] .mnav__bars { background: transparent; }
  .mnav[open] .mnav__bars::before { top: 0; transform: rotate(45deg); }
  .mnav[open] .mnav__bars::after { top: 0; transform: rotate(-45deg); }
  .mnav__panel {
    position: absolute; right: 0; top: calc(100% + 10px); width: min(300px, calc(100vw - 32px));
    background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
    padding: 10px; display: grid; gap: 2px;
  }
  .mnav__panel a:not(.btn) { padding: 12px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 17px; }
  .mnav__panel a[aria-current] { color: var(--red); background: var(--red-soft); }
  .mnav__panel .btn { margin-top: 8px; }

  .hero__inner { grid-template-columns: 1fr; padding-right: clamp(16px, 3.45vw, 53px); padding-bottom: clamp(64px, 9vw, 92px); min-height: 0; }
  .hero__copy { padding-right: 0; }
  .hero__media { position: relative; top: auto; right: auto; margin: 22px calc(-1 * clamp(16px, 3.45vw, 53px)) 0 calc(-1 * clamp(16px, 3.45vw, 53px)); width: auto;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 86%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 86%, transparent 100%); }
  .strip { grid-template-columns: repeat(3, 1fr); row-gap: 6px; }
  .strip li:nth-child(4)::before { display: none; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nav__inner { height: 60px; }
  .brand { font-size: 22px; }
  .hero__title { font-size: clamp(30px, 8.6vw, 40px); letter-spacing: -.04em; }
  .hero__actions .btn--lg { width: 100%; }
  .quick { justify-content: space-between; }
  .quick li + li::before { margin: 0 10px; height: 28px; }
  .quick a { flex-direction: column; gap: 4px; font-size: 15px; }
  .fallback { inset: 2% 0 4% 0; }
  .fb-app { grid-template-columns: 1fr; border-width: 6px; }
  .fb-side { display: none; }
  .strip { padding: 8px; border-radius: 18px; }
  .strip a { min-height: 88px; font-size: 15.5px; }
  .card { padding: 18px; }
  .steps li { padding: 16px; }
  .steps span { font-size: 15px; }
  .h2 { text-wrap: balance; }
  .foot__inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
