/* Colorado Together — shared design system
   Palette note: Colorado state flag colors (blue, gold, and a sparing touch
   of red in the flag emblem mark) — ties the brand to state identity rather
   than national party colors. Gold is the primary action/accent color. */

:root {
  --blue-900: #00265c;
  --blue-800: #0c3d7e;
  --blue-700: #1a56a3;
  --blue-500: #4d84cc;
  --blue-100: #e7eef8;
  --red-600: #c8102e;
  --gold-600: #a8720a;
  --gold-500: #ffc72c;
  --gold-100: #fff6de;
  --gray-900: #1c1c22;
  --gray-700: #4a4a52;
  --gray-500: #75757e;
  --gray-300: #d8d7dc;
  --gray-200: #eaeaed;
  --gray-100: #f6f6f7;
  --white: #ffffff;
  --danger: #a5333a;
  --success: #2f7a4d;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(32, 26, 43, 0.08);
  --shadow-md: 0 6px 24px rgba(32, 26, 43, 0.12);
  --font-serif: Georgia, 'Times New Roman', Cambria, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--gray-900);
  background: var(--white);
}

h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.25; color: var(--blue-900); }
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.4rem; margin-bottom: 1rem; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 20px; }

/* ---- Header / Nav ---- */

.site-header {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  color: var(--white);
  padding: 2.25rem 0 1.75rem;
}
.site-brand { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.brand-mark { border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.35); flex-shrink: 0; }
.site-header h1 { color: var(--white); font-size: 2.25rem; text-align: left; }
.site-header .tagline { text-align: left; font-size: 1.05rem; opacity: 0.9; margin-top: 0.35rem; font-style: italic; }
.site-header a { color: inherit; }
.site-header a:hover { text-decoration: none; }

@media (max-width: 480px) {
  .site-brand { flex-direction: column; text-align: center; }
  .site-header h1, .site-header .tagline { text-align: center; }
}

.site-nav {
  background: var(--blue-900);
  border-top: 1px solid rgba(255,255,255,0.12);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-nav .container { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0; padding: 0.25rem 0; }
.site-nav a {
  color: var(--white);
  display: inline-block;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--gold-500); text-decoration: none; }

/* ---- Sections ---- */

section { padding: 3.5rem 0; }
section.alt { background: var(--gray-100); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 2rem; }
.section-head h2 { text-align: center; }

/* ---- Photo hero (homepage) ---- */

.photo-hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center 35%;
  color: var(--white);
}
.photo-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(0,38,92,0.92) 0%, rgba(0,38,92,0.78) 32%, rgba(0,38,92,0.35) 68%, rgba(0,38,92,0.15) 100%);
}
.photo-hero .container { position: relative; z-index: 1; }
.photo-hero-content { max-width: 640px; }
.photo-hero h1 { color: var(--white); text-align: left; font-size: 2.75rem; }
.photo-hero .tagline { text-align: left; font-style: normal; font-size: 1.2rem; color: rgba(255,255,255,0.92); margin: 1rem 0 1.75rem; }
.photo-credit { position: absolute; right: 12px; bottom: 8px; z-index: 1; font-size: 0.72rem; color: rgba(255,255,255,0.65); }
.photo-credit a { color: rgba(255,255,255,0.8); }

/* ---- Photo banner (inner pages) ---- */

.page-banner {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  color: var(--white);
  text-align: center;
  margin-bottom: 0;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,38,92,0.75) 0%, rgba(0,38,92,0.88) 100%);
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 { color: var(--white); }
.page-banner p { color: rgba(255,255,255,0.92); max-width: 640px; margin: 0.5rem auto 0; }

/* ---- Inline content photos ---- */

.content-photo { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-md); margin: 1.5rem 0; }
figure.content-figure { margin: 1.5rem 0; }
figure.content-figure figcaption { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.4rem; text-align: right; }

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  background: var(--gold-500);
  color: var(--blue-900);
  border-radius: 6px;
  font-weight: 700;
  border: 2px solid var(--gold-500);
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline { background: transparent; color: var(--blue-700); border-color: var(--blue-500); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }

/* ---- Cards / grid ---- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.75rem; margin-top: 1.5rem; }
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.card .icon { width: 42px; height: 42px; margin-bottom: 0.75rem; color: var(--blue-700); }
.card h3 { margin-bottom: 0.6rem; }

/* ---- Stats ---- */

.stats { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 2rem; margin: 2rem 0 1rem; }
.stat { text-align: center; }
.stat-number { font-family: var(--font-serif); font-size: 2.75rem; font-weight: 700; color: var(--blue-700); }
.stat-label { color: var(--gray-700); }
.footnote { font-size: 0.9rem; color: var(--gray-500); font-style: italic; text-align: center; margin-top: 0.5rem; }
sup a { color: var(--blue-700); text-decoration: none; }

