/* Mars Society Volunteer Portal — Brand-aligned Light Theme */

:root {
  /* Mars Flag Colors */
  --mars-red: #CC292B;
  --mars-green: #009A44;
  --mars-blue: #3D428B;

  /* Neutral Colors */
  --snow: #FFFBFC;
  --stardust: #F8F8F8;
  --crater: #E5E5E5;
  --space: #323237;
  --deep-space: #0F0F0F;

  /* Theme Colors */
  --background: var(--snow);
  --foreground: var(--space);
  --card: var(--stardust);
  --border: var(--crater);

  /* Semantic Colors */
  --primary: #3D428B;
  --primary-hover: #2d3270;
  --primary-foreground: var(--snow);
  --accent: #009A44;
  --accent-foreground: var(--snow);
  --destructive: #CC292B;
  --destructive-foreground: var(--snow);
  --muted: var(--stardust);
  --muted-foreground: #6b6b70;
  --text-faint: #9a9aa0;

  /* Typography */
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Chakra Petch', ui-monospace, monospace;

  /* Spacing & Radius */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1.5rem;
  z-index: 200;
  font-weight: 600;
}

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

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 800px; }

/* ============ NAVIGATION ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 251, 252, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--deep-space);
}

.nav-flag {
  height: 28px;
  width: auto;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.footer-flag {
  height: 32px;
  width: auto;
  border-radius: 2px;
  margin-bottom: 0.5rem;
}

.nav-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--deep-space);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.875rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--foreground);
  background: var(--muted);
  text-decoration: none;
}

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.2s;
}

.nav-cta:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 1.5rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  /* Mars flag stripe accents at top */
  background:
    linear-gradient(90deg, 
      var(--mars-red) 0%, var(--mars-red) 33.33%, 
      var(--mars-green) 33.33%, var(--mars-green) 66.66%, 
      var(--mars-blue) 66.66%, var(--mars-blue) 100%
    );
  height: 4px;
  top: 64px;
  bottom: auto;
}

.hero-content {
  position: relative;
  max-width: 800px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(61, 66, 139, 0.08);
  border: 1px solid rgba(61, 66, 139, 0.2);
  border-radius: 20px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--deep-space);
}

.text-mars {
  color: var(--mars-red);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.hero-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-stat-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(61, 66, 139, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--muted);
  border-color: var(--muted-foreground);
}

.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }

/* ============ SECTIONS ============ */
.section {
  padding: 5rem 0;
}

.section-dark {
  background: var(--stardust);
}

.section-cta {
  background: var(--stardust);
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  color: var(--deep-space);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--muted-foreground);
}

/* ============ WHY GRID ============ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.why-card {
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all 0.3s;
}

.why-card:hover {
  border-color: rgba(61, 66, 139, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.why-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.why-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--deep-space);
}

.why-card p {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* ============ FILTER BAR ============ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: var(--snow);
  color: var(--foreground);
  border-color: var(--muted-foreground);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

/* ============ OPPORTUNITIES GRID ============ */
.opportunities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.opportunity-card {
  position: relative;
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s;
}

.opportunity-card:hover {
  border-color: rgba(61, 66, 139, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.opportunity-card.urgent {
  border-color: rgba(204, 41, 43, 0.3);
  border-left: 3px solid var(--mars-red);
}

.opportunity-urgent {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.6rem;
  background: rgba(204, 41, 43, 0.08);
  border: 1px solid rgba(204, 41, 43, 0.25);
  border-radius: 10px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--mars-red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.opportunity-category {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.opportunity-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--deep-space);
}

.opportunity-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  flex: 1;
}

.opportunity-meta {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.opportunity-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.meta-value {
  font-size: 0.8rem;
  color: var(--foreground);
  font-weight: 500;
}

.opportunity-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  padding: 0.2rem 0.6rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.7rem;
  color: var(--muted-foreground);
}

/* ============ CODE OF CONDUCT ============ */
.conduct-content {
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}

.conduct-preamble {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.conduct-section {
  margin-bottom: 2rem;
}

.conduct-section:last-child {
  margin-bottom: 0;
}

.conduct-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--deep-space);
}

.conduct-section p {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.conduct-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
}

.conduct-section li {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  padding-left: 1.5rem;
  position: relative;
}

.conduct-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  /* Mars flag stripe at bottom */
  border-bottom: 4px solid;
  border-image: linear-gradient(90deg, var(--mars-red) 33.33%, var(--mars-green) 33.33% 66.66%, var(--mars-blue) 66.66%) 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand .nav-logo { margin-right: 0.5rem; }

.footer-tagline {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--deep-space);
  margin-bottom: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

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

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem;
    background: rgba(255, 251, 252, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
  }
  
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-cta { margin-left: 0; text-align: center; }
  
  .hero { min-height: 80vh; padding: 5rem 1.5rem 3rem; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .hero-stat-divider { width: 40px; height: 1px; }
  
  .opportunities-grid { grid-template-columns: 1fr; }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .conduct-content { padding: 1.5rem; }
}
