/* RHCC Design System - Core Styles */
/* Version: 1.0 */

/* ==================== CSS VARIABLES ==================== */

:root {
  /* Primary Colors - Ocean Blue */
  --primary-900: #003D5C;
  --primary-700: #005580;
  --primary-500: #006BA6;
  --primary-300: #4D9BC4;
  --primary-100: #E5F3FA;

  /* Secondary Colors - Sunset Orange */
  --secondary-900: #CC3600;
  --secondary-700: #E54D1E;
  --secondary-500: #FF6B35;
  --secondary-300: #FF9470;
  --secondary-100: #FFE8E0;

  /* Accent Colors - Fresh Teal */
  --accent-900: #007A7A;
  --accent-700: #009999;
  --accent-500: #00B4B4;
  --accent-300: #4DCCCC;
  --accent-100: #E0F7F7;

  /* Neutral Colors */
  --neutral-900: #1A1A1A;
  --neutral-700: #4A4A4A;
  --neutral-500: #757575;
  --neutral-300: #D1D1D1;
  --neutral-100: #F5F5F5;
  --neutral-50: #FAFAFA;
  --white: #FFFFFF;

  /* Semantic Colors */
  --success-700: #2E7D32;
  --success-500: #4CAF50;
  --success-100: #E8F5E9;

  --warning-700: #F57C00;
  --warning-500: #FF9800;
  --warning-100: #FFF3E0;

  --error-700: #C62828;
  --error-500: #F44336;
  --error-100: #FFEBEE;

  --info-700: #1976D2;
  --info-500: #2196F3;
  --info-100: #E3F2FD;

  /* Typography */
  --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 80px;
  --space-11: 96px;
  --space-12: 128px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
  --shadow-primary: 0 8px 24px rgba(0, 107, 166, 0.25);
  --shadow-secondary: 0 8px 24px rgba(255, 107, 53, 0.25);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;

  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Container Widths */
  --container-xs: 480px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;
}

/* ==================== RESET & BASE ==================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-secondary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--neutral-900);
  background-color: var(--white);
}

/* ==================== TYPOGRAPHY ==================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-5);
  color: var(--neutral-900);
}

.hero-text {
  font-size: 72px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 56px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 40px;
  font-weight: 600;
}

h3 {
  font-size: 32px;
  font-weight: 600;
}

h4 {
  font-size: 24px;
  font-weight: 600;
}

h5 {
  font-size: 20px;
  font-weight: 600;
}

h6 {
  font-size: 18px;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.body-large {
  font-size: 18px;
  line-height: 1.7;
}

.body-small {
  font-size: 14px;
  line-height: 1.6;
}

.caption {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.eyebrow {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-500);
}

/* Mobile Typography */
@media (max-width: 768px) {
  .hero-text {
    font-size: 48px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 32px;
  }

  h3 {
    font-size: 24px;
  }

  h4 {
    font-size: 20px;
  }
}

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-default);
  min-height: 56px;
  min-width: 160px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--primary-500);
  color: var(--white);
  border-color: var(--primary-500);
}

.btn-primary:hover {
  background-color: var(--primary-700);
  box-shadow: var(--shadow-primary);
}

.btn-secondary {
  background-color: var(--secondary-500);
  color: var(--white);
  border-color: var(--secondary-500);
}

.btn-secondary:hover {
  background-color: var(--secondary-700);
  box-shadow: var(--shadow-secondary);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-500);
  border-color: var(--primary-500);
}

.btn-outline:hover {
  background-color: var(--primary-500);
  color: var(--white);
}

.btn-ghost {
  background-color: transparent;
  color: var(--primary-500);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--primary-100);
}

.btn-large {
  padding: var(--space-5) var(--space-7);
  font-size: 18px;
  min-height: 64px;
}

.btn-small {
  padding: var(--space-3) var(--space-5);
  font-size: 14px;
  min-height: 44px;
  min-width: 120px;
}

.btn:disabled {
  background-color: var(--neutral-300);
  border-color: var(--neutral-300);
  color: var(--neutral-500);
  cursor: not-allowed;
  opacity: 0.6;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ==================== CARDS ==================== */

.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  border: 1px solid var(--neutral-100);
  transition: all var(--duration-base) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-header {
  margin-bottom: var(--space-5);
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.card-subtitle {
  font-size: 16px;
  color: var(--neutral-700);
}

.card-body {
  margin-bottom: var(--space-5);
}

.card-footer {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--neutral-100);
}

/* ==================== FORMS ==================== */

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-family: var(--font-secondary);
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-4);
  font-family: var(--font-secondary);
  font-size: 16px;
  color: var(--neutral-900);
  background-color: var(--white);
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius-md);
  transition: all var(--duration-base) var(--ease-default);
  min-height: 56px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(0, 107, 166, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-helper {
  display: block;
  font-size: 13px;
  color: var(--neutral-700);
  margin-top: var(--space-2);
}

.form-error {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--error-500);
  margin-top: var(--space-2);
}

.form-input.error {
  border-color: var(--error-500);
}

.form-input.success {
  border-color: var(--success-500);
}

/* ==================== BADGES ==================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px 12px;
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  line-height: 1;
}

.badge-success {
  background-color: var(--success-500);
  color: var(--white);
}

.badge-warning {
  background-color: var(--warning-500);
  color: var(--white);
}

.badge-error {
  background-color: var(--error-500);
  color: var(--white);
}

.badge-info {
  background-color: var(--info-500);
  color: var(--white);
}

.badge-neutral {
  background-color: var(--neutral-700);
  color: var(--white);
}

/* ==================== LAYOUT ==================== */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-10);
}

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

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

@media (max-width: 768px) {
  .section {
    padding: var(--space-9) 0;
  }
}

.grid {
  display: grid;
  gap: var(--space-6);
}

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

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

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

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

/* ==================== UTILITIES ==================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-500); }
.text-secondary { color: var(--secondary-500); }
.text-accent { color: var(--accent-500); }
.text-muted { color: var(--neutral-700); }

.bg-primary { background-color: var(--primary-500); }
.bg-secondary { background-color: var(--secondary-500); }
.bg-accent { background-color: var(--accent-500); }
.bg-neutral { background-color: var(--neutral-50); }
.bg-white { background-color: var(--white); }

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--accent-500) 100%);
}

.bg-gradient-hero {
  background: linear-gradient(to bottom, rgba(0, 107, 166, 0.7) 0%, rgba(0, 180, 180, 0.5) 100%);
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.animate-fadeIn {
  animation: fadeIn var(--duration-slow) var(--ease-out) forwards;
}

.animate-slideUp {
  animation: slideUp var(--duration-slow) var(--ease-out) forwards;
}

.animate-slideDown {
  animation: slideDown var(--duration-slow) var(--ease-out) forwards;
}

.animate-pulse {
  animation: pulse 2s var(--ease-default) infinite;
}

/* ==================== RESPONSIVE ==================== */

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }
}
