/* ================================================================
   RAX VOICE STUDIO — global.css
   CSS Variables for all 3 themes, reset, typography
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── THEME VARIABLES ─────────────────────────────────────────── */

.theme-dark,
:root {
  --bg: #0a0a0b;
  --surface: #121214;
  --surface2: #18181b;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.12);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #22d3ee;
  --accent2: #a78bfa;
  --accent-rgb: 34, 211, 238;
  --accent2-rgb: 167, 139, 250;
  --btn-primary-bg: #22d3ee;
  --btn-primary-text: #081216;
  --input-bg: rgba(255, 255, 255, 0.07);
  --input-border: rgba(255, 255, 255, 0.18);
  --navbar-bg: rgba(10, 10, 11, 0.9);
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.7);
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
}

.theme-light {
  --bg: #fdfdfd;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: #dae1e7;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent: #0891b2;
  --accent2: #7c3aed;
  --accent-rgb: 8, 145, 178;
  --accent2-rgb: 124, 58, 237;
  --btn-primary-bg: #0891b2;
  --btn-primary-text: #ffffff;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --navbar-bg: rgba(253, 253, 253, 0.94);
  --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
}

.theme-glass {
  --bg: #05050a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface2: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(255, 255, 255, 0.07);
  --card-border: rgba(255, 255, 255, 0.22);
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --accent: #22d3ee;
  --accent2: #f472b6;
  --accent-rgb: 34, 211, 238;
  --accent2-rgb: 244, 114, 182;
  --btn-primary-bg: linear-gradient(135deg, #22d3ee, #f472b6);
  --btn-primary-text: #000000;
  --input-bg: rgba(255, 255, 255, 0.1);
  --input-border: rgba(34, 211, 238, 0.45);
  --navbar-bg: rgba(5, 5, 10, 0.85);
  --shadow: 0 0 40px rgba(34, 211, 238, 0.15);
  --danger: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;
}

/* ── RESET ───────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input,
textarea,
select {
  font-family: inherit;
  outline: none;
}

ul,
ol {
  list-style: none;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */

.text-hero {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
}

.text-h1 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
}

.text-h2 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
}

.text-h3 {
  font-size: 18px;
  font-weight: 600;
}

.text-body {
  font-size: 16px;
  font-weight: 400;
}

.text-small {
  font-size: 13px;
  font-weight: 400;
}

.text-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-accent {
  color: var(--accent);
}

.text-accent2 {
  color: var(--accent2);
}

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--success);
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LAYOUT ──────────────────────────────────────────────────── */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

.page-content {
  padding-top: 80px;
  /* navbar height */
  min-height: 100vh;
}

/* Spacing utilities */
.mt-4 {
  margin-top: 4px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mt-32 {
  margin-top: 32px;
}

.mt-48 {
  margin-top: 48px;
}

.mt-64 {
  margin-top: 64px;
}

.mb-4 {
  margin-bottom: 4px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-32 {
  margin-bottom: 32px;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-24 {
  gap: 24px;
}

/* ── SCROLLBAR ───────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-rgb), 0.5);
}

/* ── SELECTION ───────────────────────────────────────────────── */

::selection {
  background: rgba(var(--accent-rgb), 0.25);
  color: var(--text-primary);
}

/* ── THEME TRANSITION ────────────────────────────────────────── */

body * {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Exclude animations from transition override */
.no-transition,
.no-transition * {
  transition: none !important;
}