/* rez0.com — Base: variables, reset, shared primitives */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

/* Animatable custom properties for palette transitions */
@property --accent {
  syntax: '<color>';
  inherits: true;
  initial-value: #29a3ff;
}
@property --accent-alt {
  syntax: '<color>';
  inherits: true;
  initial-value: #1e88e5;
}
@property --accent-glow {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(41,163,255,0.15);
}

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

:root {
  /* Typography */
  --font-sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SF Mono", monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --space-2xl: 96px;

  /* Layout */
  --max-width: 1140px;
  --header-height: 64px;
  --radius: 14px;
  --radius-sm: 8px;
}

/* ========== DARK MODE (default) ========== */
body.dark {
  --bg: #0b0f14;
  --bg-panel: #0f141b;
  --bg-card: rgba(15, 20, 27, 0.6);
  --bg-card-solid: #111823;
  --bg-header: rgba(11, 15, 20, 0.75);
  --text: #e9f0f6;
  --text-muted: #9db1c3;
  --text-dim: #5a6a7a;
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.14);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

/* ========== LIGHT MODE ========== */
body.light {
  --bg: #f5f5f0;
  --bg-panel: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-solid: #ffffff;
  --bg-header: rgba(245, 245, 240, 0.85);
  --text: #1a1f2e;
  --text-muted: #5a6478;
  --text-dim: #8a94a6;
  --border: rgba(0, 0, 0, 0.08);
  --border-bright: rgba(0, 0, 0, 0.14);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  color-scheme: light;
}

/* ========== BLUE PALETTE (default) ========== */
body[data-palette="blue"], body:not([data-palette]) {
  --accent: #29a3ff;
  --accent-alt: #1e88e5;
  --accent-glow: rgba(41, 163, 255, 0.15);
}

/* ========== GOLD PALETTE (AI page) ========== */
body[data-palette="gold"] {
  --accent: #C8981E;
  --accent-alt: #8B6914;
  --accent-glow: rgba(200, 152, 30, 0.15);
}

/* Palette transition */
body {
  transition: --accent 0.8s ease, --accent-alt 0.8s ease, --accent-glow 0.8s ease,
              background-color 0.3s ease, color 0.3s ease;
}

/* ========== BASE STYLES ========== */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

/* ========== LAYOUT ========== */
.container {
  width: min(var(--max-width), 92%);
  margin-inline: auto;
}

.section {
  padding: var(--space-lg) 0;
}

/* ========== SHARED COMPONENTS ========== */

/* Logo — matches rez0corp.com: IBM Plex Mono, light weight, ~2rem */
.logo {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}
.logo:hover { color: var(--text); }
.logo-zero { color: var(--accent-alt); transition: color 0.3s ease; }
.logo:hover .logo-zero { color: var(--text); }
.logo:hover span:not(.logo-zero) { color: var(--accent-alt); }

/* Section headings */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  transition: color 0.8s ease;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-bright);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.btn-primary {
  background: var(--accent-alt);
  border-color: var(--accent-alt);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.card:hover::before { opacity: 1; }

/* Accent text */
.accent { color: var(--accent); transition: color 0.8s ease; }

/* Screen reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
