/* Savithri Foundation — site styles
   Palette from the logo: brand red #EE3E48. Neutrals are tinted toward it. */
:root {
  --red: #ee3e48;
  --red-deep: #c72f39;
  --red-tint: #fdeced;
  --red-tint-2: #f9d9dc;
  --ink: #2b2529;
  --ink-2: #5e555a;
  --ink-3: #8a8085;
  --line: #ecdfe1;
  --ground: #fbf7f7;
  --surface: #ffffff;
  --plum: #3a1f24;
  --plum-text: #f4e6e8;

  --font-display: "Nunito", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;

  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 6rem;
  --radius: 14px;
  --maxw: 1120px;
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  color-scheme: light;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-deep); text-underline-offset: 0.15em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0; max-width: var(--measure); }
p + p { margin-top: var(--s4); }
.lede { font-size: 1.3rem; color: var(--ink-2); line-height: 1.5; }
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red); margin-bottom: var(--s3);
}
.muted { color: var(--ink-2); }
.small { font-size: 0.95rem; }

.wrap { width: min(var(--maxw), 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: var(--s8); }
.section--tight { padding-block: var(--s7); }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s6); }
.section-head p { max-width: 58ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
  padding: 0.85rem 1.4rem; border-radius: 999px;
  text-decoration: none; border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--red); color: var(--red-deep); }
.btn--light { background: #fff; color: var(--red-deep); }
.btn--light:hover { background: var(--red-tint); color: var(--red-deep); }
.btn svg { width: 1.1em; height: 1.1em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); height: 88px; }
.brand img { height: 58px; width: auto; }
@media (max-width: 820px) { .brand img { height: 48px; } }
.nav-links { display: flex; align-items: center; gap: var(--s5); list-style: none; margin: 0; padding: 0; }
.nav-links a { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--ink-2); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
.nav-links .btn { padding: .6rem 1.1rem; border-bottom: 0; color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 28px; height: 28px; }
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 88px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: var(--s3) 1.25rem var(--s5);
  }
  .nav-links.is-open { display: flex; }
  .nav-links li a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: var(--s4); justify-content: center; }
}

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s7); align-items: center; padding-block: var(--s8); }
.hero-copy { display: flex; flex-direction: column; gap: var(--s5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero-art { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hero-art .halo { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, var(--red-tint-2), var(--red-tint) 55%, transparent 72%); }
.hero-art img { position: relative; width: 60%; height: auto; filter: drop-shadow(0 22px 40px rgba(238, 62, 72, .28)); }
.hero-meta { position: absolute; bottom: 4%; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1rem; font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--ink-2); box-shadow: 0 8px 24px rgba(58, 31, 36, .08); }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: var(--s7); }
  .hero-art { max-width: 320px; margin-inline: auto; }
}

/* Impact strip */
.impact { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.impact > div { display: flex; flex-direction: column; gap: var(--s1); padding-left: var(--s4); border-left: 3px solid var(--red); }
.impact .num { font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.impact .lbl { color: var(--ink-2); font-size: 1rem; }
@media (max-width: 720px) { .impact { grid-template-columns: 1fr; } }

/* Causes */
.causes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.cause { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.cause .icon { width: 48px; height: 48px; border-radius: 12px; background: var(--red-tint); color: var(--red); display: grid; place-items: center; }
.cause .icon svg { width: 26px; height: 26px; }
.cause p { font-size: 1.05rem; color: var(--ink-2); }
@media (max-width: 900px) { .causes { grid-template-columns: 1fr; } }

/* Events */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s5); }
.event-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.event-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(58, 31, 36, .1); color: inherit; }
.event-card .cover { aspect-ratio: 16/10; background: var(--red-tint); display: grid; place-items: center; overflow: hidden; }
.event-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.event-card .cover img.placeholder { width: 26%; height: auto; object-fit: contain; opacity: .45; }
.event-card .body { padding: var(--s4) var(--s5) var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.event-card time { font-family: var(--font-display); font-weight: 800; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--red-deep); }
.event-card .loc { color: var(--ink-3); font-size: .95rem; }
.event-card p { color: var(--ink-2); font-size: 1rem; }
.badge { display: inline-block; font-family: var(--font-display); font-weight: 800; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; background: var(--red); color: #fff; align-self: flex-start; }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: var(--s5); color: var(--ink-2); background: var(--surface); }

/* Event detail */
.event-hero { display: flex; flex-direction: column; gap: var(--s3); }
.event-facts { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); color: var(--ink-2); font-family: var(--font-display); font-weight: 700; }
.event-facts span { display: inline-flex; align-items: center; gap: .4rem; }
.event-facts svg { width: 1.1em; height: 1.1em; color: var(--red); }
.prose { max-width: var(--measure); margin-top: var(--s5); }
.back { display: inline-flex; align-items: center; gap: .4rem; margin-top: var(--s7); font-family: var(--font-display); font-weight: 700; text-decoration: none; }
.back svg { width: 1em; height: 1em; transform: rotate(180deg); }
.prose h2, .prose h3 { margin-top: var(--s6); margin-bottom: var(--s3); }
.prose ul, .prose ol { padding-left: 1.3em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); margin-top: var(--s6); }
.gallery a { display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: 10px; background: var(--red-tint); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: .9rem; color: var(--ink-2); margin-top: .35rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(43, 37, 41, .92); display: none; place-items: center; z-index: 50; padding: 2rem; }
.lightbox.is-open { display: grid; }
.lightbox img { max-width: 100%; max-height: 85vh; border-radius: 8px; box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.lightbox button { position: absolute; top: 1rem; right: 1rem; background: #fff; border: 0; border-radius: 999px; width: 44px; height: 44px; cursor: pointer; font-size: 1.4rem; }

/* Two-column feature (grant, donate) */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
.feature--center { align-items: center; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s6); display: flex; flex-direction: column; gap: var(--s4); }
.panel--red { background: var(--red); border-color: var(--red); color: #fff; }
.panel--red h3, .panel--red p { color: #fff; }
.panel--red .muted { color: rgba(255,255,255,.8); }
.doc-card { display: flex; gap: var(--s4); align-items: center; padding: var(--s4); border: 1px solid var(--line); border-radius: 12px; background: var(--ground); text-decoration: none; color: inherit; }
.doc-card:hover { border-color: var(--red); color: inherit; }
.doc-card .ico { width: 48px; height: 56px; flex: none; border-radius: 6px; background: var(--red); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: .8rem; letter-spacing: .05em; }
.doc-card strong { font-family: var(--font-display); }
.doc-card .small { color: var(--ink-3); }

.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s4); counter-reset: step; }
.steps li { display: grid; grid-template-columns: 2.2rem 1fr; gap: var(--s3); align-items: start; }
.steps li::before { counter-increment: step; content: counter(step); font-family: var(--font-display); font-weight: 900; color: var(--red); background: var(--red-tint); border-radius: 50%; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; }
.steps strong { font-family: var(--font-display); display: block; }
.steps li > div { color: var(--ink-2); font-size: 1.05rem; }

.def { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s5); margin: 0; }
.def dt { font-family: var(--font-display); font-weight: 800; color: var(--ink-2); font-size: .95rem; }
.def dd { margin: 0; }

