/* Live Drift Studio: nền đêm, một màu nhấn vàng đèn natri (cùng chất với hai game). */
:root {
  --bg: #0c0e13;
  --bg-2: #12141c;
  --panel: #161a22;
  --line: rgba(255, 255, 255, 0.09);
  --fg: #eceef2;
  --muted: #98a0b0;
  --accent: #ffb547;
  --accent-2: #ff8a3d;
  --violet: #b18cff;
  --radius: 20px;
  --wrap: 1120px;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.65 var(--body);
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}
.wrap {
  width: min(var(--wrap), 100% - 32px);
  margin-inline: auto;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  background: var(--accent);
  color: #111;
  padding: 10px 14px;
  border-radius: 10px;
}
.skip:focus {
  top: 12px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- đầu trang ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12, 14, 19, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-text b {
  font: 800 22px/1 var(--display);
  letter-spacing: 0.02em;
}
.brand-text em {
  font-style: normal;
  color: var(--accent);
}
.brand-text small {
  font: 700 10px/1 var(--body);
  letter-spacing: 0.42em;
  color: var(--muted);
  margin-top: 4px;
}
.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
}
.nav a:hover {
  color: var(--fg);
}
.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang button {
  border: 0;
  background: none;
  color: var(--muted);
  font: 700 13px/1 var(--body);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang button[aria-pressed='true'] {
  background: var(--accent);
  color: #111;
}
.menu {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.menu > span:not(.sr) {
  width: 18px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
}

/* ---------- mở đầu ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 96px;
}
.hero-bg i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--c);
  opacity: 0.16;
  filter: blur(40px);
  transform: translate(-50%, -50%);
  animation: drift 14s ease-in-out infinite alternate;
}
.hero-bg i:nth-child(2) {
  animation-duration: 18s;
}
.hero-bg i:nth-child(3) {
  animation-duration: 22s;
}
@keyframes drift {
  to {
    transform: translate(calc(-50% + 40px), calc(-50% - 24px));
  }
}
.hero-road {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 42%;
  opacity: 0.4;
}
.hero-road path {
  fill: none;
  stroke: rgba(255, 181, 71, 0.22);
  stroke-width: 46;
  stroke-linecap: round;
}
.hero-road .dash {
  stroke: rgba(12, 14, 19, 0.9);
  stroke-width: 3;
  stroke-dasharray: 26 22;
  animation: lane 3s linear infinite;
}
@keyframes lane {
  to {
    stroke-dashoffset: -48;
  }
}
.hero-in {
  position: relative;
}
.eyebrow {
  margin: 0 0 14px;
  font: 700 13px/1.2 var(--body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  font: 800 clamp(48px, 8vw, 96px) / 0.98 var(--display);
  letter-spacing: 0.005em;
  max-width: 16ch;
}
h1 span {
  color: var(--accent);
}
h2 {
  font: 800 clamp(36px, 5vw, 56px) / 1.02 var(--display);
  margin-bottom: 18px;
}
.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: #c9cdd6;
  max-width: 60ch;
  margin: 22px 0 0;
}
.lead.narrow {
  max-width: 62ch;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn.primary {
  background: linear-gradient(135deg, #ffd38a, var(--accent) 45%, var(--accent-2));
  color: #1a1206;
  box-shadow: 0 10px 30px -10px rgba(255, 181, 71, 0.6);
}
.btn.primary:hover {
  transform: translateY(-2px);
}
.btn.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.07);
}
.btn.big {
  min-height: 60px;
  font-size: 19px;
  padding: 0 32px;
  margin-top: 30px;
  overflow-wrap: anywhere;
}
.facts {
  list-style: none;
  padding: 0;
  margin: 56px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.facts li {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(22, 26, 34, 0.6);
  min-width: 170px;
}
.facts b {
  font: 800 28px/1 var(--display);
  color: var(--fg);
}
.facts span {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

/* ---------- game ---------- */
section {
  scroll-margin-top: 72px;
}
.games,
.studio,
.way,
.contact {
  padding: 96px 0;
}
.games {
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
}
.game {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 56px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
}
.game.flip .game-media {
  order: 2;
}
.game-hero {
  border-radius: 18px;
  border: 1px solid var(--line);
  width: 100%;
}
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.shots button {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: none;
  cursor: zoom-in;
  aspect-ratio: 16 / 9;
}
.shots img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.shots button:hover img {
  transform: scale(1.06);
}
.game-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.game-head img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}
.game h3 {
  font: 800 38px/1 var(--display);
}
.sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.status {
  display: inline-block;
  margin: 20px 0 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #1a1206;
  background: var(--accent);
}
.status.dev {
  background: rgba(177, 140, 255, 0.16);
  color: var(--violet);
}
.game-body > p:not(.status):not(.sub) {
  color: #c9cdd6;
}
.ticks {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}
.ticks li {
  position: relative;
  padding-left: 28px;
  color: #c9cdd6;
  font-size: 15.5px;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6e0 0 25%, var(--accent) 30% 60%, transparent 62%);
}

