/* ============================================================
   Marc Baber for Congress — Oregon District 4
   Single stylesheet: marcbaber.com
   ============================================================ */

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

:root {
  --navy:    #1a3a5c;
  --green:   #2d6a4f;
  --gold:    #c4962c;
  --cream:   #fafaf7;
  --text:    #1a1a1a;
  --text-lt: #555;
  --white:   #ffffff;
  --border:  #d4d0c8;
  --shadow:  0 2px 8px rgba(0,0,0,0.08);
  --max-w:   960px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 { font-family: var(--font-serif); color: var(--navy); line-height: 1.25; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
p  { margin-bottom: 1rem; }
a  { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--green); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.2rem; }

/* --- NAVIGATION --- */
.site-nav {
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 0;
  position: sticky; top: 0; z-index: 100;
}
.site-nav .container {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.5rem;
}
.nav-brand a {
  font-family: var(--font-serif); font-size: 1.3rem; font-weight: bold;
  color: var(--white); text-decoration: none;
}
.nav-brand small {
  display: block; font-family: var(--font-sans); font-size: 0.7rem;
  color: var(--white); font-weight: normal; letter-spacing: 0.04em;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; }
.nav-links a {
  color: var(--white); text-decoration: none; padding: 0.3rem 0.6rem;
  border-radius: 4px; font-size: 0.88rem; transition: background 0.2s;
}
.nav-links a:hover,
.nav-links a.active { background: rgba(255,255,255,0.15); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

/* --- PAGE HEADER (non-landing) --- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 1.2rem 2rem;
  text-align: center;
}
.page-header h1 { color: var(--white); }
.page-header p  { color: var(--white); font-style: italic; max-width: 600px; margin: 0.5rem auto 0; }

/* --- CONTENT AREA --- */
.content { padding: 2.5rem 0; }
.content .container > h2 { border-bottom: 3px solid var(--gold); padding-bottom: 0.4rem; margin-bottom: 1.5rem; }

/* --- CARDS (issues, volunteer, etc.) --- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--white); border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.2s;
}
.card:hover { transform: translateY(-2px); }
.card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.card-body { padding: 1.2rem; }
.card-body h3 { color: var(--navy); }

/* --- BUTTONS --- */
.btn {
  display: inline-block; padding: 0.7rem 1.6rem; border-radius: 4px;
  font-weight: 600; text-decoration: none; font-size: 1rem;
  transition: background 0.2s, transform 0.2s; cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: #d4a832; }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.5rem 0; }

/* --- FORMS --- */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--border);
  border-radius: 4px; font-size: 1rem; font-family: var(--font-sans);
}
.form-group textarea { min-height: 120px; }

/* --- EMAIL SIGNUP BOX --- */
.signup-box {
  background: var(--navy); color: var(--white); padding: 2rem;
  border-radius: 6px; text-align: center; margin: 2rem 0;
}
.signup-box h2 { color: var(--white); }
.signup-box p  { color: rgba(255,255,255,0.8); }
.signup-box .embed-placeholder {
  border: 2px dashed rgba(255,255,255,0.3); border-radius: 4px;
  padding: 2rem; margin-top: 1rem; font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* --- FOOTER --- */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,0.75);
  text-align: center; padding: 1.5rem 1.2rem; font-size: 0.82rem; line-height: 1.8;
}
.site-footer a { color: var(--white); }
.fec-disclaimer { font-weight: 600; color: var(--white); }

/* --- UTILITY --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.highlight-box {
  background: var(--white); border-left: 4px solid var(--gold);
  padding: 1.2rem 1.5rem; margin: 1.5rem 0; border-radius: 0 6px 6px 0;
}
.highlight-box p:last-child { margin-bottom: 0; }
.tag {
  display: inline-block; background: var(--green); color: var(--white);
  padding: 0.15rem 0.6rem; border-radius: 3px; font-size: 0.75rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}

/* Two-column layout */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.two-col img { width: 100%; border-radius: 6px; }

/* --- LANDING PAGE OVERRIDES --- */
body.landing .site-nav { background: transparent; position: absolute; width: 100%; }
body.landing .site-nav.scrolled { background: var(--navy); position: sticky; }
body.landing .hero {
  min-height: 70vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; text-align: center; color: var(--white);
}
body.landing .hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
body.landing .hero-overlay {
  position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,58,92,0.35) 0%, rgba(26,58,92,0.42) 100%);
  z-index: 1;
}
body.landing .hero-content { position: relative; z-index: 2; padding: 2rem 1.2rem; max-width: 700px; }
body.landing .hero-content h1 { color: var(--white); font-size: 2.8rem; margin-bottom: 0.5rem; }
body.landing .hero-content .subtitle { font-size: 1.2rem; opacity: 0.9; margin-bottom: 1.5rem; }
body.landing .hero-content .btn { margin: 0.3rem; }

body.landing .intro { padding: 3rem 0; background: var(--white); }
body.landing .pillars { padding: 3rem 0; }
body.landing .pillar-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }

/* --- MOBILE --- */
@media (max-width: 700px) {
  html { font-size: 16px; }
  .nav-links { display: none; flex-direction: column; width: 100%; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .two-col { grid-template-columns: 1fr; }
  body.landing .hero-content h1 { font-size: 2rem; }
  body.landing .hero { min-height: 60vh; }
  .card-grid { grid-template-columns: 1fr; }
  .two-col img { max-height: 60vh; object-fit: cover; }
  .btn-group { flex-direction: column; }
  .btn-group .btn { margin-bottom: 0.5rem; text-align: center; }
  .page-header { padding: 2rem 1rem 1.5rem; }
  .page-header h1 { font-size: 1.6rem; }
}

@media (min-width: 701px) {
  .nav-links { display: flex !important; }
}
