/* ==========================================================================
   Stockton REI Network — Design System
   Colors derived from existing gold/navy logo
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --rei-gold: #C5A55A;
  --rei-gold-light: #D4BC7C;
  --rei-gold-dark: #A88B3D;
  --rei-navy: #0F1923;
  --rei-navy-light: #1A2836;
  --rei-navy-mid: #243447;

  /* Surfaces */
  --rei-surface: #F8F9FA;
  --rei-surface-warm: #FAF8F5;
  --rei-white: #FFFFFF;
  --rei-border: #E2E8F0;

  /* Text */
  --rei-text: #1E293B;
  --rei-text-muted: #64748B;
  --rei-text-light: #94A3B8;
  --rei-text-on-dark: #F1F5F9;
  --rei-text-on-gold: #0F1923;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --border-radius: 8px;
  --border-radius-lg: 12px;

  /* Transitions */
  --transition: 200ms ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--rei-text);
  background: var(--rei-surface);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--rei-gold-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--rei-gold); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--rei-navy);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: var(--space-4xl) 0;
}

.section--dark {
  background: var(--rei-navy);
  color: var(--rei-text-on-dark);
}

.section--dark h2,
.section--dark h3 {
  color: var(--rei-white);
}

.section--warm {
  background: var(--rei-surface-warm);
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

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

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

/* ---------- Navigation ---------- */
.nav {
  background: var(--rei-navy);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(197, 165, 90, 0.2);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 72px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--rei-gold);
  font-weight: 700;
  font-size: 1.125rem;
}

.nav__logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
  align-items: center;
}

.nav__links a {
  color: var(--rei-text-on-dark);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition);
  text-decoration: none;
}

.nav__links a:hover {
  color: var(--rei-gold);
}

.nav__links a.nav__cta {
  background: var(--rei-gold);
  color: var(--rei-navy);
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius);
  font-weight: 600;
}

.nav__links a.nav__cta:hover {
  background: var(--rei-gold-light);
  color: var(--rei-navy);
}

/* Mobile nav */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--rei-gold);
  margin: 5px 0;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .nav__toggle { display: block; }

  .nav__links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--rei-navy);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 2px solid var(--rei-gold);
  }

  .nav__links.is-open { display: flex; }

  .nav__links a { font-size: 1.0625rem; padding: var(--space-sm) 0; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--rei-navy);
  color: var(--rei-text-on-dark);
  padding: var(--space-4xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(197, 165, 90, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--rei-white);
  margin-bottom: var(--space-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero__gold {
  color: var(--rei-gold);
}

.hero p {
  font-size: 1.1875rem;
  color: var(--rei-text-light);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Stats Bar ---------- */
.stats {
  background: var(--rei-navy-light);
  border-top: 1px solid rgba(197, 165, 90, 0.15);
  border-bottom: 1px solid rgba(197, 165, 90, 0.15);
  padding: var(--space-xl) 0;
}

.stats__inner {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}

.stats__item {
  text-align: center;
}

.stats__number {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--rei-gold);
  line-height: 1;
}

.stats__label {
  font-size: 0.875rem;
  color: var(--rei-text-light);
  margin-top: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-sans);
}

.btn--primary {
  background: var(--rei-gold);
  color: var(--rei-navy);
}

.btn--primary:hover {
  background: var(--rei-gold-light);
  color: var(--rei-navy);
}

.btn--secondary {
  background: transparent;
  color: var(--rei-gold);
  border-color: var(--rei-gold);
}

.btn--secondary:hover {
  background: rgba(197, 165, 90, 0.1);
  color: var(--rei-gold-light);
}

.btn--dark {
  background: var(--rei-navy);
  color: var(--rei-gold);
}

.btn--dark:hover {
  background: var(--rei-navy-light);
  color: var(--rei-gold-light);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1.0625rem;
}

/* ---------- Cards ---------- */
.card {
  background: var(--rei-white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--rei-border);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.card__icon {
  width: 48px;
  height: 48px;
  background: rgba(197, 165, 90, 0.1);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
}

.card h3 {
  margin-bottom: var(--space-sm);
}

.card p {
  color: var(--rei-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Dark card variant */
.card--dark {
  background: var(--rei-navy-light);
  border-color: rgba(197, 165, 90, 0.15);
}

.card--dark h3 { color: var(--rei-white); }
.card--dark p { color: var(--rei-text-light); }

/* ---------- Event Card ---------- */
.event-card {
  background: var(--rei-white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--rei-border);
  border-left: 4px solid var(--rei-gold);
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}

.event-card__date {
  text-align: center;
  min-width: 64px;
  flex-shrink: 0;
}

.event-card__month {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--rei-gold-dark);
  letter-spacing: 0.05em;
}

.event-card__day {
  font-size: 2rem;
  font-weight: 700;
  color: var(--rei-navy);
  line-height: 1;
  margin-top: 2px;
}

.event-card__details h3 {
  margin-bottom: var(--space-xs);
  font-size: 1.25rem;
}

.event-card__meta {
  font-size: 0.875rem;
  color: var(--rei-text-muted);
  margin-bottom: var(--space-sm);
}

.event-card__meta span + span::before {
  content: ' \2022 ';
  margin: 0 var(--space-xs);
}

@media (max-width: 768px) {
  .event-card { flex-direction: column; gap: var(--space-md); }
}

/* ---------- Blog Card ---------- */
.blog-card {
  background: var(--rei-white);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--rei-border);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.blog-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--rei-navy-light);
}

.blog-card__body {
  padding: var(--space-lg);
}

.blog-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rei-gold-dark);
  margin-bottom: var(--space-sm);
}

