:root {
  /* Hub neutrals (dark-first, add light mode via prefers-color-scheme) */
  --bg: #0b0c0f;
  --fg: #f3f4f6;
  --muted: #9aa3b2;
  --card: #111318;
  --border: #1b1f2a;
  --focus: #ffffff;

  /* Sub-brand tokens */
  --brand-news: #0E3A8A;    /* B2GNews */
  --brand-events: #16A34A;  /* B2GEvents */
  --brand-jobs: #0D43CE;    /* B2GJobs */

  /* Typography */
  --font-sans: ui-sans-serif, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans";
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;

  --maxw: 1200px;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;
}

/* Light mode */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --fg: #1a1a1a;
    --muted: #6b7280;
    --card: #f9fafb;
    --border: #e5e7eb;
    --focus: #000000;
    --shadow: 0 10px 30px rgba(0,0,0,.1);
  }
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--fg);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--focus);
  color: var(--bg);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Header */
header {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--fg);
  text-decoration: none;
}

/* Main Content */
main {
  flex: 1;
}

/* Hero Section */
.hero {
  padding: calc(var(--space-xl) * 2) 0 var(--space-xl);
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  color: var(--fg);
}

.hero h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 400;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Cards Section */
.cards-section {
  padding: var(--space-lg) 0;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow);
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
}

@media (prefers-color-scheme: light) {
  .card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,.15);
  }
}

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

/* Only show focus outlines when user is tabbing */
body:not(.user-is-tabbing) .card:focus {
  outline: none;
}


.card__content {
  padding: var(--space-md);
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--fg);
}

.card p {
  color: var(--muted);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

.card__cta {
  color: var(--fg);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}


/* About Section */
.about {
  padding: var(--space-lg) 0;
  text-align: center;
}

.about h2 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--fg);
}

.about p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Footer */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: var(--space-md) 0;
  margin-top: auto;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

footer p {
  color: var(--muted);
  font-size: 0.875rem;
}

footer nav {
  display: flex;
  gap: var(--space-md);
}

footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

footer nav a:hover {
  color: var(--fg);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero {
    padding: var(--space-md) 0 var(--space-md);
  }
  
  .hero h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    margin-bottom: 0;
  }
  
  .cards-section {
    padding: var(--space-md) 0;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
  }
  
  .card {
    padding: 0;
  }
  
  .card__content {
    padding: var(--space-sm) var(--space-md);
  }
  
  footer .container {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }
  
  footer nav {
    gap: var(--space-sm);
  }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
  .card:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: currentColor;
  }
  
  .card {
    border-width: 2px;
  }
}

/* Contact Section */
.contact {
  padding: var(--space-lg) 0;
  text-align: center;
}

.contact h2 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--fg);
}

.contact-form {
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
}

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

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  color: var(--fg);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  width: 100%;
  padding: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--fg);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--brand-jobs);
  box-shadow: 0 0 0 2px rgba(13, 67, 206, 0.1);
}

@media (prefers-color-scheme: light) {
  .form-group input:focus {
    box-shadow: 0 0 0 2px rgba(13, 67, 206, 0.1);
  }
}

.form-group input::placeholder {
  color: var(--muted);
}

.send-btn {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: 8px;
  background: var(--brand-jobs);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  margin-top: var(--space-sm);
}

.send-btn:hover {
  background: #0a35a3;
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .send-btn:hover {
    transform: none;
  }
}

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

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

/* Focus management for keyboard users */
.user-is-tabbing *:focus {
  outline: 2px solid var(--focus) !important;
  outline-offset: 2px !important;
}