/* ============================================================
   AI PASSPORT — brand skin over the NCA header+hero shell.
   Token-only overrides (swap-safe): recolor + fonts. Load LAST.
   AIP palette: Trust Navy #071B3B · Signal Red #C6172E · Achievement Gold #F2C14E
                Digital Sky #62C4E8 · Evidence Mint #58D6B4 · Cloud Ice #EDF6FA
   ============================================================ */
:root{
  /* ---- primary accents ---- */
  --color-red:#C6172E;            /* Signal Red = brand primary (progress bar, hover, overlay slot0) */
  --color-red-hover:#a01120;
  --color-light-red:#C6172E;      /* CTA "Kiểm tra năng lực" */
  --color-light-red-hover:#a01120;
  --color-dark:#071B3B;           /* Trust Navy = ink + dark buttons/text */
  --color-dark-blue:#071B3B;      /* CTA "Tài liệu" (navy) */
  --color-dark-blue-hover:#0e2b57;
  --color-dark-red:#8a1020;
  --color-dark-red-hover:#6d0d19;
  --color-font-dark:#071B3B;

  /* ---- hero world accent colors (6 slots) mapped to AIP palette ---- */
  --color-course-pink:#F2C14E;   --color-course-pink-dark:#F2C14E;   /* Cấp 1 · Gold   */
  --color-course-orange:#2AA6D8; --color-course-orange-dark:#2AA6D8; /* slot2 · Cấp 2 · Sky    */
  --color-course-purple:#2FB98C; --color-course-purple-dark:#2FB98C; /* slot3 · Cấp 3 · Mint   */
  --color-course-green:#1E5AA8;  --color-course-green-dark:#1E5AA8;  /* slot4 · Cấp 4 · Navy-mid */
  --color-course-blue:#E0A32B;   --color-course-blue-dark:#E0A32B;   /* slot5 · Cấp 5 · Amber  */

  /* ---- typography ---- */
  --font-family-eng:"Inter", system-ui, sans-serif;      /* EN labels / fraction / display-EN */
  --font-family-sans:"Be Vietnam Pro", "Inter", system-ui, sans-serif; /* VI body + heading */
}