.blog-card__body h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}

.blog-card__body h3 a {
  color: var(--rei-navy);
}

.blog-card__body h3 a:hover {
  color: var(--rei-gold-dark);
}

.blog-card__excerpt {
  font-size: 0.875rem;
  color: var(--rei-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.blog-card__date {
  font-size: 0.8125rem;
  color: var(--rei-text-light);
}

/* ---------- Section Headers ---------- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header p {
  color: var(--rei-text-muted);
  font-size: 1.0625rem;
  max-width: 600px;
  margin: var(--space-md) auto 0;
}

.section-header__label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rei-gold-dark);
  margin-bottom: var(--space-sm);
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--rei-navy);
  color: var(--rei-text-on-dark);
  padding: var(--space-3xl) 0;
  text-align: center;
}

.cta-banner h2 {
  color: var(--rei-white);
  margin-bottom: var(--space-md);
}

.cta-banner p {
  color: var(--rei-text-light);
  margin-bottom: var(--space-xl);
  font-size: 1.0625rem;
}

/* ---------- Resources List ---------- */
.resource-group {
  margin-bottom: var(--space-3xl);
}

.resource-group h3 {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--rei-gold);
  display: inline-block;
}

.resource-list {
  list-style: none;
}

.resource-list li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--rei-border);
}

.resource-list li:last-child {
  border-bottom: none;
}

.resource-list a {
  font-weight: 500;
  font-size: 1rem;
}

.resource-list .resource-desc {
  font-size: 0.875rem;
  color: var(--rei-text-muted);
  margin-top: 2px;
}

/* ---------- Featured Sponsor Card ---------- */
.sponsor-feature {
  background: linear-gradient(135deg, var(--rei-navy) 0%, var(--rei-navy-mid) 100%);
  border-radius: var(--border-radius-lg);
  padding: var(--space-2xl);
  border: 1px solid rgba(197, 165, 90, 0.2);
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  margin: var(--space-xl) 0;
}

.sponsor-feature__logo {
  flex-shrink: 0;
}

.sponsor-feature__logo img {
  height: 40px;
}

.sponsor-feature h4 {
  color: var(--rei-gold);
  margin-bottom: var(--space-sm);
}

.sponsor-feature p {
  color: var(--rei-text-light);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

@media (max-width: 768px) {
  .sponsor-feature { flex-direction: column; text-align: center; }
}

/* ---------- FAQ Accordion ---------- */
.faq details {
  border-bottom: 1px solid var(--rei-border);
}

.faq summary {
  padding: var(--space-lg) 0;
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--rei-gold);
  font-weight: 300;
  transition: transform var(--transition);
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq summary::-webkit-details-marker { display: none; }

.faq .faq__answer {
  padding: 0 0 var(--space-lg);
  color: var(--rei-text-muted);
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--rei-navy);
  color: var(--rei-text-light);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer__brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer h4 {
  color: var(--rei-gold);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.footer ul {
  list-style: none;
}

.footer ul li { margin-bottom: var(--space-sm); }

.footer ul a {
  color: var(--rei-text-light);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer ul a:hover { color: var(--rei-gold); }

/* Sponsor strip */
.footer__sponsor {
  border-top: 1px solid rgba(197, 165, 90, 0.15);
  padding-top: var(--space-xl);
  margin-top: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__sponsor-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rei-text-light);
  margin-bottom: var(--space-xs);
}

.footer__sponsor-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--rei-text-light);
  font-size: 0.875rem;
}

