@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --pnw-primary: #1f4d2e;
  --pnw-primary-light: #2f6940;
  --pnw-accent: #8bbf4d;
  --pnw-bg: #f5f6f8;
  --pnw-text: #1a1a1a;
  --pnw-muted: #6b7280;
  --pnw-border: #d1d5db;
  --pnw-success: #16794a;
  --pnw-warn: #b45309;
  --pnw-danger: #b91c1c;
  --pnw-card: #ffffff;
  --pnw-radius: 8px;
  --pnw-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--pnw-bg);
  color: var(--pnw-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pnw-primary-light); }
a:hover { color: var(--pnw-primary); }

header.site-header {
  position: relative;
  background: var(--pnw-primary);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--pnw-shadow);
}

header.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
}

header.site-header .brand img {
  height: 36px;
  width: auto;
}

header.site-header nav a {
  color: #fff;
  margin-left: 18px;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.9;
}
header.site-header nav a:hover { opacity: 1; text-decoration: underline; }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

main.wide { max-width: 1200px; }

h1 { font-size: 1.8rem; margin: 0 0 12px; color: var(--pnw-primary); }
h2 { font-size: 1.3rem; margin: 28px 0 12px; color: var(--pnw-primary); }
h3 { font-size: 1.05rem; margin: 20px 0 8px; }

.card {
  background: var(--pnw-card);
  border-radius: var(--pnw-radius);
  box-shadow: var(--pnw-shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.muted { color: var(--pnw-muted); font-size: 0.92rem; }

.field {
  display: block;
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="date"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--pnw-border);
  border-radius: 6px;
  font-size: 0.98rem;
  font-family: inherit;
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--pnw-primary-light);
  outline-offset: -1px;
  border-color: var(--pnw-primary-light);
}
.field .hint { font-size: 0.85rem; color: var(--pnw-muted); margin-top: 4px; }
.field .error { color: var(--pnw-danger); font-size: 0.88rem; margin-top: 4px; }

.row { display: flex; gap: 12px; }
.row .field { flex: 1; }
@media (max-width: 600px) { .row { flex-direction: column; gap: 0; } }

