/* =============================================================================
   styles.css  —  Warm, human, reassuring theme for a small local association.
   Soft sage + cream + beige. No external fonts/libraries (fast, private).
   Edit the variables below to re-skin the whole page.
   ========================================================================== */

:root {
  /* ---- Brand colors (edit these) ---- */
  --color-primary: #3f6f5e;     /* main sage-green: links, buttons, headings */
  --color-secondary: #b98a52;   /* soft warm brown accent (used sparingly)   */
  --color-background: #faf6ee;  /* warm off-white page background            */
  --color-text: #36332d;        /* warm dark text                           */
  --color-muted: #766e60;       /* soft brown-grey secondary text           */

  /* ---- Derived / supporting tones ---- */
  --color-primary-dark: #2c5044;
  --color-sage: #7e9b8a;
  --color-sage-soft: #e7eee7;   /* very pale sage */
  --color-cream: #f6efe1;       /* cream */
  --color-beige: #efe7d6;       /* light beige */
  --color-surface: #fffdf8;     /* card surface */
  --color-surface-alt: #f3ecdf; /* alternating section background */
  --color-border: #e6ddcd;

  /* Gentle status tints — soft, never alarming */
  --tint-accept-bg: #ecf2ec;
  --tint-accept-mark: #4f7d63;
  --tint-check-bg: #f5efe2;
  --tint-check-mark: #a98551;

  /* ---- Type ---- */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", sans-serif;
  --fs-base: 1.05rem;
  --lh-base: 1.62;

  /* ---- Layout ---- */
  --maxw: 1060px;
  --radius: 18px;
  --radius-sm: 12px;
  --space: clamp(2.2rem, 5vw, 3.6rem);
  --shadow: 0 1px 2px rgba(54, 51, 45, .04), 0 10px 30px rgba(63, 111, 94, .07);
  --shadow-soft: 0 6px 18px rgba(63, 111, 94, .06);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Never allow content to scroll sideways on small screens */
html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-background);
  background-image:
    radial-gradient(60% 50% at 100% 0%, rgba(185, 138, 82, .06), transparent 70%),
    radial-gradient(50% 40% at 0% 8%, rgba(126, 155, 138, .08), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

/* Defensive: cards/blocks never exceed their column */
.card, .contact-info, .notes-list, .carousel, .glance-card {
  max-width: 100%;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.18; color: var(--color-primary-dark); font-weight: 600; }
h1 { font-size: clamp(1.9rem, 4.6vw, 2.85rem); margin: .15em 0 .35em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 3.4vw, 2.05rem); margin: 0 0 .55em; }
h3 { font-size: 1.18rem; margin: 0 0 .35em; }

p { margin: 0 0 1rem; }
.lead { font-size: 1.1rem; color: var(--color-text); max-width: 62ch; }

a { color: var(--color-primary); text-underline-offset: .15em; }

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

/* ---- Eyebrow label (small uppercase tag above headings) ---- */
.eyebrow {
  font-family: var(--font-sans);
  color: var(--color-sage); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; font-size: .72rem; margin: 0 0 .35rem;
}