.footer__sponsor-link:hover { color: var(--rei-white); }

.footer__copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: var(--space-lg);
  font-size: 0.8125rem;
  color: var(--rei-text-light);
  text-align: center;
}

@media (max-width: 768px) {
  .footer__inner { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
  .footer__sponsor { flex-direction: column; gap: var(--space-md); text-align: center; }
}

@media (max-width: 480px) {
  .footer__inner { grid-template-columns: 1fr; }
}

/* ---------- Article / Blog Post ---------- */
.article {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
}

.article__header {
  margin-bottom: var(--space-2xl);
}

.article__category {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rei-gold-dark);
  margin-bottom: var(--space-sm);
}

.article__meta {
  font-size: 0.875rem;
  color: var(--rei-text-muted);
  margin-top: var(--space-md);
}

.article__body h2 {
  margin: var(--space-2xl) 0 var(--space-md);
  font-size: 1.5rem;
}

.article__body h3 {
  margin: var(--space-xl) 0 var(--space-md);
  font-size: 1.25rem;
}

.article__body p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.article__body ul, .article__body ol {
  margin: var(--space-md) 0 var(--space-md) var(--space-xl);
  line-height: 1.8;
}

.article__body li {
  margin-bottom: var(--space-sm);
}

.article__body blockquote {
  border-left: 3px solid var(--rei-gold);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  color: var(--rei-text-muted);
  font-style: italic;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.8125rem;
  color: var(--rei-text-muted);
  margin-bottom: var(--space-lg);
}

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

.breadcrumb a:hover {
  color: var(--rei-gold-dark);
}

.breadcrumb span {
  margin: 0 var(--space-xs);
  color: var(--rei-text-light);
}

/* ---------- Page Hero (sub-pages) ---------- */
.page-hero {
  background: var(--rei-navy);
  color: var(--rei-text-on-dark);
  padding: var(--space-3xl) 0;
}

.page-hero h1 {
  color: var(--rei-white);
  margin-bottom: var(--space-sm);
}

.page-hero p {
  color: var(--rei-text-light);
  font-size: 1.0625rem;
  max-width: 600px;
}

/* ---------- Social Links ---------- */
.social-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius);
  background: var(--rei-navy-light);
  color: var(--rei-text-light);
  font-size: 1.25rem;
  transition: all var(--transition);
  border: 1px solid rgba(197, 165, 90, 0.15);
}

.social-links a:hover {
  background: var(--rei-gold);
  color: var(--rei-navy);
}

/* ---------- Utility Classes ---------- */
.text-center { text-align: center; }
.text-gold { color: var(--rei-gold); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* ---------- Newsletter Form ---------- */
.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 480px;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rei-border);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  background: var(--rei-white);
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--rei-gold);
  box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
}

@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; }
}

/* ---------- Past Events (collapsible) ---------- */
.past-events summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--rei-gold-dark);
  font-size: 1rem;
  padding: var(--space-md) 0;
}

.past-events__list {
  list-style: none;
  padding: 0 0 var(--space-lg);
}

.past-events__list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--rei-border);
  font-size: 0.9375rem;
  display: flex;
  justify-content: space-between;
}

.past-events__list .pe-date {
  color: var(--rei-text-muted);
  font-size: 0.8125rem;
  flex-shrink: 0;
}

/* ---------- Two-Column Layout ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: var(--space-xl); }
}

/* ---------- Profile Card ---------- */
.profile {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}

.profile__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--rei-gold);
  flex-shrink: 0;
}

.profile h3 {
  margin-bottom: var(--space-xs);
}

.profile__title {
  font-size: 0.875rem;
  color: var(--rei-gold-dark);
  font-weight: 500;
  margin-bottom: var(--space-md);
}

@media (max-width: 480px) {
  .profile { flex-direction: column; align-items: center; text-align: center; }
}