/* ---------- studio ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 48px;
}
.pillar {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 181, 71, 0.06), transparent 60%), var(--panel);
}
.pillar h3 {
  font: 800 28px/1 var(--display);
  margin: 18px 0 10px;
}
.pillar p {
  margin: 0;
  color: var(--muted);
}
.ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 181, 71, 0.12);
}
.ico svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- cách làm ---------- */
.way {
  background: var(--bg-2);
}
.way-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
}
.steps {
  list-style: none;
  counter-reset: s;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.steps li {
  counter-increment: s;
  position: relative;
  padding: 22px 22px 22px 76px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute;
  left: 22px;
  top: 20px;
  font: 800 30px/1 var(--display);
  color: var(--accent);
}
.steps h3 {
  font-size: 18px;
  font-weight: 700;
}
.steps p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15.5px;
}

/* ---------- liên hệ ---------- */
.contact {
  text-align: center;
  background: radial-gradient(60% 80% at 50% 0%, rgba(255, 181, 71, 0.12), transparent 70%), var(--bg);
}
.contact-in {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-in img {
  margin-bottom: 22px;
  filter: drop-shadow(0 10px 30px rgba(255, 181, 71, 0.35));
}
.contact .lead {
  margin-inline: auto;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
}
.foot a {
  text-decoration: none;
}

/* ---------- xem ảnh lớn ---------- */
.viewer {
  border: 0;
  padding: 0;
  background: none;
  max-width: min(1280px, 96vw);
}
.viewer::backdrop {
  background: rgba(5, 6, 9, 0.88);
}
.viewer img {
  border-radius: 14px;
  max-height: 88vh;
  width: auto;
}
.viewer .close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* ---------- hiện dần khi cuộn ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s, transform 0.7s;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  *,
  .hero-bg i,
  .hero-road .dash {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- màn nhỏ ---------- */
@media (max-width: 900px) {
  .game,
  .way-grid {
    grid-template-columns: 1fr;
  }
  .game.flip .game-media {
    order: 0;
  }
  .pillars {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .menu {
    display: flex;
    margin-left: 0;
  }
  .lang {
    margin-left: auto;
  }
  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 16px;
    background: rgba(12, 14, 19, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    padding: 14px 4px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
  }
  .top-row {
    gap: 12px;
  }
  .brand-text b {
    font-size: 19px;
  }
  .hero {
    padding: 72px 0 64px;
  }
  .games,
  .studio,
  .way,
  .contact {
    padding: 72px 0;
  }
  .game {
    padding: 16px;
    gap: 22px;
    border-radius: 22px;
  }
  .facts li {
    min-width: 0;
    flex: 1 1 140px;
  }
  .steps li {
    padding: 18px 18px 18px 64px;
  }
  .steps li::before {
    left: 16px;
  }
}
