@font-face {
  font-family: "Plus Jakarta Sans Variable";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-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: "Plus Jakarta Sans Variable";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0;
}
@font-face {
  font-family: "Plus Jakarta Sans Variable";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-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;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-ext-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --font-sans: "Plus Jakarta Sans Variable", "Segoe UI", sans-serif;
  --font-editorial: "Instrument Serif", Georgia, serif;
  --canvas: #0a0e18;
  --surface: #121a2a;
  --ink: #edf2ff;
  --muted: #aab7cf;
  --line: #bbd1fc24;
  --subtle: #18243a;
  --glass: #111a2bea;
  --accent: #a9c8ff;
  --accent-deep: #7498f4;
  --chip: #1a2940;
  --ground: #0c1423;
  --shadow: 0 6px 28px #0206125c;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.22, 1.24, .36, 1);
  --page-width: 1240px;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #f2f5fb;
  --surface: #ffffff;
  --ink: #172235;
  --muted: #4f5e75;
  --line: #152b4a20;
  --subtle: #e9eff9;
  --glass: #f9fbffec;
  --chip: #e6edf8;
  --ground: #eaf0fa;
  --shadow: 0 4px 24px #122e5712;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(ellipse 72% 460px at 50% 0%, #233e6f4c, transparent 100%), var(--canvas);
  color: var(--ink);
  transition: background-color .28s var(--ease), color .24s;
  overflow-x: hidden;
}
:root[data-theme="light"] body { background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; color: inherit; }

.wrap { width: min(calc(100% - 40px), var(--page-width)); margin-inline: auto; }

