/* ══════════════════════════════════════════════════════════════
   WEIRDMAKER BASE STYLES — Reset + Global Patterns
   Requires: tokens.css loaded first
══════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-brand);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Ambient Background Glow ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(100,60,200,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(40,200,160,0.04) 0%, transparent 50%);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent2); }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-brand);
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

code, .mono { font-family: var(--font-mono); }
.terminal { font-family: var(--font-terminal); }

/* ── Layout Utilities ── */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Card Pattern ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--duration) var(--ease);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border2);
  transform: translateY(-1px);
}

/* ── Button Patterns ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-family: var(--font-brand);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: none;
  transition: all var(--duration) var(--ease);
}
.btn--primary {
  background: linear-gradient(135deg, #6c4de6, #8b5cf6);
  color: #fff;
}
.btn--primary:hover {
  background: linear-gradient(135deg, #7c5df6, #9b6fff);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(140,92,246,0.3);
}
.btn--secondary {
  background: transparent;
  color: var(--accent2);
  border: 1px solid var(--accent2);
}
.btn--secondary:hover {
  background: var(--accent2-dim);
  color: var(--accent2);
}
.btn--hot {
  background: linear-gradient(135deg, #ff3c78, #ff6b6b);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Badge Pattern ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  border-radius: 100px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge--accent {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(180,138,255,0.25);
}
.badge--teal {
  background: var(--accent2-dim);
  color: var(--accent2);
  border: 1px solid rgba(74,255,204,0.2);
}
.badge--hot {
  background: rgba(255,60,120,0.12);
  color: var(--hot);
  border: 1px solid rgba(255,60,120,0.25);
}

/* ── CRT Scanlines (opt-in) ── */
.crt-scanlines::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  z-index: 1;
}

/* ── Glow Effect (opt-in) ── */
.glow {
  text-shadow:
    0 0 10px rgba(180,138,255,0.3),
    0 0 30px rgba(180,138,255,0.15);
}
.glow--teal {
  text-shadow:
    0 0 10px rgba(74,255,204,0.3),
    0 0 30px rgba(74,255,204,0.15);
}

/* ── Form Inputs ── */
.input {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: 10px 16px;
  transition: border-color var(--duration) var(--ease);
  width: 100%;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
.input::placeholder {
  color: var(--text3);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Skip Link (a11y) ── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #000;
  padding: 8px 16px;
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  .container { padding: 0 16px; }
}
