/* ==========================================================
   Point Diablo — styles
   Palette pulled from the logo: evergreen, beam gold, cream.
   ========================================================== */

:root {
  --green-900: #13352c;
  --green-800: #1b4337;
  --green-700: #245446;
  --gold-500: #c9a45c;
  --cream-50: #fefdfa; /* matches the logo backdrop */
  --cream-100: #f5f2e8;
  --cream-200: #ebe5d4;

  --color-bg: var(--cream-50);
  --color-surface: #ffffff;
  --color-tint: var(--cream-100);
  --color-text: #1a2622;
  --color-muted: #4d5a55;
  --color-border: var(--cream-200);
  --color-primary: var(--green-800);
  --color-primary-hover: var(--green-900);
  --color-on-primary: #ffffff;
  --color-accent: var(--gold-500);
  --color-accent-text: #8a6a2c; /* gold dark enough for text on cream (4.6:1) */

  --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(19, 53, 44, 0.06), 0 2px 8px rgba(19, 53, 44, 0.05);
  --shadow-md: 0 4px 12px rgba(19, 53, 44, 0.08), 0 12px 32px rgba(19, 53, 44, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--green-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.5rem; }
p  { margin: 0 0 1em; }

a { color: var(--color-primary); }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 16px; top: -100px;
  background: var(--green-900); color: #fff;
  padding: 10px 16px; border-radius: 8px; z-index: 1000;
}
.skip-link:focus { top: 16px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }
.center { text-align: center; }

.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-tint { background: var(--color-tint); }
.section-dark { background: var(--green-900); color: #e6ece9; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { color: var(--gold-500); }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-lede { font-size: 1.1875rem; color: var(--color-muted); }
.section-dark .section-lede { color: #c5d1cc; }

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin-bottom: 12px;
}

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; gap: 64px; }
}
.prose { font-size: 1.125rem; color: var(--color-muted); max-width: 64ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  background: var(--color-primary); color: var(--color-on-primary);
  border: 2px solid var(--color-primary);
  border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease), transform 150ms var(--ease);
}
.btn:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.btn:active { transform: scale(0.98); }
.btn-ghost { background: transparent; color: var(--color-primary); }
.btn-ghost:hover { background: var(--color-primary); color: var(--color-on-primary); }
.btn-small { min-height: 42px; padding: 0 20px; font-size: 0.9375rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(254, 253, 250, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.site-header.scrolled { border-color: var(--color-border); box-shadow: var(--shadow-sm); }

.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.wordmark { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; }
.wordmark-name {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 1.375rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green-900); margin: 0;
}
.wordmark-sub {
  font-size: 0.625rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--color-muted);
}

.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-menu a:not(.btn) {
  color: var(--color-text); text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  padding: 8px 0; position: relative;
}
.nav-menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--gold-500); transform: scaleX(0); transform-origin: left;
  transition: transform 250ms var(--ease);
}
.nav-menu a:not(.btn):hover::after,
.nav-menu a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--green-900); cursor: pointer; border-radius: 8px;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color-bg); border-bottom: 1px solid var(--color-border);
    padding: 8px 24px 24px; box-shadow: var(--shadow-md);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 200ms;
  }
  .nav-menu.open { visibility: visible; opacity: 1; transform: none; }
  .nav-menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--color-border); }
  .nav-menu a:not(.btn)::after { display: none; }
  .nav-menu .btn { margin-top: 16px; }
}

