:root {
  --bg: #0c1018;
  --bg-elevated: #141a24;
  --bg-soft: #1a2230;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eef7;
  --muted: #9aa8bc;
  --blue: #4ea2f5;
  --blue-deep: #2b6fb8;
  --gold: #d4b26a;
  --danger: #e85d5d;
  --radius: 14px;
  --header-h: 72px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Sora", sans-serif;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(78, 162, 245, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(212, 178, 106, 0.08), transparent 50%),
    linear-gradient(180deg, #0a0e15 0%, var(--bg) 40%, #0b1220 100%);
  min-height: 100vh;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #8bc4ff;
}

ul {
  padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(10, 14, 21, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 42px;
  max-height: calc(var(--header-h) - 20px);
}

.logo img {
  height: 40px;
  max-height: 100%;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  margin-left: auto;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.is-open .icon-menu {
  display: none;
}

.nav-toggle.is-open .icon-close {
  display: block;
}

.nav-toggle .toggle-label::before {
  content: "Menu";
}

.nav-toggle.is-open .toggle-label::before {
  content: "Đóng";
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.main-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.main-nav .auth-links {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(78, 162, 245, 0.45);
  color: #fff;
}

.btn-gold {
  background: linear-gradient(135deg, #e2c37a, #b8923f);
  color: #1a1408;
}

.btn-gold:hover {
  color: #1a1408;
}

main {
  padding-top: var(--header-h);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 12, 20, 0.92) 0%, rgba(8, 12, 20, 0.72) 42%, rgba(8, 12, 20, 0.35) 100%),
    url("banner.3dd2.webp") center / cover no-repeat;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(transparent, var(--bg));
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 3.5rem 0 4rem;
}

.hero-copy .brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  background: linear-gradient(180deg, #fff 20%, #9ec8f5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy h1 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 600;
  max-width: 18ch;
  margin-bottom: 1rem;
}

.hero-copy .lead {
  max-width: 42ch;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
  animation: floatY 5.5s ease-in-out infinite;
}

.hero-visual img {
  width: min(100%, 420px);
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.section {
  padding: 4rem 0;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 640px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.intro-block {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.intro-card {
  background: linear-gradient(160deg, rgba(26, 34, 48, 0.95), rgba(16, 22, 34, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.intro-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1rem 1.25rem;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-item:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 162, 245, 0.4);
  background: var(--bg-soft);
}

.category-item img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin: 0 auto 0.85rem;
}

.category-item h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.category-item p {
  font-size: 0.88rem;
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 162, 245, 0.35);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0e14;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.05);
}

.article-card .body {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card .meta {
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--blue);
}

.article-card p {
  font-size: 0.92rem;
  flex: 1;
}

.read-more {
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.brand-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-row img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(0.2);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.brand-row img:hover {
  opacity: 1;
  filter: none;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 820px;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.faq-item p {
  margin: 0;
  font-size: 0.95rem;
}

.page-hero {
  padding: 2.8rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(78, 162, 245, 0.08), transparent 70%);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  max-width: 18ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--blue);
}

.breadcrumb span {
  opacity: 0.5;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.prose {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.8rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 1.6rem;
}

.prose h3 {
  font-size: 1.1rem;
  margin-top: 1.25rem;
}

.prose img.cover {
  width: 100%;
  border-radius: 12px;
  margin: 0.5rem 0 1.25rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.side-box {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.side-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.side-list a {
  color: var(--text);
  font-size: 0.92rem;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.7rem;
  align-items: center;
}

.side-list img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.side-list span {
  line-height: 1.35;
}

.list-page .card-grid {
  padding-bottom: 3rem;
}

.cta-band {
  margin: 1rem 0 0;
  padding: 1.6rem;
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(78, 162, 245, 0.18), rgba(212, 178, 106, 0.12)),
    var(--bg-soft);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-band h2 {
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}

.cta-band p {
  margin: 0;
}

.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 0;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 7rem);
  line-height: 1;
  background: linear-gradient(180deg, #fff, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #080c13;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 38px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.92rem;
}

.footer-col h3 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.promo-strip {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: center;
}

.promo-strip img {
  width: 100%;
  border-radius: 12px;
}

.text-link-inline {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1024px) {
  .hero-grid,
  .intro-block,
  .content-wrap,
  .promo-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brand-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    padding: 2.5rem 0 3rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(10, 14, 21, 0.98);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }

  .main-nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    padding: 0.85rem 1rem;
  }

  .main-nav .auth-links {
    display: flex;
    margin: 0.35rem 0 0;
    flex-direction: column;
    width: 100%;
  }

  .auth-links .btn {
    width: 100%;
  }

  .desktop-auth {
    display: none;
  }

  .card-grid,
  .category-grid,
  .brand-row {
    grid-template-columns: 1fr 1fr;
  }

  .hero-copy .brand-mark {
    font-size: 2.4rem;
  }

  .prose {
    padding: 1.2rem 1rem 1.4rem;
  }
}

@media (max-width: 520px) {
  .card-grid,
  .category-grid,
  .brand-row {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .cta-band {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
