/* ===========================================================
   Porter for Legislature — District 30
   Base styles. Colors nod to the US flag (navy/red) and the
   Nebraska seal (gold). Tweak the tokens below to rebrand fast.
   =========================================================== */

:root {
  --navy: #0a1f44;
  --navy-800: #0f2a5a;
  --navy-700: #143a7a;
  --red: #bf1e2e;
  --red-dark: #9c1622;
  --gold: #c9a227;
  --gold-light: #e7c765;
  --paper: #f7f8fb;
  --ink: #16233d;
  --muted: #5b6884;
  --white: #ffffff;
  --line: #e3e7ef;

  --maxw: 1140px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(10, 31, 68, 0.12);
  --shadow-sm: 0 4px 14px rgba(10, 31, 68, 0.10);

  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.05; margin: 0 0 .4em; letter-spacing: .5px; }
p { margin: 0 0 1rem; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--gold); color: var(--navy); padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase; font-size: .95rem;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none; text-align: center; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); box-shadow: var(--shadow-sm); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-outline:hover { background: rgba(255,255,255,.12); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 31, 68, .96);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 3px solid var(--gold);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; gap: 4px; }
.brand-flag {
  width: 34px; height: 22px; border-radius: 3px; object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-head); }
.brand-text strong { font-size: 1.35rem; letter-spacing: 2px; }
.brand-text span { font-size: .72rem; letter-spacing: 3px; color: var(--gold-light); }

.primary-nav { display: flex; align-items: center; gap: 26px; }
.primary-nav a { color: rgba(255,255,255,.9); font-family: var(--font-head); font-weight: 500; letter-spacing: .5px; text-transform: uppercase; font-size: .95rem; }
.primary-nav a:hover { color: var(--gold-light); text-decoration: none; }
.nav-cta { color: var(--navy) !important; padding: 9px 20px; }
.nav-cta:hover { color: var(--navy) !important; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 8px; cursor: pointer;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--white); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: var(--white);
  padding: clamp(60px, 10vw, 120px) 0 clamp(70px, 9vw, 110px);
}
.hero-flags { position: absolute; inset: 0; pointer-events: none; }
.hero-flag { position: absolute; opacity: .16; filter: saturate(1.1); }
.hero-flag--us {
  right: -8%; top: -12%; width: 62%; transform: rotate(-6deg);
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000 40%, transparent 72%);
  mask-image: radial-gradient(circle at 70% 30%, #000 40%, transparent 72%);
}
.hero-flag--ne {
  left: -14%; bottom: -22%; width: 46%; transform: rotate(5deg); opacity: .1;
  -webkit-mask-image: radial-gradient(circle at 40% 60%, #000 45%, transparent 74%);
  mask-image: radial-gradient(circle at 40% 60%, #000 45%, transparent 74%);
}
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,31,68,.85) 0%, rgba(10,31,68,.55) 45%, rgba(10,31,68,.25) 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; }

.eyebrow {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 4px;
  font-size: .82rem; font-weight: 600; color: var(--gold-light); margin: 0 0 14px;
}
.hero-title { font-size: clamp(2.8rem, 7vw, 5.2rem); font-weight: 700; letter-spacing: 1px; }
.hero-title-sub { display: block; font-size: clamp(1.1rem, 2.4vw, 1.7rem); font-weight: 500; color: rgba(255,255,255,.85); letter-spacing: 2px; margin-top: 8px; text-transform: uppercase; }
.hero-lede { font-size: clamp(1.05rem, 1.7vw, 1.3rem); max-width: 620px; color: rgba(255,255,255,.92); }
.hero-lede strong { color: var(--gold-light); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 30px; }

.hero-signup { display: flex; flex-wrap: wrap; gap: 10px; max-width: 620px; }
.hero-signup input {
  flex: 1 1 220px; min-width: 0; padding: 14px 16px; border-radius: 999px; border: 0;
  font-size: 1rem; font-family: var(--font-body);
}
.hero-signup input[name="zip"] { flex: 0 0 110px; }
.hero-signup .btn { flex: 0 0 auto; }
.hero-signup-note { margin-top: 12px; font-weight: 600; color: var(--gold-light); }

