/* ==========================================================================
   西游云 (xiyou.homes) - Neo-Brutalist Coordinate Grid & Bold Monochrome-Gold Matrix
   Ultra-fast loading - Pure CSS - Zero Bloat - 100% Native
   ========================================================================== */

:root {
  /* Neo-Brutalist Light Mode Palette (Default) */
  --bg-canvas: #f4f4f5;
  --bg-card: #ffffff;
  --bg-panel: #fafafa;
  --bg-accent: #facc15; /* Hyper-saturated imperial gold */
  
  --color-black: #09090b;
  --color-white: #ffffff;
  --color-gold: #facc15;
  --color-gold-hover: #eab308;
  --color-vermilion: #ef4444; /* Signal vermilion */
  --color-emerald: #10b981;
  --color-cyan: #06b6d4;

  --border-stark: 2px solid #09090b;
  --border-thick: 3px solid #09090b;
  --shadow-brutal: 4px 4px 0px #09090b;
  --shadow-brutal-gold: 4px 4px 0px #facc15;
  --shadow-brutal-lg: 6px 6px 0px #09090b;
  --shadow-pressed: 1px 1px 0px #09090b;

  --text-primary: #09090b;
  --text-secondary: #3f3f46;
  --text-muted: #71717a;
  --text-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, Monaco, "Courier New", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;

  --header-bg: rgba(244, 244, 245, 0.95);
  --header-border: #09090b;

  --grid-line: rgba(9, 9, 11, 0.08);
}

/* Neo-Brutalist Dark Mode Matrix */
[data-theme="dark"] {
  --bg-canvas: #09090b;
  --bg-card: #121217;
  --bg-panel: #18181f;
  --bg-accent: #facc15;
  
  --color-black: #ffffff;
  --color-white: #09090b;
  --color-gold: #facc15;
  --color-gold-hover: #fde047;
  --color-vermilion: #f87171;
  --color-emerald: #34d399;
  --color-cyan: #22d3ee;

  --border-stark: 2px solid #facc15;
  --border-thick: 3px solid #facc15;
  --shadow-brutal: 4px 4px 0px #facc15;
  --shadow-brutal-gold: 4px 4px 0px #ffffff;
  --shadow-brutal-lg: 6px 6px 0px #facc15;
  --shadow-pressed: 1px 1px 0px #facc15;

  --text-primary: #f4f4f5;
  --text-secondary: #d4d4d8;
  --text-muted: #a1a1aa;

  --header-bg: rgba(9, 9, 11, 0.95);
  --header-border: #27272a;

  --grid-line: rgba(250, 204, 21, 0.12);
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background-image: 
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--text-mono);
  letter-spacing: -0.02em;
}

/* Interactive Grid Canvas Overlay behind Hero */
#gridCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 640px;
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Header & Dynamic Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--header-bg);
  border-bottom: var(--border-stark);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  background: #ffffff;
  border: var(--border-stark);
  box-shadow: 3px 3px 0px var(--text-primary);
  color: #09090b !important;
  font-weight: 900;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

[data-theme="dark"] .brand-badge {
  background: #ffffff;
  border: 2px solid #facc15;
  box-shadow: 3px 3px 0px #facc15;
}

.brand-badge:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px var(--text-primary);
}

.brand-badge:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px;
}

.brand-logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-tag {
  font-size: 0.75rem;
  font-weight: 900;
  color: #09090b;
  background: var(--color-gold);
  padding: 3px 7px;
  border: 1.5px solid #09090b;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 700;
  padding: 6px 10px;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--color-gold);
  color: #09090b;
  border: 1px solid #09090b;
  box-shadow: 2px 2px 0px #09090b;
  transform: translate(-1px, -1px);
}

.nav-news-pill {
  background: var(--bg-card);
  border: 1px dashed var(--color-vermilion) !important;
  color: var(--color-vermilion) !important;
  position: relative;
}

.nav-news-pill::after {
  content: "NEW";
  font-size: 0.65rem;
  font-weight: 900;
  background: var(--color-vermilion);
  color: #fff;
  padding: 1px 4px;
  margin-left: 4px;
  border-radius: 2px;
}

.nav-news-pill:hover {
  background: var(--color-vermilion) !important;
  color: #ffffff !important;
  border-style: solid !important;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Brutalist Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-card);
  border: var(--border-stark);
  box-shadow: 2px 2px 0px var(--text-primary);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.theme-toggle-btn:hover {
  background: var(--color-gold);
  color: #09090b;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--text-primary);
}

.theme-toggle-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px;
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.sun-icon { display: block; }
.moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

