/* ─── GrowDirect Shared CSS ─── */
/* Common patterns for all site/ pages */

/* ─── CUSTOM PROPERTIES ─── */
:root {
  --ink: #0D1117;
  --ink2: #0A0E14;
  --card: #131920;
  --card-hover: #171E26;
  --border: #1C2330;
  --border-light: #252D3A;
  --btc: #F7931A;
  --canary: #FBBF24;
  --gold: #FBBF24;
  --gold-dim: #D97706;
  --amber: #F59E0B;
  --text: #E5E7EB;
  --text2: #8B919A;
  --text3: #505865;
  --text4: #363D48;
  --green: #059669;
  --blue: #3B82F6;
  --red: #EF4444;
  --orange: #F97316;
  --critical: #DC2626;
  --high: #F59E0B;
  --medium: #3B82F6;
  --low: #6B7280;
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }

/* ─── BASE ─── */
body {
  background: var(--ink);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─── GRAIN OVERLAY ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' 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");
}

/* ─── TYPOGRAPHY ─── */
/* Inter: body text (loaded per-page via Google Fonts)
   Space Grotesk: headings
   Space Mono: monospace, labels, nav
   Bebas Neue: logo (hub)
   DM Serif Display: hero accents (hub) */

/* ─── DOC NAV BAR ─── */
/* Used on site/docs/ pages for consistent back-navigation */
.doc-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 52px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 48px);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.doc-nav a {
  color: var(--text3);
  text-transform: uppercase;
  transition: color 0.2s;
}

.doc-nav a:hover { color: var(--canary); }

.doc-nav.scrolled {
  box-shadow: 0 1px 0 var(--border-light);
}

.doc-nav .doc-nav-title {
  color: var(--text2);
  margin-left: auto;
}

/* ─── SITE FOOTER ─── */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px clamp(24px, 5vw, 64px);
  border-top: 1px solid var(--border);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--text4);
  letter-spacing: 0.05em;
}

.site-footer a {
  color: var(--text3);
  transition: color 0.2s;
}

.site-footer a:hover { color: var(--canary); }

.footer-right {
  display: flex;
  gap: 24px;
}

/* ─── SECTION STRUCTURE ─── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px clamp(24px, 5vw, 64px);
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--canary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
  position: relative;
  padding-left: 28px;
}

.section-label::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 1px;
  background: var(--canary);
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 720px;
  margin-bottom: 48px;
  line-height: 1.8;
}

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

/* ─── SEVERITY BADGES ─── */
.sev-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sev-badge.critical { background: rgba(220,38,38,0.15); color: var(--critical); }
.sev-badge.high { background: rgba(245,158,11,0.15); color: var(--high); }
.sev-badge.medium { background: rgba(59,130,246,0.15); color: var(--medium); }
.sev-badge.low { background: rgba(107,114,128,0.15); color: var(--low); }

/* ─── GATE PATTERN ─── */
/* Password-gated content sections */
.gate-input {
  width: 100%;
  max-width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 18px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}

.gate-input:focus { border-color: var(--canary); }

.gate-btn {
  width: 100%;
  max-width: 280px;
  background: linear-gradient(135deg, var(--btc), var(--gold));
  border: none;
  border-radius: 6px;
  padding: 14px;
  color: #000;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.gate-btn:hover { opacity: 0.9; }

.gate-error {
  display: none;
  color: var(--red);
  font-size: 11px;
  font-family: 'Space Mono', monospace;
}

/* ─── RESPONSIVE ─── */

/* Mobile: < 768px */
@media (max-width: 767px) {
  .section {
    padding: 48px clamp(16px, 4vw, 24px);
  }

  .section-title {
    font-size: 1.5rem;
  }

  .doc-nav {
    gap: 12px;
    padding: 0 16px;
    font-size: 10px;
  }

  .site-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 24px 16px;
  }

  .footer-right {
    justify-content: center;
  }
}