/* ---- Accessibility helpers ---- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--color-primary); color: #fff; padding: .6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--color-sage); outline-offset: 2px; border-radius: 6px; }

/* ============================== NAVBAR ================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 238, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 0 rgba(54, 51, 45, .02);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; gap: 1rem;
}
.brand {
  font-family: var(--font-display); font-weight: 600; text-decoration: none;
  color: var(--color-primary-dark); font-size: 1.08rem; line-height: 1.2;
  /* Allow the name to shrink/truncate so it never pushes the burger off-screen */
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Menu container (section links + language switch) */
.nav__menu {
  flex: 1 1 auto; display: flex; align-items: center;
  justify-content: flex-end; gap: 1.3rem;
}
.nav__list {
  display: flex; align-items: center; gap: .35rem;
  list-style: none; margin: 0; padding: 0;
}
.nav__link {
  display: inline-block; text-decoration: none; color: var(--color-text);
  font-size: .92rem; font-weight: 600; padding: .4rem .6rem; border-radius: 8px;
  white-space: nowrap; transition: color .15s ease, background .15s ease;
}
.nav__link:hover { color: var(--color-primary-dark); background: var(--color-cream); }
.nav__link.is-active {
  color: var(--color-primary-dark);
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

/* Burger toggle — icon only (hidden on desktop) */
.nav__toggle {
  display: none; flex: none; place-items: center; place-content: center;
  width: 2.6rem; height: 2.6rem;
  border: 1px solid var(--color-border); background: var(--color-surface);
  color: var(--color-primary-dark); cursor: pointer; border-radius: 12px;
}
.nav__bars, .nav__bars::before, .nav__bars::after {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--color-primary-dark); transition: transform .2s ease, opacity .2s ease;
}
.nav__bars { position: relative; }
.nav__bars::before, .nav__bars::after { content: ""; position: absolute; left: 0; }
.nav__bars::before { top: -5px; }
.nav__bars::after { top: 5px; }
.nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__bars::before { transform: translateY(5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* Language switch */
.lang-switch {
  display: inline-flex; border: 1px solid var(--color-border);
  border-radius: 999px; overflow: hidden; background: var(--color-surface);
  flex: none;
}
.lang-btn {
  border: 0; background: transparent; cursor: pointer;
  padding: .42rem .85rem; font: inherit; font-weight: 600; font-size: .82rem;
  color: var(--color-muted);
}
.lang-btn[aria-pressed="true"] { background: var(--color-primary); color: #fff; }

/* ---- Mobile: brand + hamburger only; the dropdown holds links + language -- */
@media (max-width: 820px) {
  .nav__toggle { display: grid; }
  .nav__menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .9rem;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    padding: .9rem 1.25rem 1.3rem;
    /* collapsed by default */
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: .15rem; width: 100%; }
  .nav__link { display: block; padding: .7rem .6rem; font-size: 1rem; }
  .nav__link.is-active { box-shadow: inset 3px 0 0 var(--color-primary); border-radius: 6px; }
  /* Language switch sits at the bottom of the open menu, clearly visible */
  .nav__menu .lang-switch { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .nav__menu { transition: none; }
}

/* =============================== HERO ================================== */
.hero {
  background:
    linear-gradient(180deg, var(--color-cream), var(--color-background) 90%);
  padding: clamp(2rem, 4.5vw, 3.2rem) 0 clamp(2.2rem, 5vw, 3.4rem);
  border-bottom: 1px solid var(--color-border);
}
.hero-inner { display: grid; gap: 1.8rem; align-items: center; }
.hero-subtitle {
  color: var(--color-sage); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; font-size: .74rem; margin: 0 0 .35rem;
}
.hero-desc { color: var(--color-muted); max-width: 52ch; font-size: 1.08rem; }
.hero-media { margin: 0; min-width: 0; }
/* The photo carousel lives in the hero — fill the column, stay compact */
.hero-media .carousel { margin: 0; max-width: 100%; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; margin-top: 1.3rem; }
.hero-link {
  font-weight: 600; font-size: .92rem; color: var(--color-primary-dark);
  text-decoration: none; opacity: .85;
}
.hero-link:hover { text-decoration: underline; opacity: 1; }

/* =============================== BUTTONS =============================== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.25rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: .95rem;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-soft); }
.btn--primary:hover { background: var(--color-primary-dark); }
.btn--ghost { background: var(--color-surface); color: var(--color-primary-dark); border-color: var(--color-border); }
.btn--ghost:hover { border-color: var(--color-sage); }

/* ============================ AT A GLANCE ============================== */
.glance { padding: clamp(1.4rem, 3vw, 2rem) 0; }
.glance-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .8rem; grid-template-columns: 1fr;
}
.glance-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: .95rem 1.1rem; box-shadow: var(--shadow-soft);
  display: grid; gap: .2rem;
}
.glance-card__label {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-sage);
}
.glance-card__value { color: var(--color-text); font-size: .98rem; }

/* =============================== SECTIONS ============================== */
.section { padding: var(--space) 0; }
.section--alt { background: var(--color-surface-alt); }
.section--notes { background: var(--color-cream); }

/* How to help — friendly, not procedural */
.steps {
  list-style: none; padding: 0; margin: 1.4rem 0 0;
  display: grid; gap: .9rem;
}
.steps li {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.15rem 1.2rem; box-shadow: var(--shadow-soft);
}
.steps h3 { color: var(--color-primary); font-size: 1.08rem; }
.steps p { margin: 0; color: var(--color-muted); font-size: .96rem; }

/* Badges (current needs) — soft cream pills, no vivid orange */
.badges { list-style: none; padding: 0; margin: 1rem 0 1.1rem;
  display: flex; flex-wrap: wrap; gap: .55rem; }
.badges li {
  background: var(--color-cream); color: var(--color-primary-dark);
  border: 1px solid var(--color-border);
  padding: .42rem .9rem; border-radius: 999px; font-weight: 600; font-size: .92rem;
}

/* Cards (accepted / check / volunteer) — balanced, gentle tints */
.needs-grid { display: grid; gap: 1rem; margin-top: 1.6rem; }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-soft);
}
.card h3 { color: var(--color-primary-dark); }
.card--accept { background: var(--tint-accept-bg); border-color: #d7e4d8; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding-left: 1.7rem; position: relative; margin-bottom: .5rem; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--tint-accept-mark); font-weight: 700;
}

/* About & Contact — merged section: contact card (left) + about (right).
   Contact comes first in the DOM, so it sits left on desktop and on top on
   mobile — the most useful info is always reached first. */
.ac-grid { display: grid; gap: 1.2rem; }
.ac-contact, .ac-about {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-soft);
}
.ac-contact h3, .ac-about h3 { color: var(--color-primary-dark); margin-bottom: .9rem; }
.ac-about h4 {
  font-family: var(--font-display); color: var(--color-primary);
  font-size: 1.05rem; font-weight: 600; margin: 1rem 0 .3rem;
}
.ac-about .lead { font-size: 1.02rem; margin-bottom: 0; }
.ac-about p:last-child { margin-bottom: 0; }
.ac-contact__actions { margin-top: 1.1rem; }
.ac-contact__actions .btn { font-size: .9rem; padding: .6rem 1.1rem; }

