/* ============================================
   IGSB Site - Custom CSS
   Fully static, responsive design system.
   No external frameworks used.

   === Design System ===
   - CSS Custom Properties (variables) are defined in :root.
   - Prefer using variables for colors, spacing, and breakpoints.
   - Reusable classes are provided for common layout patterns.

   === Reusable Classes ===
   - .section          → Consistent vertical spacing for page sections
   - .grid / .grid-2/3/4 → Responsive grid layouts
   - .card             → Content cards with hover effects
   - .nav-link         → Styled navigation links
   - .footer-section   → Footer column wrapper
   - .btn / .btn-primary / .btn-secondary → Button styles

   === Breakpoints ===
   - Mobile:  ≤ 768px
   - Tablet+: ≥ 1024px

   Keep this file as the single source of truth for styling.
   ============================================ */

:root {
  /* === Colors === */
  --color-primary: #1e40af;        /* Main brand blue */
  --color-primary-dark: #1e3a8a;   /* Darker blue for hover/active states */
  --color-blue: #1e40af;           /* Alias kept for backward compatibility */
  --color-accent: #dc2626;         /* Red accent (used in announcement) */
  --color-accent-dark: #b91c1c;
  --color-bg: #fafafa;             /* Page background */
  --color-surface: #ffffff;        /* Card / surface background */
  --color-text: #18181b;           /* Primary text color */
  --color-text-muted: #52525b;     /* Secondary / muted text */
  --color-text-light: #a1a1aa;     /* Light / subtle text */
  --color-border: #e5e7eb;         /* Default border color */
  --color-white: #ffffff;
  --color-zinc-900: #18181b; /* Dark background for buttons */

  /* === Spacing Scale === */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 2.5rem;

  /* === Typography === */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-weight-bold: 800;
  --font-weight-semibold: 600;

  /* === Breakpoints (for reference in media queries) === */
  --bp-mobile: 768px;
  --bp-tablet: 1024px;

  /* === Effects === */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 4px rgb(0 0 0 / 0.1);
}

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

html {
  scroll-behavior: smooth;
}

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

/* Container */
.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Reusable Layout Classes */
.section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

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

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

/* Navigation */
.nav-link {
  color: white;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #bfdbfe;
}

/* Footer */
.footer-section {
  margin-bottom: var(--space-md);
}

.footer-section h4,
.footer-section .footer-title {
  font-size: 0.75rem;
  letter-spacing: 1px;
  font-weight: 600;
  color: white;
  margin-bottom: 12px;
}

/* Cards & Sections */
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 4px 6px 8px -2px rgb(0 0 0 / 0.08); /* Always visible, bottom + right */
  /* No transition or transform */
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 6px 10px 12px -3px rgb(0 0 0 / 0.1); /* Enhanced on hover, no movement */
}

/* Text Utilities */
.text-center {
  text-align: center;
}

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

/* Typography */
h1, h2, h3, h4 {
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .section-title {
    font-size: 1.875rem;
  }
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-blue);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-white);
  color: var(--color-blue);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.btn-primary:hover {
  background: #f4f4f5;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.7);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}

.btn-dark {
  background: var(--color-zinc-900);
  color: var(--color-white);
}

.btn-dark:hover {
  background: #000;
}

/* Support page copy button */
.copy-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Announcement Bar (Red) */
.announcement {
  background: var(--color-red);
  color: white;
  padding: 0.75rem 1rem;
  text-align: center;
  position: relative;
  z-index: 50;
}

.announcement-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-size: 0.95rem;
}

.announcement a {
  color: white;
  text-decoration: underline;
  font-weight: 600;
}

.announcement a:hover {
  color: #fecaca;
}

.close-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.5rem;
  opacity: 0.9;
}

.close-btn:hover {
  opacity: 1;
}

/* Header / Navigation (Blue band) */
nav {
  background: var(--color-blue);
  color: white;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  position: sticky;
  top: 0;
  z-index: 40;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: white;
}

.logo-circle {
  width: 36px;
  height: 36px;
  background: white;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue);
  font-weight: 900;
  font-size: 1.35rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a {
  color: white;
  transition: color 0.2s;
  padding: 0.25rem 0.5rem;
}

.nav-links a:hover {
  color: #bfdbfe;
}

.nav-links a.active {
  color: #dbeafe;
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: white;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  padding: 0.5rem;
  cursor: pointer;
}

#mobile-menu {
  display: none;
  background: #1e3a8a;
  padding: 1rem 1.25rem;
  border-top: 1px solid #3b82f6;
}

#mobile-menu.show {
  display: block;
}

#mobile-menu a {
  display: block;
  padding: 0.65rem 0.75rem;
  color: white;
  font-weight: 600;
  border-radius: 0.5rem;
}

#mobile-menu a:hover {
  background: #1e40af;
}

/* Hero Section */
.hero {
  position: relative;
  background: var(--color-text);
  overflow: hidden;
}

.hero img,
.hero picture {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.25) 0%,
    rgba(0,0,0,0.45) 100%
  );
  z-index: 1;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hero-text {
  max-width: 640px;
  color: white;
}

.hero-text h1 {
  font-size: 4.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 1rem;
}

.hero-text .tagline {
  font-size: 1.65rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: rgba(255,255,255,0.95);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.9);
  color: #166534;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

/* Cards & Sections */
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

/* Press page specific */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.fact-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem;
}

.fact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #71717a;
  margin-bottom: 0.25rem;
}

/* Forms */
input, textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 1rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, textarea:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #71717a;
  margin-bottom: 0.4rem;
}

/* Footer */
footer {
  background: #18181b;
  color: #a1a1aa;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.footer-col h4 {
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: #a1a1aa;
  margin-bottom: 0.35rem;
}

.footer-col a:hover {
  color: white;
}

/* Utility */
.text-center { text-align: center; }
.mt-8 { margin-top: 2rem; }
.mb-6 { margin-bottom: 1.5rem; }
.gap-4 { gap: 1rem; }

/* Responsive tweaks */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  /* Hide desktop-only elements on mobile */
  .desktop-only {
    display: none !important;
  }
  
  .hero-text h1 {
    font-size: 3.25rem;
  }
  
  .hero-text .tagline {
    font-size: 1.35rem;
  }
}

/* Mobile Footer - Text above image in portrait */
@media (max-width: 1024px) {
  footer > div[style*="position:relative"] {
    display: flex;
    flex-direction: column;
  }

  footer > div[style*="position:relative"] > picture {
    order: 2;
  }

  footer > div[style*="position:relative"] > div[style*="position:absolute"] {
    position: static !important;
    order: 1;
    background: var(--color-text);
    padding: var(--space-lg) var(--space-sm);
    color: #e5e7eb;
    text-align: left !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}

/* Mobile Hero - Text in dark bar below image */
@media (max-width: 1024px) {
  .hero {
    display: block;
  }

  .hero-overlay {
    display: none;
  }

  .hero-content {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 1.25rem 1rem 1.5rem;
    background: #18181b;
    color: white;
    text-align: center !important;
  }

  .hero-text {
    max-width: 92% !important;
    margin: 0 auto;
    padding: 0 0.5rem;
  }

  .hero-text h1 {
    font-size: 2.8rem;
    margin-bottom: 0.75rem;
  }

  .hero-text .tagline {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
  }

  /* Stack buttons on mobile and center them */
  .hero-content > div > div[style*="display:flex"] {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Mobile hero image - natural scaling, no forced height */
  .hero img,
  .hero picture img {
    height: auto !important;
    object-fit: cover !important;
    object-position: center top !important;
  }
}