:root {
  --bg: #0a1018;
  --bg-elevated: #111925;
  --bg-soft: #162033;
  --line: rgba(148, 163, 184, 0.16);
  --text: #e8eef7;
  --muted: #9aa8bc;
  --accent: #2f8cff;
  --accent-2: #1a6fd4;
  --gold: #c9a45b;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
  --max: 1120px;
  --font-display: "Syne", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", 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(47, 140, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(201, 164, 91, 0.12), transparent 50%),
    linear-gradient(180deg, #0c1420 0%, var(--bg) 40%, #080d14 100%);
  background-attachment: fixed;
  line-height: 1.7;
  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: #7bbcff;
}

ul {
  padding-left: 1.2rem;
}

.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);
  background: rgba(10, 16, 24, 0.86);
  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;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  flex-shrink: 1;
  min-width: 0;
  max-width: min(58vw, 220px);
  max-height: calc(var(--header-h) - 24px);
  overflow: hidden;
}

.brand img {
  width: auto;
  height: 36px;
  max-height: 36px;
  max-width: 100%;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.35rem;
}

.nav-desktop a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  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(--accent), var(--accent-2));
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(47, 140, 255, 0.45);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  min-height: 42px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-panel {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: min(320px, 100%);
  height: calc(100vh - var(--header-h));
  background: rgba(12, 18, 28, 0.98);
  border-left: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform 0.28s ease;
  padding: 1.25rem;
  z-index: 999;
  overflow-y: auto;
}

.nav-panel.open {
  transform: translateX(0);
}

.nav-panel a {
  display: block;
  padding: 0.85rem 0.4rem;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.nav-panel .panel-actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 998;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

main {
  padding-top: var(--header-h);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 12, 20, 0.35) 0%, rgba(8, 12, 20, 0.72) 55%, rgba(8, 12, 20, 0.96) 100%),
    linear-gradient(90deg, rgba(8, 12, 20, 0.75) 0%, rgba(8, 12, 20, 0.25) 55%, rgba(8, 12, 20, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  max-width: 640px;
  animation: rise 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  margin: 0 0 0.9rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.25;
  margin: 0 0 0.9rem;
  font-weight: 700;
  color: #f4f7fb;
}

.hero p {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section {
  padding: 4rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 640px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.55rem;
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.intro-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.intro-copy p {
  color: var(--muted);
}

.intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.category-item {
  display: block;
  background: linear-gradient(180deg, rgba(22, 32, 51, 0.9), rgba(14, 20, 32, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-item:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 140, 255, 0.4);
  color: var(--text);
}

.category-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #000;
}

.category-item span {
  display: block;
  padding: 0.9rem 1rem 1.05rem;
  font-weight: 600;
}

.card-grid {
  display: grid;
  gap: 1.1rem;
}

.article-card {
  display: grid;
  gap: 0.9rem;
  background: rgba(17, 25, 37, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 164, 91, 0.35);
  color: var(--text);
}

.article-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #000;
}

.article-card .card-body {
  padding: 0 1rem 1.1rem;
}

.article-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  line-height: 1.35;
  font-family: var(--font-display);
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
}

.faq-list {
  display: grid;
  gap: 0.8rem;
}

.faq-item {
  background: rgba(17, 25, 37, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.faq-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
  font-family: var(--font-display);
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  padding: 2.6rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 32, 51, 0.45), transparent);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: 0 0 0.7rem;
  line-height: 1.2;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 46rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.content-wrap {
  display: grid;
  gap: 1.5rem;
  padding: 2.2rem 0 3.5rem;
}

.prose {
  background: rgba(17, 25, 37, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem;
}

.prose h2,
.prose h3 {
  font-family: var(--font-display);
  line-height: 1.3;
}

.prose h2 {
  margin: 1.8rem 0 0.7rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin: 1.4rem 0 0.55rem;
  font-size: 1.1rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose p:first-child {
  margin-top: 0;
}

.prose img {
  border-radius: 12px;
  margin: 1rem 0;
  border: 1px solid var(--line);
}

.related {
  display: grid;
  gap: 0.9rem;
}

.aside-box {
  background: rgba(17, 25, 37, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.aside-box h2 {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
  font-family: var(--font-display);
}

.aside-box a {
  display: block;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 0.94rem;
}

.aside-box a:last-child {
  border-bottom: 0;
}

.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 0;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin: 0 0 0.5rem;
}

.error-page p {
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #080d14;
  padding: 2.5rem 0 1.5rem;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.7rem;
}

.footer-brand p,
.footer-col p,
.footer-copy {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-col h3 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
  font-family: var(--font-display);
}

.footer-col a {
  display: block;
  color: var(--muted);
  padding: 0.28rem 0;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  justify-content: space-between;
  align-items: center;
}

.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1rem;
}

.brand-row img {
  height: 28px;
  width: auto;
  opacity: 0.85;
  filter: grayscale(0.2);
}

.cta-strip {
  display: grid;
  gap: 1rem;
  align-items: center;
  padding: 1.3rem;
  border-radius: var(--radius);
  border: 1px solid rgba(47, 140, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(47, 140, 255, 0.14), rgba(201, 164, 91, 0.08)),
    var(--bg-elevated);
}

.cta-strip img {
  width: min(100%, 280px);
  margin-inline: auto;
}

.ext-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .intro-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }

  .cta-strip {
    grid-template-columns: 1fr auto;
  }

  .content-wrap.with-aside {
    grid-template-columns: 1.7fr 0.8fr;
    align-items: start;
  }
}

@media (min-width: 992px) {
  .brand {
    max-width: 240px;
    flex-shrink: 0;
  }

  .brand img {
    height: 40px;
    max-height: 40px;
  }

  .menu-toggle {
    display: none;
  }

  .nav-desktop,
  .header-actions {
    display: flex;
  }

  .nav-panel,
  .nav-overlay {
    display: none !important;
  }

  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 991px) {
  .header-actions {
    display: none;
  }
}
