/* === HPX BASE — Shared across all pages === */
/* Last updated: 2026-04-19 */
/* Source of truth for: reset, tokens, typography, sections, buttons, effects */

/* --- RESET --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- DESIGN TOKENS --- */
:root {
  /* Cool palette (solution, hope, HPX brand) */
  --cool1: #38BDF8;
  --cool2: #0EA5E9;
  --cool3: #0369A1;
  --cool4: #1E3A5F;

  /* Warm palette (crisis, heat, urgency) */
  --warm1: #F59E0B;
  --warm2: #EA580C;
  --warm3: #DC2626;
  --warm4: #7f1d1d;

  /* Neutrals */
  --white: #FAFAFA;
  --dark:  #0C1824;
  --dark2: #111D2C;
  --dark3: #162232;

  /* Typography */
  --fd: 'Bebas Neue', sans-serif;   /* Display / headings */
  --fb: 'DM Sans', sans-serif;      /* Body / text */
}

/* --- BASE --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--fb);
  color: var(--white);
  background: var(--dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- SKIP LINK (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cool2);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 10000;
  border-radius: 0 0 4px 4px;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--cool1);
  outline-offset: 2px;
}

/* --- NWS ALERT BAR --- */
#nws-alert-bar {
  position: relative;
  z-index: 999;
  font-family: var(--fb);
  line-height: 1.4;
  padding: 0.75rem 2rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: none; /* hidden by default, shown by JS when alert is active */
}

@media (max-width: 768px) {
  #nws-alert-bar {
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
  }
}

/* --- SECTION PATTERNS --- */
.section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--cool1);
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--fd);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 0.03em;
  line-height: 1;
  margin-bottom: 2rem;
}

.content-section {
  padding: 8rem 2rem;
  position: relative;
  overflow: hidden;
}

.content-section.alt {
  background: var(--dark2);
}

.content-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 1rem 3rem;
  font-family: var(--fd);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background: linear-gradient(135deg, var(--cool2), var(--cool3));
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(14, 165, 233, 0.35);
}
.btn:focus-visible {
  outline: 2px solid var(--cool1);
  outline-offset: 3px;
}
.btn-sec {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-sec:hover {
  border-color: var(--cool1);
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.15);
}
.btn-warm {
  background: linear-gradient(135deg, var(--warm2), var(--warm3));
}
.btn-warm:hover {
  box-shadow: 0 12px 40px rgba(234, 88, 12, 0.35);
}
.btn-warm-outline {
  background: transparent;
  border: 1px solid rgba(234, 88, 12, 0.4);
}
.btn-warm-outline:hover {
  border-color: var(--warm2);
  box-shadow: 0 8px 30px rgba(234, 88, 12, 0.15);
}
.btn-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-sm {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

/* --- CLICK EFFECTS --- */
.click-fx {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
}
.click-fx.cool {
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  animation: ripCool 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.click-fx.cool.r2 {
  border-color: rgba(56, 189, 248, 0.2);
  animation-delay: 0.1s;
}
@keyframes ripCool {
  0% { width: 0; height: 0; opacity: 1; }
  100% { width: 300px; height: 300px; opacity: 0; margin-left: -150px; margin-top: -150px; border-width: 0.5px; }
}
.click-fx.heat {
  background: radial-gradient(circle, rgba(234, 88, 12, 0.25) 0%, rgba(245, 158, 11, 0.1) 40%, transparent 70%);
  animation: ripHeat 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.click-fx.heat.r2 {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(234, 88, 12, 0.05) 40%, transparent 70%);
  animation-delay: 0.06s;
}
@keyframes ripHeat {
  0% { width: 0; height: 0; opacity: 1; }
  50% { opacity: 0.8; }
  100% { width: 250px; height: 250px; opacity: 0; margin-left: -125px; margin-top: -125px; }
}
.click-fx.mid {
  border: 1px solid rgba(234, 179, 8, 0.3);
  background: radial-gradient(circle, rgba(234, 179, 8, 0.1) 0%, transparent 60%);
  animation: ripMid 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.click-fx.mid.r2 {
  border-color: rgba(234, 179, 8, 0.15);
  background: radial-gradient(circle, rgba(234, 179, 8, 0.05) 0%, transparent 60%);
  animation-delay: 0.08s;
}
@keyframes ripMid {
  0% { width: 0; height: 0; opacity: 1; }
  100% { width: 280px; height: 280px; opacity: 0; margin-left: -140px; margin-top: -140px; border-width: 0.5px; }
}

/* --- ANIMATIONS --- */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* --- REDUCED MOTION --- */
@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;
  }
  .fade-el {
    opacity: 1 !important;
    transform: none !important;
  }
  .click-fx {
    display: none !important;
  }
  #nws-alert-bar {
    /* still shows, just no animation */
  }
}

/* --- RESPONSIVE UTILITIES --- */
@media (max-width: 768px) {
  .btn-row {
    flex-direction: column;
    align-items: center;
  }
}
