/* ═══════════════════════════════════════════════════════════════
   ShadowX Mirrors — shadowx-mirrors.online
   Fonts: Space Grotesk (headings), DM Sans (body), JetBrains Mono (code)
   Palette: deep navy with teal/coral accents
   ═══════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;
  --bg: #060d18;
  --bg-deep: #030810;
  --surface: rgba(10, 22, 40, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --text: #edf2f8;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.14);
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.15);
  --coral: #fb7185;
  --coral-dim: rgba(251, 113, 133, 0.12);
  --success: #4ade80;
  --warning: #fbbf24;
  --max-w: 1120px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(ellipse at 15% 10%, rgba(45, 212, 191, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(251, 113, 133, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #5eead4; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 0;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
h3 { font-size: 1.1rem; margin-bottom: 8px; }

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-radius: 6px;
  padding: 2px 6px;
  overflow-wrap: anywhere;
}

/* ─── LAYOUT ─────────────────────────────────────────────────────────── */

.container {
  width: min(calc(100% - 40px), var(--max-w));
  margin-inline: auto;
}

.section {
  padding-block: 64px;
  scroll-margin-top: 20px;
}
.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: 28px;
}
.section-head p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 6px 0 0;
}

/* ─── SKIP LINK ────────────────────────────────────────────────────────── */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--accent);
  color: #062018;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  transform: translateY(-200%);
  transition: transform 200ms ease;
}
.skip-link:focus { transform: translateY(0); }

/* ─── HEADER / NAV ─────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 13, 24, 0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(45, 212, 191, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding-block: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(45, 212, 191, 0.3);
  background: rgba(45, 212, 191, 0.06);
  padding: 4px;
  transition: transform 300ms ease, box-shadow 300ms ease;
}
.brand:hover .brand-logo {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.2);
}

.brand-copy { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-sub {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── NAV: the distinctive pill nav ────────────────────────────────────── */

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-link {
  position: relative;
  padding: 8px 16px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  transition: color 200ms ease, background 200ms ease;
}
.nav-link:hover { color: var(--text); background: rgba(45, 212, 191, 0.08); }
.nav-link.active {
  color: #062018;
  background: linear-gradient(135deg, var(--accent), #5eead4);
  box-shadow: 0 2px 12px rgba(45, 212, 191, 0.3);
}

/* ─── MOBILE NAV ───────────────────────────────────────────────────────── */

.mobile-nav { display: none; }
.mobile-nav summary {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary::before { content: "☰"; font-size: 1.1rem; color: var(--text); }
.mobile-nav[open] summary::before { content: "✕"; }

.mobile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 20px;
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  min-width: 200px;
}
.mobile-menu a {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}
.mobile-menu a:hover { background: var(--surface-soft); }

/* ─── HERO ─────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  padding-block: clamp(56px, 8vw, 100px) 60px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 14px;
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.06);
  font-size: 0.78rem;
  font-weight: 600;
  color: #a7f3d0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.lead {
  max-width: 680px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ─── BUTTONS ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.25), rgba(15, 118, 110, 0.4));
  border-color: rgba(45, 212, 191, 0.35);
  color: #f0fdfa;
}
.btn-primary:hover {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.35), rgba(15, 118, 110, 0.55));
  box-shadow: 0 4px 20px rgba(45, 212, 191, 0.2);
  border-color: rgba(45, 212, 191, 0.5);
}

/* ─── STATUS PANEL ───────────────────────────────────────────────────────── */

.status-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(10, 30, 50, 0.9), rgba(6, 18, 35, 0.95));
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
}

.status-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.status-detail {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.pill-ok {
  color: #a7f3d0;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

/* ─── MIRROR CARDS ───────────────────────────────────────────────────────── */

.mirror-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mirror-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}
.mirror-card:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 212, 191, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(45, 212, 191, 0.06);
}

.mirror-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.mirror-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--accent);
}

.kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.addr-box {
  margin-block: 16px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}
.addr-box code {
  font-size: 0.82rem;
  background: none;
  border: none;
  padding: 0;
  color: #d8e6ff;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 5px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.74rem;
  color: var(--muted);
}

.mirror-cta { margin-top: auto; }
.mirror-cta .btn { width: 100%; }

.note {
  margin-top: 24px;
  padding: 16px 18px;
  background: rgba(45, 212, 191, 0.05);
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: #cbd5e1;
}

/* ─── STEPS ─────────────────────────────────────────────────────────────── */

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 64px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 250ms ease, border-color 250ms ease;
}
.steps li:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.25);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 18px;
  left: 22px;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--coral);
  opacity: 0.7;
}
.steps p { color: var(--muted); font-size: 0.9rem; }
.steps a { font-weight: 600; }

/* ─── GUIDE CARDS ────────────────────────────────────────────────────────── */

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 250ms ease, border-color 250ms ease;
}
.guide-card:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.25);
}
.guide-card .kicker { margin-bottom: 8px; }
.guide-card h3 { margin-bottom: 10px; }
.guide-card p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
  flex-grow: 1;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
  margin-top: auto;
}
.text-link:hover { color: #5eead4; }

/* ─── FAQ ───────────────────────────────────────────────────────────────── */

.faq-list { display: grid; gap: 12px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 200ms ease;
}
.faq-item:hover { border-color: rgba(45, 212, 191, 0.2); }

.faq-item summary {
  position: relative;
  padding: 16px 48px 16px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 400;
  transition: transform 200ms ease;
}
.faq-item[open] summary::after {
  content: "−";
}

.faq-body {
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.faq-body p { margin: 0 0 10px; }
.faq-body p:last-child { margin-bottom: 0; }

/* ─── PAGE WRAP (inner pages) ────────────────────────────────────────────── */

.page-wrap {
  padding-block: 40px 60px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--muted);
}
.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: rgba(148, 163, 184, 0.4);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] { color: var(--text); }

.prose {
  max-width: 780px;
  padding: clamp(24px, 5vw, 48px);
  background: rgba(8, 18, 35, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.prose h1 { margin-bottom: 20px; }
.prose h2 { margin-top: 2.2em; font-size: 1.5rem; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }
.prose p { color: #cbd5e1; margin: 0 0 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose a { font-weight: 600; }
.prose strong { color: var(--text); }

.prose-center {
  text-align: center;
  padding-block: 80px;
}
.prose-center .btn { margin-top: 20px; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.related {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.related h2 { font-size: 1.2rem; margin-bottom: 14px; }
.related ul { padding-left: 20px; }
.related li { margin-bottom: 8px; color: var(--muted); font-size: 0.9rem; }
.related a { color: var(--accent); }

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */

.site-footer {
  margin-top: 40px;
  padding-block: 36px 44px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(3, 8, 16, 0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 32px;
  margin-bottom: 28px;
}

.footer-title {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
}
.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.footer-links {
  display: grid;
  gap: 6px;
  align-content: start;
}
.footer-links a {
  font-size: 0.84rem;
  color: var(--muted);
  transition: color 200ms ease;
}
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ─── SCROLL ANIMATIONS ───────────────────────────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .site-nav { display: none; }
  .mobile-nav { display: block; }

  .hero { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--max-w)); }
  .mirror-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .section { padding-block: 48px; }
  .mirror-card, .status-panel { padding: 20px; }
  .hero { padding-block: 44px 48px; }
  .header-inner { min-height: 60px; }
  .brand-logo { width: 30px; height: 30px; }
  .brand-name { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
}