/* Board */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.person { display: flex; flex-direction: column; gap: var(--s2); padding-top: var(--s4); border-top: 3px solid var(--red-tint-2); }
.person .avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--red-tint); color: var(--red-deep); font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; display: grid; place-items: center; margin-bottom: var(--s2); }
.person .role { color: var(--red-deep); font-family: var(--font-display); font-weight: 700; font-size: .95rem; }
.person p { color: var(--ink-2); font-size: 1.02rem; }
@media (max-width: 860px) { .board { grid-template-columns: 1fr; } }

/* CTA band */
.band { background: var(--red); color: #fff; }
.band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); padding-block: var(--s7); }
.band h2, .band p { color: #fff; }
.band p { color: rgba(255,255,255,.85); }

/* Footer */
.site-footer { background: var(--plum); color: var(--plum-text); padding-block: var(--s7) var(--s5); }
.site-footer a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s6); }
.foot-grid h4 { color: #fff; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--s3); }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.foot-grid p { color: var(--plum-text); font-size: 1rem; }
.foot-logo { background: #fff; display: inline-block; padding: .5rem .8rem; border-radius: 10px; margin-bottom: var(--s4); }
.foot-logo img { height: 44px; width: auto; }
.foot-bottom { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid rgba(255,255,255,.15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); font-size: .9rem; color: rgba(244, 230, 232, .75); }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr; } }

/* Page header */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: var(--s7); }
.page-head .wrap { display: flex; flex-direction: column; gap: var(--s3); }

.skip { position: absolute; left: -999px; top: 0; background: var(--red); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

.doc-card > svg { width: 24px; height: 24px; flex: none; color: var(--red); margin-left: auto; }
.foot-logo { padding: .35rem .6rem; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* FAQ */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); max-width: 78ch; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s4) 0; min-height: 48px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 1.15rem; }
.faq-item summary::after { content: "+"; font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; color: var(--red); flex: none; width: 1.5rem; text-align: center; transition: transform .2s; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item > p { padding-bottom: var(--s5); color: var(--ink-2); max-width: 70ch; }
.def--wide { grid-template-columns: 9rem 1fr; gap: var(--s4) var(--s5); }
.def--wide dd { color: var(--ink-2); max-width: 60ch; }
@media (max-width: 640px) { .def, .def--wide { grid-template-columns: 1fr; gap: var(--s1); } .def dd, .def--wide dd { margin-bottom: var(--s3); } }

/* Mobile touch targets and wrapping */
.nav-links a { min-height: 44px; display: inline-flex; align-items: center; }
.doc-card { flex-wrap: wrap; }
.doc-card > span:nth-child(2) { flex: 1 1 12rem; min-width: 0; }
.event-facts { font-size: 1rem; }
@media (max-width: 480px) { .hero-actions .btn { width: 100%; justify-content: center; } h1 { font-size: 2.2rem; } .band .btn { width: 100%; justify-content: center; } }
