/* ══════════════════════════════════════════════════
   GLITCHLIT SYSTEMS — Global Styles
   Shared across all pages
   ══════════════════════════════════════════════════ */

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

/* ── CSS VARIABLES ── */
:root {
  --bg: #0a0a0c;
  --surface: #111114;
  --surface-hover: #18181c;
  --border: #222228;
  --border-light: #2a2a32;
  --text: #e8e6e2;
  --text-dim: #8a8890;
  --text-muted: #5a5860;
  --accent: #c45d2c;
  --accent-dim: rgba(196, 93, 44, 0.15);
  --accent-glow: rgba(196, 93, 44, 0.08);
  --white: #f0ede8;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--white); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.nav-logo .glitch-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  width: 16px;
  height: 16px;
  justify-content: center;
}
.nav-logo .glitch-mark .s1,
.nav-logo .glitch-mark .s2,
.nav-logo .glitch-mark .s3 {
  height: 2.5px;
  background: var(--accent);
}
.nav-logo .glitch-mark .s1 { width: 100%; transform: translateX(1px); }
.nav-logo .glitch-mark .s2 { width: 45%; transform: translateX(-2px); }
.nav-logo .glitch-mark .s3 { width: 100%; transform: translateX(1px); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

/* ── GLITCH-WORD TREATMENT ── */
.glitch-word {
  position: relative;
  display: inline-block;
}
.glitch-word::before,
.glitch-word::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  color: var(--white);
}
.glitch-word::before {
  clip-path: polygon(0 35%, 100% 35%, 100% 50%, 0 50%);
  transform: translateX(-4px);
  color: var(--accent);
  opacity: 0.5;
}
.glitch-word::after {
  clip-path: polygon(0 55%, 100% 55%, 100% 68%, 0 68%);
  transform: translateX(3px);
  color: var(--accent);
  opacity: 0.35;
}

/* ── SECTION-TITLE .gl TREATMENT ── */
.section-title .gl {
  position: relative;
  display: inline;
}
.section-title .gl::after {
  content: attr(data-t);
  position: absolute;
  left: 0;
  top: 0;
  clip-path: polygon(0 40%, 100% 40%, 100% 55%, 0 55%);
  transform: translateX(-3px);
  color: var(--accent);
  opacity: 0.35;
}

/* ── SECTION LABELS & TITLES ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  max-width: 700px;
  position: relative;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* ── SECTION-DARK ── */
.section-dark {
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.section-dark > * {
  position: relative;
  z-index: 1;
}
.section-dark section {
  padding: 6rem 2rem;
}

/* ── BINARY-BG ── */
.binary-bg {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 400px;
  height: 300px;
  opacity: 0.06;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.3;
  color: var(--accent);
  overflow: hidden;
  mask-image: radial-gradient(ellipse at bottom right, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at bottom right, black 0%, transparent 70%);
}

/* ── WARM-GLOW ── */
.warm-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 93, 44, 0.04) 0%, transparent 70%);
  pointer-events: none;
}
.warm-glow.top-right { top: -200px; right: -100px; }
.warm-glow.bottom-left { bottom: -200px; left: -100px; }

/* ── GRID-OVERLAY ── */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent, black 30%, black 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, black 30%, black 70%, transparent);
}

/* ── HERO-CTA ── */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(196, 93, 44, 0.3);
  transition: border-color 0.2s, color 0.2s;
}
.hero-cta:hover { border-color: var(--accent); color: var(--white); }
.hero-cta .arrow { transition: transform 0.2s; }
.hero-cta:hover .arrow { transform: translateX(4px); }

/* ── GLITCH LINE ── */
.glitch-line {
  height: 2px;
  background: var(--border);
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}
.glitch-line::before {
  content: '';
  position: absolute;
  height: 2px;
  width: 60px;
  background: var(--accent);
  left: 15%;
  opacity: 0.6;
}
.glitch-line::after {
  content: '';
  position: absolute;
  height: 2px;
  width: 30px;
  background: var(--accent);
  left: calc(15% + 68px);
  opacity: 0.3;
}

/* ── DIVIDER ── */
.divider {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 3px;
  position: relative;
}
.divider::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light) 20%, var(--border-light) 80%, transparent);
}
.divider::after {
  content: '';
  display: block;
  height: 1px;
  margin-top: 2px;
  background: linear-gradient(90deg, transparent, var(--border-light) 25%, var(--border-light) 75%, transparent);
  transform: translateX(8px);
  opacity: 0.4;
}

/* ── FOOTER ── */
footer {
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
}

footer .copyright {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

footer .footer-links {
  display: flex;
  gap: 1.5rem;
}
footer .footer-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
footer .footer-links a:hover { color: var(--text-dim); }

/* ── RESPONSIVE (shared) ── */
@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
}
