/* ===============================================================
   GATESIG DOCS — Shared Styles
   Inherits design language from main site (index.html)
   =============================================================== */

:root {
  --bg-deep: #04070d;
  --bg-primary: #080c15;
  --bg-card: #0c111c;
  --bg-card-hover: #101828;
  --border: rgba(34, 211, 238, 0.08);
  --border-bright: rgba(34, 211, 238, 0.18);
  --text-primary: #e8edf5;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;
  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.15);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.12);
  --green: #10b981;
  --green-bright: #00ff88;
  --red: #ef4444;
  --purple: #a78bfa;
  --gold: #d4a853;
  --gold-light: #f0d78c;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ===============================================================
   NAVIGATION
   =============================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--amber);
  text-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
  text-decoration: none;
}
.nav-brand img {
  height: 28px;
  width: auto;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.4);
}
.nav-links a:hover { color: var(--cyan); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav { padding: 12px 20px; }
}

/* ===============================================================
   LAYOUT
   =============================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.doc-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .doc-container { padding: 0 20px; }
}

/* ===============================================================
   DOCS HERO (smaller than main site hero)
   =============================================================== */
.doc-hero {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}
.doc-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(34, 211, 238, 0.04) 0%, transparent 70%),
    linear-gradient(rgba(34, 211, 238, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 60px 60px, 60px 60px;
}
.doc-hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.doc-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.doc-hero-title .accent {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.doc-hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

/* ===============================================================
   DOCS CONTENT
   =============================================================== */
.doc-content {
  padding: 0 0 120px;
  position: relative;
}

.doc-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 64px 0 20px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  color: var(--text-primary);
}
.doc-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.doc-content h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  margin: 40px 0 12px;
  color: var(--text-primary);
}

.doc-content p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.doc-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.doc-content a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 211, 238, 0.3);
  transition: border-color 0.3s;
}
.doc-content a:hover {
  border-bottom-color: var(--cyan);
}

/* Gate cards */
.gate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: border-color 0.3s, transform 0.3s;
}
.gate-card:hover {
  border-color: var(--border-bright);
  transform: translateX(4px);
}
.gate-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--bg-deep);
  background: var(--cyan);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.gate-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.gate-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Stats callout */
.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  margin: 32px 0;
}
.callout p {
  margin-bottom: 0;
  font-size: 15px;
}
.callout .stat {
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  font-weight: 600;
}

/* Docs index cards */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-decoration: none;
  transition: border-color 0.3s, transform 0.3s;
  display: block;
}
.doc-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
}
.doc-card-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.doc-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.doc-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
  margin: 0 auto;
  max-width: 800px;
}

/* ===============================================================
   FOOTER
   =============================================================== */
.site-footer {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--amber);
  margin-bottom: 8px;
}
.footer-brand .accent {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.footer-text a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.footer-text a:hover {
  color: var(--cyan);
}
.footer-legal {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===============================================================
   SCROLL ANIMATIONS
   =============================================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
