:root {
  /* Brand palette - matches the original site */
  --brand: #ab4235;          /* deep terracotta - headings, buttons, links */
  --brand-dark: #8f3025;     /* pressed / hover */
  --brand-soft: #e1755a;     /* warm accent - gradients */
  --brand-60: #d87b68;
  --brand-40: #f2a999;
  --brand-20: #ffe0d9;
  --brand-10: #ffedea;
  --ink: #311c0f;            /* body text */
  --ink-80: #492a1f;
  --ink-60: #684f41;         /* muted text */
  --ink-20: #ebdad4;         /* borders */
  --ink-10: #fbeae5;         /* soft fills */
  --cream: #fef7f3;          /* page background */
  --white: #ffffff;
  --grey-4: #ebdad4;
  --grey-5: #f6ece8;
  --grey-6: #fbf4f1;

  --bg: var(--cream);
  --card: var(--white);
  --text: var(--ink);
  --muted: var(--ink-60);
  --border: var(--ink-20);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(49, 28, 15, 0.06), 0 8px 24px rgba(49, 28, 15, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; display: block; }
svg[aria-hidden] { width: 1.15em; height: 1.15em; flex: none; }
.topbar svg { width: 28px; height: 28px; }
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 600; }
p { margin: 0 0 1em; }
button, input, textarea, select { font: inherit; color: inherit; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1040px; }
.narrow { max-width: 480px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.xs { font-size: 0.78rem; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.hero {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--brand) 100%);
  color: var(--white);
  text-align: center;
  padding: 48px 16px 88px;
}
.hero img.logo { height: 80px; width: auto; margin: 0 auto 12px; object-fit: contain; }
.hero h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin-bottom: 8px; }
.hero p { max-width: 520px; margin: 0 auto; opacity: 0.92; }

.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: linear-gradient(135deg, var(--brand-soft) 0%, var(--brand) 100%);
}
.topbar a { color: var(--white); text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.topbar img { height: 36px; width: auto; }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card.flush { padding: 0; overflow: hidden; }
.lift { margin-top: -56px; position: relative; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px; min-height: 44px;
  background: var(--brand); color: var(--white); font-weight: 600; text-decoration: none;
  cursor: pointer; transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible, .chip:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--brand-40); outline-offset: 2px;
}
.btn.big { width: 100%; font-size: 1.1rem; padding: 14px 24px; background: linear-gradient(90deg, var(--brand-soft), var(--brand)); box-shadow: 0 6px 18px rgba(171, 66, 53, 0.3); }
.btn.big:hover { background: linear-gradient(90deg, var(--brand), var(--brand-dark)); }
.btn.deep { background: var(--ink-80); }
.btn.deep:hover { background: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink-20); }
.btn.ghost:hover { background: var(--ink-10); }
.btn.light { background: var(--brand-10); color: var(--brand); }
.btn.light:hover { background: var(--brand-20); }
.btn.danger { background: var(--ink); }
.btn.sm { padding: 6px 14px; min-height: 34px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Chips / badges */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 2px 10px; font-size: 0.75rem; font-weight: 500;
  background: var(--brand-10); color: var(--brand); border: 0; text-decoration: none;
}
.chip.done { background: var(--brand); color: var(--white); }
.chip.open { background: var(--ink-10); color: var(--ink-80); }
.chip svg { width: 12px; height: 12px; }

/* Progress */
.bar { height: 14px; border-radius: 999px; background: var(--brand-10); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-soft), var(--brand)); transition: width 0.6s ease; }
.bar.thin { height: 8px; }
.stats { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; margin: 10px 0 0; }
.stats strong { font-size: 1.05rem; }

/* People list on home */
.people { display: grid; gap: 18px; }
.person {
  display: grid; grid-template-columns: 1fr; text-decoration: none; color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.person:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(49, 28, 15, 0.06), 0 14px 32px rgba(49, 28, 15, 0.1); }
