/* TCHOG — The Caring Hands of God Children's Centre */

:root {
  /* Colours taken from the TCHOG logo */
  --paper: #FDFAFD;      /* page background, a trace of lavender */
  --ink: #4A1A50;        /* plum: the logo's lettering. Text, header, footer */
  --ink-soft: #6E5571;   /* muted plum for secondary text */
  --sun: #EB16E6;        /* bright pink: the adult figure. Shapes and stripes */
  --sun-deep: #C62BC0;   /* deeper pink: the logo's dots. Buttons with white text */
  --pink-soft: #F7C9F5;  /* pale pink for highlights on plum */
  --leaf: #0A0ADC;       /* blue: the child figure. Links and labels */
  --sky: #F5ECF6;        /* lavender section background */
  --line: #E6D8E8;
  --white: #FFFFFF;
  --danger: #B3261E;

  --font-display: "Young Serif", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --space: clamp(64px, 9vw, 112px);
  --radius-lg: 28px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--leaf); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--white); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1 var(--font-body);
  padding: 15px 26px; border-radius: 999px;
  border: 2px solid transparent; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--leaf); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--leaf); border-color: var(--leaf); color: var(--white); }
.text-link { font-weight: 600; color: var(--leaf); text-underline-offset: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink);
  border-bottom: 5px solid var(--sun);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.brand-mark { width: 56px; height: 56px; flex: none; background: var(--white); border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; }
.brand-text span { font-size: .78rem; color: rgba(255, 255, 255, .85); max-width: 230px; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--white); text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover { background: rgba(255, 255, 255, .12); }
.site-nav .nav-cta { background: var(--sun-deep); color: var(--white); margin-left: 6px; font-weight: 600; }
.site-nav .nav-cta:hover { background: var(--leaf); color: var(--white); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; border-radius: 8px; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 22px; height: 2px; background: var(--white); margin: 0 auto; position: relative; transition: transform .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 5px solid var(--sun);
    padding: 8px var(--gutter) 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; border-radius: 8px; }
  .site-nav .nav-cta { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 420px) { .brand-text span { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); letter-spacing: -.01em; margin-bottom: .45em; max-width: 13ch; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-figure { position: relative; margin: 0; justify-self: center; width: min(100%, 460px); }
.hero-figure .sun {
  position: absolute; width: 92%; aspect-ratio: 1; border-radius: 50%;
  background: var(--sun); right: -18%; top: -10%; z-index: 0;
}
.hero-figure img {
  position: relative; z-index: 1; width: 100%; aspect-ratio: 9 / 10; object-fit: cover;
  border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
  border: 8px solid var(--paper);
}
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { width: min(80%, 380px); order: -1; }
}

/* ---------- Greeting strip ---------- */
.greeting-strip { background: var(--leaf); color: var(--white); }
.strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-top: 14px; padding-bottom: 14px; }
.strip-inner p { margin: 0; }
.strip-inner strong { color: var(--pink-soft); font-weight: 600; }
.greeting-strip .text-link { color: var(--white); }

/* ---------- Sections ---------- */
.section { padding: var(--space) 0; }
.section-head { margin-bottom: 36px; max-width: 640px; }
.section-intro { font-size: 1.15rem; color: var(--ink-soft); max-width: 58ch; }
.empty { color: var(--ink-soft); font-style: italic; list-style: none; }

/* About */
.about { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 80px); }
.about-grid p { max-width: 62ch; }
.pillars { margin: 0; display: grid; gap: 22px; align-content: start; }
.pillars div { padding-left: 20px; border-left: 4px solid var(--sun); }
.pillars dt { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 4px; }
.pillars dd { margin: 0; color: var(--ink-soft); }

.care-heading { margin-top: clamp(56px, 7vw, 80px); }
.care-list {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px 32px;
}
.care-list li { padding-top: 18px; border-top: 2px solid var(--ink); }
.care-list h4 { margin-bottom: 6px; }
.care-list p { color: var(--ink-soft); margin: 0; font-size: 1rem; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

/* Photos */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button {
  font: 500 .95rem var(--font-body); color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line);
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
}
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }

