/* ============================================================
   base.css
   Self-hosted fonts, CSS variables, reset, typography, buttons.
   No external requests — every font file lives in /fonts.
   ============================================================ */

/* --- Self-hosted fonts (replaces the Google Fonts CDN link) --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/inter/inter-latin-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter/inter-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/jetbrains-mono-latin-500-normal.woff2') format('woff2');
}

/* --- Design tokens --- */
:root {
  --bg: #030305;
  --bg-elevated: #0a0a10;
  --bg-card: rgba(10, 10, 16, 0.7);
  --border: rgba(0, 240, 255, 0.12);
  --border-hover: rgba(0, 240, 255, 0.35);
  --text: #e8e8f0;
  --text-dim: #8890a0;
  --text-muted: #505868;
  --accent: #00f0ff;
  --accent-dim: rgba(0, 240, 255, 0.15);
  --accent-glow: rgba(0, 240, 255, 0.4);
  --secondary: #0080ff;
  --tertiary: #b829dd;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::selection { background: var(--accent-dim); color: var(--accent); }

/* --- Typography --- */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { color: var(--text-dim); }

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { text-shadow: 0 0 12px var(--accent-glow); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 500;
  cursor: pointer; transition: var(--transition); border: none;
  position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: #000; font-weight: 600;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--accent-glow), 0 4px 20px rgba(0,0,0,0.3);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* --- Visible keyboard focus (was missing entirely before) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
