/* ===================================================================
   RoEx Marketing Theme - Design System Variables & Utilities
   Extracted from: roexaudio.com (Home + Mastering pages only)
   =================================================================== */

/* === CSS Variables (Design Tokens) === */
:root {
  /* Typography */
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* Font Weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  
  /* Font Sizes */
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fs-3xl: 32px;
  --fs-4xl: 40px;
  --fs-5xl: 48px;
  --fs-6xl: 64px;
  --fs-7xl: 80px;
  --fs-8xl: 96px;
  
  /* Line Heights */
  --lh-xs: 1.4;
  --lh-sm: 1.45;
  --lh-base: 1.5;
  --lh-md: 1.55;
  --lh-lg: 1.6;
  --lh-xl: 1.4;
  --lh-2xl: 1.3;
  --lh-3xl: 1.25;
  --lh-4xl: 1.2;
  --lh-5xl: 1.15;
  --lh-6xl: 1.1;
  --lh-7xl: 1.05;
  --lh-8xl: 1.05;
  
  /* Colors */
  --c-bg: #171717;
  --c-surface: #1f1f1f;
  --c-text: #ffffff;
  --c-muted: rgba(255, 255, 255, 0.6);
  --c-dimmed: rgba(255, 255, 255, 0.4);
  --c-heading: #ffffff;
  --c-border: rgba(255, 255, 255, 0.07);
  --c-border-hover: rgba(255, 255, 255, 0.12);
  --c-link: #a5f3fc;
  --c-link-hover: #02abd3;
  --c-primary: #02abd3;
  --c-primary-hover: #0398ba;
  --c-primary-text: #ffffff;
  --c-accent: #a5f3fc;
  --c-success: #81eea8;
  --c-overlay: rgba(23, 23, 23, 0.7);
  
  /* Spacing Scale */
  --sp-0: 0;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;
  --sp-40: 160px;
  
  /* Border Radius */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 24px;
  --r-full: 9999px;
  
  /* Shadows */
  --shadow-sm: rgba(0, 0, 0, 0.12) 0px -0.5px 0px 0px inset, rgba(0, 0, 0, 0.06) 0px 1px 2px -0.5px;
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.35);
  
  /* Container */
  --container-max: 1200px;
}

/* === Base Styles === */
html {
  color-scheme: dark;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  color: var(--c-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-2xl);
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-6);
}

h1 {
  font-size: var(--fs-6xl);
  line-height: var(--lh-6xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--fs-5xl);
  line-height: var(--lh-5xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--fs-3xl);
  line-height: var(--lh-3xl);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.02em;
}

h4 {
  font-size: var(--fs-2xl);
  line-height: var(--lh-2xl);
  font-weight: var(--fw-semibold);
}

h5 {
  font-size: var(--fs-xl);
  line-height: var(--lh-xl);
  font-weight: var(--fw-semibold);
}

h6 {
  font-size: var(--fs-lg);
  line-height: var(--lh-lg);
  font-weight: var(--fw-semibold);
}

p, li {
  font-size: var(--fs-md);
  line-height: var(--lh-md);
  margin: 0 0 var(--sp-4);
}

p.lead {
  font-size: var(--fs-xl);
  line-height: var(--lh-xl);
  color: var(--c-muted);
}

small {
  font-size: var(--fs-sm);
  color: var(--c-muted);
}

a {
  color: var(--c-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--c-link-hover);
}

a:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* === Layout === */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--sp-6);
  padding-right: var(--sp-6);
}

.section {
  padding: var(--sp-24) 0;
}

.section-hero {
  padding: calc(var(--sp-24) * 2) 0;
  text-align: center;
}

/* === Grid System === */
.grid {
  display: grid;
  gap: var(--sp-8);
  align-items: stretch;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* === Cards === */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-8);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  border-color: var(--c-border-hover);
  box-shadow: var(--shadow-md);
}

.card-header {
  margin-bottom: var(--sp-6);
}

.card-header h3 {
  margin-bottom: var(--sp-2);
}

.card-body {
  margin-bottom: var(--sp-6);
  flex-grow: 1;
}

.card-footer {
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.875em 1.5em;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--c-primary);
  color: var(--c-primary-text);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--c-primary-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--c-surface);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}