/* Brutalist Primary & Secondary Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 10px 22px;
  cursor: pointer;
  border: var(--border-stark);
  box-shadow: var(--shadow-brutal);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-gold);
  color: #09090b !important;
}

.btn-primary:hover {
  background: var(--color-gold-hover);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--text-primary);
}

.btn-primary:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0px var(--text-primary);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-panel);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--text-primary);
}

.btn-secondary:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0px var(--text-primary);
}

.btn-lg {
  padding: 14px 34px;
  font-size: 1.1rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 70px 0 50px;
  position: relative;
  z-index: 1;
}

.hero-coordinate-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: var(--border-stark);
  box-shadow: 2px 2px 0px var(--text-primary);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.live-indicator {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--color-vermilion);
  border: 1px solid #09090b;
}

.hero-headline {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-headline .highlight-gold {
  background: var(--color-gold);
  color: #09090b;
  padding: 2px 10px;
  border: var(--border-stark);
  display: inline-block;
  box-shadow: 3px 3px 0px var(--text-primary);
}

.hero-briefing {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 820px;
  margin-bottom: 34px;
  border-left: 4px solid var(--color-gold);
  padding-left: 18px;
}

.hero-cta-box {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

/* ==========================================================================
   Dual-Track Marquee Banners
   ========================================================================== */
.marquee-container {
  width: 100%;
  overflow: hidden;
  border-top: var(--border-stark);
  border-bottom: var(--border-stark);
  background: #09090b;
  color: #ffffff;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 30px 0 60px;
  user-select: none;
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  gap: 30px;
  width: max-content;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.track-left {
  animation: marqueeLeft 35s linear infinite;
}

.track-right {
  animation: marqueeRight 35s linear infinite;
}

@keyframes marqueeLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marqueeRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--text-mono);
}

.marquee-item .dot-green {
  color: var(--color-emerald);
}

.marquee-item .dot-gold {
  color: var(--color-gold);
}

/* ==========================================================================
   CLI Ping Sandbox (Terminal Block)
   ========================================================================== */
.terminal-block {
  background: #09090b;
  border: var(--border-stark);
  box-shadow: var(--shadow-brutal-lg);
  border-radius: 0;
  overflow: hidden;
  margin: 50px 0 80px;
  color: #f4f4f5;
}

