:root {
  --bg: #071018;
  --bg-elevated: #0d1824;
  --surface: #122033;
  --surface-2: #182a40;
  --line: rgba(148, 185, 220, 0.16);
  --text: #eef5fb;
  --muted: #9eb0c4;
  --accent: #5eb0f0;
  --accent-strong: #3d97df;
  --gold: #d4b46a;
  --danger: #e25b5b;
  --ok: #3dbf8f;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --nav-h: 72px;
  --max: 1120px;
  --font: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --display: "Sora", "Be Vietnam Pro", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(94, 176, 240, 0.18), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(212, 180, 106, 0.1), transparent 50%),
    linear-gradient(180deg, #08131d 0%, var(--bg) 40%, #050b12 100%);
  min-height: 100vh;
  line-height: 1.65;
}

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: #8cc8f7;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.25;
  margin: 0 0 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  backdrop-filter: blur(16px);
  background: rgba(7, 16, 24, 0.88);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: var(--nav-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: 0;
  max-width: min(48vw, 220px);
  overflow: hidden;
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.desktop-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--text);
  background: rgba(94, 176, 240, 0.12);
}

.auth-desktop {
  display: none;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #061018;
}

.btn-primary:hover {
  color: #031018;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(94, 176, 240, 0.45);
  color: var(--text);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(18, 32, 51, 0.9);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.menu-toggle svg {
  width: 18px;
  height: 18px;
}

.mobile-panel {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  background: rgba(8, 16, 26, 0.97);
  border-bottom: 1px solid var(--line);
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  z-index: 999;
}

.mobile-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-panel-inner {
  padding: 1rem 0 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.mobile-panel a {
  color: var(--text);
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(148, 185, 220, 0.08);
  font-weight: 500;
}

.mobile-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-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 top;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 16, 24, 0.35) 0%, rgba(7, 16, 24, 0.55) 42%, rgba(7, 16, 24, 0.96) 100%),
    linear-gradient(90deg, rgba(7, 16, 24, 0.75) 0%, rgba(7, 16, 24, 0.2) 55%, rgba(7, 16, 24, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  max-width: 680px;
  animation: rise 0.8s ease both;
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: 0.6rem;
  color: var(--text);
}

.hero h1 {
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  color: #d7e7f7;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.hero p {
  font-size: 1.05rem;
  max-width: 540px;
  color: #c3d3e4;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.section {
  padding: 4rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 680px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.section-kicker {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.intro-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.intro-copy p + p {
  margin-top: 0.2rem;
}

.intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.category-grid,
.card-grid,
.guide-grid {
  display: grid;
  gap: 1rem;
}

.category-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(24, 42, 64, 0.9), rgba(13, 24, 36, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-item:hover {
  border-color: rgba(94, 176, 240, 0.45);
  transform: translateY(-3px);
  color: inherit;
}

.category-item img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #05080e;
  border-radius: 12px;
  padding: 0.35rem;
}

.category-item h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.category-item p {
  margin: 0;
  font-size: 0.9rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(94, 176, 240, 0.4);
  color: inherit;
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a121c;
}

.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.05rem 1.1rem 1.2rem;
  display: grid;
  gap: 0.45rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.article-card h2,
.article-card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.article-card p {
  margin: 0;
  font-size: 0.92rem;
}

.faq-list {
  display: grid;
  gap: 0.8rem;
}

.faq-item {
  background: rgba(18, 32, 51, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.faq-item p {
  margin: 0;
  font-size: 0.95rem;
}

.brand-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  align-items: center;
}

.brand-row img {
  width: 100%;
  max-height: 48px;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(0.2);
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: #050b12;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-brand img {
  height: 38px;
  width: auto;
  max-height: 38px;
  margin-bottom: 0.8rem;
}

.footer-links {
  display: grid;
  gap: 0.45rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 185, 220, 0.1);
  color: var(--muted);
  font-size: 0.88rem;
}

.page-hero {
  padding: 2.4rem 0 1.2rem;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb span {
  opacity: 0.5;
}

.content-wrap {
  display: grid;
  gap: 1.5rem;
}

.prose {
  background: rgba(13, 24, 36, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem;
}

.prose h2 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}

.prose h3 {
  margin-top: 1.2rem;
  font-size: 1.05rem;
}

.prose ul, .prose ol {
  color: var(--muted);
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 1.2rem;
}

.cover img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.related {
  display: grid;
  gap: 0.85rem;
}

.related a {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.8rem;
  align-items: center;
  color: inherit;
  padding: 0.65rem;
  border-radius: 12px;
  border: 1px solid transparent;
}

.related a:hover {
  border-color: var(--line);
  background: rgba(18, 32, 51, 0.7);
  color: inherit;
}

.related img {
  width: 84px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.related h3 {
  font-size: 0.95rem;
  margin: 0;
}

.related p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
}

.error-page {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 0;
}

.error-code {
  font-family: var(--display);
  font-size: clamp(4rem, 14vw, 7rem);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.chip {
  display: inline-flex;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.chip.active,
.chip:hover {
  color: var(--text);
  border-color: rgba(94, 176, 240, 0.45);
  background: rgba(94, 176, 240, 0.1);
}

.feature-strip {
  display: grid;
  gap: 1rem;
}

.feature-item {
  padding: 1.1rem;
  border-left: 3px solid var(--accent);
  background: rgba(18, 32, 51, 0.55);
}

.feature-item h3 {
  font-size: 1.02rem;
}

.reveal {
  animation: fade-in 0.7s ease both;
}

@media (min-width: 720px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid,
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .content-wrap {
    grid-template-columns: 1.7fr 0.9fr;
  }

  .feature-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .brand-row {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (min-width: 980px) {
  .desktop-nav,
  .auth-desktop {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 979px) {
  .brand-text {
    display: none;
  }
}
