/**
 * Global Diaspora Connect (GDC) Global Stylesheet
 * Integrates Design Tokens into CSS Classes & Elementor-compatible utilities
 */

/* ==========================================================================
   1. BASE RESETS & ACCESSIBLE DEFAULTS
   ========================================================================== */

html {
  box-sizing: border-box;
  font-family: var(--gdc-font-body);
  font-size: 16px;
  line-height: var(--gdc-leading-normal);
  color: var(--gdc-ink);
  background-color: var(--gdc-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessible Focus States (WCAG 2.2 AA) */
:focus-visible {
  outline: 3px solid var(--gdc-blue-600) !important;
  outline-offset: 3px !important;
  box-shadow: var(--gdc-shadow-focus);
}

/* Reduced Motion Preference */
@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;
  }
}

/* ==========================================================================
   2. TYPOGRAPHY SYSTEM
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gdc-font-heading);
  color: var(--gdc-navy-900);
  font-weight: var(--gdc-weight-semibold);
  line-height: var(--gdc-leading-tight);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

h1 { font-size: var(--gdc-text-h1); font-weight: var(--gdc-weight-bold); }
h2 { font-size: var(--gdc-text-h2); }
h3 { font-size: var(--gdc-text-h3); }
h4 { font-size: var(--gdc-text-h4); }

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--gdc-ink);
}

p.gdc-lead {
  font-size: var(--gdc-text-body-lg);
  line-height: var(--gdc-leading-loose);
  color: var(--gdc-ink-light);
}

.gdc-text-muted {
  color: var(--gdc-muted);
}

.gdc-gold-accent {
  color: var(--gdc-gold-500);
}

/* Hero H1 Split Pattern from Mockup */
.gdc-hero-title {
  color: var(--gdc-white);
  font-weight: var(--gdc-weight-bold);
  font-size: var(--gdc-text-h1);
  line-height: 1.15;
}

.gdc-hero-title span.gdc-highlight {
  color: var(--gdc-gold-500);
  display: inline;
}

/* Gold Underline Accent */
.gdc-heading-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.gdc-heading-underline::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background-color: var(--gdc-gold-500);
  border-radius: var(--gdc-radius-pill);
}

/* ==========================================================================
   3. BUTTONS (Mockup Specs & Contrast Compliance)
   ========================================================================== */

.gdc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--gdc-font-body);
  font-size: var(--gdc-text-sm);
  font-weight: var(--gdc-weight-semibold);
  line-height: 1.25;
  text-decoration: none;
  border-radius: var(--gdc-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--gdc-transition-fast);
  white-space: nowrap;
}

/* Primary Gold Button ("Join GDC") - Navy text gives 6.16:1 AA pass */
.gdc-btn-primary,
.gdc-btn-gold {
  background-color: var(--gdc-gold-500);
  color: var(--gdc-navy-900) !important;
  border-color: var(--gdc-gold-500);
}

.gdc-btn-primary:hover,
.gdc-btn-gold:hover {
  background-color: var(--gdc-gold-600);
  border-color: var(--gdc-gold-600);
  transform: translateY(-1px);
  box-shadow: var(--gdc-shadow-md);
}

/* Outline Button ("Explore Opportunities") */
.gdc-btn-outline {
  background-color: transparent;
  color: var(--gdc-white) !important;
  border-color: rgba(255, 255, 255, 0.85);
}

.gdc-btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--gdc-white);
  color: var(--gdc-white) !important;
  transform: translateY(-1px);
}

/* Blue Solid Button ("Submit a Project") */
.gdc-btn-blue {
  background-color: var(--gdc-blue-600);
  color: var(--gdc-white) !important;
  border-color: var(--gdc-blue-600);
}

.gdc-btn-blue:hover {
  background-color: var(--gdc-blue-700);
  border-color: var(--gdc-blue-700);
  transform: translateY(-1px);
  box-shadow: var(--gdc-shadow-md);
}

/* Green Solid Button ("Member Login") */
.gdc-btn-green {
  background-color: var(--gdc-green-600);
  color: var(--gdc-white) !important;
  border-color: var(--gdc-green-600);
}

.gdc-btn-green:hover {
  background-color: var(--gdc-green-700);
  border-color: var(--gdc-green-700);
  transform: translateY(-1px);
  box-shadow: var(--gdc-shadow-md);
}

/* Circular Arrow Icon Button (Used on Cards & Tiles) */
.gdc-btn-circle-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--gdc-surface);
  color: var(--gdc-navy-700);
  border: 1px solid var(--gdc-line);
  transition: all var(--gdc-transition-fast);
}