/* ---- Research / references ---- */

.reference { margin-bottom: 1rem; padding-left: 2rem; text-indent: -2rem; font-size: 0.93rem; color: var(--gray-700); scroll-margin-top: 90px; }
.reference-number { font-weight: 700; color: var(--blue-700); }
.reference:target { background: var(--gold-100); }

/* ---- CTA ---- */

.cta { background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%); color: var(--white); text-align: center; }
.cta h2 { color: var(--white); }
.cta p { color: rgba(255,255,255,0.9); }

/* ---- Footer ---- */

.site-footer { background: var(--blue-900); color: rgba(255,255,255,0.85); text-align: center; padding: 2rem 0; font-size: 0.92rem; }
.site-footer a { color: var(--gold-500); }

/* ---- Forms ---- */

.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.form-field input[type=text], .form-field input[type=email], .form-field input[type=password],
.form-field textarea, .form-field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field .hint { color: var(--gray-500); font-size: 0.85rem; margin-top: 0.3rem; }
.form-card { max-width: 480px; margin: 0 auto; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); }
.form-card.wide { max-width: 720px; }

.alert { padding: 0.9rem 1.1rem; border-radius: 6px; margin-bottom: 1.25rem; font-size: 0.95rem; }
.alert-success { background: #e9f5ec; color: var(--success); border: 1px solid #c3e3cd; }
.alert-error { background: #fbeaeb; color: var(--danger); border: 1px solid #f0c6c9; }
.alert-info { background: var(--blue-100); color: var(--blue-800); border: 1px solid var(--gray-300); }

/* ---- Blog ---- */

.post-list { display: flex; flex-direction: column; gap: 1.75rem; }
.post-summary { border-bottom: 1px solid var(--gray-200); padding-bottom: 1.75rem; }
.post-summary h3 { margin-bottom: 0.3rem; }
.post-meta { color: var(--gray-500); font-size: 0.88rem; margin-bottom: 0.6rem; }
.post-body { font-size: 1.08rem; }
.post-body p { margin-bottom: 1.1rem; }
.discussion-link { display: inline-block; margin-top: 1rem; font-weight: 600; }

/* ---- Forum ---- */

.forum-category-list, .topic-list { display: flex; flex-direction: column; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.forum-category, .topic-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--gray-200); background: var(--white);
}
.forum-category:last-child, .topic-row:last-child { border-bottom: none; }
.forum-category:hover, .topic-row:hover { background: var(--gray-100); }
.forum-category h3, .topic-row h3 { margin-bottom: 0.2rem; font-size: 1.1rem; }
.forum-category p, .topic-row .topic-meta { color: var(--gray-500); font-size: 0.88rem; margin: 0; }
.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-pinned { background: var(--gold-100); color: var(--gold-600); }
.badge-locked { background: var(--gray-200); color: var(--gray-700); }
.badge-role { background: var(--blue-100); color: var(--blue-700); margin-left: 0.4rem; }

.post-thread { display: flex; flex-direction: column; gap: 1.25rem; margin: 1.5rem 0; }
.forum-post { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.forum-post-meta { display: flex; justify-content: space-between; color: var(--gray-500); font-size: 0.85rem; margin-bottom: 0.6rem; }
.forum-post-author { font-weight: 700; color: var(--blue-800); }
.forum-post-body { font-size: 1rem; }

.breadcrumbs { font-size: 0.9rem; color: var(--gray-500); margin-bottom: 1.25rem; }

/* ---- Utility ---- */

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.small { font-size: 0.9rem; color: var(--gray-500); }
.svg-icon { width: 1.4em; height: 1.4em; vertical-align: -0.3em; }

/* ---- Responsive ---- */

@media (max-width: 860px) {
  .photo-hero { min-height: 460px; text-align: center; }
  .photo-hero-content { max-width: none; }
  .photo-hero h1, .photo-hero .tagline { text-align: center; }
}

@media (max-width: 600px) {
  h1 { font-size: 1.9rem; }
  .site-header h1 { font-size: 1.75rem; }
  h2 { font-size: 1.6rem; }
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 0.6rem 0.7rem; font-size: 0.88rem; }
  .stat-number { font-size: 2.1rem; }
  section { padding: 2.5rem 0; }
  .forum-category, .topic-row { flex-direction: column; align-items: flex-start; }
  .photo-hero { min-height: 380px; }
  .photo-hero h1 { font-size: 2rem; }
  .page-banner { min-height: 190px; }
}
