/* ============================================================
   Jennifer's Hospitality Corner — styles
   Colors live in the :root block below; change them in one place.
   ============================================================ */

:root {
  --teal: #113A40;          /* hero + footer */
  --teal-2: #1A4E55;        /* slightly lighter teal for cards on teal */
  --honey: #E6A03A;         /* buttons + progress */
  --honey-dark: #C9831F;    /* button hover */
  --sage: #EEF3F1;          /* soft section background */
  --white: #FFFFFF;
  --ink: #1F2A2C;           /* main text color */
  --muted: #5B6B6D;         /* secondary text */
  --line: #D9E3E0;          /* thin borders */
  --on-teal: #F4F1EA;       /* text on teal */
  --on-teal-muted: #B9CBCB;
  --mug: #FBF7EF;           /* mug body */
  --card: #FFFFFF;

  --bg-page: var(--white);
  --bg-sage: var(--sage);

  --radius: 18px;
  --shadow: 0 10px 30px rgba(17, 58, 64, .12);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Dark mode (follows the phone/computer setting) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --teal: #0C2B30;
    --teal-2: #164046;
    --ink: #E8EEEC;
    --muted: #A5B5B3;
    --line: #2A3D3F;
    --mug: #22383B;
    --card: #182628;
    --bg-page: #121C1E;
    --bg-sage: #172427;
  }
}

/* ---------- Basics ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-page);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h2 { font-size: clamp(1.75rem, 4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: inherit; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--honey); color: var(--teal); padding: 10px 14px; border-radius: 10px; font-weight: 700;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--honey); color: #1B1405;
  font-family: var(--sans); font-weight: 700; text-decoration: none;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: .8em 1.5em; font-size: 1rem;
  transition: background-color .2s, transform .2s;
}
.btn:hover { background: var(--honey-dark); transform: translateY(-1px); }
.btn--small { padding: .5em 1.15em; font-size: .95rem; }
.btn--big { font-size: 1.2rem; padding: .95em 2.2em; box-shadow: 0 8px 24px rgba(230, 160, 58, .35); }
.btn--ghost { background: transparent; color: var(--ink); border: 2px solid var(--honey); }
.btn--ghost:hover { background: var(--honey); color: #1B1405; }

/* ---------- Header ---------- */
.topbar { background: var(--teal); color: var(--on-teal); border-bottom: 1px solid rgba(255,255,255,.08); position: sticky; top: 0; z-index: 20; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; letter-spacing: .01em; line-height: 1.2; display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { height: 34px; width: auto; flex: none; }
@media (max-width: 380px) { .brand { font-size: 1rem; } .brand__mark { height: 28px; } }

/* ---------- Hero ---------- */
.hero { background: var(--teal); color: var(--on-teal); padding: 48px 0 64px; overflow: hidden; }
.hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 88px; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; gap: 56px; }
}
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: var(--honey); margin-bottom: .75em; }
.hebrew-name { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--on-teal); margin: -.4em 0 .6em; }
.hero h1 { font-size: clamp(2.3rem, 6.5vw, 3.8rem); font-weight: 700; color: #fff; }
.lede { font-size: 1.15rem; color: var(--on-teal-muted); max-width: 36em; }

.tally { background: var(--teal-2); border-radius: var(--radius); padding: 22px 22px 18px; margin: 28px 0; }
.tally__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.raised { margin: 0; line-height: 1; }
.raised__num { font-family: var(--serif); font-weight: 700; font-size: clamp(2.6rem, 9vw, 3.6rem); color: #fff; font-variant-numeric: tabular-nums; }
.raised__goal { margin: .35em 0 0; color: var(--on-teal-muted); font-size: 1.05rem; }

/* Mug illustration */
.mug { width: 104px; height: 104px; flex: none; }
.mug__body { fill: var(--mug); }
.mug__fill { fill: var(--honey); transition: y 1.4s cubic-bezier(.2,.7,.2,1), height 1.4s cubic-bezier(.2,.7,.2,1); }
.mug__rim, .mug__handle { stroke: #F4F1EA; }
.steam path { stroke: rgba(244, 241, 234, .55); animation: steam 3.2s ease-in-out infinite; }
.steam .steam__2 { animation-delay: .6s; }
.steam .steam__3 { animation-delay: 1.2s; }
@keyframes steam {
  0%   { opacity: 0; transform: translateY(6px); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-8px); }
}

.bar { height: 14px; background: rgba(255,255,255,.12); border-radius: 999px; overflow: hidden; margin: 20px 0 16px; }
.bar__fill { height: 100%; width: 0; background: var(--honey); border-radius: inherit; transition: width 1.4s cubic-bezier(.2,.7,.2,1); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; text-align: center; }
.stats > div { padding: 6px 4px; }
.stats > div + div { border-left: 1px solid rgba(255,255,255,.12); }
.stats dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--on-teal-muted); }
.stats dd { margin: 2px 0 0; font-family: var(--serif); font-weight: 600; font-size: clamp(1.2rem, 4.5vw, 1.6rem); color: #fff; font-variant-numeric: tabular-nums; }
.stats dd.reached { color: var(--honey); }

.note { margin-top: 16px; font-size: .98rem; color: var(--on-teal-muted); max-width: 34em; }
.note strong { color: #fff; }

.hero__photo { margin: 0; position: relative; }
.hero__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
  border: 6px solid rgba(244, 241, 234, .9);
}
@media (max-width: 899px) { .hero__photo { max-width: 440px; margin: 0 auto; order: -1; } }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
@media (min-width: 900px) { .section { padding: 88px 0; } }
.section--white { background: var(--bg-page); }
.section--sage { background: var(--bg-sage); }
.section .narrow p { font-size: 1.12rem; }

/* Mom's message */
.letter { margin: 36px 0 0; background: var(--bg-sage); border-left: 5px solid var(--honey); border-radius: 0 var(--radius) var(--radius) 0; padding: 26px 26px 20px; }
.letter__label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.letter blockquote { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.6; }
.letter blockquote p { font-size: inherit !important; }
.letter__close { font-style: italic; font-weight: 600; margin-bottom: 0; }

/* Gallery: framed photos in staggered columns */
.gallery__title {
  display: flex; align-items: center; gap: 18px; justify-content: center;
  margin: 56px 0 28px; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 3.5vw, 1.8rem); color: var(--ink);
}
.gallery__title::before, .gallery__title::after { content: ""; height: 1px; width: min(120px, 18vw); background: var(--honey); }
.gallery { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 14px; }
@media (min-width: 760px) { .gallery { columns: 3; column-gap: 22px; } }
.gallery li { break-inside: avoid; margin: 0 0 14px; }
@media (min-width: 760px) { .gallery li { margin-bottom: 22px; } }
.gallery button {
  all: unset; display: block; width: 100%; box-sizing: border-box; cursor: zoom-in;
  background: var(--card); padding: 7px; border-radius: 6px;
  box-shadow: 0 1px 2px rgba(17, 58, 64, .08), 0 8px 24px rgba(17, 58, 64, .10);
  transition: transform .5s ease, box-shadow .5s ease;
}
@media (min-width: 760px) { .gallery button { padding: 10px; } }
.gallery button:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(17, 58, 64, .08), 0 16px 36px rgba(17, 58, 64, .16); }
.gallery button:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; }
.gallery .frame { display: block; overflow: hidden; border-radius: 3px; background: var(--bg-sage); }
.gallery img { width: 100%; height: auto; display: block; transition: transform 1.2s ease; }
.gallery button:hover img { transform: scale(1.035); }
@media (prefers-color-scheme: dark) {
  .gallery button { background: #20302f; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
}

/* Steps */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { background: var(--card); border-radius: var(--radius); padding: 22px; display: flex; gap: 14px; box-shadow: 0 2px 0 var(--line); }
@media (min-width: 1000px) { .steps li { flex-direction: column; } }
.steps__num {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--teal); color: var(--honey);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.3rem;
}
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; color: var(--muted); }
.steps a { color: var(--ink); font-weight: 600; text-decoration-color: var(--honey); text-decoration-thickness: 2px; }

