:root {
  --bg: #0a1020;
  --bg-2: #0f1830;
  --surface: #142038;
  --surface-2: #1a2944;
  --line: rgba(148, 176, 220, 0.18);
  --text: #eef3fb;
  --muted: #9db0cb;
  --accent: #3ba0ff;
  --accent-2: #1e7be0;
  --ok: #3ecf8e;
  --warn: #f0b429;
  --danger: #ef5b6a;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --container: 1120px;
  --header-h: 72px;
  --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 600px at 10% -10%, rgba(59, 160, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(30, 123, 224, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 40%, #09101c 100%);
  min-height: 100vh;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  backdrop-filter: blur(14px);
  background: rgba(8, 14, 28, 0.86);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  max-width: 42%;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 1;
}

.nav-desktop a {
  color: var(--muted);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: rgba(59, 160, 255, 0.12);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 20px rgba(59, 160, 255, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: rgba(59, 160, 255, 0.45);
  background: rgba(59, 160, 255, 0.08);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: rgba(59, 160, 255, 0.1);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(10, 16, 32, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  z-index: 999;
}

.mobile-panel.open {
  display: block;
  animation: slideDown 0.25s ease;
}

.mobile-panel a {
  display: block;
  padding: 0.85rem 0.75rem;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.mobile-panel .mobile-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  padding-top: var(--header-h);
}

.hero {
  position: relative;
  min-height: clamp(360px, 58vh, 560px);
  display: grid;
  align-items: 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::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 12, 24, 0.92) 0%, rgba(7, 12, 24, 0.72) 42%, rgba(7, 12, 24, 0.35) 100%),
    linear-gradient(0deg, rgba(7, 12, 24, 0.95) 0%, transparent 48%);
}

.hero-content {
  padding: 3.5rem 0 3rem;
  max-width: 640px;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 1.4rem;
  color: #d5e2f5;
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section {
  padding: 4rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin: 0 0 0.35rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

.section-link {
  white-space: nowrap;
  font-weight: 600;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
}

.panel {
  background: linear-gradient(180deg, rgba(26, 41, 68, 0.75), rgba(20, 32, 56, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.panel h2,
.panel h3 {
  font-family: var(--display);
  margin-top: 0;
}

.panel p {
  color: #c9d7ea;
}

.intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.intro-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  min-height: 180px;
  transition: transform 0.25s, border-color 0.25s;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 160, 255, 0.5);
  text-decoration: none;
}

.category-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.category-card span {
  display: block;
  padding: 0.85rem 1rem 1rem;
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 160, 255, 0.45);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.article-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #0d1528;
}

.article-card .card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.article-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  font-family: var(--display);
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(59, 160, 255, 0.14);
  color: #9fd0ff;
  font-size: 0.75rem;
  font-weight: 600;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20, 32, 56, 0.8);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0;
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
}

.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(59, 160, 255, 0.08), transparent);
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: 0 0 0.7rem;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb span {
  opacity: 0.5;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  padding: 2.5rem 0 4rem;
}

.prose {
  background: rgba(20, 32, 56, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
}

.prose h2,
.prose h3 {
  font-family: var(--display);
  line-height: 1.3;
}

.prose p,
.prose li {
  color: #c8d6ea;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose img {
  border-radius: 12px;
  margin: 1rem 0;
  border: 1px solid var(--line);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.side-card {
  background: rgba(20, 32, 56, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.side-card h3 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  font-family: var(--display);
}

.side-list {
  display: grid;
  gap: 0.75rem;
}

.side-list a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
}

.side-list a:hover {
  color: var(--accent);
}

.side-list img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

.side-list strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.35;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.brand-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.brand-row img {
  width: 100%;
  height: 64px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.step {
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(20, 32, 56, 0.72);
}

.step .num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(59, 160, 255, 0.18);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.step h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-family: var(--display);
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 10vw, 6rem);
  margin: 0;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page p {
  color: var(--muted);
  max-width: 42ch;
  margin: 0.8rem auto 1.4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #070c18;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
}

.site-footer h3 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  font-family: var(--display);
}

.site-footer p,
.site-footer a {
  color: var(--muted);
}

.site-footer a {
  display: block;
  margin-bottom: 0.45rem;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .nav-desktop,
  .header-actions .btn {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .intro-grid,
  .content-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .card-grid,
  .related-grid,
  .steps,
  .brand-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .brand img {
    height: 30px;
    max-width: 120px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .category-grid,
  .card-grid,
  .related-grid,
  .steps,
  .brand-row {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 2.4rem 0 2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .prose {
    padding: 1.15rem;
  }

  .article-card img {
    height: 170px;
  }
}