/* ---------- Hero ---------- */
.hero { padding: 32px 0 clamp(72px, 10vw, 120px); text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-logo {
  width: min(100%, 560px);
  margin: 16px 0 40px;
}
.hero-title { max-width: 20ch; }
.hero-lede { font-size: clamp(1.125rem, 2vw, 1.3125rem); color: var(--color-muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }

/* ---------- Mission ---------- */
.mission { background: var(--green-900); text-align: center; position: relative; overflow: hidden; }
.mission::before {
  /* the lighthouse beam */
  content: ""; position: absolute; top: 0; left: 50%; width: 140%; height: 100%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0%, rgba(201, 164, 92, 0.22), transparent 60%);
  pointer-events: none;
}
.mission .eyebrow { color: var(--gold-500); }
.mission-statement {
  position: relative; margin: 0;
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(1.75rem, 3.8vw, 2.625rem); line-height: 1.3;
  color: #fff; text-wrap: balance;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 250ms var(--ease), transform 250ms var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card p { color: var(--color-muted); margin: 0; }
.card h3 { margin-bottom: 8px; }

.icon {
  width: 44px; height: 44px; padding: 10px; margin-bottom: 20px;
  border-radius: 10px; background: var(--cream-100);
  fill: none; stroke: var(--green-800); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.section-tint .icon { background: var(--cream-100); }

/* ---------- Steps ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.step { border-top: 2px solid rgba(201, 164, 92, 0.5); padding-top: 24px; }
.step-num {
  display: block; font-family: var(--font-serif); font-size: 2.5rem; line-height: 1;
  color: var(--gold-500); margin-bottom: 16px;
}
.step p { color: #c5d1cc; margin: 0; }

/* ---------- Team ---------- */
.member { text-align: center; }
.member-photo {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--radius); margin-bottom: 20px;
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  box-shadow: var(--shadow-sm);
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* Fallback monogram shown until real photos are added */
.member-photo.no-photo::after {
  content: attr(data-initials);
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 4rem; letter-spacing: 0.08em; color: var(--gold-500);
}
.member-photo.no-photo img { display: none; }
.member h3 { margin-bottom: 4px; }
.member-role {
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-accent-text); margin-bottom: 12px;
}
.member-bio { color: var(--color-muted); max-width: 34ch; margin: 0 auto 12px; }
.member-email {
  display: flex; align-items: center; gap: 8px;
  width: fit-content; margin: 0 auto;
  min-height: 40px; padding: 0 4px;
  color: var(--color-primary); font-weight: 600; font-size: 0.9375rem;
  text-decoration: none; overflow-wrap: anywhere;
}
.member-email:hover { text-decoration: underline; text-underline-offset: 3px; }
.member-email svg {
  width: 18px; height: 18px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Contact ---------- */
.contact-note { margin: 32px 0 16px; font-weight: 600; color: var(--green-900); }
.contact-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 24px 12px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  color: var(--color-text);
}
.contact-name { font-family: var(--font-serif); font-size: 1.375rem; font-weight: 600; color: var(--green-900); }
.contact-name { margin-bottom: 4px; }
.contact-addr {
  display: inline-flex; align-items: center; min-height: 32px;
  color: var(--color-primary); font-weight: 600; font-size: 0.9375rem;
  text-decoration: none; overflow-wrap: anywhere;
}
.contact-addr:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Meeting request form ---------- */
.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;
}
.form-wrap { max-width: 760px; margin-top: 40px; }
.request-form, .form-success {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 5vw, 48px);
}
.form-title { font-size: 1.75rem; margin-bottom: 4px; }
.form-hint { color: var(--color-muted); font-size: 0.9375rem; margin-bottom: 28px; }
.req { color: #a1402f; }
.optional { color: var(--color-muted); font-weight: 400; }

.form-grid { display: grid; gap: 0 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }

.field { margin-bottom: 20px; min-width: 0; }
.field label, .chips legend {
  display: block; font-weight: 600; font-size: 0.9375rem; color: var(--green-900); margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--color-text);
  background: var(--cream-50);
  border: 1.5px solid #cfc7b2; border-radius: 10px;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease), background-color 150ms var(--ease);
}
.field textarea { resize: vertical; min-height: 132px; line-height: 1.55; }
.field select {
  appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231b4337' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field input::placeholder { color: #8a918d; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b3aa92; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background-color: #fff;
  border-color: var(--green-800); box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.45);
}
.field [aria-invalid="true"] { border-color: #b3261e; background-color: #fff8f7; }
.field-help { font-size: 0.875rem; color: var(--color-muted); margin: 6px 0 0; }
.field-error { font-size: 0.875rem; font-weight: 600; color: #b3261e; margin: 6px 0 0; }
.field-error:empty { display: none; }
.field-error::before { content: "! "; }

.chips { border: 0; padding: 0; margin: 4px 0 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips legend { margin-bottom: 10px; padding: 0; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border: 1.5px solid #cfc7b2; border-radius: 999px; background: var(--cream-50);
  font-size: 0.9375rem; font-weight: 500; user-select: none;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease);
}
.chip:hover span { border-color: var(--green-800); }
.chip input:checked + span { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.chip input:checked + span::before { content: "\2713"; font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--gold-500); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.error-summary {
  border: 1.5px solid #b3261e; background: #fff8f7; border-radius: 10px;
  padding: 16px 20px; margin-bottom: 24px; color: #7a1a14;
}
.error-summary p { font-weight: 700; margin: 0 0 6px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: #b3261e; font-weight: 600; }

.form-submit { width: 100%; margin-top: 8px; gap: 10px; }
@media (min-width: 640px) { .form-submit { width: auto; min-width: 200px; } }
.form-submit[disabled] { opacity: 0.6; cursor: progress; }
.form-submit .spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { margin: 12px 0 0; font-size: 0.9375rem; color: var(--color-muted); }
.form-status.is-error { color: #b3261e; font-weight: 600; }
.form-status:empty { display: none; }

.form-success { text-align: center; }
.form-success .icon { width: 56px; height: 56px; padding: 14px; border-radius: 50%; background: var(--green-800); stroke: #fff; stroke-width: 2.5; margin: 0 auto 16px; display: block; }
.form-success p { color: var(--color-muted); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #c5d1cc; padding: 56px 0 40px; }
.site-footer .wordmark-name { color: #fff; }
.footer-inner { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) {
  .footer-inner { grid-template-columns: 1fr auto; }
  .footer-copy { grid-column: 1 / -1; }
}
.footer-sub { margin: 4px 0 0; font-size: 0.875rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-nav a { color: #e6ece9; text-decoration: none; padding: 8px 0; }
.footer-nav a:hover { color: var(--gold-500); }
.footer-copy {
  margin: 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
}

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