.gdc-card:hover .gdc-btn-circle-arrow {
  background-color: var(--gdc-navy-700);
  color: var(--gdc-white);
  border-color: var(--gdc-navy-700);
  transform: translateX(4px);
}

/* ==========================================================================
   4. CARDS & ELEVATED CONTAINERS
   ========================================================================== */

.gdc-card {
  background-color: var(--gdc-white);
  border: 1px solid var(--gdc-line);
  border-radius: var(--gdc-radius-lg);
  box-shadow: var(--gdc-shadow-sm);
  padding: 1.5rem;
  transition: transform var(--gdc-transition-normal), box-shadow var(--gdc-transition-normal), border-color var(--gdc-transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.gdc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--gdc-shadow-hover);
  border-color: #CBD5E1;
}

/* Opportunity Card Variant */
.gdc-opportunity-card {
  padding: 0;
}

.gdc-opportunity-card .gdc-card-media {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: var(--gdc-surface-2);
}

.gdc-opportunity-card .gdc-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--gdc-transition-slow);
}

.gdc-opportunity-card:hover .gdc-card-media img {
  transform: scale(1.05);
}

.gdc-opportunity-card .gdc-card-badge-slot {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.gdc-opportunity-card .gdc-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* ==========================================================================
   5. STATUS BADGE SYSTEM (Mandatory Component)
   ========================================================================== */

.gdc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-family: var(--gdc-font-body);
  font-size: var(--gdc-text-xs);
  font-weight: var(--gdc-weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--gdc-radius-pill);
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}

.gdc-status-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Status 1: Operational / Active */
.gdc-status-operational {
  background-color: var(--gdc-status-operational-bg);
  color: var(--gdc-status-operational-text);
  border-color: var(--gdc-status-operational-border);
}
.gdc-status-operational::before { background-color: var(--gdc-green-600); }

/* Status 2: Verified / Screened */
.gdc-status-verified {
  background-color: var(--gdc-status-verified-bg);
  color: var(--gdc-status-verified-text);
  border-color: var(--gdc-status-verified-border);
}
.gdc-status-verified::before { background-color: var(--gdc-blue-600); }

/* Status 3: Under Development */
.gdc-status-under-dev {
  background-color: var(--gdc-status-dev-bg);
  color: var(--gdc-status-dev-text);
  border-color: var(--gdc-status-dev-border);
}
.gdc-status-under-dev::before { background-color: var(--gdc-amber-600); }

/* Status 4: Expression of Interest */
.gdc-status-eoi {
  background-color: var(--gdc-status-eoi-bg);
  color: var(--gdc-status-eoi-text);
  border-color: var(--gdc-status-eoi-border);
}
.gdc-status-eoi::before { background-color: var(--gdc-gold-600); }

/* Status 5: Exploratory */
.gdc-status-exploratory {
  background-color: var(--gdc-status-exploratory-bg);
  color: var(--gdc-status-exploratory-text);
  border-color: var(--gdc-status-exploratory-border);
}
.gdc-status-exploratory::before { background-color: var(--gdc-status-exploratory-text); }

/* Status 6: Concept Stage */
.gdc-status-concept {
  background-color: var(--gdc-status-concept-bg);
  color: var(--gdc-status-concept-text);
  border-color: var(--gdc-status-concept-border);
}
.gdc-status-concept::before { background-color: var(--gdc-grey-500); }

/* ==========================================================================
   6. PROFILE CARD (CEO Profile Component)
   ========================================================================== */

.gdc-profile-card {
  background: var(--gdc-white);
  border: 1px solid var(--gdc-line);
  border-radius: var(--gdc-radius-xl);
  padding: 2.5rem;
  box-shadow: var(--gdc-shadow-md);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.gdc-profile-avatar-wrap {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
  position: relative;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--gdc-gold-500), var(--gdc-gold-100));
}

.gdc-profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--gdc-surface-2);
  display: block;
}

.gdc-profile-name {
  font-size: 1.5rem;
  font-weight: var(--gdc-weight-bold);
  color: var(--gdc-navy-900);
  margin-bottom: 0.25rem;
}

.gdc-profile-title {
  color: var(--gdc-gold-600);
  font-weight: var(--gdc-weight-semibold);
  font-size: var(--gdc-text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.gdc-profile-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background-color: var(--gdc-gold-500);
}

.gdc-profile-bio {
  color: var(--gdc-ink);
  font-size: var(--gdc-text-body);
  line-height: var(--gdc-leading-loose);
  margin: 0 auto;
}
