/* ============================================
   WASHINGTON STATE HISTORY — DESIGN SYSTEM
   Inspired by Seattle Kraken Brand Identity
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* --- TOKENS --- */
:root {
  --deep-sea: #001628;
  --deep-sea-90: rgba(0, 22, 40, 0.92);
  --abyss: #000d17;
  --boundless: #1a3a4a;
  --ice-blue: #96D8D8;
  --ice-blue-dim: rgba(150, 216, 216, 0.15);
  --ice-blue-glow: rgba(150, 216, 216, 0.35);
  --shadow-blue: #68A2B9;
  --fog: #C4D8D8;
  --ice-white: #EDF5F5;
  --red-eye: #E63946;
  --surface: #0a2233;
  --surface-card: #0d2a3d;
  --surface-hover: #133548;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --nav-height: 56px;
  --container-max: 1200px;
  --container-text: 780px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-med: 0.4s;
  --duration-slow: 0.7s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
  font-family: var(--font-body);
  background: var(--deep-sea);
  color: var(--ice-white);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ice-blue); text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--ice-blue); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--shadow-blue); }
p { font-size: clamp(0.95rem, 1.8vw, 1.05rem); color: var(--fog); max-width: 65ch; }

/* --- NAVIGATION --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--deep-sea-90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(150, 216, 216, 0.1);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ice-white);
}

.nav-brand .brand-accent { color: var(--ice-blue); }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fog);
  transition: all var(--duration-fast) var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ice-white);
  background: var(--ice-blue-dim);
}

.nav-links a.active { color: var(--ice-blue); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ice-blue);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* --- CONTAINERS --- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.container--text { max-width: var(--container-text); }

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding: 60px 24px 40px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  animation: heroZoom 25s ease-in-out infinite alternate;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(0, 22, 40, 0.3) 0%,
    rgba(0, 22, 40, 0.5) 50%,
    rgba(0, 22, 40, 0.95) 100%
  );
}

@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
}

.hero-content h1 {
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ice-blue);
  margin-bottom: 24px;
}

/* --- WAVE ANIMATION --- */
.wave-container {
  position: relative;
  overflow: hidden;
  height: 60px;
  margin-top: -1px;
}

.wave-container svg {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 100%;
}

.wave-1 { animation: waveSlide 8s linear infinite; opacity: 0.4; }
.wave-2 { animation: waveSlide 12s linear infinite reverse; opacity: 0.2; }

@keyframes waveSlide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- SECTIONS --- */
.section { padding: 60px 0; }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 { margin-bottom: 8px; }
.section-header p { margin: 0 auto; color: var(--shadow-blue); }

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--ice-blue);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* --- CARDS --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface-card);
  border: 1px solid rgba(150, 216, 216, 0.08);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: all var(--duration-med) var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  padding: 1px;
  background: linear-gradient(135deg, var(--ice-blue-dim), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--duration-med) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(150, 216, 216, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 40px var(--ice-blue-dim);
}

.card:hover::before { opacity: 1; }

.card-icon { font-size: 2rem; margin-bottom: 16px; display: block; }

.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  text-transform: uppercase;
  color: var(--ice-white);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.9rem;
  color: var(--shadow-blue);
  line-height: 1.5;
}

.card-arrow {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: var(--ice-blue);
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--duration-med) var(--ease-out);
  font-size: 1.2rem;
}

.card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- INFO STRIP --- */
.info-strip {
  background: var(--surface);
  border-top: 1px solid rgba(150, 216, 216, 0.08);
  border-bottom: 1px solid rgba(150, 216, 216, 0.08);
  padding: 32px 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: center;
}

.info-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.info-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--shadow-blue);
}

.info-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ice-white);
}

.info-value a {
  color: var(--ice-blue);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-fast);
}

.info-value a:hover { border-bottom-color: var(--ice-blue); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
  border: 2px solid var(--ice-blue);
  color: var(--ice-blue);
  background: transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn:hover {
  background: var(--ice-blue);
  color: var(--deep-sea);
  box-shadow: 0 0 20px var(--ice-blue-dim);
}

.btn--primary {
  background: var(--ice-blue);
  color: var(--deep-sea);
}

.btn--primary:hover {
  background: #b4e8e8;
  box-shadow: 0 0 24px var(--ice-blue-glow);
}

.btn--sm { padding: 8px 18px; font-size: 0.8rem; }

/* --- SCROLL REVEAL --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }

.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }

/* --- PAGE TRANSITION --- */
.page-transition { animation: pageIn 0.5s var(--ease-out) both; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- FOOTER --- */
.site-footer {
  background: var(--abyss);
  border-top: 1px solid rgba(150, 216, 216, 0.06);
  padding: 32px 24px;
  text-align: center;
}

.site-footer p { margin: 0 auto; font-size: 0.8rem; color: var(--boundless); }

/* --- PAGE HEADER (for non-hero pages) --- */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid rgba(150,216,216,0.08);
  padding: 48px 24px 40px;
  text-align: center;
}

.page-header p { margin: 12px auto 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;
  }
  .hero-bg { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .reveal-stagger > * { opacity: 1; transform: none; }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--deep-sea-90);
    backdrop-filter: blur(16px);
    padding: 12px;
    border-bottom: 1px solid rgba(150, 216, 216, 0.1);
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero { min-height: 40vh; padding: 40px 16px 30px; }
  .card-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .info-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  :root { --nav-height: 48px; }
  .info-grid { grid-template-columns: 1fr; }
}
