/* ==========================================================================
   Aloha State Outreach — site stylesheet
   Previously this file's contents were pasted inline into every page, three
   copies drifting apart. One file now serves them all and caches between
   page loads.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand */
  --teal:        #1a6b5a;
  --teal-dark:   #145446;
  --plum:        #7b3f6e;
  --plum-dark:   #632f58;
  --gold:        #e8a24a;
  --sand:        #f2ede3;
  --sand-deep:   #e0dbd1;

  /* Ink */
  --ink:         #1a122b;
  --ink-muted:   #4b4b4b;
  --ink-soft:    #6f6a63;
  --line:        #e2dcd1;
  --line-strong: #b2a49d;

  /* Surfaces */
  --surface:     #ffffff;
  --surface-alt: #faf8f4;

  /* Feedback */
  --success-bg:  #e4f1e6;
  --success-ink: #22603a;
  --error-bg:    #fdecea;
  --error-ink:   #a52c22;
  --error-line:  #c62828;

  --brand-sweep: linear-gradient(90deg, var(--teal) 0%, var(--plum) 50%, var(--gold) 100%);

  --radius-sm:   8px;
  --radius:      12px;
  --radius-lg:   20px;

  --shadow-sm:   0 1px 3px rgba(26, 18, 43, .08);
  --shadow:      0 4px 20px rgba(26, 18, 43, .08);
  --shadow-lg:   0 12px 44px rgba(26, 18, 43, .13);

  --container:   1120px;
  --measure:     68ch;

  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Respect a stated preference for reduced motion over our own flourishes. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-muted);
  background: var(--sand);
  background-image: linear-gradient(170deg, var(--sand) 0%, var(--sand-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--ink-muted);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--plum);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s ease;
}
a:hover { color: var(--teal); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { margin: 0 0 1.15em; padding-left: 1.4em; }
li { margin-bottom: .5em; }

strong { color: var(--ink); font-weight: 600; }

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2.5rem 0;
}

/* A single visible focus treatment, used everywhere. */
:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. Layout helpers
   -------------------------------------------------------------------------- */

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.container--narrow { --container: 860px; }

.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section--tight { padding: clamp(2rem, 4vw, 3.5rem) 0; }

.section--panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 4vw, 3.25rem);
}

.stack > * + * { margin-top: 1.15em; }

.measure { max-width: var(--measure); }

.text-center { text-align: center; }

.visually-hidden {
  position: absolute !important;
  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: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 100;
  padding: .75rem 1.5rem;
  background: var(--surface);
  color: var(--plum);
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

.divider {
  height: 3px;
  border: 0;
  border-radius: 2px;
  background: var(--brand-sweep);
  opacity: .8;
  margin: 2rem 0;
}

.eyebrow {
  display: block;
  margin-bottom: .6rem;
  color: var(--teal);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--primary {
  background: var(--brand-sweep);
  color: #fff;
  box-shadow: 0 4px 14px rgba(122, 62, 109, .3);
}
.btn--primary:hover {
  color: #fff;
  box-shadow: 0 8px 24px rgba(122, 62, 109, .38);
}

.btn--donate {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(232, 162, 74, .38);
}
.btn--donate:hover {
  background: #dd9436;
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(232, 162, 74, .45);
}

.btn--outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-muted);
}
.btn--outline:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.btn--sm { padding: .55rem 1.15rem; font-size: .9rem; }
.btn--lg { padding: 1rem 2.4rem; font-size: 1.1rem; }
.btn--block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
}
.btn-row--center { justify-content: center; }

/* --------------------------------------------------------------------------
   5. Site header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
}

.site-header__logo img {
  width: 190px;
  height: auto;
}

@media (max-width: 480px) {
  .site-header__logo img { width: 150px; }
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle__bars {
  display: block;
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li { margin: 0; }

.site-nav a {
  display: block;
  padding: .5rem .85rem;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { background: var(--sand); color: var(--teal); }

.site-nav a[aria-current='page'] {
  color: var(--teal);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--teal);
}

.site-nav .btn { margin-left: .4rem; }
.site-nav .btn:hover { background: var(--gold); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    width: 100%;
    padding-bottom: .75rem;
  }
  .site-nav.is-open { display: block; }

  .site-header__inner { flex-wrap: wrap; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
  }
  .site-nav a { padding: .7rem .85rem; }
  .site-nav .btn { margin: .4rem 0 0; }
  .site-nav a[aria-current='page'] { box-shadow: inset 3px 0 0 var(--teal); }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
}

.hero__tagline {
  max-width: 46ch;
  text-wrap: balance;
  margin: 0 auto 1.75rem;
  color: var(--plum);
  font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem);
  font-style: italic;
  font-weight: 300;
}

/* --------------------------------------------------------------------------
   7. Content cards and grids
   -------------------------------------------------------------------------- */

.card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.card h3 {
  margin-bottom: .4rem;
  color: var(--teal);
}

.card p { color: var(--ink-soft); font-size: .97rem; }

.card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--sand);
  font-size: 1.35rem;
  line-height: 1;
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.stat-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  margin: 0;
  padding: 0;
}

.stat {
  padding: 1.25rem;
  background: var(--surface-alt);
  border-radius: var(--radius);
  text-align: center;
}