/* Floating 2-Tier Chrome */
.chrome {
  position: sticky; top: 12px; z-index: 50; margin-top: 16px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 20px;
  backdrop-filter: blur(24px); box-shadow: var(--shadow);
}
.chrome-top {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 15px; flex-wrap: wrap;
}
.chrome-left, .chrome-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.15rem; font-weight: 810; letter-spacing: -.055em; }
.brand i { font-family: var(--font-editorial); font-size: 1.28em; font-weight: 400; color: var(--accent); }
:root[data-theme="light"] .brand i { color: #3d68bb; }
.brand-mark {
  display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px;
  background: #111623; color: #a9c8ff; border: 1px solid #9ebeff30;
}
.divider-v { width: 1px; height: 22px; background: var(--line); margin-inline: 2px; }
.portfolio-chip {
  font-size: .78rem; font-weight: 680; color: var(--muted); padding: 6px 10px;
  border-radius: 10px; transition: background-color .18s, color .18s;
}
.portfolio-chip:hover { background: var(--subtle); color: var(--ink); }

.lang-switch {
  display: inline-flex; padding: 3px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--line);
}
.lang-switch a {
  padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 760; color: var(--muted);
}
.lang-switch a[aria-current="page"] { background: #213454; color: #fff; }
:root[data-theme="light"] .lang-switch a[aria-current="page"] { background: #111; color: #fff; }

.chrome-bottom {
  border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 6px 14px 8px; flex-wrap: wrap;
}
.main-nav { position: relative; display: flex; align-items: center; gap: 3px; padding: 3px; }
.main-nav a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; font-size: .81rem; font-weight: 740; color: var(--muted);
  transition: color .2s, transform .2s var(--spring);
}
.main-nav a:active { transform: scale(.95); }
.main-nav a[aria-current="location"] { color: #fff; }
.selected-pill, .ghost-pill {
  position: absolute; top: 3px; height: 33px; border-radius: 999px; pointer-events: none;
}
.selected-pill {
  background: #213454; box-shadow: inset 0 0 0 1px #9ebeff40;
  transition: transform .35s var(--spring), width .35s var(--spring);
}
:root[data-theme="light"] .selected-pill { background: #111; box-shadow: none; }
.ghost-pill {
  opacity: 0; background: #ffffff14;
  transition: transform .25s var(--spring), width .25s var(--spring), opacity .18s;
}
:root[data-theme="light"] .ghost-pill { background: #1111110e; }
.ghost-pill.visible { opacity: 1; }

.status-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 680; color: var(--muted);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #7bb3ff; box-shadow: 0 0 0 3px #7bb3ff2a; display: inline-block; }

/* Buttons */
.button {
  min-height: 38px; display: inline-flex; align-items: center; justify-content: center;
  position: relative; gap: 7px; padding: 0 15px; border-radius: 11px;
  border: 1px solid transparent; font-size: .83rem; font-weight: 750; white-space: nowrap;
  transition: background-color .2s, border-color .2s, box-shadow .22s, transform .22s var(--spring), translate .22s var(--ease);
}
.button:active { transform: scale(.955) !important; }
.button-secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.button-secondary:hover { background: var(--subtle); translate: 0 -1px; }
.button-icon { width: 38px; min-width: 38px; padding: 0; border-radius: 50%; background: var(--subtle); border-color: var(--line); }
.button-icon:hover { background: var(--chip); }
.button-primary {
  isolation: isolate; overflow: hidden; color: #0b1730; border-color: #c1d8ff66;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}
.button-primary::after {
  content: ""; position: absolute; inset: -30% 0; width: 45%;
  background: linear-gradient(90deg, transparent, #ffffff99, transparent);
  transform: translateX(-140%) skewX(-23deg); transition: transform .54s var(--ease); z-index: -1;
}
.button-primary:hover { translate: 0 -1.5px; box-shadow: 0 7px 20px #6a9dff52; }
.button-primary:hover::after { transform: translateX(310%) skewX(-23deg); }

/* Bento */
.bento {
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow);
  transition: border-color .22s, box-shadow .24s, translate .24s var(--ease);
}
.bento:hover { translate: 0 -2px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* Sections & Hero */
main { padding-block: 30px 44px; display: grid; gap: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 790; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 10px; }

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); gap: 22px; align-items: center;
}
.hero h1 {
  margin: 0; font-size: clamp(2.4rem, 4.4vw, 4.1rem); font-weight: 810; line-height: 1.08; letter-spacing: -.06em;
}
.hero h1 em {
  position: relative; display: inline-block; isolation: isolate; margin-left: .06em;
  font: italic 400 1.15em/.95 var(--font-editorial); color: #c4dbff; letter-spacing: -.02em;
}
:root[data-theme="light"] .hero h1 em { color: #2a52a1; }
.hero h1 em .float-text { position: relative; display: inline-block; animation: text-drift 11s ease-in-out infinite; }
.hero h1 em .float-text::after {
  content: ""; position: absolute; inset: 74% -3px 0; background: #7aa5ff36;
  border-radius: 32% 9% 23% 14%; transform: rotate(-2.8deg); z-index: -1;
}
@keyframes text-drift {
  0%,100% { transform: translate3d(0,0,0) rotate(-.24deg); }
  25% { transform: translate3d(2px,-4px,0) rotate(.55deg); }
  51% { transform: translate3d(0,-1px,0) rotate(.3deg); }
  76% { transform: translate3d(-2px,3px,0) rotate(-.52deg); }
}
.hero-desc { font-size: .98rem; line-height: 1.65; color: var(--muted); max-width: 58ch; margin: 14px 0 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.build-meta { font-size: .78rem; color: var(--muted); margin-top: 12px; }

/* Floating Stickers Cluster */
.sticker-cloud {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 11px; padding: 14px;
}
.sticker {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 13px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(14px); box-shadow: 0 12px 26px #04091a38;
  font-size: .79rem; font-weight: 740; color: var(--ink);
  transition: transform .24s var(--spring), border-color .22s, box-shadow .24s;
}
.sticker:hover { animation-play-state: paused; transform: translateY(-4px) scale(1.06) rotate(0deg) !important; border-color: #9ec0ff78; }
.sticker.lit { background: linear-gradient(135deg, #213a66, #182b4c); border-color: #8bb8ff88; color: #eef5ff; }
.s1 { animation: sf1 7.2s ease-in-out infinite; }
.s2 { animation: sf2 8.4s ease-in-out infinite -2s; }
.s3 { animation: sf3 6.8s ease-in-out infinite -3.5s; }
.s4 { animation: sf2 9.1s ease-in-out infinite -1s; }
.s5 { animation: sf1 7.9s ease-in-out infinite -4s; }
@keyframes sf1 { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(-1deg); } }
@keyframes sf2 { 0%,100% { transform: translateY(0) rotate(3.8deg); } 50% { transform: translateY(-9px) rotate(1deg); } }
@keyframes sf3 { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(7px) rotate(2deg); } }

/* 4 KPI Fact Cards */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.fact { padding: 18px 20px; position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 6px; }
.fact-primary {
  background: linear-gradient(142deg, #223a63, #192b4b 65%, #162237);
  border-color: #93b9fc65; color: #eaf2ff;
}
.fact-primary::after {
  content: ""; position: absolute; z-index: -1; top: -45%; left: 45%; width: 22%; height: 220%;
  background: linear-gradient(90deg, #a3c1ff06, #bdd2ff28 45%, #aac4ff12); transform: rotate(42deg);
}
.fact-label { font-size: .78rem; font-weight: 720; color: var(--muted); }
.fact-primary .fact-label { color: #c7daf5; }
.fact-val {
  display: inline-block;
  width: fit-content;
  font-size: clamp(1.6rem, 2.5vw, 2.3rem);
  font-weight: 820;
  letter-spacing: -.065em;
  line-height: 1.05;
  transform-origin: 35% 60%;
  will-change: transform;
  animation: stat-float 6.8s ease-in-out infinite;
}
.facts .fact:nth-child(2) .fact-val { animation-duration: 7.6s; animation-delay: -1.8s; }
.facts .fact:nth-child(3) .fact-val { animation-duration: 8.3s; animation-delay: -3.7s; }
.facts .fact:nth-child(4) .fact-val { animation-duration: 7.1s; animation-delay: -5.1s; }
.fact:hover .fact-val { animation-play-state: paused; transform: translate3d(0, -3px, 0) scale(1.03); transition: transform .24s var(--spring); }
@keyframes stat-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-.35deg); }
  30% { transform: translate3d(2px, -4px, 0) rotate(.55deg); }
  65% { transform: translate3d(-1.5px, 2.5px, 0) rotate(-.45deg); }
}
@media (prefers-reduced-motion: reduce) {
  .float-text, .sticker, .fact-val { animation: none !important; }
}
.fact-note { font-size: .75rem; color: var(--muted); }
.fact-primary .fact-note { color: #bdd3f4; }

/* Showcase Screenshot Bento */
.showcase { padding: 20px; display: grid; gap: 14px; }
.showcase-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.shot-frame {
  position: relative; border-radius: 15px; overflow: hidden; border: 1px solid #abbff444;
  background: #0a0e18; cursor: zoom-in;
}
.shot-frame img { width: 100%; height: auto; display: block; transition: scale .36s var(--ease); }
.shot-frame:hover img { scale: 1.012; }
.zoom-pill {
  position: absolute; right: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px;
  background: #0a1122cc; color: #eef4ff; border: 1px solid #ffffff28; font-size: .75rem; font-weight: 720; backdrop-filter: blur(8px);
}

/* Feature Grid */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: clamp(1.65rem, 2.6vw, 2.35rem); font-weight: 800; letter-spacing: -.055em; }
.section-head h2 em { font: italic 400 1.18em/.9 var(--font-editorial); color: var(--accent); }
:root[data-theme="light"] .section-head h2 em { color: #2a52a1; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.feat-card { padding: 20px 22px; display: grid; gap: 8px; align-content: start; }
.feat-num {
  width: fit-content; font-size: .68rem; font-weight: 790; padding: 3px 8px; border-radius: 999px;
  background: var(--chip); color: var(--muted); letter-spacing: .08em;
}
.feat-card h3 { margin: 2px 0 0; font-size: 1.02rem; font-weight: 770; letter-spacing: -.03em; }
.feat-card p { margin: 0; font-size: .85rem; line-height: 1.6; color: var(--muted); }

/* Setup & Download Two-Col */
.two-col { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.panel { padding: 22px 24px; display: grid; gap: 14px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.step-n {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--chip); color: var(--accent); font-weight: 800; font-size: .82rem;
}
:root[data-theme="light"] .step-n { color: #2a52a1; }
.steps h3 { margin: 0 0 3px; font-size: .92rem; font-weight: 760; }
.steps p { margin: 0; font-size: .84rem; color: var(--muted); line-height: 1.55; }

.spec-dl { margin: 0; display: grid; }
.spec-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.spec-dl dt { color: var(--muted); }
.spec-dl dd { margin: 0; font-weight: 760; text-align: right; }

.checksum-box {
  padding: 13px 15px; border-radius: 14px; background: var(--ground); border: 1px solid var(--line); display: grid; gap: 8px;
}
.checksum-head { display: flex; justify-content: space-between; align-items: center; font-size: .76rem; font-weight: 720; color: var(--muted); }
.checksum-code { font-family: ui-monospace, Consolas, monospace; font-size: .76rem; word-break: break-all; color: var(--accent); }
:root[data-theme="light"] .checksum-code { color: #214998; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); padding: 14px 18px; }
.faq summary { font-weight: 740; font-size: .92rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: "+"; font-size: 1.2rem; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 10px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.6; }

footer {
  border-top: 1px solid var(--line); padding: 20px 0 30px; color: var(--muted); font-size: .79rem;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Dialog & Toast */
dialog.img-modal {
  border: 0; padding: 0; background: transparent; max-width: min(1080px, 94vw);
}
dialog.img-modal::backdrop { background: #04091acc; backdrop-filter: blur(8px); }
.modal-box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 10px; }
.modal-box img { width: 100%; height: auto; border-radius: 12px; display: block; }
.modal-top { display: flex; justify-content: space-between; align-items: center; }

.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  padding: 10px 15px; border-radius: 12px; background: #1a2a47; color: #fff;
  border: 1px solid #9ebeff40; font-size: .82rem; font-weight: 680;
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: all .22s var(--ease);
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 960px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .facts, .feature-grid { grid-template-columns: 1fr; }
}