button, .btn {
  display: inline-block;
  background: var(--pnw-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 0.98rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
button:hover, .btn:hover { background: var(--pnw-primary-light); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-secondary {
  background: #fff;
  color: var(--pnw-primary);
  border: 1px solid var(--pnw-border);
}
.btn-secondary:hover { background: var(--pnw-bg); }

.btn-danger { background: var(--pnw-danger); }
.btn-danger:hover { background: #991919; }

.btn-success { background: var(--pnw-success); }
.btn-success:hover { background: #105d38; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.alert {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.alert-info    { background: #e8f0fb; color: #1c3766; }
.alert-success { background: #dcf3e8; color: #105d38; }
.alert-warn    { background: #fff4dc; color: #7a4b08; }
.alert-error   { background: #fbe3e3; color: #911818; }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-pending  { background: #fff4dc; color: #7a4b08; }
.badge-active   { background: #dcf3e8; color: #105d38; }
.badge-rejected { background: #fbe3e3; color: #911818; }
.badge-paid     { background: #dcf3e8; color: #105d38; }
.badge-unpaid   { background: #fbe3e3; color: #911818; }

table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--pnw-radius);
  overflow: hidden;
  box-shadow: var(--pnw-shadow);
}
table.data th, table.data td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--pnw-border);
  font-size: 0.93rem;
}
table.data th {
  background: #f0f2f5;
  font-weight: 600;
  color: var(--pnw-primary);
}
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #fafbfc; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}
.filter-bar input, .filter-bar select {
  padding: 7px 10px;
  border: 1px solid var(--pnw-border);
  border-radius: 6px;
  font-size: 0.92rem;
  font-family: inherit;
}

footer.site-footer {
  text-align: center;
  color: var(--pnw-muted);
  font-size: 0.85rem;
  padding: 32px 24px;
}

.repeater-item {
  border: 1px solid var(--pnw-border);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fafbfc;
  position: relative;
}
.repeater-item .remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  color: var(--pnw-danger);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 8px;
}

.section-divider {
  height: 1px;
  background: var(--pnw-border);
  margin: 24px 0;
}

.consent-block {
  background: #fafbfc;
  border: 1px solid var(--pnw-border);
  border-radius: 6px;
  padding: 14px;
  font-size: 0.9rem;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.hidden { display: none !important; }

/* Home page ---------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 62vh;
  background-image: url('/assets/hero.png');
  background-size: cover;
  background-position: center 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,34,21,0.35) 0%, rgba(13,34,21,0.75) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.hero-content img.hero-logo {
  height: 64px;
  width: auto;
  margin-bottom: 18px;
}
.hero-content h1 {
  color: #fff;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  margin: 0 0 10px;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.hero-content .tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic;
  opacity: 0.95;
  margin: 0 0 28px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.hero-content .btn-row {
  justify-content: center;
  gap: 12px;
}
.hero-content .btn {
  padding: 12px 22px;
  font-size: 1rem;
}
.hero-content .btn-secondary {
  background: rgba(255,255,255,0.92);
  color: var(--pnw-primary);
  border-color: transparent;
}
.hero-content .btn-secondary:hover {
  background: #fff;
}

.emergency-card {
  border-left: 4px solid var(--pnw-danger);
}
.emergency-primary-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 10px 0 6px;
}
.emergency-primary-row .label {
  font-size: 0.95rem;
  color: var(--pnw-muted);
}
.emergency-primary {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pnw-danger);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.emergency-primary:hover { text-decoration: underline; }
.emergency-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.emergency-list li {
  padding: 10px 0;
  border-top: 1px solid var(--pnw-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.95rem;
}
.emergency-list li:first-child {
  border-top: none;
  padding-top: 4px;
}
.emergency-list .label {
  color: var(--pnw-text);
  flex: 1;
  min-width: 200px;
}
.emergency-list a {
  color: var(--pnw-primary);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.emergency-list a:hover { text-decoration: underline; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.value-item {
  background: #fafbfc;
  border: 1px solid var(--pnw-border);
  border-radius: 6px;
  padding: 14px;
}
.value-item h3 {
  margin: 0 0 6px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pnw-primary);
}
.value-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--pnw-text);
  line-height: 1.4;
}
@media (max-width: 900px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .values-grid { grid-template-columns: 1fr; }
}

.area-map {
  margin-top: 12px;
}
.area-map img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--pnw-border);
  display: block;
}
.area-map figcaption {
  font-size: 0.88rem;
  color: var(--pnw-muted);
  margin-top: 8px;
}

.committee-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.committee-list li {
  padding: 10px 0;
  border-top: 1px solid var(--pnw-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.committee-list li:first-child {
  border-top: none;
}
.committee-list .role {
  color: var(--pnw-muted);
  font-size: 0.92rem;
}

.full-bleed { max-width: none; padding-left: 0; padding-right: 0; }

/* Mobile fixes ------------------------------------------------------------ */

/* Hamburger nav toggle: hidden on desktop, shown on mobile. */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: #fff;
  margin-left: 12px;
}
.nav-toggle svg { display: block; width: 28px; height: 28px; }
.nav-toggle:focus-visible {
  outline: 2px solid var(--pnw-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  header.site-header { padding: 12px 16px; }
  header.site-header .brand { font-size: 0.98rem; gap: 10px; }
  header.site-header .brand img { height: 32px; }

  header.site-header nav#site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--pnw-primary);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    padding: 12px 16px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 0;
    width: 100%;
    z-index: 20;
  }
  body.nav-open header.site-header nav#site-nav {
    display: flex;
  }
  header.site-header nav#site-nav a {
    margin-left: 0;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 1rem;
    opacity: 1;
  }
  header.site-header nav#site-nav a:hover,
  header.site-header nav#site-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
    outline: none;
  }
  header.site-header nav#site-nav .nav-cta-outline,
  header.site-header nav#site-nav .nav-cta-solid {
    text-align: center;
    margin-top: 6px;
  }

  /* On the landing page the overlay header is transparent — the open
     dropdown gets a translucent dark blurred background so links read
     against the hero photo. */
  body.landing.nav-open header.site-header nav#site-nav {
    background: rgba(8, 22, 14, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* Horizontal scroll wrapper for wide admin tables.
   Wrap any <table class="data"> in <div class="table-scroll"> so the table
   stays readable on narrow viewports without breaking the page layout. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--pnw-radius);
}
.table-scroll > table.data { min-width: 720px; }

@media (max-width: 720px) {
  .table-scroll { margin: 0 -8px; padding: 0 8px; }
}

/* Hero: shorter on mobile so the photo doesn't push CTAs below the fold
   on landscape phones. */
@media (max-width: 768px) {
  .hero {
    min-height: 380px;
    padding: 56px 20px;
  }
  .hero-content img.hero-logo { height: 52px; margin-bottom: 12px; }
}

/* Inline table action buttons (Edit/Delete/Save) carry inline padding via
   JS-injected `style=`. Override at narrow widths so they meet a usable
   touch-target size. */
@media (max-width: 600px) {
  table.data button[style],
  table.data .btn[style] {
    min-height: 36px !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }
}

/* Nav CTA buttons (Log in outlined / Register solid) — present on every
   page; on the landing they sit over the photo, on other pages they sit on
   the solid green header. */
header.site-header nav .nav-cta-outline,
header.site-header nav .nav-cta-solid {
  padding: 7px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  display: inline-block;
  transition: background 0.15s, opacity 0.15s;
}
header.site-header nav .nav-cta-outline {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  opacity: 1;
}
header.site-header nav .nav-cta-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  text-decoration: none;
}
header.site-header nav .nav-cta-solid {
  background: var(--pnw-accent);
  color: #0f3320;
  opacity: 1;
}
header.site-header nav .nav-cta-solid:hover {
  background: #a3d05a;
  text-decoration: none;
}

/* Landing page (body.landing) — overlay header on top of the hero photo. */
body.landing { background: #0d1e14; }

body.landing header.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  background: transparent;
  box-shadow: none;
  padding: 18px 32px;
}

body.landing .hero {
  min-height: 100vh;
  padding: 120px 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  background-image: url('/assets/hero.png');
  background-size: cover;
  background-position: center 60%;
  color: #fff;
  position: relative;
}
body.landing .hero::before {
  background: linear-gradient(115deg,
    rgba(8, 22, 14, 0.92) 0%,
    rgba(13, 30, 20, 0.78) 35%,
    rgba(13, 30, 20, 0.50) 70%,
    rgba(13, 30, 20, 0.55) 100%);
}

body.landing .hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}

body.landing .hero-text { max-width: 760px; text-align: left; }

body.landing .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pnw-accent);
  margin-bottom: 20px;
}
body.landing .eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--pnw-accent);
  display: block;
}

