/* ------------------------------------------------------------ fonts */
@font-face { font-family: "Be Vietnam Pro"; font-weight: 400; font-display: swap; src: url("../fonts/BeVietnamPro-Regular.ttf") format("truetype"); }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 600; font-display: swap; src: url("../fonts/BeVietnamPro-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 700; font-display: swap; src: url("../fonts/BeVietnamPro-Bold.ttf") format("truetype"); }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 800; font-display: swap; src: url("../fonts/BeVietnamPro-ExtraBold.ttf") format("truetype"); }

/* ------------------------------------------------------------ tokens */
:root {
  --blue: #0f75bd;
  --blue-deep: #0b5c98;
  --navy: #0a2c57;
  --ink: #14243b;
  --muted: #55657a;
  --paper: #f6f3ec;
  --card: #ffffff;
  --line: #e3e0d8;
  --desk: #eceae4;
  --c-video: #0f75bd;
  --c-q1: #31bee9;
  --c-q2: #f9c51c;
  --c-q3: #f9c51c;
  --c-q4: #f48615;
  --c-q5: #eb5729;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(10, 44, 87, .06), 0 8px 24px rgba(10, 44, 87, .08);
  --wrap: 1180px;
  color-scheme: light;
}

.c-video { --c: var(--c-video); --on-c: #fff; }
.c-q1 { --c: var(--c-q1); --on-c: var(--navy); }
.c-q2 { --c: var(--c-q2); --on-c: var(--navy); }
.c-q3 { --c: var(--c-q3); --on-c: var(--navy); }
.c-q4 { --c: var(--c-q4); --on-c: var(--navy); }
.c-q5 { --c: var(--c-q5); --on-c: #fff; }

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { -webkit-user-drag: none; user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #ffb703; outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--navy); color: #fff; border-radius: 8px; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ top bar */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 18px; padding-block: 14px; }
.logo { height: 52px; width: auto; flex: none; }
.org { display: flex; flex-direction: column; line-height: 1.3; padding-left: 18px; border-left: 2px solid var(--line); }
.org-1 { font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--navy); }
.org-2 { font-size: 18px; font-weight: 800; letter-spacing: .02em; color: var(--blue); }

/* ------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 140% at 10% 0%, #1a86d1 0%, var(--blue) 45%, var(--blue-deep) 100%); }
.hero-in { position: relative; z-index: 1; padding: 76px 160px 72px 0; }
.mosaic { position: absolute; top: 0; right: 0; bottom: 0; width: 120px; background: url("../img/mosaic-v.svg") center / 100% 100% no-repeat; }
.eyebrow { display: flex; align-items: center; gap: 14px; margin: 0 0 26px; font-size: 19px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: #cfe9fb; }
.eyebrow-line { width: 44px; height: 3px; border-radius: 2px; background: #f7931e; }
.hero-title { margin: 0; display: flex; flex-direction: column; }
.t-num { font-size: clamp(64px, 11vw, 132px); font-weight: 800; line-height: .92; letter-spacing: -.03em; }
.t-main { margin-top: 22px; font-size: clamp(26px, 4vw, 46px); font-weight: 800; line-height: 1.3; text-transform: uppercase; letter-spacing: .01em; }
.t-sub { margin-top: 18px; font-size: clamp(17px, 2.1vw, 23px); font-weight: 600; line-height: 1.5; color: #ffe39a; }
.stages { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 52px 0 0; padding: 0; max-width: 980px; }
.stages li { position: relative; display: flex; flex-direction: column; gap: 12px; font-size: 14px; font-weight: 600; line-height: 1.5; padding-right: 12px; }
.stages li::before { content: ""; position: absolute; top: 17px; left: 36px; right: 0; border-top: 2px dashed rgba(255, 255, 255, .45); }
.stages li:last-child::before { display: none; }
.stages .n { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 800; color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.stages .s1 .n { background: var(--c-q1); }
.stages .s2 .n { background: var(--c-q2); color: var(--navy); }
.stages .s3 .n { background: var(--c-q4); }
.stages .s4 .n { background: #ef6a2c; }
.stages .s5 .n { background: #e5323b; }
.hero-quote { margin: 40px 0 0; max-width: 720px; font-style: italic; font-size: 17px; line-height: 1.75; color: #e5f2fc; }

/* ------------------------------------------------------------ parts */
.parts { padding-block: 32px 56px; display: flex; flex-direction: column; gap: 22px; }
.notice { margin: 0; padding: 14px 18px; border-radius: 12px; background: #fff4e5; color: #7a4100; font-weight: 600; }
.part { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.part::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); }
.part-head { position: relative; }
.part-h { margin: 0; font: inherit; }
.part-bar { display: flex; align-items: center; gap: 18px; width: 100%; padding: 20px 22px 20px 30px; border: 0; background: none; text-align: left; transition: background .15s; }
.part:not(.is-open) .part-bar:hover { background: color-mix(in srgb, var(--c) 7%, #fff); }
.part.is-open .part-bar { cursor: default; padding-right: 150px; }
.badge { flex: none; min-width: 104px; text-align: center; padding: 7px 14px; border-radius: 999px; background: var(--c); color: var(--on-c); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.part-titles { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.part-name { font-size: clamp(18px, 2.2vw, 22px); font-weight: 700; line-height: 1.3; color: var(--navy); }
.chev { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); color: var(--navy); transition: border-color .15s, background .15s; }
.part-bar:hover .chev { border-color: var(--c); }
.part.is-open .chev { display: none; }
.chev svg, .part-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.part-close { position: absolute; top: 50%; right: 22px; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 8px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; color: var(--navy); }
.part-close:hover { border-color: var(--c); }
.part-close svg { transform: rotate(180deg); }
.part-body { padding: 0 22px 22px 30px; }

/* ------------------------------------------------------------ video */
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.player video { display: block; width: 100%; height: 100%; background: #000; }

/* ------------------------------------------------------------ book viewer */
.viewer { background: var(--desk); border-radius: 14px; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.stage { position: relative; height: min(78vh, 900px); min-height: 360px; overflow: hidden; outline: none; touch-action: pan-y pinch-zoom; }
.stage:focus-visible { box-shadow: inset 0 0 0 3px #ffb703; }
.stage.zoomed { overflow: auto; touch-action: auto; cursor: grab; }
.stage.zoomed.dragging { cursor: grabbing; }
.sheet { position: relative; min-width: 100%; min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 18px 64px; }
.sheet canvas { display: block; flex: none; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .08), 0 14px 36px rgba(0, 0, 0, .14); border-radius: 3px; }
.stage.zoomed .sheet { align-items: flex-start; justify-content: flex-start; width: max-content; padding: 18px; }
.shield { position: absolute; inset: 0; }
.stage.zoomed .shield { display: none; }
.nav { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--navy); box-shadow: 0 2px 10px rgba(0, 0, 0, .15); transition: opacity .15s, transform .15s; }
.nav:hover { transform: translateY(-50%) scale(1.06); }
.nav:disabled { visibility: hidden; }
.nav.prev { left: 10px; }
.nav.next { right: 10px; }
.nav svg, .tb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.spinner { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 4px solid rgba(15, 117, 189, .2); border-top-color: var(--blue); animation: spin .8s linear infinite; z-index: 3; }
@keyframes spin { to { transform: rotate(360deg); } }

.toolbar { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); }
.tb { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; border: 0; background: transparent; color: var(--navy); font-size: 14px; font-weight: 600; }
.tb:hover:not(:disabled) { background: #f0f4f8; }
.tb:disabled { opacity: .35; cursor: default; }
.tb[aria-pressed="true"] { background: #e6f1fa; color: var(--blue); }
.tb-sep { width: 1px; height: 24px; margin: 0 6px; background: var(--line); }
.pageno { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.pageno input { width: 56px; height: 36px; border: 1.5px solid var(--line); border-radius: 8px; text-align: center; font: inherit; font-weight: 700; color: var(--ink); }
.pageno input:focus { border-color: var(--blue); outline: none; }
.zoom-val { min-width: 52px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.only-wide { display: inline-grid; }

.thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 14px; background: #fff; border-top: 1px solid var(--line); scroll-snap-type: x proximity; }
.thumb { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 8px; background: none; scroll-snap-align: center; }
.thumb img, .thumb .ph { display: block; width: 84px; height: 104px; object-fit: cover; border-radius: 3px; background: #eef1f4; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.thumb span { font-size: 12px; font-weight: 600; color: var(--muted); }
.thumb.current { border-color: var(--c); }
.thumb.current span { color: var(--ink); }

/* fullscreen */
.viewer:fullscreen { display: flex; flex-direction: column; border-radius: 0; background: #2b2f36; }
.viewer:fullscreen .stage { flex: 1; height: auto; }
.viewer:-webkit-full-screen { display: flex; flex-direction: column; width: 100%; height: 100%; border-radius: 0; background: #2b2f36; }
.viewer:-webkit-full-screen .stage { flex: 1; height: auto; }

/* ------------------------------------------------------------ footer */
.footer { background: var(--navy); color: #c9d6e6; }
.footer-band { height: 12px; background: url("../img/mosaic-h.svg") center / 100% 100% no-repeat; }
.copyright { margin: 0 auto; padding-block: 22px; text-align: center; font-size: 14px; line-height: 1.6; }

/* ------------------------------------------------------------ small screens */
@media (max-width: 900px) {
  .hero-in { padding-right: 70px; }
  .mosaic { width: 48px; }
  .stages { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stages li { font-size: 12.5px; }
}
@media (max-width: 640px) {
  .topbar-in { gap: 12px; }
  .logo { height: 38px; }
  .org { padding-left: 12px; }
  .org-1 { font-size: 11.5px; }
  .org-2 { font-size: 13.5px; }
  .hero-in { padding: 52px 44px 52px 0; }
  .mosaic { width: 28px; }
  .stages { grid-template-columns: 1fr; gap: 10px; max-width: none; }
  .stages li { flex-direction: row; align-items: center; gap: 12px; font-size: 14px; }
  .stages li::before { display: none; }
  .stages .n { width: 30px; height: 30px; flex: none; }
  .part-bar { flex-wrap: wrap; gap: 10px 14px; padding: 16px 16px 16px 22px; }
  .part.is-open .part-bar { padding-right: 16px; }
  .part-titles { flex-basis: 100%; order: 3; }
  .chev { margin-left: auto; width: 34px; height: 34px; }
  .part-close { top: 12px; right: 14px; transform: none; padding: 6px 10px 6px 12px; }
  .part-body { padding: 0 12px 14px 18px; }
  html { scroll-padding-top: 96px; }
  .stage { height: auto; aspect-ratio: 100 / 128; max-height: 80vh; }
  .sheet { padding: 12px 8px; }
  .nav { width: 40px; height: 40px; }
  .nav.prev { left: 4px; }
  .nav.next { right: 4px; }
  .only-wide { display: none; }
  .br-wide { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}

/* ------------------------------------------------------------ print */
.print-block { display: none; }
@media print {
  body > *:not(.print-block) { display: none !important; }
  .print-block { display: block !important; padding: 40px; font-size: 18px; }
}