/* ---------- Value bar ---------- */
.valuebar { background: var(--red); color: var(--white); }
.valuebar-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 26px 20px;
}
.valuebar-grid > div {
  display: flex; flex-direction: column; gap: 2px; padding: 6px 16px; position: relative;
}
.valuebar-grid > div + div { border-left: 1px solid rgba(255,255,255,.25); }
.vb-icon { font-size: 1.5rem; }
.valuebar-grid strong { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .5px; font-size: 1.02rem; }
.valuebar-grid span:last-child { font-size: .9rem; color: rgba(255,255,255,.9); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tint { background: var(--paper); }
.section--dark { background: var(--navy); color: var(--white); }

.section-head { max-width: 720px; margin: 0 auto clamp(30px, 5vw, 54px); text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.section-sub { color: var(--muted); font-size: 1.1rem; }
.section-head--light .section-sub { color: rgba(255,255,255,.8); }
.section-head--light .eyebrow { color: var(--gold-light); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-photo { position: relative; }
.photo-frame {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--navy-700), var(--navy)); color: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 2px; font-size: 1rem;
  box-shadow: var(--shadow); border: 4px solid var(--white);
}
.photo-badge {
  position: absolute; right: -14px; bottom: -14px; width: 92px; height: 60px;
  border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); border: 3px solid var(--white); background: var(--navy);
}
.photo-badge img { width: 100%; height: 100%; object-fit: cover; }
.about-copy h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.creds { list-style: none; padding: 0; margin: 0 0 24px; }
.creds li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.creds li::before {
  content: "★"; position: absolute; left: 0; top: 0; color: var(--gold); font-size: 1.05rem;
}

/* ---------- Priorities cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .15s ease, box-shadow .2s ease;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; width: 6px; height: 100%; background: linear-gradient(var(--red), var(--gold)); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-num { font-family: var(--font-head); font-size: 2.2rem; color: var(--line); font-weight: 700; display: block; line-height: 1; }
.card h3 { font-size: 1.3rem; margin-top: 6px; color: var(--navy); }
.card p { color: var(--muted); margin: 0; }
.cards-note { text-align: center; color: var(--muted); margin-top: 22px; font-size: .95rem; }

/* ---------- District ---------- */
.district-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.district-copy h2 { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--navy); }
.chips { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-weight: 600; font-size: .92rem; color: var(--navy);
}
.district-visual { display: flex; justify-content: center; }
.flag-stack { position: relative; width: min(100%, 380px); }
.flag-stack img { border-radius: 10px; box-shadow: var(--shadow); border: 4px solid var(--white); }
.flag-stack img:first-child { transform: rotate(-4deg); }
.flag-stack img:last-child { position: absolute; width: 78%; right: -6%; bottom: -18%; transform: rotate(5deg); }

/* ---------- Get Involved ---------- */
.involve-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: clamp(34px, 6vw, 60px); }
.involve-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius);
  padding: 28px 22px; color: var(--white); transition: transform .15s ease, background .2s ease, border-color .2s;
}
.involve-card:hover { text-decoration: none; transform: translateY(-4px); background: rgba(255,255,255,.1); border-color: var(--gold); }
.involve-icon { font-size: 2rem; }
.involve-card h3 { margin: 12px 0 8px; font-size: 1.25rem; }
.involve-card p { color: rgba(255,255,255,.8); font-size: .96rem; margin-bottom: 14px; }
.involve-link { font-family: var(--font-head); letter-spacing: 1px; text-transform: uppercase; color: var(--gold-light); font-size: .9rem; }

/* ---------- Join form ---------- */
.join-form {
  background: var(--white); color: var(--ink); border-radius: var(--radius);
  padding: clamp(26px, 4vw, 44px); max-width: 760px; margin: 0 auto; box-shadow: var(--shadow);
}
.join-form h3 { font-size: 1.7rem; color: var(--navy); text-align: center; }
.join-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--navy); }
.field input {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; font-family: var(--font-body);
}
.field input:focus, .hero-signup input:focus { outline: 3px solid var(--gold-light); outline-offset: 1px; }
.join-interests { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 4px 0 22px; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.join-interests legend { font-weight: 700; color: var(--navy); padding: 0 6px; }
.join-interests label { display: inline-flex; align-items: center; gap: 8px; font-size: .96rem; }
.join-form .btn { display: block; width: 100%; }
.join-note { margin-top: 14px; text-align: center; font-weight: 700; color: var(--red); }
.form-help { text-align: center; color: var(--muted); font-size: .85rem; margin: 14px 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: #071733; color: rgba(255,255,255,.85); padding: 50px 0 26px; border-top: 3px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 30px; align-items: start; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand p { margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a, .footer-contact a { color: rgba(255,255,255,.85); }
.footer-links a:hover, .footer-contact a:hover { color: var(--gold-light); }
.socials { display: flex; gap: 16px; margin-top: 8px; }
.footer-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); }
.disclaimer { font-size: .82rem; color: rgba(255,255,255,.6); }
.copyright { font-size: .82rem; color: rgba(255,255,255,.55); margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .valuebar-grid { grid-template-columns: repeat(2, 1fr); }
  .valuebar-grid > div:nth-child(3) { border-left: 0; }
  .about-grid, .district-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; margin: 0 auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .involve-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); border-bottom: 3px solid var(--gold);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .primary-nav.open { max-height: 380px; }
  .primary-nav a { padding: 16px 22px; border-top: 1px solid rgba(255,255,255,.08); }
  .nav-cta { margin: 14px 22px; text-align: center; }
  .cards { grid-template-columns: 1fr; }
  .involve-grid { grid-template-columns: 1fr; }
  .join-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .flag-stack { margin-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