body.landing .hero-headline {
  font-size: clamp(2.4rem, 6.2vw, 5.4rem);
  font-weight: 800;
  line-height: 0.97;
  margin: 0 0 22px;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

body.landing .hero-tagline {
  font-size: clamp(1.15rem, 2.4vw, 1.85rem);
  font-weight: 700;
  margin: 0 0 18px;
  color: #fff;
  line-height: 1.2;
}
body.landing .hero-tagline .accent { color: var(--pnw-accent); }

body.landing .hero-description {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  font-weight: 400;
  max-width: 460px;
  margin: 0 0 32px;
  opacity: 0.95;
  line-height: 1.55;
}

body.landing .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

body.landing .btn-large {
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: background 0.15s;
}
body.landing .btn-large svg { width: 18px; height: 18px; stroke-width: 2; }
body.landing .btn-register {
  background: var(--pnw-accent);
  color: #0f3320;
}
body.landing .btn-register:hover { background: #a3d05a; }
body.landing .btn-login-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
}
body.landing .btn-login-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Values strip at the bottom of the hero */
body.landing .hero-values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 1080px;
}
body.landing .value-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
body.landing .value-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(139, 191, 77, 0.18);
  border: 1px solid rgba(139, 191, 77, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pnw-accent);
  flex-shrink: 0;
}
body.landing .value-hero-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }
body.landing .value-hero h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 600;
  color: #fff;
}
body.landing .value-hero p {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

/* Below-the-fold cards on landing keep light theme */
body.landing main { background: var(--pnw-bg); }

/* Mobile / tablet landing adjustments */
@media (max-width: 1024px) {
  body.landing .hero { padding: 110px 24px 40px; }
  body.landing .hero-values { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 600px) {
  body.landing header.site-header { padding: 12px 16px; }
  body.landing .hero { padding: 96px 20px 32px; min-height: auto; }
  body.landing .hero-inner { gap: 32px; }
  body.landing .hero-headline { font-size: clamp(2rem, 9vw, 3rem); }
  body.landing .hero-values { grid-template-columns: 1fr; gap: 18px; padding-top: 28px; }
  body.landing .btn-large { padding: 12px 18px; font-size: 0.95rem; }
}

/* FAQ accordion — uses native <details> + <summary> so no JS required. */
details.faq.card {
  padding: 0;
  margin-bottom: 12px;
}
details.faq.card > summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--pnw-primary);
  list-style: none;
  position: relative;
  user-select: none;
  padding-right: 48px;
}
details.faq.card > summary::-webkit-details-marker { display: none; }
details.faq.card > summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--pnw-muted);
  font-weight: 300;
  transition: transform 0.15s ease;
}
details.faq.card[open] > summary::after {
  content: "−";
}
details.faq.card > summary:hover {
  background: var(--pnw-bg);
  border-radius: var(--pnw-radius) var(--pnw-radius) 0 0;
}
details.faq.card[open] > summary {
  border-bottom: 1px solid var(--pnw-border);
  border-radius: var(--pnw-radius) var(--pnw-radius) 0 0;
}
details.faq.card > .faq-body {
  padding: 16px 20px 20px;
}
details.faq.card > .faq-body > :first-child { margin-top: 0; }
details.faq.card > .faq-body > :last-child { margin-bottom: 0; }