/* Donors */
.donors__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.donors__head h2 { margin: 0; }
.count { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--muted); vertical-align: middle; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
@media (min-width: 720px) { .controls { width: auto; } }
.search { flex: 1 1 200px; }
.search input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: .6em 1.1em;
}
.search input:focus { border-color: var(--honey); outline: none; }
.toggle { display: inline-flex; background: var(--bg-sage); border-radius: 999px; padding: 4px; }
.toggle__btn {
  font: inherit; font-weight: 600; font-size: .95rem; color: var(--muted);
  background: transparent; border: 0; border-radius: 999px; padding: .5em 1.1em; cursor: pointer;
}
.toggle__btn[aria-pressed="true"] { background: var(--teal); color: #fff; }

.donors { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .donors { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .donors { grid-template-columns: repeat(3, 1fr); } }
.donor { background: var(--bg-sage); border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.donor__avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--teal); color: var(--honey);
  display: grid; place-items: center; font-weight: 700; font-family: var(--serif);
}
.donor__main { min-width: 0; flex: 1; }
.donor__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donor__date { font-size: .88rem; color: var(--muted); }
.donor__amt { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.empty { text-align: center; font-size: 1.15rem; color: var(--muted); padding: 32px 16px; background: var(--bg-sage); border-radius: var(--radius); }
#showAll { margin-top: 24px; }

/* Footer */
.footer { background: var(--teal); color: var(--on-teal-muted); padding: 28px 0; font-size: .95rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; }
.footer__brand { display: flex; flex-direction: column; gap: 6px; }
.footer .brand { color: var(--on-teal); }
.footer__memorial { font-size: .9rem; font-style: italic; }

/* Lightbox (big photo viewer) */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100%; height: 100%; display: none; place-items: center;
}
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgba(8, 22, 25, .92); }
.lightbox img { max-width: min(92vw, 1400px); max-height: 82vh; width: auto; height: auto; border-radius: 10px; }
.lightbox__cap { color: #E8EEEC; text-align: center; margin: 12px 16px 0; font-size: .95rem; position: absolute; bottom: 16px; left: 0; right: 0; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; display: grid; place-items: center;
}
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__close:hover, .lightbox__nav:hover { background: var(--honey); color: #1B1405; }

/* ---------- Reduced motion: keep everything still ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .steam path { opacity: .6; }
}