/* Logo lines = HTML text (real px, easy to tune). Tagline above, wordmark below. */
.l-header__title-text{ display:flex; flex-direction:column; justify-content:center; row-gap:1px; }
.aip-tagline{ font-family:"Be Vietnam Pro", sans-serif; font-weight:500; font-size:13px; letter-spacing:.2px; line-height:1.15; white-space:nowrap; }
.aip-wordmark{ font-family:"Inter", sans-serif; font-weight:700; font-size:24px; letter-spacing:.5px; line-height:1; white-space:nowrap; }
/* invert: white over hero -> navy when scrolled or mega-menu open */
[data-invert] .l-header__title-text{ color:#fff; }
.is-scrolled [data-invert] .l-header__title-text,
.is-megamenu-open .l-header__title-text{ color:#071B3B; }

/* AIP logo emblem is a shield PNG (square 1:1) — enlarge on desktop so it reads clearly */
.l-header__title-mark img{ object-fit:contain; }
@media (min-width:1025px){
  .l-header__title-mark,
  .l-header__title-mark img{ width:7rem; }
  .is-scrolled .l-header__title-mark,
  .is-scrolled .l-header__title-mark img{ width:6rem; }
}
/* ≤1024px: header nền TRẮNG cố định -> chữ logo phải NAVY (không thì trắng-trên-trắng = tàng hình) */
@media (max-width:1024px){
  [data-invert] .l-header__title-text,
  [data-invert] .l-header__title-text .aip-tagline,
  [data-invert] .l-header__title-text .aip-wordmark{ color:#071B3B; }
}
/* Mobile: phóng to emblem cho cân với chữ (đang 2.6rem = quá nhỏ) */
@media (max-width:768px){
  .l-header__title-mark img{ width:4.2rem; }
}

/* Hero heading — Be Vietnam Pro, tighter tracking to feel like a brand statement */
.p-top-kv__heading{ font-family:"Be Vietnam Pro", sans-serif; letter-spacing:-.01em; }

/* Category EN label — Inter, brand-y tracking */
.p-top-kv__category-item-en{ font-family:"Inter", sans-serif; letter-spacing:.01em; }

/* KASE mega-menu competency badges — colored tag = skill depth (bright/fresh AIP tones) */
:root{
  --color-tag-green:#12CFA3;   /* Cơ bản  = bright mint   */
  --color-tag-pink:#F2C14E;    /* Nâng cao = Achievement Gold (brand) */
}
[data-tag-color="red"]{ --color-tag:#F5384E; }            /* Chuyên sâu = bright red */

/* KASE: each of the 4 pillar cards gets its own arrow colour (variety + distinction) */
.l-header-gnav__menu-item--course .l-header-gnav__dropdown-menu>.l-header-gnav__dropdown-menu-item:nth-child(1){ --color-course:#2AA6D8; } /* K · Sky  */
.l-header-gnav__menu-item--course .l-header-gnav__dropdown-menu>.l-header-gnav__dropdown-menu-item:nth-child(2){ --color-course:#E0951A; } /* A · Gold */
.l-header-gnav__menu-item--course .l-header-gnav__dropdown-menu>.l-header-gnav__dropdown-menu-item:nth-child(3){ --color-course:#C6172E; } /* S · Red  */
.l-header-gnav__menu-item--course .l-header-gnav__dropdown-menu>.l-header-gnav__dropdown-menu-item:nth-child(4){ --color-course:#22B892; } /* E · Mint */

/* KASE image-cards: banner ON TOP, title (+ arrow) wraps BELOW it — like the original course cards */
.l-header-gnav__dropdown-menu-item-link{ flex-wrap:wrap; }
.l-header-gnav__dropdown-menu-item-image{ flex:0 0 100%; width:100%; }

body{ -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }

/* ============================================================
   SECTION · "AI PASSPORT LÀ GÌ" (intro + số liệu + video)
   Layout clone pixel-perfect từ Mindvalley "What is" (đo LIVE),
   recolor + Việt hoá theo brand AIP. Nhịp: pad 128/120, wrap 1200,
   gap 20/20/40/80, radius media 24. Font Be Vietnam Pro.
   ============================================================ */
.aip-whatis{
  background:#fff;            /* nền trắng full (bỏ gradient) */
  padding:128px 120px;
  overflow:hidden;
}
.aip-whatis__inner{ max-width:1200px; margin:0 auto; display:flex; flex-direction:column; }
.aip-whatis__titles{ display:flex; flex-direction:column; align-items:center; gap:20px; text-align:center; }
.aip-whatis__eyebrow{
  margin:0; font-family:var(--font-family-sans);
  font-size:20px; font-weight:600; line-height:1.25;
  letter-spacing:.12em; text-transform:uppercase;
  color:var(--color-red);                 /* Signal Red kicker */
}
.aip-whatis__title{
  margin:0; font-family:var(--font-family-sans);
  font-size:36px; font-weight:700; line-height:48px; letter-spacing:-.01em;  /* lh 48 (~1.33) — thoáng, chừa dấu VI */
  color:var(--color-dark);                 /* Trust Navy */
}
.aip-whatis__title span{ display:block; }
.aip-whatis__subtitle{
  margin:0; max-width:820px; font-family:var(--font-family-sans);
  font-size:18px; font-weight:400; line-height:30px;   /* body: lh 30 như Figma */
  color:#33455F;                           /* muted navy */
}
.aip-whatis__stats{ display:flex; justify-content:center; gap:64px; margin-top:40px; }
.aip-whatis__stat{ display:flex; flex-direction:column; align-items:center; gap:6px; }
.aip-whatis__stat-value{
  font-family:var(--font-family-sans);
  font-size:36px; font-weight:700; line-height:44px; letter-spacing:-.01em;
  background:linear-gradient(180deg,#2AA6D8 0%,#071B3B 100%); /* Digital Sky → Trust Navy */
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
}
.aip-whatis__stat-label{
  font-family:var(--font-family-sans);
  font-size:16px; font-weight:600; line-height:20px;
  letter-spacing:.06em; text-transform:uppercase;
  color:var(--color-dark);
}
.aip-whatis__media{
  margin-top:80px; width:100%;
  aspect-ratio:16 / 9; border-radius:24px; overflow:hidden;
  background:#071B3B;
  box-shadow:0 30px 60px -30px rgba(7,27,59,.45);
}
.aip-whatis__media video{ width:100%; height:100%; object-fit:cover; display:block; }

/* rise reveal (bám easing gốc) — chỉ ẩn khi JS bật (html.aip-js) để no-JS vẫn thấy */
.aip-rise{ transition:opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
html.aip-js .aip-rise{ opacity:0; transform:translateY(24px); }
html.aip-js .aip-rise.is-shown{ opacity:1; transform:none; }
@media (prefers-reduced-motion:reduce){ html.aip-js .aip-rise{ opacity:1; transform:none; transition:none; } }

@media (max-width:1000px){
  .aip-whatis{ padding:96px 40px; }
  .aip-whatis__title{ font-size:30px; line-height:40px; }
}
@media (max-width:640px){
  .aip-whatis{ padding:72px 24px; }
  .aip-whatis__title{ font-size:25px; line-height:33px; }
  .aip-whatis__subtitle{ font-size:16px; line-height:26px; }
  .aip-whatis__subtitle br{ display:none; } /* mobile: bỏ ngắt dòng ép của desktop, để chữ chảy tự nhiên */
  .aip-whatis__stats{ gap:28px; flex-wrap:wrap; margin-top:32px; }
  .aip-whatis__media{ margin-top:48px; }
}

/* ============================================================
   TRACKING TOÀN SITE (chốt) · chữ gần lại ~ -3% đến -4%
   NCA gốc set tracking cho tiếng Nhật (rất thưa: body/heading/copy 0.1em,
   token --md dùng 41× nhưng bỏ trống) → Latin/VI nhìn giãn. Retune về chặt.
   Đây là RULE MẶC ĐỊNH cho web AIP — mọi text mới cũng theo mức này.
   ============================================================ */
:root{
  --letter-spacing-body:-0.03em;
  --letter-spacing-heading:-0.02em;
  --letter-spacing-heading-en:-0.01em;
  --letter-spacing-copy:-0.03em;
  --letter-spacing-xxl:-0.02em;
  --letter-spacing-xl:-0.02em;
  --letter-spacing-l:0;
  --letter-spacing-m:-0.02em;
  --letter-spacing-md:-0.02em;   /* NCA tham chiếu 41× nhưng chưa định nghĩa → định nghĩa cho chặt */
  --letter-spacing-s:0;
  --letter-spacing-xs:0;
  --letter-spacing-no:0;
}
/* default cho mọi text không set tracking riêng */
body{ letter-spacing:-0.03em; }

/* siết lại section "AI PASSPORT LÀ GÌ" (đè giá trị cũ, cascade sau thắng) */
.aip-whatis__eyebrow{ letter-spacing:0; }   /* badge — không giãn (bỏ tracking uppercase) */
.aip-whatis__title{ letter-spacing:-.03em; }
.aip-whatis__subtitle{ letter-spacing:-.04em; } /* body ~ -4% như Figma */
.aip-whatis__stat-value{ letter-spacing:-.02em; }
.aip-whatis__stat-label{ letter-spacing:.03em; } /* uppercase label — giảm từ .06em */

/* ============================================================
   WEIGHT · BODY TEXT nhẹ 1 bậc (chốt 30/09/2026)
   400 (Regular) → 300 (Light) cho chữ chạy — nét 400 quá dày.
   RULE MẶC ĐỊNH web AIP: mọi body/paragraph mới dùng 300.
   Heading/label giữ weight riêng (700/600/500...). Cần load 300 ở <head>.
   ============================================================ */
:root{ --font-weight-normal:300; }
body{ font-weight:300; }
.aip-whatis__subtitle{ font-weight:300; }

/* ============================================================
   SECTION · NEWS (clone i-chang NCA, rebrand AIP) — dưới hero.
   Giữ bố cục/kích cỡ gốc; đổi FONT (Inter EN / Be Vietnam Pro VI) + MÀU (navy/Signal Red) qua token + scoped.
   ============================================================ */
.aip-news{ background:#fff; border-top:none; border-bottom:none; }
.aip-news .p-top-section__heading-main{ font-family:"Inter",sans-serif; color:var(--color-dark); letter-spacing:-.02em; }
.aip-news .p-top-section__heading-sub{ font-family:"Be Vietnam Pro",sans-serif; color:var(--color-red); font-weight:700; }
.aip-news .c-news-list__item-heading{ font-family:"Be Vietnam Pro",sans-serif; color:var(--color-dark); font-weight:600; letter-spacing:-.01em; }
.aip-news .c-news-list__item-check{ background:var(--color-red); font-family:"Inter",sans-serif; border-radius:50%; }
.aip-news .c-news-list__item-date,
.aip-news .c-news-list__item-date-y,
.aip-news .c-news-list__item-date-md{ color:var(--color-dark); font-family:"Inter",sans-serif; }
.aip-news .c-button-circle{ --color-course:var(--color-red); }
/* bỏ đường line dọc ngăn giữa heading và danh sách tin */
.aip-news .p-top-news__body{ border-left:none; }

/* Button CTA (c-button-square: Tài liệu / Kiểm tra năng lực / Về AIP / Đăng ký ngay):
   BO TRÒN HẲN (pill) + khoảng cách giữa 2 nút header = 10px. */
.c-button-square,
.c-button-square__inner{ border-radius:999px; }
.l-header__button,
.p-top-kv__footer-button{ -webkit-column-gap:10px; -moz-column-gap:10px; column-gap:10px; }
/* Drawer mobile: 3 nút CTA trả về NGUYÊN GỐC NCA — KHÔNG bo góc, KHÔNG khoảng cách, KHÔNG padding thêm.
   (bo góc scope riêng drawer để KHÔNG đụng pill ở header / news / hero.) */
.l-gnav__button{ padding:0; -webkit-column-gap:0; -moz-column-gap:0; column-gap:0; }
.l-gnav__button .c-button-square,
.l-gnav__button .c-button-square__inner{ border-radius:0; }
/* giữ chữ nút drawer xuống dòng để không bị cắt (fix cũ, không liên quan bo/gap) */
.l-gnav__button .c-button-label{ white-space:normal; line-height:1.2; text-align:center; }
/* badge "MỚI" trong drawer: bo tròn (pill) */
.l-gnav__menu-item-label-topic{ border-radius:999px; }
/* badge "MỚI" ở banner promo đầu drawer (ô vuông 60×60 .l-gnav__topics-label): bo tròn */
.l-gnav__topics-label{ border-radius:999px; }
/* Nút header: ÉP cao 60px cả 2 trạng thái (chưa cuộn 80→60 vì to). Nút gốc bị kéo giãn 100% theo header → ép height. */
.l-header__button{ -webkit-box-align:center; -ms-flex-align:center; align-items:center; }
.l-header__button .l-header__button-item{ height:60px; }
.l-header__button .c-button-square{ height:60px; box-sizing:border-box; padding-top:10px; padding-bottom:10px; }
.is-scrolled .l-header__button .c-button-square{ padding-top:20px; padding-bottom:20px; }
/* Header pill (bo MAX) CHỈ áp desktop; mobile giữ bình thường (không bo góc theo yêu cầu). */
@media (min-width:1025px){ .l-header__inner{ border-radius:999px; } }
/* Hộp logo (title-mark) có nền trắng full-height sát mép trái → che góc bo trái của pill khi cuộn.
   Bỏ nền hộp đó (lúc cuộn header đã trắng nên trong suốt vẫn đúng) → góc trái pill lộ tròn. */
/* Các tinh chỉnh cho pill header CHỈ desktop (mobile giữ bình thường) */
@media (min-width:1025px){
  .is-scrolled .l-header__title-mark{ background:transparent; }
  /* Khi cuộn: pill bo tròn mạnh → logo sát mép cong. Lùi logo vào +20px cho thoáng. */
  .is-scrolled .l-header__title{ margin-left:20px; }
}

/* ── Accordion drawer mobile (JS toggle height 0↔auto) ─────────────────────
   NCA gốc dùng JS set height động; bản dựng này port module Accordion trong nca.js.
   Thêm transition để height/opacity + chevron mở mượt. */
.l-gnav__dropdown{ transition:height .34s cubic-bezier(.4,0,.2,1), opacity .28s ease; }
.l-gnav__menu-dropdown-trigger-icon{ transition:transform .3s ease; }
.js-accordion.is-open .l-gnav__menu-dropdown-trigger-icon{ transform:rotate(180deg); }

/* ============================================================
   SECTION · "CẢM ƠN" + footer  (clone ut-ec.co.jp/20th → rebrand AIP)
   Ảnh team trên nền TRẮNG · Trust Navy #071B3B dâng phủ ~3/10 đáy ảnh ·
   36 tia sáng dọc động (aipMoveGrad) chỉ ở vùng CẢM ƠN · vòm cong arc ·
   footer logo AIP + social + trang chủ + copyright. Font Be Vietnam Pro.
   ============================================================ */
.aip-ty{ position:relative; overflow:hidden; background:#fff; color:#fff; }
.aip-ty__photo{ position:relative; z-index:2; padding:80px clamp(16px,5.1vw,80px) 0; }
.aip-ty__photo img, .aip-ty__photo video{ display:block; width:100%; aspect-ratio:1344 / 672; object-fit:cover; object-position:center; border-radius:24px; }

.aip-ty__body{
  position:relative; z-index:1; overflow:hidden;
  background:var(--color-dark);                      /* Trust Navy đặc, hoà với footer */
  margin-top:clamp(-240px,-13.5vw,-110px);           /* navy dâng phủ đáy ảnh */
  padding-top:clamp(150px,16vw,300px);
}
.aip-ty__rays{
  position:absolute; inset:0; z-index:0; display:flex; pointer-events:none;
  /* navy đặc ở vùng ảnh bleed (top ~16vw) → tia sáng chỉ từ vùng CẢM ƠN trở xuống */
  -webkit-mask:linear-gradient(180deg, transparent 0, transparent max(130px,16vw), #000 max(205px,23vw), #000 100%);
          mask:linear-gradient(180deg, transparent 0, transparent max(130px,16vw), #000 max(205px,23vw), #000 100%);
}
.aip-ty__rays i{
  display:block; flex:1 1 2.7778%; height:100%;
  background:linear-gradient(0deg, rgba(170,210,245,.26) 0%, rgba(170,210,245,0) 100%);
  background-size:100% 600%; background-position:50% 0%;
  box-shadow:0 0 22px rgba(170,210,245,.06);
  animation:aipMoveGrad 4.6s ease infinite;
}
@keyframes aipMoveGrad{ 0%{background-position:50% 0%} 50%{background-position:50% 100%} 100%{background-position:50% 0%} }
.aip-ty__rays i:nth-child(6n+1){animation-duration:5.3s}
.aip-ty__rays i:nth-child(6n+2){animation-duration:4.2s}
.aip-ty__rays i:nth-child(6n+3){animation-duration:3.5s}
.aip-ty__rays i:nth-child(6n+4){animation-duration:4.7s}
.aip-ty__rays i:nth-child(6n+5){animation-duration:5.4s}
.aip-ty__rays i:nth-child(6n)  {animation-duration:3.9s}

.aip-ty__top{ position:relative; z-index:2; text-align:center; padding:clamp(20px,4vh,56px) 24px clamp(32px,5vh,72px); }
.aip-ty__top::before{
  content:""; position:absolute; left:0; right:0; top:0; bottom:22%; z-index:-1; pointer-events:none;
  background:linear-gradient(180deg, rgba(7,27,59,.96) 0%, rgba(7,27,59,.92) 40%, rgba(7,27,59,.5) 76%, rgba(7,27,59,0) 100%);
}
.aip-ty__top-inner{ max-width:1100px; margin:0 auto; }
.aip-ty__copy{ margin:0; }
.aip-ty__copy p, .aip-ty__lead{ margin:0; font-family:var(--font-family-sans); font-size:16px; font-weight:300; line-height:1.7; letter-spacing:-.02em; color:#fff; }
.aip-ty__lead{ margin-top:30px; }
.aip-ty__message{ margin:clamp(24px,4vh,52px) 0 0; font-family:var(--font-family-sans); font-size:clamp(56px,8.5vw,90px); font-weight:700; line-height:1.02; letter-spacing:-.03em; color:#fff; }

.aip-ty__footer{ position:relative; z-index:1; }
.aip-ty__arc{ position:relative; width:100%; height:clamp(110px,13.9vw,210px); overflow:hidden; margin-bottom:-1px; }
.aip-ty__arc svg{ display:block; width:100%; height:auto; }
.aip-ty__arc path{ fill:var(--color-dark); }
.aip-ty__footer-body{ background:var(--color-dark); padding:clamp(16px,3vh,44px) clamp(24px,6vw,90px) clamp(44px,6vh,90px); }
.aip-ty__footer-inner{ max-width:1320px; margin:0 auto; }
.aip-ty__footer-row{ display:flex; align-items:center; justify-content:space-between; gap:24px; }
.aip-ty__footer-row--top{ padding-bottom:26px; }
.aip-ty__footer-row--bottom{ padding-top:22px; }
.aip-ty__logo{ display:flex; align-items:center; gap:12px; }
.aip-ty__logo img{ height:46px; width:auto; }
.aip-ty__logo span{ font-family:var(--font-family-eng); font-size:22px; font-weight:700; letter-spacing:.02em; color:#fff; }
.aip-ty__social{ display:flex; align-items:center; gap:14px; }
.aip-ty__social a{ width:44px; height:44px; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.14); color:#fff; text-decoration:none; transition:background .25s ease; }
.aip-ty__social a:hover{ background:rgba(255,255,255,.28); }
.aip-ty__social svg{ width:17px; height:17px; fill:#fff; }
.aip-ty__footer-divider{ height:1px; background:rgba(255,255,255,.22); }
.aip-ty__official{ font-family:var(--font-family-sans); font-size:15px; font-weight:500; color:#fff; text-decoration:none; letter-spacing:-.01em; }
.aip-ty__official:hover{ opacity:.75; }
.aip-ty__copyright{ margin:0; font-family:var(--font-family-sans); font-size:12px; font-weight:300; line-height:1.9; letter-spacing:-.01em; color:rgba(255,255,255,.66); }
@media (prefers-reduced-motion:reduce){ .aip-ty__rays i{ animation:none; } }
@media (max-width:720px){ .aip-ty__footer-row{ flex-direction:column; align-items:flex-start; gap:16px; } }
/* FIX mobile: màn hẹp SVG dome thấp hơn clamp-height → dư đáy container lộ rays (vệt hở).
   Cho arc cao khít đúng SVG để không còn khoảng trống dưới vòm. */
@media (max-width:600px){ .aip-ty__arc{ height:auto; } }
/* mobile: 3 dòng lời cảm ơn viết LIỀN (không ép ngắt từng câu, để chữ chảy tự nhiên) */
@media (max-width:720px){
  .aip-ty__copy p{ display:inline; }
  .aip-ty__copy p::after{ content:" "; }
}


/* ── Header andrew mới (fixed, reserve 120px desktop / 60px ≤1250) + hero NẰM TRỌN 1 màn hình ──
   hero = 100svh − chiều cao header → header + hero = đúng 100svh (không tràn). */
.p-top-kv{ height:calc(100dvh - 120px); }
@media (max-width:1250px){ .p-top-kv{ height:calc(100dvh - 60px); } }
/* Bỏ padding-top reserve của .l-wrapper (leftover header NCA cũ dùng --header-height) — header andrew mới đã reserve qua #ly_header */
#wrapper.l-wrapper{ padding-top:0; }


/* ── Footer CTA bar đã bỏ → dời nội dung hero xuống sát đáy (offset bottom gốc chừa footer ~13rem) ── */
/* Footer bỏ → ảnh hero phủ 100% (var footer-height=0, không còn hở dải overlay-color ở đáy) */
.p-top-kv{ --kv-footer-height:0px; }
@media (min-width:1025px){ .p-top-kv__heading, .p-top-kv__block{ bottom:5rem; } }
/* mobile: GIỮ heading như gốc (tránh đè category), chỉ hạ block (category+progress) xuống sát đáy */
@media (max-width:1024px){ .p-top-kv__block{ bottom:5rem; } }
@media (max-width:767px){ .p-top-kv__block{ bottom:4rem; } }