.stat dt {
  color: var(--ink-soft);
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.stat dd {
  margin: .25rem 0 0;
  color: var(--teal);
  font-size: 1.6rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   8. Forms
   -------------------------------------------------------------------------- */

.form-panel {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: linear-gradient(150deg, var(--sand) 0%, var(--sand-deep) 100%);
  border-radius: var(--radius-lg);
}

.form {
  display: grid;
  gap: 1.15rem;
  max-width: 620px;
  margin-inline: auto;
}

.form__row {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.field { display: flex; flex-direction: column; gap: .4rem; }

.field label {
  color: var(--ink-muted);
  font-size: .92rem;
  font-weight: 600;
}

.field .hint {
  color: var(--ink-soft);
  font-size: .82rem;
  font-weight: 400;
}

.field .required { color: var(--error-line); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field select {
  /* Keep the native control but replace the inconsistent default arrow. */
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%234b4b4b'%3E%3Cpath d='M4.2 6.2 8 10l3.8-3.8-1.1-1.1L8 7.8 5.3 5.1z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26, 107, 90, .16);
}

.field input[aria-invalid='true'],
.field select[aria-invalid='true'],
.field textarea[aria-invalid='true'] {
  border-color: var(--error-line);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, .13);
}

.field__error {
  min-height: 0;
  color: var(--error-ink);
  font-size: .85rem;
  font-weight: 500;
}
.field__error:empty { display: none; }

/* The honeypot. Hidden from people, left in the DOM for bots to fill in.
   Not `display:none`, which the better bots skip. */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__footnote {
  margin: 0;
  color: var(--ink-soft);
  font-size: .84rem;
  line-height: 1.6;
}

.form-message {
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 500;
}
.form-message:empty { display: none; }

.form-message--success {
  background: var(--success-bg);
  color: var(--success-ink);
  border-left: 4px solid var(--teal);
}

.form-message--error {
  background: var(--error-bg);
  color: var(--error-ink);
  border-left: 4px solid var(--error-line);
}

/* --------------------------------------------------------------------------
   9. Donate / Givebutter
   -------------------------------------------------------------------------- */

.donate-panel .gb-embed { margin-top: 1.5rem; }

.donate-panel {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Givebutter mount point. A button widget renders a button; an embed widget
   renders an iframe. Neither may overflow the card. */
.gb-embed {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  /* Givebutter controls what renders in here and can change it at any time.
     If it ever comes back wider than a phone, it scrolls inside this box
     rather than making the whole page scroll sideways. Safe for the donation
     overlay, which is fixed-positioned and so is not clipped by this. */
  max-width: 100%;
  overflow-x: auto;
}
.gb-embed iframe {
  width: 100% !important;
  max-width: 100%;
  border: 0;
}
/* A button widget sizes to its own button and is centred by the flex rule
   above. A form/embed widget instead needs the full width of the card — add
   the gb-embed--form modifier to the mount point for that. */
.gb-embed givebutter-widget {
  display: block;
  max-width: 100%;
}

.gb-embed--form { align-items: stretch; }
.gb-embed--form givebutter-widget { width: 100%; }

/* The stand-in donate link shown until the widget renders — and permanently
   if Givebutter is blocked. It is a real way to give, not a placeholder, so
   it is styled as one rather than as an empty dashed box. */
.gb-fallback {
  text-align: center;
}

.impact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.impact-list li {
  display: flex;
  gap: .9rem;
  align-items: baseline;
  padding: .9rem 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.impact-list li:last-child { border-bottom: 0; }

.impact-list .amount {
  flex: 0 0 4.5rem;
  color: var(--teal);
  font-size: 1.05rem;
  font-weight: 600;
}

.notice-box {
  padding: 1.15rem 1.35rem;
  margin: 1.75rem 0;
  background: var(--surface-alt);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
}
.notice-box p:last-child { margin-bottom: 0; }

.crisis-note {
  padding: 1.15rem 1.35rem;
  background: #f0f5f3;
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-sm);
  color: #1a4c40;
  font-size: .95rem;
}
.crisis-note p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   10. Legal / long-form pages
   -------------------------------------------------------------------------- */

.legal { max-width: var(--measure); }

.legal h2 {
  margin-top: 2.5rem;
  padding-top: .25rem;
  font-size: 1.3rem;
}

.legal h2:first-of-type { margin-top: 1.5rem; }

.legal .last-updated {
  color: var(--ink-soft);
  font-size: .9rem;
}

.back-link {
  display: inline-block;
  margin-top: 2.5rem;
  font-weight: 600;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  margin-bottom: 2.25rem;
}

.site-footer h2 {
  margin-bottom: .75rem;
  color: var(--ink-muted);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: .5rem; }

.site-footer a {
  color: var(--ink-soft);
  font-size: .95rem;
  text-decoration: none;
}
.site-footer a:hover { color: var(--teal); text-decoration: underline; }

.site-footer__logo { width: 200px; height: auto; margin-bottom: 1rem; }

.site-footer__tagline {
  color: var(--ink-soft);
  font-size: .9rem;
  font-style: italic;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .87rem;
}

.site-footer__bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}

/* --------------------------------------------------------------------------
   12. Print
   -------------------------------------------------------------------------- */

@media print {
  body { background: #fff; }
  .site-header,
  .site-footer__grid,
  .skip-link,
  .form-panel,
  .btn { display: none !important; }
  .section--panel { box-shadow: none; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: .85em; }
}