/* Compact contact list — small label + value rows, no heavy dividers */
.contact-info { margin: 0; display: grid; gap: .6rem; }
.contact-info > div { display: grid; gap: .1rem; }
.contact-info dt { font-weight: 700; color: var(--color-sage); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .08em; }
.contact-info dd { margin: 0; font-size: .97rem; }
.contact-info a { word-break: break-word; }

/* Carousel — one soft, compact photo at a time */
.carousel { margin-top: 1.1rem; max-width: 760px; width: 100%; }
.carousel[hidden] { display: none; }

.carousel__viewport {
  position: relative; width: 100%;
  overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--color-border); box-shadow: var(--shadow-soft);
  background: var(--color-surface-alt);
}
.carousel__track { display: flex; transition: transform .45s cubic-bezier(.4, 0, .2, 1); }
.carousel__slide { flex: 0 0 100%; margin: 0; }
.carousel__slide img {
  width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover;
  background: var(--color-surface-alt); -webkit-user-select: none; user-select: none;
}

/* Discreet arrow buttons — overlaid inside the viewport (never widen layout) */
.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--color-border); background: rgba(255, 253, 248, .9);
  color: var(--color-primary-dark); cursor: pointer;
  font-size: 1.4rem; line-height: 1; display: grid; place-items: center;
  box-shadow: var(--shadow-soft); transition: background .15s ease, border-color .15s ease;
}
.carousel__btn--prev { left: .5rem; }
.carousel__btn--next { right: .5rem; }
.carousel__btn:hover { background: var(--color-cream); border-color: var(--color-sage); }
.carousel__btn[hidden] { display: none; }

.carousel__caption {
  text-align: center; color: var(--color-muted); font-size: .9rem;
  margin: .8rem 0 0; min-height: 1.2em;
}

/* Dots */
.carousel__dots { display: flex; justify-content: center; gap: .5rem; margin-top: .7rem; }
.carousel__dots[hidden] { display: none; }
.carousel__dot {
  width: 9px; height: 9px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 0; background: var(--color-border); transition: background .15s ease, transform .15s ease;
}
.carousel__dot:hover { background: var(--color-sage); }
.carousel__dot.is-active { background: var(--color-primary); transform: scale(1.25); }

@media (prefers-reduced-motion: reduce) {
  .carousel__track { transition: none; }
}

/* A few gentle notes — calm card, no red alert */
.notes-list {
  list-style: none; margin: 1.2rem 0 1.3rem; padding: 1.3rem 1.4rem;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
  display: grid; gap: .7rem;
}
.notes-list li { position: relative; padding-left: 1.6rem; max-width: 64ch; }
.notes-list li::before {
  content: "✿"; position: absolute; left: 0; top: .05rem;
  color: var(--color-sage); font-size: .95rem;
}

/* ============================== FOOTER ================================ */
/* Minimal footer — a single discreet identity line, not a heavy block */
.site-footer {
  background: var(--color-surface-alt);
  border-top: 1px solid var(--color-border);
  padding: 1.3rem 0;
  color: var(--color-muted);
}
.footer-line { margin: 0; font-size: .9rem; text-align: center; }

/* ===================== ANCHORS / BACK-TO-TOP ========================== */
/* Keep section titles clear of the sticky navbar when jumping to anchors. */
#about-contact, #how-to-help, #needs, #notes { scroll-margin-top: 76px; }

.back-to-top {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60;
  width: 2.7rem; height: 2.7rem; border-radius: 50%;
  border: 1px solid var(--color-border); background: var(--color-surface);
  color: var(--color-primary-dark); cursor: pointer;
  font-size: 1.2rem; line-height: 1; display: grid; place-items: center;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, background .15s ease;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--color-cream); border-color: var(--color-sage); }
.back-to-top[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity .2s ease; transform: none; }
}

/* ============================ RESPONSIVE ============================== */
@media (min-width: 640px) {
  /* Three quick-fact cards, evenly spread */
  .glance-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .needs-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 820px) {
  /* Two balanced columns: contact (left), about (right) */
  .ac-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.8rem; align-items: start; }
}
@media (min-width: 940px) {
  .hero-inner { grid-template-columns: 1.05fr .95fr; gap: 2.6rem; }
}

/* ---- Mobile density: a bit more compact, same readability ---- */
@media (max-width: 600px) {
  :root { --space: 1.9rem; }
  .hero { padding: 1.5rem 0 1.8rem; }
  .hero-desc, .lead { font-size: 1.02rem; }
  p { margin-bottom: .8rem; }
  .card, .ac-contact, .ac-about { padding: 1.05rem; }
  .notes-list { padding: 1.05rem 1.15rem; }
  .glance { padding: 1.1rem 0; }
  .glance-card { padding: .8rem .95rem; }
  .steps { margin-top: 1.1rem; gap: .7rem; }
  .needs-grid { margin-top: 1.2rem; }
}
