:root {
  --bg: #0e1218;
  --bg-elevated: #161c26;
  --bg-soft: #1c2430;
  --surface: #222b38;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eef6;
  --text-muted: #9aa8bc;
  --accent: #3b9eff;
  --accent-strong: #1f7de0;
  --accent-soft: rgba(59, 158, 255, 0.14);
  --gold: #d4b06a;
  --danger: #e85d5d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --header-h: 68px;
  --max: 1120px;
  --font-display: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(59, 158, 255, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(212, 176, 106, 0.08), transparent 50%),
    linear-gradient(180deg, #0b0f15 0%, var(--bg) 40%, #0a0e14 100%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #7bc0ff;
}

ul, ol {
  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;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: rgba(10, 14, 20, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  flex-shrink: 0;
  max-width: 46%;
}

.brand img {
  height: 36px;
  width: auto;
  max-height: 36px;
  max-width: 140px;
  object-fit: contain;
}

.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-left: auto;
  min-width: 0;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--text-muted);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(59, 158, 255, 0.45);
  color: var(--text);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}

.menu-toggle svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mobile-panel {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: rgba(12, 16, 22, 0.98);
  border-bottom: 1px solid var(--border);
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  z-index: 999;
  padding: 1rem 0 1.25rem;
}

.mobile-panel.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav {
  display: grid;
  gap: 0.25rem;
}

.mobile-nav a {
  color: var(--text);
  padding: 0.85rem 0.4rem;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.mobile-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.mobile-actions .btn {
  width: 100%;
}

.page-main {
  padding-top: var(--header-h);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 11, 16, 0.35) 0%, rgba(8, 11, 16, 0.55) 45%, rgba(8, 11, 16, 0.96) 100%),
    linear-gradient(90deg, rgba(8, 11, 16, 0.75) 0%, rgba(8, 11, 16, 0.2) 55%, rgba(8, 11, 16, 0.55) 100%);
}

.hero-content {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 4.5rem;
  max-width: 680px;
  animation: rise 0.8s ease both;
}

.hero-brand {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  margin-bottom: 0.6rem;
  background: linear-gradient(180deg, #fff 20%, #b8c7db 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.hero-content p {
  font-size: 1.05rem;
  max-width: 34rem;
  margin-bottom: 1.4rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.section {
  padding: 4.25rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 640px;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.section-head p {
  margin-bottom: 0;
}

.intro-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.intro-copy {
  background: linear-gradient(180deg, rgba(28, 36, 48, 0.7), rgba(22, 28, 38, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  min-height: 260px;
}

.intro-visual img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.category-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 180px;
  border: 1px solid var(--border);
  background: #000;
  color: #fff;
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-card:hover img {
  transform: scale(1.05);
}

.category-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85));
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.cards {
  display: grid;
  gap: 1rem;
}

.card {
  display: grid;
  gap: 0.9rem;
  background: rgba(22, 28, 38, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 158, 255, 0.35);
}

.card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 0 1rem 1.15rem;
}

.card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.card-body h3 a {
  color: var(--text);
}

.card-body h3 a:hover {
  color: var(--accent);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #9fd0ff;
  font-size: 0.75rem;
  font-weight: 600;
}

.faq {
  display: grid;
  gap: 0.75rem;
}

.faq details {
  background: rgba(22, 28, 38, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--accent);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0.75rem 0 0;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  background: #090c11;
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
}

.footer-brand p {
  max-width: 28rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.footer-links h3 {
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  padding: 0.25rem 0;
  font-size: 0.92rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.page-hero {
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(59, 158, 255, 0.08), transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb span {
  opacity: 0.5;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  max-width: 18ch;
}

.page-hero .lead {
  max-width: 42rem;
  margin-bottom: 0;
}

.content-wrap {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 3.5rem;
}

.prose {
  background: rgba(22, 28, 38, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem;
}

.prose h2 {
  margin-top: 1.75rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin-top: 1.35rem;
  font-size: 1.1rem;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose img {
  border-radius: var(--radius-sm);
  margin: 1.1rem 0;
  border: 1px solid var(--border);
}

.sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.side-box {
  background: rgba(22, 28, 38, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.side-list {
  display: grid;
  gap: 0.85rem;
}

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.7rem;
  align-items: center;
}

.side-item img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

.side-item a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-size: clamp(3rem, 12vw, 5.5rem);
  margin-bottom: 0.4rem;
  background: linear-gradient(180deg, #fff, #7aa8d8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.related {
  margin-top: 2rem;
}

.related h2 {
  margin-bottom: 1rem;
}

.inline-figure {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.inline-figure figcaption {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.feature-strip {
  display: grid;
  gap: 1rem;
}

.feature-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(28, 36, 48, 0.75);
  border: 1px solid var(--border);
}

.feature-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.muted {
  color: var(--text-muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .nav-desktop,
  .header-actions {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .brand {
    max-width: none;
  }

  .intro-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.3fr 1fr;
  }

  .footer-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-wrap.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .prose {
    padding: 1.85rem 1.75rem;
  }
}
