/* ============================================================
   OASIS MENTAL CARE — Design System
   Brand tokens, typography, layout, utilities
   ============================================================ */

/* ── Google Fonts ────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');

/* ── Root Tokens ────────────────────────────────── */
:root {
  /* Brand Colors */
  --color-primary: #2F584E;
  --color-primary-light: #3d7268;
  --color-primary-dark: #1e3a33;
  --color-primary-rgb: 47, 88, 78;

  --color-cream: #F6EFE4;
  --color-cream-dark: #EDE3D3;
  --color-cream-light: #FBF8F3;

  --color-gold: #F5E1A4;
  --color-gold-dark: #D4BF78;
  --color-gold-light: #FAF0CF;

  --color-warm: #E6AF91;
  --color-warm-light: #F0CCBA;

  --color-white: #FFFFFF;
  --color-black: #1A1A1A;
  --color-text: #2D2D2D;
  --color-text-light: #5A5A5A;
  --color-text-muted: #8A8A8A;
  --color-border: rgba(47, 88, 78, 0.12);

  /* Semantic Colors */
  --color-success: #4A8B6E;
  --color-warning: #D4A34A;
  --color-danger: #C75B5B;
  --color-info: #5B8EC7;

  /* Typography */
  --font-heading: 'Rubik', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Rubik', -apple-system, BlinkMacSystemFont, sans-serif;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Type Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;

  /* Borders */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px rgba(47, 88, 78, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 40px rgba(47, 88, 78, 0.1), 0 8px 16px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 30px rgba(47, 88, 78, 0.15);
  --shadow-gold: 0 4px 15px rgba(245, 225, 164, 0.3);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;

  /* Z-index */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-notification: 500;
}

/* ── Reset & Base ───────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: var(--fw-light);
  color: var(--color-text);
  background-color: var(--color-cream-light);
  line-height: var(--leading-normal);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-primary-light);
}

/* ── Typography ─────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  line-height: var(--leading-tight);
  color: var(--color-primary-dark);
}

h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

.text-sm {
  font-size: var(--text-sm);
}

.text-lg {
  font-size: var(--text-lg);
}

.text-xl {
  font-size: var(--text-xl);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-light {
  color: var(--color-text-light);
}

.text-primary {
  color: var(--color-primary);
}

.text-gold {
  color: var(--color-gold-dark);
}

.text-center {
  text-align: center;
}

.text-white {
  color: var(--color-white);
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-light);
  font-weight: var(--fw-regular);
}

.section-subtitle {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-gold-dark);
  margin-bottom: var(--space-3);
}

/* ── Layout ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: var(--container-md);
}

.container-wide {
  max-width: var(--container-2xl);
}

section {
  padding: var(--space-24) 0;
  position: relative;
}

.section-sm {
  padding: var(--space-16) 0;
}

.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 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;
}

.flex-col {
  flex-direction: column;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

/* ── Glassmorphism Card ─────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) var(--ease-out);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(245, 225, 164, 0.4);
}

.glass-card-dark {
  background: rgba(47, 88, 78, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-cream-light);
}

.glass-card-dark h3,
.glass-card-dark h4 {
  color: var(--color-gold-light);
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: var(--color-white);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-gold);
}

.btn-white {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn-white:hover {
  background: var(--color-cream);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
}

/* ── Tags & Badges ──────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  /* White contrast */
  color: var(--color-white);
  /* White text requested */
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-gold {
  background: rgba(245, 225, 164, 0.3);
  color: var(--color-gold-dark);
}

.badge-bilingual {
  background: linear-gradient(135deg, rgba(47, 88, 78, 0.1), rgba(245, 225, 164, 0.2));
  color: var(--color-gold-dark);
  /* Changed from primary for better contrast */
  font-weight: var(--fw-semibold);
}

/* ── Section Dividers (Wave SVG) ────────────────── */
.wave-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.wave-divider svg {
  width: calc(100% + 2px);
  height: 60px;
  display: block;
}

.wave-divider-top {
  top: -1px;
  bottom: auto;
  transform: rotate(180deg);
}

/* ── Section Backgrounds ────────────────────────── */
.bg-cream {
  background-color: var(--color-cream);
}

.bg-white {
  background-color: var(--color-white);
}

.bg-primary {
  background-color: var(--color-primary);
}

.bg-cream-light {
  background-color: var(--color-cream-light);
}

.bg-gradient-hero {
  background: linear-gradient(160deg,
      var(--color-primary-dark) 0%,
      var(--color-primary) 35%,
      #3d7268 70%,
      #4a8b7a 100%);
}

.bg-gradient-soft {
  background: linear-gradient(180deg,
      var(--color-cream-light) 0%,
      var(--color-cream) 50%,
      var(--color-cream-light) 100%);
}

/* ── Icon Circles ───────────────────────────────── */
.icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(47, 88, 78, 0.1), rgba(245, 225, 164, 0.15));
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

.icon-circle-lg {
  width: 80px;
  height: 80px;
  font-size: 2rem;
}

/* ── Step Numbers ───────────────────────────────── */
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  color: var(--color-primary-dark);
  flex-shrink: 0;
}

/* ── Forms ──────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-primary-dark);
  margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-light);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(47, 88, 78, 0.1);
  background: var(--color-white);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
  font-weight: var(--fw-light);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-danger);
  margin-top: var(--space-1);
  display: none;
}

/* ── Accordion ──────────────────────────────────── */
.accordion-item {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.accordion-item:hover {
  border-color: rgba(47, 88, 78, 0.2);
}

.accordion-header {
  width: 100%;
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  color: var(--color-primary-dark);
  text-align: left;
  line-height: var(--leading-snug);
}

.accordion-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
  margin-left: var(--space-4);
  color: var(--color-gold-dark);
  font-size: var(--text-xl);
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out);
}

.accordion-item.active .accordion-body {
  max-height: 600px;
}

.accordion-content {
  padding: var(--space-2) var(--space-8) var(--space-8);
  color: var(--color-text-light);
  line-height: var(--leading-relaxed);
}

/* ── Trust Bar ──────────────────────────────────── */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-4) 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.trust-item span.trust-icon {
  font-size: var(--text-lg);
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  h1 {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-3xl);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  section {
    padding: var(--space-16) 0;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  h1 {
    font-size: var(--text-3xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }

  h3 {
    font-size: var(--text-xl);
  }

  .container {
    padding: 0 var(--space-4);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  section {
    padding: var(--space-12) 0;
  }

  .btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
  }

  .hide-mobile {
    display: none !important;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--text-2xl);
  }

  .btn {
    padding: var(--space-3) var(--space-6);
  }
}

/* ── Accessibility ──────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}