.btn-secondary:hover {
  border-color: var(--c-border-hover);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

.btn-large {
  padding: 1.125em 2em;
  font-size: var(--fs-md);
}

.btn-small {
  padding: 0.625em 1em;
  font-size: var(--fs-sm);
}

/* === Feature Blocks === */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-8);
  margin: var(--sp-16) 0;
}

.feature-item {
  text-align: center;
  padding: var(--sp-8);
}

.feature-icon {
  font-size: var(--fs-6xl);
  color: var(--c-accent);
  margin-bottom: var(--sp-4);
}

.feature-title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-3);
}

.feature-description {
  color: var(--c-muted);
  font-size: var(--fs-md);
}

/* === Metrics / KPI Display === */
.metric {
  text-align: center;
  padding: var(--sp-6);
}

.metric-value {
  font-size: var(--fs-6xl);
  font-weight: var(--fw-bold);
  color: var(--c-heading);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.metric-label {
  font-size: var(--fs-base);
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === FAQ Section === */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--c-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  color: var(--c-heading);
  margin-bottom: var(--sp-3);
}

.faq-answer {
  font-size: var(--fs-md);
  color: var(--c-muted);
  line-height: var(--lh-md);
}

.faq-answer a {
  color: var(--c-link);
  font-weight: var(--fw-medium);
}

/* === Hero Section === */
.hero {
  padding: calc(var(--sp-24) * 2.5) 0;
  text-align: center;
}

.hero h1 {
  margin-bottom: var(--sp-6);
}

.hero .lead {
  max-width: 700px;
  margin: 0 auto var(--sp-8);
}

.hero-cta {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* === Navigation (Marketing Style) === */
.nav-marketing {
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--c-border);
}

.nav-marketing .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: var(--sp-8);
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--c-text);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--c-accent);
}

/* === Footer === */
.footer-marketing {
  padding: var(--sp-16) 0 var(--sp-8);
  border-top: 1px solid var(--c-border);
  margin-top: var(--sp-32);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--sp-8);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-border);
}

/* === Utility Classes === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--c-muted); }
.text-dimmed { color: var(--c-dimmed); }
.text-primary { color: var(--c-primary); }
.text-accent { color: var(--c-accent); }

.font-semibold { font-weight: var(--fw-semibold); }
.font-bold { font-weight: var(--fw-bold); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.mb-12 { margin-bottom: var(--sp-12); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }

.p-0 { padding: 0; }
.p-4 { padding: var(--sp-4); }
.p-6 { padding: var(--sp-6); }
.p-8 { padding: var(--sp-8); }

/* === Breakpoints & Responsive === */

/* Tablet (768px and below) */
@media screen and (max-width: 768px) {
  .container {
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
  }
  
  .section {
    padding: var(--sp-16) 0;
  }
  
  .section-hero,
  .hero {
    padding: var(--sp-20) 0;
  }
  
  h1 {
    font-size: clamp(40px, 10vw, 56px);
  }
  
  h2 {
    font-size: clamp(32px, 8vw, 40px);
  }
  
  h3 {
    font-size: clamp(24px, 6vw, 28px);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
  
  .nav-links {
    gap: var(--sp-4);
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    width: 100%;
  }
  
  .metric-value {
    font-size: var(--fs-5xl);
  }
}

/* Mobile (640px and below) */
@media screen and (max-width: 640px) {
  .section {
    padding: var(--sp-12) 0;
  }
  
  .section-hero,
  .hero {
    padding: var(--sp-16) 0;
  }
  
  h1 {
    font-size: clamp(32px, 10vw, 40px);
  }
  
  h2 {
    font-size: clamp(28px, 8vw, 32px);
  }
  
  .card {
    padding: var(--sp-6);
  }
  
  .grid {
    gap: var(--sp-4);
  }
  
  .nav-marketing {
    padding: var(--sp-4) 0;
  }
  
  .metric-value {
    font-size: var(--fs-4xl);
  }
}

/* Large Desktop (1024px and above) */
@media screen and (min-width: 1024px) {
  h1 {
    font-size: clamp(56px, 6vw, 80px);
  }
  
  .grid {
    gap: var(--sp-10);
  }
  
  .hero .lead {
    font-size: var(--fs-2xl);
  }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--c-primary);
  color: var(--c-primary-text);
  padding: var(--sp-2) var(--sp-4);
  text-decoration: none;
  border-radius: 0 0 var(--r-md) 0;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}
