/* =========================================================
   ZLT Co. — Base Stylesheet
   Theme engine, nav, article base, footer, utilities
   ========================================================= */

/* ---------- VARIABLES ---------- */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg: #0f1117;
  --bg-elevated: #161b22;
  --bg-card: #161b22;
  --text: #f0f0f5;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --accent: #ff1e56;
  --accent-glow: rgba(255, 30, 86, 0.18);
  --border: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --text: #111111;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;
  --accent: #ff1e56;
  --accent-glow: rgba(255, 30, 86, 0.10);
  --border: rgba(0, 0, 0, 0.08);
}

/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
  background: var(--accent);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* ---------- NAV ---------- */
.zlt-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle span:nth-child(1) { width: 100%; }
.nav-toggle span:nth-child(2) { width: 75%; }
.nav-toggle span:nth-child(3) { width: 50%; }

/* ---------- ARTICLE BASE ---------- */
.article-container {
  max-width: 850px;
  margin: 100px auto 60px;
  padding: 40px 20px;
}

.article-container h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin-bottom: 12px;
  font-weight: 800;
}

.article-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-container p {
  color: var(--text-muted);
  margin-bottom: 22px;
  font-size: 16px;
  line-height: 1.75;
}

.article-container h2 {
  margin-top: 40px;
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.article-container h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin-top: 10px;
  opacity: 0.5;
  border-radius: 2px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--accent);
  padding: 10px 18px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: var(--accent);
  color: white;
}

/* ---------- FOOTER ---------- */
.zlt-footer {
  font-family: var(--font);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding-top: 60px;
  margin-top: 0;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 40px;
  padding: 0 48px 48px;
}

.footer-col h4 {
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  font-weight: 400;
}

/* ---------- UTILITIES ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---------- FOCUS ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 740px) {
  .zlt-nav {
    padding: 14px 20px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    top: 60px;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 32px;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border-left: 1px solid var(--border);
    z-index: 40;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 16px;
    padding: 10px 0;
    width: 100%;
  }

  .footer-container {
    padding: 0 24px 36px;
    gap: 32px;
  }

  .article-container {
    margin: 40px auto;
    padding: 24px 16px;
  }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}