.terminal-header {
  background: #18181b;
  border-bottom: 2px solid #27272a;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.t-dot {
  width: 12px;
  height: 12px;
  border: 1px solid #000;
}
.t-dot-red { background: #ef4444; }
.t-dot-yellow { background: #facc15; }
.t-dot-green { background: #10b981; }

.terminal-title {
  font-family: var(--text-mono);
  font-size: 0.85rem;
  color: #a1a1aa;
  font-weight: 700;
}

.region-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.region-btn {
  background: #27272a;
  border: 1px solid #3f3f46;
  color: #f4f4f5;
  font-family: var(--text-mono);
  font-size: 0.78rem;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.region-btn:hover {
  background: var(--color-gold);
  color: #09090b;
  border-color: var(--color-gold);
}

.region-btn.active {
  background: var(--color-gold);
  color: #09090b;
  border-color: var(--color-gold);
  font-weight: 800;
}

.terminal-body {
  padding: 24px;
  font-family: var(--text-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  min-height: 240px;
  background: #09090b;
  color: #10b981;
  overflow-x: auto;
}

.t-cursor {
  display: inline-block;
  width: 9px;
  height: 16px;
  background: #facc15;
  vertical-align: middle;
  animation: blink 1s step-start infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   Section Header Styling
   ========================================================================== */
.section {
  padding: 80px 0;
  border-bottom: var(--border-stark);
}

.section-head {
  margin-bottom: 44px;
}

.section-label {
  display: inline-block;
  font-family: var(--text-mono);
  font-size: 0.82rem;
  font-weight: 900;
  background: #09090b;
  color: #facc15;
  padding: 4px 10px;
  border: var(--border-stark);
  margin-bottom: 12px;
}

[data-theme="dark"] .section-label {
  background: #facc15;
  color: #09090b;
}

.section-h2 {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.section-p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 720px;
}

/* ==========================================================================
   Brutalist Spec Modules (3 Core Feature Cards)
   ========================================================================== */
.features-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.brutal-card {
  background: var(--bg-card);
  border: var(--border-stark);
  box-shadow: var(--shadow-brutal);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.brutal-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0px var(--text-primary);
}

.card-num {
  font-family: var(--text-mono);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-gold);
  -webkit-text-stroke: 1.5px #09090b;
  margin-bottom: 14px;
}

[data-theme="dark"] .card-num {
  -webkit-text-stroke: 1.5px #facc15;
  color: #09090b;
}

.card-h3 {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.card-p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.spec-table {
  border-top: var(--border-stark);
  padding-top: 16px;
  font-family: var(--text-mono);
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
}

.spec-key {
  color: var(--text-muted);
}

.spec-val {
  font-weight: 800;
  color: var(--text-primary);
}

/* ==========================================================================
   Spotlight Cards: Streaming & AI Support
   ========================================================================== */
.spotlight-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.spotlight-box {
  background: var(--bg-card);
  border: var(--border-thick);
  box-shadow: var(--shadow-brutal-lg);
  padding: 38px 32px;
  display: flex;
  flex-direction: column;
}

.spotlight-tag {
  align-self: flex-start;
  font-family: var(--text-mono);
  font-size: 0.8rem;
  font-weight: 900;
  padding: 4px 10px;
  border: var(--border-stark);
  margin-bottom: 18px;
}

.tag-stream {
  background: #fef2f2;
  color: #ef4444;
  border-color: #ef4444;
}

.tag-ai {
  background: #ecfdf5;
  color: #059669;
  border-color: #059669;
}

.spotlight-h3 {
  font-size: 1.7rem;
  font-weight: 900;
  margin-bottom: 14px;
}

.pill-matrix {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 24px;
}

.pill-item {
  font-family: var(--text-mono);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--text-primary);
  box-shadow: 2px 2px 0px var(--text-primary);
}

.pill-item:hover {
  background: var(--color-gold);
  color: #09090b;
}

/* ==========================================================================
   Realistic Pricing Table
   ========================================================================== */
.pricing-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

.pricing-card {
  background: var(--bg-card);
  border: var(--border-stark);
  box-shadow: var(--shadow-brutal);
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pricing-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0px var(--text-primary);
}

.pricing-highlight {
  border: var(--border-thick);
  background: var(--bg-card);
  box-shadow: 6px 6px 0px var(--color-gold);
}

[data-theme="dark"] .pricing-highlight {
  box-shadow: 6px 6px 0px #ffffff;
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-vermilion);
  color: #ffffff;
  font-family: var(--text-mono);
  font-size: 0.75rem;
  font-weight: 900;
  padding: 3px 12px;
  border: 2px solid #09090b;
  white-space: nowrap;
}

.plan-tier {
  font-family: var(--text-mono);
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.plan-summary {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 38px;
}

.price-display {
  margin: 18px 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--text-mono);
}

.price-sym {
  font-size: 1.3rem;
  font-weight: 900;
}

.price-val {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
}

.price-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.plan-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  flex-grow: 1;
  font-size: 0.88rem;
  border-top: 1px dashed var(--text-primary);
  padding-top: 16px;
}

.plan-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.chk-box {
  background: var(--color-gold);
  border: 1px solid #09090b;
  color: #09090b;
  font-weight: 900;
  font-size: 0.7rem;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.pricing-cta {
  width: 100%;
  padding: 12px;
}

/* ==========================================================================
   User Testimonials
   ========================================================================== */
.testimonials-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--bg-card);
  border: var(--border-stark);
  box-shadow: var(--shadow-brutal);
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.review-badge {
  font-family: var(--text-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-emerald);
  margin-bottom: 12px;
}

.review-text {
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 20px;
  flex-grow: 1;
}

.reviewer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--grid-line);
  padding-top: 14px;
}

.reviewer-avatar {
  width: 40px;
  height: 40px;
  background: var(--color-gold);
  border: 2px solid #09090b;
  font-weight: 900;
  font-family: var(--text-mono);
  color: #09090b;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-box {
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-card {
  background: var(--bg-card);
  border: var(--border-stark);
  box-shadow: 3px 3px 0px var(--text-primary);
}

.faq-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-primary);
  cursor: pointer;
  gap: 16px;
}