.person .thumb { aspect-ratio: 16 / 10; background: var(--brand-10); position: relative; }
.person .thumb img { width: 100%; height: 100%; object-fit: cover; }
.person .thumb .count {
  position: absolute; right: 10px; bottom: 10px; background: rgba(49, 28, 15, 0.7); color: var(--white);
  font-size: 0.75rem; border-radius: 999px; padding: 2px 10px; display: flex; gap: 6px; align-items: center;
}
.person .thumb .count svg { width: 12px; height: 12px; }
.person .body { padding: 18px 20px 20px; }
.person h3 { color: var(--brand); font-size: 1.15rem; margin-bottom: 6px; }
.person p.desc { color: var(--muted); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 14px; }
.person .cta { margin-top: 14px; font-weight: 600; color: var(--brand); font-size: 0.9rem; display: flex; align-items: center; gap: 6px; }
@media (min-width: 640px) {
  .person { grid-template-columns: 240px 1fr; }
  .person .thumb { aspect-ratio: auto; min-height: 100%; }
}

/* Past projects */
details.past { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; }
details.past summary { cursor: pointer; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; list-style: none; font-weight: 600; }
details.past summary::-webkit-details-marker { display: none; }
details.past summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); line-height: 1; }
details.past[open] summary::after { content: "\2212"; }
details.past .inner { padding: 0 20px 20px; }
.mini { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--grey-5); text-decoration: none; color: inherit; }
.mini img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--brand-10); flex: none; }
.mini .t { font-weight: 600; color: var(--brand); }

/* Story page */
.gallery { background: var(--ink); }
.gallery .stage { position: relative; aspect-ratio: 4 / 3; background: var(--ink); }
.gallery .stage > :not(.nav) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border: 0; }
.gallery .nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(49, 28, 15, 0.55); color: var(--white); cursor: pointer; display: grid; place-items: center; z-index: 2;
}
.gallery .nav.prev { left: 10px; } .gallery .nav.next { right: 10px; }
.gallery .nav svg { width: 20px; height: 20px; }
.gallery .thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; scrollbar-width: thin; }
.gallery .thumbs button {
  flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid transparent;
  padding: 0; background: var(--ink-80); cursor: pointer; position: relative; opacity: 0.7;
}
.gallery .thumbs button[aria-current="true"] { border-color: var(--brand); opacity: 1; }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs .play { position: absolute; inset: 0; display: grid; place-items: center; color: var(--white); background: rgba(49, 28, 15, 0.35); }
.gallery .thumbs .play svg { width: 22px; height: 22px; }
@media (min-width: 760px) { .gallery .stage { aspect-ratio: 16 / 10; } .story-top { margin-top: 24px; border-radius: var(--radius); overflow: hidden; } }

.story-text { white-space: pre-line; font-size: 1.02rem; }
.share { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.share .btn { width: 100%; }
.section-title { font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.section-title svg { width: 22px; height: 22px; color: var(--brand); }

.sticky-give {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96); box-shadow: 0 -4px 20px rgba(49, 28, 15, 0.1); display: flex; gap: 10px;
  transform: translateY(110%); transition: transform 0.25s ease, visibility 0.25s; visibility: hidden;
}
.sticky-give.show { transform: none; visibility: visible; }
.sticky-give .btn { flex: 1; white-space: nowrap; padding: 12px 14px; }
@media (max-width: 759px) { body.has-sticky footer.site { padding-bottom: 110px; } }
@media (min-width: 760px) { .sticky-give { display: none; } }

/* Forms */
label.f { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; border: 1.5px solid var(--ink-20); background: var(--white); border-radius: 12px; padding: 10px 14px; min-height: 44px;
}
textarea.input { min-height: 140px; resize: vertical; line-height: 1.55; }
.input:focus { border-color: var(--brand); outline: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.help { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.hp { position: absolute; left: -9999px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(150%); z-index: 100;
  background: var(--ink); color: var(--white); padding: 12px 22px; border-radius: 999px; font-weight: 500;
  box-shadow: var(--shadow); transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s; max-width: calc(100% - 32px); text-align: center;
  opacity: 0; visibility: hidden;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }

.empty { text-align: center; padding: 40px 24px; }
.empty svg { width: 48px; height: 48px; color: var(--brand-40); margin: 0 auto 12px; }
footer.site { text-align: center; padding: 32px 16px 48px; font-size: 0.85rem; color: var(--muted); }
.spinner { width: 32px; height: 32px; border: 3px solid var(--brand-20); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 80px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
