/* Piyali Foundation — site styles.
   Colours come from the round logo: blue ring, green child figure.
   Marigold is kept for the Donate action only. */

@font-face {
  font-family: "Baloo 2";
  src: url("../fonts/baloo2-var.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: "Hind";
  src: url("../fonts/hind-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Hind";
  src: url("../fonts/hind-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Hind";
  src: url("../fonts/hind-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --blue: #0858a0;
  --navy: #062f57;
  --green: #48b848;
  --green-ink: #256f2b;
  --marigold: #f6b21b;
  --marigold-deep: #e39f05;
  --paper: #f2f7fb;
  --white: #ffffff;
  --ink: #1e2c3b;
  --muted: #4d5c6c;
  --line: #d3dfea;

  --font-display: "Baloo 2", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Hind", "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 70rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-space: clamp(3rem, 7vw, 5.5rem);
  --radius: 0.75rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
h4 { font-size: 1.125rem; font-weight: 600; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: 0.35em; }

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--marigold-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose { max-width: 44rem; }
.lead { font-size: 1.3rem; line-height: 1.5; color: var(--ink); }
.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: var(--white);
  border-radius: 0 0 0.5rem 0.5rem;
}
.skip-link:focus { top: 0; color: var(--white); }

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  padding: 0.7rem 1.4rem 0.6rem;
  border-radius: 999px;
  border: 2px solid var(--blue);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.2;
  text-decoration: none;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
}
.button:hover { background: var(--blue); color: var(--white); }

.button-donate {
  background: var(--marigold);
  border-color: var(--marigold);
  color: var(--navy);
}
.button-donate:hover { background: var(--marigold-deep); border-color: var(--marigold-deep); color: var(--navy); }

.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.6rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
}
.brand img { width: 4rem; height: 4rem; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.15rem, 3.6vw, 1.55rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--blue);
}
.brand-sub {
  font-weight: 600;
  font-size: clamp(0.68rem, 2.1vw, 0.85rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--green-ink);
}

.menu-button {
  display: none;
  padding: 0.5rem 1rem 0.4rem;
  border: 2px solid var(--blue);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li { margin: 0; }
.site-nav a:not(.button) {
  display: inline-block;
  padding: 0.4rem 0;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.site-nav a:not(.button):hover { border-bottom-color: var(--line); }
.site-nav a:not(.button)[aria-current="page"] { border-bottom-color: var(--green); }
.site-nav .button { padding: 0.5rem 1.3rem 0.4rem; }

@media (max-width: 61.99rem) {
  .brand { flex: 1 1 0; gap: 0.6rem; }
  .brand img { width: 3.25rem; height: 3.25rem; }
  .js .menu-button { display: inline-block; flex: none; }
  .js .site-nav { display: none; flex-basis: 100%; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 0.5rem; }
  .site-nav a:not(.button) { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a:not(.button)[aria-current="page"] { border-bottom-color: var(--green); }
  .site-nav .button { margin-top: 0.9rem; text-align: center; display: block; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-space); }
.section-paper { background: var(--paper); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy a { color: var(--white); }

.section-head { max-width: 44rem; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); margin: 0; }
.section-head-spaced { margin-top: 3.5rem; }
.section-navy .section-head p { color: #c9d9ea; }

.page-head { background: var(--paper); padding-block: clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 20ch; }
.page-head .lead { max-width: 44rem; margin: 0; }

/* ---------- Home hero ---------- */

.hero { background: var(--paper); padding-block: clamp(2.5rem, 6vw, 5rem); overflow: hidden; }
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero h1 { max-width: 17ch; }
.hero .lead { max-width: 36rem; }

/* The arch echoes the half-circle behind the child in the logo. */
.hero-figure { position: relative; max-width: 30rem; margin: 0 auto; width: 100%; }
.hero-photo { position: relative; }
.hero-photo::before {
  content: "";
  position: absolute;
  inset: -1rem 1rem 0 -1rem;
  border: 0.5rem solid var(--green);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}
.hero-figure img {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: 78% 100%;
  border-radius: 999px 999px var(--radius) var(--radius);
}
.hero-figure figcaption,
.photo figcaption {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--muted);
}

@media (min-width: 56rem) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 4rem; }
}

/* ---------- Facts band ---------- */

.facts {
  display: grid;
  gap: 2rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.facts li { margin: 0; border-top: 3px solid var(--green); padding-top: 0.9rem; }
.fact-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1;
  color: var(--white);
}
.fact-text { display: block; margin-top: 0.35rem; color: #d5e2ef; font-size: 1.05rem; line-height: 1.4; }

/* ---------- Columns with a top rule (pillars, areas) ---------- */

.columns {
  display: grid;
  gap: 2rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.column { border-top: 3px solid var(--blue); padding-top: 1rem; }
.column h3 { margin-bottom: 0.4em; }
.column p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.column p + p { margin-top: 0.6em; }
.column a { font-weight: 600; }
@media (min-width: 62rem) {
  .columns-four { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Split: text beside a photo ---------- */

.split { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 56rem) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split-wide-text { grid-template-columns: 1.3fr 0.7fr; }
}

.photo { margin: 0; }
.photo img { width: 100%; border-radius: var(--radius); object-fit: cover; }
.photo-tall img { aspect-ratio: 4 / 3; }
.photo-banner { margin-top: 2.5rem; }
.photo-banner img { aspect-ratio: 1349 / 500; }

/* ---------- Year rail (home) and timeline (about) ---------- */

.year {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}

.year-rail {
  display: grid;
  gap: 1.75rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.year-rail li { margin: 0; padding-left: 1.1rem; border-left: 0.3rem solid var(--green); }
.year-rail .year { display: block; font-size: 2rem; margin-bottom: 0.3rem; }
.year-rail p { margin: 0; color: var(--ink); font-size: 1.05rem; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline > li {
  position: relative;
  margin: 0;
  padding: 0 0 2.25rem 1.75rem;
  border-left: 0.3rem solid var(--green);
}
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 0.35rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--white);
  border: 0.3rem solid var(--blue);
}
.timeline .year { display: block; font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 0.5rem; }
.timeline p { max-width: 42rem; margin-bottom: 0.75em; }
.timeline p:last-child { margin-bottom: 0; }

@media (min-width: 56rem) {
  .timeline > li {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 1.5rem;
    padding-left: 2.25rem;
  }
  .timeline .year { margin: 0; }
}

/* ---------- Lists ---------- */

.tick-list { list-style: none; padding: 0; margin: 0 0 1em; }
.tick-list li { position: relative; padding-left: 1.6rem; margin-bottom: 0.5em; }
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--green);
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  gap: 0.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.service-list li {
  margin: 0;
  padding: 0.55rem 0 0.45rem;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.name-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}
.name-list li {
  margin: 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 0.3rem solid var(--green);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--navy);
}
.name-list small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 1rem; color: var(--muted); }

.logo-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 40rem) { .logo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 62rem) { .logo-grid { grid-template-columns: repeat(4, 1fr); } }
.logo-grid li {
  margin: 0;
  min-height: clamp(7rem, 22vw, 9.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  font-size: clamp(1rem, 2.6vw, 1.15rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
}
.logo-grid img { max-height: 8.5rem; width: auto; }

/* ---------- Work areas ---------- */

.jump-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; list-style: none; padding: 0; margin: 1.75rem 0 0; }
.jump-nav li { margin: 0; }
.jump-nav a {
  display: inline-block;
  padding: 0.35rem 0.9rem 0.25rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--white);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}
.jump-nav a:hover { background: var(--blue); color: var(--white); }

.area { padding-block: clamp(2.25rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.area:last-child { border-bottom: 0; }
.area > .wrap > h2 { max-width: 24ch; }
.area h3 { margin-top: 1.75em; }
.area .prose > h3:first-child { margin-top: 0; }

.course-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 1rem; }
.course-list li { margin: 0; padding: 1rem 1.25rem; background: var(--paper); border-radius: var(--radius); }
.course-list h4 { margin-bottom: 0.25em; }
.course-list p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* ---------- People ---------- */

.people { display: grid; gap: 2.25rem 3rem; }
@media (min-width: 56rem) { .people { grid-template-columns: 1fr 1fr; } }
.person { border-top: 3px solid var(--blue); padding-top: 1rem; }
.person h3 { margin-bottom: 0.15em; }
.person-role { font-weight: 600; color: var(--green-ink); margin: 0 0 0.2em; }
.person-quals { color: var(--muted); font-size: 1rem; margin: 0 0 0.75em; }
.person p:last-child { margin-bottom: 0; }

.people-compact .person { border-top-color: var(--line); border-top-width: 1px; }

/* ---------- Donate ---------- */

.bank {
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  max-width: 36rem;
}
.bank h2, .bank h3 { margin-bottom: 0.75em; }
.bank dl { margin: 0; }
.bank-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}
.bank-row dt { color: var(--muted); font-size: 1rem; }
.bank-row dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.copy-button {
  padding: 0.25rem 0.8rem 0.15rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}
.copy-button:hover { background: var(--blue); color: var(--white); }

.donate-band { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56rem) { .donate-band { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* ---------- Contact ---------- */

.contact-list { margin: 0; }
.contact-list dt { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--navy); margin-top: 1.5rem; }
.contact-list dt:first-child { margin-top: 0; }
.contact-list dd { margin: 0.2rem 0 0; }

.map { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius); }

.note {
  border-left: 0.3rem solid var(--marigold);
  background: var(--paper);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 44rem;
}
.note p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy); color: #d5e2ef; font-size: 1.05rem; }
.site-footer a { color: var(--white); }
.site-footer h2 { font-size: 1.2rem; color: var(--white); margin-bottom: 0.6em; }
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  padding-block: 3rem 2rem;
}
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer-brand img { width: 5.5rem; height: 5.5rem; flex: none; background: var(--white); border-radius: 50%; padding: 0.2rem; }
.footer-brand p { margin: 0; }
.footer-brand strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--white); }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-links { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.95rem;
}
.footer-base p { margin: 0; }

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

@media print {
  .site-header { position: static; }
  .menu-button, .site-nav, .button-row, .copy-button, .map { display: none !important; }
  .section-navy, .site-footer { background: none; color: var(--ink); }
  .section-navy h2, .fact-number, .fact-text, .site-footer a, .site-footer h2, .footer-brand strong { color: var(--ink); }
}