.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px;
}
.photo { display: block; width: 100%; padding: 0; border: 0; background: var(--sky); border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.photo:hover img { transform: scale(1.03); }
.photo-cap { font-size: .95rem; color: var(--ink-soft); margin: 10px 2px 0; }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100%; height: 100%; color: var(--white);
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(43, 15, 48, .92); }
.lightbox figure { margin: 0; max-width: min(1100px, 86vw); text-align: center; }
.lightbox img { max-height: 78vh; margin: 0 auto; border-radius: var(--radius-sm); }
.lightbox figcaption { margin-top: 14px; }
.lb-close, .lb-nav {
  position: absolute; background: rgba(255,255,255,.14); color: var(--white); border: 0;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* Announcements */
.announcements { background: var(--sky); }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 860px; }
.news-item { background: var(--white); border-radius: var(--radius-sm); padding: 24px 28px; display: grid; gap: 20px; }
.news-item.has-image { grid-template-columns: 180px 1fr; }
.news-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.news-item h3 { margin-bottom: .35em; }
.news-item p:last-child { margin: 0; color: var(--ink-soft); }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .92rem; color: var(--ink-soft); margin-bottom: 8px; }
.news-tag { background: var(--leaf); color: var(--white); font-weight: 600; font-size: .82rem; padding: 3px 10px; border-radius: 999px; }
.show-more { margin-top: 24px; }
@media (max-width: 600px) { .news-item.has-image { grid-template-columns: 1fr; } .news-item { padding: 20px; } }

/* Greetings */
.greeting-card {
  background: var(--ink); color: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; display: grid; position: relative;
}
.greeting-card.has-image { grid-template-columns: .9fr 1.1fr; }
.greeting-card img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.greeting-body { padding: clamp(28px, 5vw, 56px); position: relative; }
.greeting-card::after {
  content: ""; position: absolute; width: 170px; height: 170px; border-radius: 50%;
  background: var(--sun); right: -60px; bottom: -70px; pointer-events: none;
}
.greeting-season { color: var(--pink-soft); font-weight: 600; margin-bottom: 10px; }
.greeting-body h3 { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--white); }
.greeting-message { font-size: 1.15rem; max-width: 52ch; color: #EFE3F0; }
.greeting-from { font-family: var(--font-display); color: var(--pink-soft); margin: 0; }
@media (max-width: 760px) { .greeting-card.has-image { grid-template-columns: 1fr; } .greeting-card img { min-height: 220px; max-height: 300px; } }

.archive { margin-top: 24px; max-width: 760px; }
.archive summary { cursor: pointer; font-weight: 600; color: var(--leaf); padding: 6px 0; }
.archive-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.archive-item p { margin: 0; color: var(--ink-soft); }

/* Help */
.help { background: var(--white); border-top: 1px solid var(--line); }
.help-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; margin-top: 32px; }
.help-item { padding: 28px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); }
.help-item p { color: var(--ink-soft); }
.help-give { background: var(--pink-soft); border-color: var(--sun); }
.help-give p { color: var(--ink); }
.give-details { background: rgba(255,255,255,.55); border-radius: 8px; padding: 14px 16px; }
.give-details p { margin: 0 0 8px; display: grid; }
.give-details p:last-child { margin: 0; }
@media (max-width: 860px) { .help-grid { grid-template-columns: 1fr; } }

/* Contact */
.contact { background: var(--sky); }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-lines { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.contact-lines li { display: grid; }
.line-label { font-size: .88rem; color: var(--ink-soft); }
.contact-lines a { color: var(--ink); font-weight: 600; word-break: break-word; }

.contact-form { background: var(--white); padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .97rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px;
  padding: 12px 14px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(235, 22, 230, .3); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .9rem; margin: 6px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 16px 0 0; font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: var(--leaf); }
.form-status.err { color: var(--danger); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--ink); color: #E3D3E5; padding: 36px 0; border-top: 5px solid var(--sun); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.footer-inner p { margin: 0; }
.footer-name { font-family: var(--font-display); color: var(--white); font-size: 1.1rem; }
.site-footer .text-link { color: var(--pink-soft); }

/* Address, directions and social links */
.contact-lines address { font-style: normal; }
.contact-lines li > a + a, .contact-lines address + a { margin-top: 4px; font-weight: 600; color: var(--leaf); }
.footer-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-social a { color: var(--pink-soft); font-weight: 600; text-underline-offset: 4px; }