.faq-icon-btn {
  width: 26px;
  height: 26px;
  background: var(--color-gold);
  border: 1px solid #09090b;
  color: #09090b;
  font-weight: 900;
  font-family: var(--text-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-card.open .faq-icon-btn {
  transform: rotate(45deg);
  background: var(--color-vermilion);
  color: #fff;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 22px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-card.open .faq-content {
  max-height: 400px;
  padding: 0 22px 20px;
  border-top: 1px dashed var(--grid-line);
}

/* ==========================================================================
   Footer - Exactly 4 Specified Headings in New Tab
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: var(--bg-card);
  border-top: var(--border-thick);
  padding: 50px 0 35px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.footer-link {
  font-family: var(--text-mono);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-primary);
  padding: 8px 18px;
  border: var(--border-stark);
  box-shadow: 2px 2px 0px var(--text-primary);
  background: var(--bg-canvas);
  transition: all 0.15s ease;
}

.footer-link:hover {
  background: var(--color-gold);
  color: #09090b;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--text-primary);
}

.footer-copy {
  text-align: center;
  font-family: var(--text-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--grid-line);
  padding-top: 22px;
}

/* ==========================================================================
   Sub-pages / Recommended News Page
   ========================================================================== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.article-card {
  background: var(--bg-card);
  border: var(--border-stark);
  box-shadow: var(--shadow-brutal);
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.article-meta {
  font-family: var(--text-mono);
  font-size: 0.8rem;
  color: var(--color-vermilion);
  font-weight: 800;
  margin-bottom: 12px;
}

.article-title {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.article-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* ==========================================================================
   Responsive Adaptations (@media)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-headline {
    font-size: 2.8rem;
  }
  .features-matrix,
  .pricing-matrix {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-headline {
    font-size: 2.2rem;
  }
  .nav-links {
    display: none; /* Mobile header cleanup */
  }
  .features-matrix,
  .spotlight-matrix,
  .pricing-matrix,
  .testimonials-matrix,
  .article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .terminal-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .footer-link {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   Article Detail & SEO Long-Form Typography Enhancements
   ========================================================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--text-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumbs a {
  color: var(--text-primary);
  text-decoration: underline;
}
.breadcrumbs a:hover {
  color: var(--color-gold);
}

.article-header {
  margin-bottom: 36px;
  border-bottom: var(--border-stark);
  padding-bottom: 24px;
}
.article-header h1 {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--text-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.article-meta-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

.article-sidebar {
  position: sticky;
  top: 90px;
}
.toc-card {
  background: var(--bg-card);
  border: var(--border-stark);
  box-shadow: var(--shadow-brutal);
  padding: 20px;
}
.toc-title {
  font-family: var(--text-mono);
  font-size: 0.95rem;
  font-weight: 900;
  border-bottom: var(--border-stark);
  padding-bottom: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
}
.toc-list a {
  color: var(--text-secondary);
  line-height: 1.4;
  padding: 4px 6px;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}
.toc-list a:hover {
  color: var(--text-primary);
  border-left-color: var(--color-gold);
  background: var(--bg-panel);
  font-weight: 700;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.article-body h2 {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--text-primary);
  letter-spacing: -0.02em;
}
.article-body h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 28px 0 12px;
}
.article-body p {
  margin-bottom: 20px;
}
.article-body strong {
  color: var(--text-primary);
  font-weight: 800;
}
.article-body ul, .article-body ol {
  margin: 0 0 24px 24px;
}
.article-body li {
  margin-bottom: 8px;
}
.article-body blockquote {
  background: var(--bg-card);
  border-left: 5px solid var(--color-gold);
  padding: 16px 20px;
  margin: 24px 0;
  border-top: 1px solid var(--grid-line);
  border-right: 1px solid var(--grid-line);
  border-bottom: 1px solid var(--grid-line);
  box-shadow: 2px 2px 0px var(--text-primary);
  font-size: 0.98rem;
  color: var(--text-primary);
}
.article-table-wrapper {
  overflow-x: auto;
  margin: 28px 0;
  border: var(--border-stark);
  box-shadow: var(--shadow-brutal);
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 0.9rem;
  text-align: left;
}
.article-table th {
  background: #09090b;
  color: #facc15;
  font-family: var(--text-mono);
  padding: 12px 14px;
  font-weight: 800;
  border: 1px solid #27272a;
}
[data-theme="dark"] .article-table th {
  background: #facc15;
  color: #09090b;
}
.article-table td {
  padding: 12px 14px;
  border: 1px solid var(--grid-line);
  color: var(--text-primary);
}
.article-table tr:nth-child(even) {
  background: var(--bg-panel);
}

.article-faq {
  margin-top: 50px;
  padding-top: 30px;
  border-top: var(--border-thick);
}

.related-posts-section {
  margin-top: 60px;
  padding-top: 30px;
  border-top: var(--border-thick);
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.related-card {
  background: var(--bg-card);
  border: var(--border-stark);
  box-shadow: 2px 2px 0px var(--text-primary);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.related-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--color-gold);
}
.related-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.4;
}
.related-date {
  font-family: var(--text-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
}

@media (max-width: 900px) {
  .article-container {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
    margin-bottom: 30px;
  }
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}
