/* UP Waale Ireland - site styles. Warm, photo-led, no external fonts or trackers. */
:root {
  --ink: #2b1a12;
  --ink-soft: #5a463b;
  --cream: #fff8ef;
  --paper: #ffffff;
  --sand: #f6ead9;
  --saffron: #f08a24;
  --saffron-deep: #b5530c;
  --eyebrow: #a04a0a;      /* Hindi eyebrows on light sections: 5.1:1 on sand, 5.7:1 on cream, 6.0:1 on white */
  --marigold: #f6b73c;
  --rose: #c2185b;
  --maroon: #6e1a27;
  --green: #1f7a4d;
  --green-deep: #145a38;
  --error: #a4141e;
  --field-line: #8f7d6c;   /* form box and choice borders: 3.9:1 on white */
  --line: rgba(43, 26, 18, 0.12);
  --shadow: 0 10px 30px rgba(60, 30, 10, 0.12);
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif Devanagari", "Kohinoor Devanagari", "Nirmala UI", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, "Noto Sans Devanagari", "Nirmala UI", sans-serif;
  --hindi: "Noto Serif Devanagari", "Kohinoor Devanagari", "Nirmala UI", "Mangal", var(--serif);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* scroll-padding keeps #links and keyboard focus clear of the sticky header */
html { scroll-behavior: smooth; scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--saffron-deep); text-underline-offset: 3px; }
a:hover { color: var(--maroon); }
/* Keyboard focus ring: green on light backgrounds (4.5:1 or more). Dark or colourful areas switch it to white:
   white is 5.0-5.9:1 on the saffron-rose band, 11.4:1 on maroon and 17.7:1 on the footer. */
:focus-visible { outline: 3px solid var(--focus, var(--green)); outline-offset: 3px; border-radius: 4px; }
.hero, .cta, .highlight, .side-card, .site-footer, .lightbox { --focus: #fff; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.18; margin: 0 0 0.5em; color: var(--maroon); font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.hi { font-family: var(--hindi); }
.eyebrow {
  display: inline-block;
  font-family: var(--hindi);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--eyebrow);
  margin-bottom: 0.4rem;
}
/* Letter spacing breaks the joined top line of Devanagari, so Hindi text keeps normal spacing */
.eyebrow:lang(hi), .eyebrow :lang(hi) { letter-spacing: normal; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 46rem; }
.skip {
  position: absolute; left: -999px; top: 0; background: var(--paper); padding: 0.6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* JavaScript on or off. build.py writes <html class="no-js">; the first line of site.js changes it to "js". */
.js .no-js-only { display: none; }
.no-js .needs-js { display: none; }
/* site.js normally makes that switch within a moment, so no-JavaScript fallbacks wait 2 seconds before
   they appear: visitors with JavaScript never see them flash up while the page loads. (Browsers that
   cannot animate "display" simply show them straight away.) */
@keyframes wait-for-js { from, to { display: none; } }
@keyframes wait-for-js-sticky { from, to { position: sticky; } }
.no-js .no-js-only { animation: wait-for-js 2s; }

/* Marigold garland (toran) along the very top */
.toran {
  height: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='26' viewBox='0 0 56 26'%3E%3Cpath d='M0 3 Q28 14 56 3' fill='none' stroke='%231f7a4d' stroke-width='2'/%3E%3Cpath d='M18 9 q-6 7 -1 13 q4 -7 1 -13z' fill='%232e8b57'/%3E%3Cpath d='M38 9 q6 7 1 13 q-4 -7 -1 -13z' fill='%232e8b57'/%3E%3Ccircle cx='28' cy='12' r='7' fill='%23f08a24'/%3E%3Ccircle cx='28' cy='12' r='4.2' fill='%23f6b73c'/%3E%3Ccircle cx='28' cy='12' r='1.8' fill='%23c2581b'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 56px 26px;
  background-color: var(--maroon);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 239, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 50px; height: 50px; flex: none; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; color: var(--maroon); line-height: 1; letter-spacing: 0.02em; }
/* balance: on phones the tagline breaks as "Uttar Pradesh / community in Ireland", never with "Ireland" alone */
.brand-sub { display: block; font-size: 0.86rem; color: var(--ink-soft); letter-spacing: 0.01em; margin-top: 0.2rem; line-height: 1.25; text-wrap: balance; }
.nav-toggle {
  display: none; align-items: center; gap: 0.55rem; border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 0.5rem 0.95rem; font: inherit; font-weight: 600; color: var(--maroon); cursor: pointer;
}
/* Small arrow: points down while the menu is closed, up while it is open */
.nav-toggle::after {
  content: ""; width: 0.45em; height: 0.45em; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-0.12em) rotate(45deg); transition: transform 0.15s ease;
}
.nav-toggle[aria-expanded="true"]::after { transform: translateY(0.12em) rotate(-135deg); }
@media (prefers-reduced-motion: reduce) { .nav-toggle::after { transition: none; } }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.3rem; }
.site-nav a {
  display: block; text-decoration: none; color: var(--ink); font-weight: 600; padding: 0.55rem 0.85rem; border-radius: 999px;
}
.site-nav a:hover { background: var(--sand); color: var(--maroon); }
.site-nav a[aria-current="page"] { color: var(--maroon); background: var(--sand); }
.site-nav .nav-cta a { background: var(--saffron-deep); color: #fff; }
.site-nav .nav-cta a:hover, .site-nav .nav-cta a[aria-current="page"] { background: var(--maroon); color: #fff; }
@media (max-width: 860px) {
  /* With JavaScript: a Menu button opens a drop-down panel */
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; display: none;
    background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: 0 14px 28px rgba(60, 30, 10, 0.18);
  }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 0.75rem 1.25rem 1.25rem; }
  .site-nav a { padding: 0.8rem 1rem; }
  /* Without JavaScript the Menu button can't work, so the links wrap in rows under the logo instead
     (after the same 2-second wait as above), and the taller header no longer sticks to the top */
  html:not(.js) .site-header { position: relative; animation: wait-for-js-sticky 2s; }
  html:not(.js) .site-header .wrap { flex-wrap: wrap; row-gap: 0.2rem; }
  html:not(.js) .brand { min-height: 76px; }
  html:not(.js) .site-nav { flex-basis: 100%; animation: wait-for-js 2s; }
  html:not(.js) .site-nav ul { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.3rem; padding: 0 0 0.8rem; }
  html:not(.js) .site-nav a { padding: 0.45rem 0.8rem; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 700;
  padding: 0.85rem 1.4rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--saffron-deep); color: #fff; }
.btn-primary:hover { background: var(--maroon); color: #fff; }
.btn-light { background: rgba(255, 255, 255, 0.92); color: var(--maroon); }
.btn-light:hover { background: #fff; color: var(--maroon); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-deep); color: #fff; }
/* While the form sends, site.js marks Send aria-disabled (not disabled, so keyboard focus stays on it) */
.btn:disabled, .btn:disabled:hover, .btn[aria-disabled="true"], .btn[aria-disabled="true"]:hover { opacity: 0.6; cursor: progress; transform: none; }
.btn-primary:disabled:hover { background: var(--saffron-deep); }
/* The same faded look for Send, made with its colour instead of opacity, so the focus ring around it
   stays at full strength (#d3986d = saffron-deep at 60% on the white form card) */
.btn-primary[aria-disabled="true"], .btn-primary[aria-disabled="true"]:hover { opacity: 1; background: #d3986d; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }

/* Home hero: crossfading photos of UP and Ireland. Two grid rows: the text, then the slideshow bar. */
.hero {
  position: relative; min-height: min(88vh, 760px); display: grid; grid-template-rows: 1fr auto; align-items: end;
  color: #fff; overflow: hidden; background: var(--maroon);
}
.hero-slides { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
/* Only the photo on show is visible; the previous one stays until it has faded out */
.hero-slides li { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.6s ease, visibility 0s linear 1.6s; }
.hero-slides li.on { opacity: 1; visibility: visible; transition: opacity 1.6s ease, visibility 0s; }
.hero-slides img { width: 100%; height: 100%; object-fit: cover; }
.hero-slides li.on img { animation: drift 9s ease-out both; }
.hero.is-paused .hero-slides li.on img { animation-play-state: paused; }   /* paused by the visitor: no drift */
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .hero-slides li.on img { animation: none; }
  .hero-slides li, .hero-slides li.on { transition: none; }
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(43, 14, 8, 0.15) 0%, rgba(43, 14, 8, 0.25) 40%, rgba(43, 14, 8, 0.82) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 5rem 0 1.5rem; }
/* Extra shade that follows the text block (not the photo height), so the eyebrow, Hindi line and intro
   stay above 4.5:1 on bright photos. It fades in just above the eyebrow and, on wide screens, fades out
   to the right of the text so the rest of the photo stays bright. */
.hero-content::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -2rem; bottom: -100vh; left: -100vw; right: -100vw;
  background: linear-gradient(90deg, rgba(43, 14, 8, 0.66) calc(100vw + 46rem), rgba(43, 14, 8, 0) calc(100vw + 64rem));
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 7rem);
  mask-image: linear-gradient(180deg, transparent 0, #000 7rem);
}
.hero h1 { color: #fff; max-width: 24ch; text-wrap: balance; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
.hero h1 > span { display: block; }   /* one sentence per line */
.hero .hindi-line { font-family: var(--hindi); font-size: clamp(1.3rem, 2.6vw, 1.9rem); color: #ffd27a; margin: -0.2rem 0 0.8rem; }
.hero p.intro { font-size: 1.18rem; max-width: 40rem; color: #fff7ee; }
.hero .eyebrow { color: #ffe1b8; }
.hero .eyebrow, .hero .hindi-line, .hero p.intro { text-shadow: 0 1px 3px rgba(20, 6, 2, 0.6); }

/* Slideshow bar under the buttons: caption | photo dots | pause button. It is part of the layout,
   so it can never cover the buttons. */
.hero-bar {
  position: relative; z-index: 3; width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; padding: 0 0 1rem;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.5rem 1rem;
}
.hero-caption {
  justify-self: start; margin: 0; pointer-events: none; font-size: 0.85rem; line-height: 1.35; color: #fff;
  background: rgba(0, 0, 0, 0.35); padding: 0.3rem 0.75rem; border-radius: 999px;
}
.hero-dots { display: flex; justify-content: center; }
/* Each dot is a 24 x 24 px button; the visible ring is drawn inside it */
.hero-dots button { position: relative; width: 24px; height: 24px; flex: none; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.hero-dots button::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(20, 6, 2, 0.35);
}
.hero-dots button:hover::before { background: rgba(255, 255, 255, 0.5); }
.hero-dots button[aria-current="true"]::before { border-width: 6px; }   /* filled; a border also shows in Windows contrast themes */
.hero-dots button:focus-visible { outline-offset: 0; }
.hero-toggle {
  justify-self: end; position: relative; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 36px;
  padding: 0.35rem 0.95rem 0.35rem 0.8rem; border: 1.5px solid rgba(255, 255, 255, 0.85); border-radius: 999px;
  background: rgba(20, 8, 4, 0.5); color: #fff; font: inherit; font-size: 0.85rem; font-weight: 600; line-height: 1.2; cursor: pointer;
}
.hero-toggle:hover { background: rgba(20, 8, 4, 0.78); }
/* Pause icon (two bars); a play triangle once the slideshow is paused (site.js sets .is-paused on .hero
   and swaps the words "Pause slideshow" / "Play slideshow"; the words alone carry the state) */
.hero-toggle::before {
  content: ""; flex: none; width: 10px; height: 12px; border-left: 3.5px solid currentColor; border-right: 3.5px solid currentColor;
}
.hero.is-paused .hero-toggle::before {
  width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor;
}
@media (forced-colors: active) { .hero-toggle::before { forced-color-adjust: none; } }   /* keep the triangle's shape */
/* Both need site.js (it makes the dots): hidden without it, but they keep their space so nothing moves when they appear */
.no-js .hero-dots, .no-js .hero-toggle { visibility: hidden; }
@media (max-width: 760px) {
  .hero-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .hero-caption { grid-column: 1 / -1; }
  .hero-dots { justify-content: flex-start; }
}
@media (max-width: 600px) {
  /* Phones: no caption chip (each dot names its photo for screen readers) and a round pause button */
  .hero-caption {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .hero-toggle { display: block; width: 40px; height: 40px; min-height: 0; padding: 0; overflow: hidden; white-space: nowrap; text-indent: 60px; }
  .hero-toggle::before { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .hero.is-paused .hero-toggle::before { transform: translate(-38%, -50%); }
}

/* Page hero (inner pages) */
.page-hero { position: relative; min-height: 380px; display: grid; align-items: end; color: #fff; overflow: hidden; background: var(--maroon); }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43, 14, 8, 0.1), rgba(43, 14, 8, 0.78)); }
/* 3.4rem at the bottom: the intro always clears the photo credit chip (bottom right, about 42px tall with its offset) */
.page-hero .wrap { position: relative; z-index: 2; padding: 6rem 0 3.4rem; }
.page-hero h1 { color: #fff; margin-bottom: 0.3rem; }
.page-hero .eyebrow { color: #ffe1b8; }
.page-hero p { color: #fff7ee; font-size: 1.15rem; max-width: 42rem; margin: 0; }
.page-hero .eyebrow, .page-hero p { text-shadow: 0 1px 3px rgba(20, 6, 2, 0.6); }
.page-hero .credit { position: absolute; z-index: 3; right: 1rem; bottom: 0.8rem; font-size: 0.8rem; color: #fff; background: rgba(0, 0, 0, 0.35); padding: 0.25rem 0.6rem; border-radius: 999px; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-sand { background: var(--sand); }
.section-white { background: var(--paper); }
.section-head { max-width: 48rem; margin-bottom: 2.2rem; }
.center { text-align: center; margin-inline: auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.8rem, 5vw, 4rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

.photo { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--sand); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption {
  position: absolute; left: 0.7rem; bottom: 0.7rem; font-size: 0.82rem; line-height: 1.35; color: #fff; background: rgba(0, 0, 0, 0.45);
  padding: 0.22rem 0.65rem; border-radius: 999px; max-width: calc(100% - 1.4rem);
}
.ratio-photo img { aspect-ratio: 3 / 2; }
.ratio-tall img { aspect-ratio: 4 / 5; }
/* A wide crop for a photo with a lot of empty ceiling (use it with pos-bottom). It is as wide as a 3:2
   figure, so the srcset "sizes" stay right. */
.ratio-banner img { aspect-ratio: 2 / 1; }
/* One column: no text column to balance, so the tall photo goes back to its own 3:2 shape */
@media (max-width: 860px) { .ratio-tall img { aspect-ratio: 3 / 2; } }

/* Two homes mosaic */
.two-homes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.home-col h3 { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.home-col h3 .hi { font-size: 1.05rem; color: var(--saffron-deep); font-weight: 600; }
.mosaic { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: 0.7rem; height: 430px; }
.mosaic .photo:first-child { grid-row: span 2; }
.mosaic .photo img { aspect-ratio: auto; }
@media (max-width: 860px) { .two-homes { grid-template-columns: 1fr; } .mosaic { height: 340px; } }

/* Event cards: 5 across on wide screens, otherwise 3 + 2 or 2 + 2 + 1 with the last row centred */
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.1rem; }
.cards > .card { flex: 0 1 calc((100% - 2 * 1.1rem) / 3 - 0.1px); min-width: 0; }
@media (min-width: 1160px) { .cards > .card { flex-basis: calc((100% - 4 * 1.1rem) / 5 - 0.1px); } }
@media (max-width: 720px) { .cards > .card { flex-basis: calc((100% - 1.1rem) / 2 - 0.1px); } }
@media (max-width: 480px) { .cards > .card { flex-basis: 100%; } }
.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); color: var(--ink); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-body { padding: 1rem 1.1rem 1.3rem; }
.card-body .hi { color: var(--saffron-deep); font-size: 1rem; display: block; }
.card-body h3 { margin: 0.1rem 0 0.35rem; font-size: 1.25rem; }
.card-body .when { font-size: 0.9rem; font-weight: 700; color: var(--green); margin: 0 0 0.4rem; }
.card-body p { font-size: 0.96rem; color: var(--ink-soft); margin: 0; }

/* Highlight band */
.highlight { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; background: var(--maroon); color: #fff; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.highlight img { width: 100%; height: 100%; object-fit: cover; min-height: 340px; }
.highlight .txt { padding: clamp(1.8rem, 4vw, 3rem); align-self: center; }
.highlight h2 { color: #fff; }
.highlight .eyebrow { color: var(--marigold); }
.highlight p { color: #fbe9dc; }
.highlight .facts { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.highlight .facts li { padding: 0.35rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
@media (max-width: 860px) { .highlight { grid-template-columns: 1fr; } }

/* Photo strip */
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.6rem; }
.strip a { display: block; border-radius: 14px; overflow: hidden; }
.strip img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform 0.3s ease; }
.strip a:hover img { transform: scale(1.05); }
@media (max-width: 860px) { .strip { grid-template-columns: repeat(3, 1fr); } }

/* Call to action band */
.cta { background: linear-gradient(120deg, var(--saffron-deep), var(--rose)); color: #fff; border-radius: 26px; padding: clamp(2rem, 5vw, 3.4rem); display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.cta h2 { color: #fff; }
.cta p { color: #fff3ea; margin: 0; }
.cta .hi { color: #fff; }   /* 5.0:1 at the saffron end, more towards the rose end */
.cta .btn-row { justify-content: flex-end; margin: 0; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } .cta .btn-row { justify-content: flex-start; } }

/* Values */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.value { background: var(--paper); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); border-top: 5px solid var(--saffron); }
.value:nth-child(2) { border-color: var(--rose); }
.value:nth-child(3) { border-color: var(--green); }
.value:nth-child(4) { border-color: var(--marigold); }
.value .hi { font-size: 1.6rem; color: var(--maroon); display: block; line-height: 1.2; }
.value h3 { font-family: var(--sans); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--saffron-deep); margin: 0.2rem 0 0.5rem; }
.value p { font-size: 0.96rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 860px) { .values { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

.note { background: var(--paper); border-left: 5px solid var(--green); border-radius: 12px; padding: 1.1rem 1.3rem; box-shadow: var(--shadow); }
.note p:last-child { margin: 0; }

/* Picture grids (about page) */
.pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.pics .photo img { aspect-ratio: 4 / 3; }
/* Small photos (phones, and tablets up to 960px, where the three-across photos are under 300px wide and the
   longer captions wrap to two lines): the caption goes under the photo instead of covering it. Keep both
   rules together: without height: auto the photo fills the stretched grid cell and the caption is cut off. */
@media (max-width: 960px) {
  .pics .photo img { height: auto; }
  .pics .photo figcaption {
    position: static; max-width: none; border-radius: 0; background: none; color: var(--ink);
    padding: 0.45rem 0.75rem 0.6rem; font-size: 0.82rem;
  }
}
@media (max-width: 760px) {
  .pics { grid-template-columns: 1fr 1fr; }
  /* Home mosaic: a slim shaded strip along the bottom edge instead of a big pill */
  .mosaic .photo figcaption {
    left: 0; right: 0; bottom: 0; max-width: none; border-radius: 0; padding: 0.8rem 0.65rem 0.45rem; font-size: 0.78rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.66) 1.2rem); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  }
}

/* Event detail blocks */
.event-block { padding: clamp(2.2rem, 5vw, 3.5rem) 0; border-bottom: 1px solid var(--line); }
.event-block:last-of-type { border-bottom: 0; }
.event-block .date-pill { display: inline-block; background: var(--green); color: #fff; border-radius: 999px; padding: 0.25rem 0.85rem; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.8rem; }
.event-block ul:not(.chips) { padding-left: 1.2rem; }
.event-block .past { background: var(--paper); border-radius: 14px; padding: 1rem 1.2rem; box-shadow: var(--shadow); margin-top: 1rem; }
.event-block .past h3 { margin: 0 0 0.4rem; font-family: var(--serif); color: var(--maroon); font-size: 1.1rem; line-height: inherit; }
.event-block .past p { margin: 0 0 0.3rem; font-size: 0.97rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; list-style: none; margin: 0.6rem 0 1rem; }
.chips li { background: var(--sand); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.92rem; }

/* Gallery */
.gallery-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.gallery-nav a { text-decoration: none; background: var(--paper); border: 1px solid var(--line); padding: 0.45rem 1rem; border-radius: 999px; color: var(--maroon); font-weight: 600; }
.gallery-nav a:hover { background: var(--sand); }
/* Rows of photos, so every row lines up and only the last row of a set can be short. 1, 2 or 3 columns,
   switching at 615 and 909px: the same widths GALLERY_SIZES in tools/build.py assumes. In rows the photos
   are cut to 3:2 (most already are); on phones, one column, each photo keeps its own shape. The photo
   viewer always shows the whole photo. */
.gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
.gallery a { display: block; border-radius: 14px; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.gallery img { width: 100%; transition: transform 0.35s ease; }
@media (min-width: 615px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery img { aspect-ratio: 3 / 2; object-fit: cover; }
}
@media (min-width: 909px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery a:hover img { transform: scale(1.03); }
.gallery .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem 0.8rem 0.6rem; font-size: 0.86rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.6)); }
.gallery-section { margin-bottom: 3rem; }
.credits { font-size: 0.88rem; color: var(--ink-soft); columns: 2 320px; column-gap: 2rem; padding-left: 1.1rem; }
.credits li { margin-bottom: 0.35rem; break-inside: avoid; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20, 10, 6, 0.94); display: none; align-items: center; justify-content: center; padding: 3.5rem 1rem 4.5rem; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 100%; max-width: 100%; width: auto; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lightbox .lb-cap { position: absolute; left: 0; right: 0; bottom: 1.2rem; margin: 0; text-align: center; color: #fff; padding: 0 4rem; font-size: 0.95rem; }
/* Round buttons: a dark disc with a light ring, so they show up on light and dark photos alike */
.lightbox button {
  position: absolute; width: 48px; height: 48px; border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 999px;
  background: rgba(20, 10, 6, 0.62); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.lightbox button:hover { background: rgba(20, 10, 6, 0.85); }
/* Two-tone focus ring (dark inside, white outside) that shows over any photo */
.lightbox button:focus-visible { outline-offset: 2px; box-shadow: 0 0 0 2px rgba(20, 10, 6, 0.9), 0 2px 10px rgba(0, 0, 0, 0.4); }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 900px) and (orientation: portrait) {
  /* Phones and tablets held upright: caption right under the photo, previous/next in a bar below it */
  .lightbox { flex-direction: column; gap: 0.75rem; padding: 4.5rem 1rem 5.5rem; }
  .lightbox img { max-height: calc(100% - 5rem); }
  .lightbox .lb-cap { position: static; padding: 0 0.5rem; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 1.25rem; transform: none; }
  .lightbox .lb-prev { left: calc(50% - 64px); }
  .lightbox .lb-next { right: calc(50% - 64px); }
}

/* Join form */
.join-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 900px) { .join-grid { grid-template-columns: 1fr; } }
.form-card { background: var(--paper); border-radius: 22px; padding: clamp(1.4rem, 3.5vw, 2.4rem); box-shadow: var(--shadow); }
.form-card .no-js-only { background: var(--sand); border-radius: 12px; padding: 0.9rem 1.1rem; }
.form-card .no-js-only a { color: var(--eyebrow); }   /* 5.1:1 on sand */
.field { margin-bottom: 1.15rem; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 0.35rem; color: var(--ink); }
.field legend { padding: 0; }
.field .opt { font-weight: 400; color: var(--ink-soft); font-size: 0.92rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%; font: inherit; padding: 0.75rem 0.9rem; border: 1.5px solid var(--field-line); border-radius: 12px; background: #fffdfa; color: var(--ink);
}
.field textarea { min-height: 130px; resize: vertical; }
/* Focus: saffron border plus the site's green keyboard ring */
.field input:focus, .field textarea:focus { border-color: var(--saffron-deep); }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 2px; }
.hint { font-size: 0.9rem; color: var(--ink-soft); }
.field .hint { margin: 0.3rem 0 0; }
.field-group > .hint { margin: 1.5rem 0 0.55rem; }   /* the "mobile or email" note sits above its two boxes */
/* Error messages stay hidden until site.js marks the field (or the contact group) with .has-error */
.err { display: none; color: var(--error); font-size: 0.92rem; font-weight: 600; margin: 0.35rem 0 0; }
.has-error > .err { display: block; }
.field-group > .err { margin: -0.6rem 0 1.15rem; }
.field.has-error input, .field.has-error textarea, .field-group.has-error input,
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error); }
.two { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } }
/* flex + flex: 1: each box fills its grid cell, so the two boxes in a row are the same height when one label wraps */
.choice { position: relative; display: flex; }
.choice input { position: absolute; opacity: 0; }
.choice label { flex: 1; display: flex; gap: 0.6rem; align-items: center; font-weight: 600; border: 1.5px solid var(--field-line); background: #fffdfa; border-radius: 14px; padding: 0.75rem 0.9rem; cursor: pointer; margin: 0; }
/* A round marker like an ordinary radio button: a thin ring, a thick saffron ring once chosen */
.choice label::before { content: ""; flex: none; width: 20px; height: 20px; border: 2px solid var(--field-line); border-radius: 50%; background: #fff; }
.choice label .ico { font-size: 1.3rem; }
.field.has-error .choice label, .choice input[aria-invalid="true"] + label { border-color: var(--error); }
.choice input:checked + label { border-color: var(--saffron-deep); background: #fff1e2; box-shadow: inset 0 0 0 1.5px var(--saffron-deep); }
.choice input:checked + label::before { border: 6px solid var(--saffron-deep); }
.choice input:focus-visible + label { outline: 3px solid var(--green); outline-offset: 2px; }
.consent { display: flex; gap: 0.7rem; align-items: flex-start; }
.consent input { width: 22px; height: 22px; margin-top: 0.2rem; flex: none; accent-color: var(--saffron-deep); }
.consent label { font-weight: 400; }
.field.has-error .consent input, .consent input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.field .consent input:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; border-radius: 14px; padding: 1rem 1.2rem; margin-top: 1rem; }
/* While empty it is still drawn, at no size, so screen readers already know this live region when
   "Sending your message…" is put into it */
.form-status:empty { display: block; margin: 0; padding: 0; border: 0; }
/* While the message is on its way (site.js adds .busy): a calm, neutral box (ink on sand, 14:1) */
.form-status.busy { display: block; background: var(--sand); color: var(--ink); border: 1px solid rgba(43, 26, 18, 0.18); }
.form-status.ok { display: block; background: #e7f5ec; color: var(--green-deep); border: 1px solid #b6dec6; }
.form-status.bad { display: block; background: #fdecec; color: #8a1018; border: 1px solid #f2c1c1; }
.form-status:focus-visible { outline-offset: 2px; }
/* Error summary: a short line, then one link per problem */
.form-status p { margin: 0; }
.form-status ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.form-status li { margin: 0.2rem 0; }
.form-status a { color: inherit; font-weight: 700; }
.side-card { background: var(--maroon); color: #fbe9dc; border-radius: 22px; padding: 1.8rem; box-shadow: var(--shadow); }
.side-card h3 { color: #fff; }
.side-card a { color: var(--marigold); font-weight: 700; word-break: break-word; }
.side-card .photo { margin-top: 1.2rem; box-shadow: none; }
.side-card ul { padding-left: 1.1rem; margin: 0 0 1rem; }
/* Two columns: "Other ways to reach us" stays in view beside the longer form as visitors scroll through it.
   6rem = the scroll-padding that already clears the sticky header (76px + its 1px border). Only on screens
   tall enough for the whole card under the header (in em, so a larger default text size needs a taller
   screen); shorter windows keep the card in place, as before. */
@media (min-width: 901px) and (min-height: 42em) {
  .side-card { position: sticky; top: 6rem; }
}

/* Footer */
.site-footer { background: #2a110c; color: #e9d6c8; padding: 3.2rem 0 2rem; margin-top: 0; }
.site-footer a { color: var(--marigold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-sub { color: #d8bfae; }
.site-footer h2 { color: #fff; font-family: var(--sans); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.footer-note { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 2.2rem; padding-top: 1.2rem; font-size: 0.88rem; color: #c9b2a3; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem; }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 4rem 1rem; }

/* Additions */
.photo.fill { height: 100%; }
.photo.fill img { aspect-ratio: auto; height: 100%; }
.lead.center { margin-inline: auto; }
.notfound .btn-row { justify-content: center; }

.site-footer .hi { margin-top: 0.9rem; color: #f6d9b8; font-size: 1.1rem; }

/* Photo focus helpers: put the class on the <img>, on its <figure>, or on a page hero <section> */
img.pos-top, .pos-top img { object-position: 50% 15%; }
img.pos-bottom, .pos-bottom img { object-position: 50% 85%; }

/* ---------------------------------------------------------------------------------------------
   Home: rotating quotations from Uttar Pradesh's writers (site.js quoteBand). The Hindi line glows
   softly, like a diya, three times when it appears (about 0.4 pulses a second, far below any flash
   threshold). It never glows when paused or when the device asks for reduced motion. Without
   JavaScript all three quotations are shown one under another. */
.quotes {
  position: relative;
  color: #fbe9dc;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(240, 138, 36, 0.28), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(194, 24, 91, 0.25), transparent 55%),
    var(--maroon);
  border-top: 4px solid var(--marigold);
  border-bottom: 4px solid var(--marigold);
  padding: clamp(2.4rem, 6vw, 3.8rem) 0;   /* the controls are at the top now, so the same space at the bottom */
  overflow: hidden;
}
.quotes::before {   /* a large, faint quotation mark; it sits behind the start of the title, so it stays very faint */
  content: "\201C";          /* browsers that cannot give generated text an alternative show it as before */
  content: "\201C" / "";     /* decorative: empty alternative text, so screen readers do not read it out */
  position: absolute; left: max(1rem, calc(50% - 640px)); top: -0.4rem;
  font-family: var(--serif); font-size: clamp(7rem, 16vw, 12rem); line-height: 1;
  color: var(--marigold); opacity: 0.08; pointer-events: none;
}
/* Title, then the controls (Pause button, then the dots), then the quotation, in the same order as the HTML.
   On wide screens the controls sit at the right end of the title's row; where there is no room for both
   they go on their own row under the title. */
.quotes > .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.1rem 1.5rem; }
.quotes-title {
  position: relative;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #ffdc96; margin: 0;   /* pale marigold: 5.0:1 or more anywhere behind the title, even on the saffron glow and the faint mark; 8.7:1 on plain maroon */
}
.quotes-title [lang="hi"] { font-family: var(--hindi); text-transform: none; letter-spacing: 0; font-size: 1.1rem; }
.quote-stage { position: relative; display: grid; flex: 1 0 100%; }
.quote { grid-area: 1 / 1; align-self: center; margin: 0; max-width: 60rem; }
.js .quote { opacity: 0; visibility: hidden; transition: opacity 0.9s ease, visibility 0s linear 0.9s; }
.js .quote.on { opacity: 1; visibility: visible; transition: opacity 0.9s ease; }
/* Until site.js has set the band up (it then adds .is-ready), nothing fades: the two quotations that were
   on show without JavaScript disappear at once instead of fading out over the first one */
.js .quotes:not(.is-ready) .quote { transition: none; }
.no-js .quote-stage { display: block; }
.no-js .quote + .quote { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.quote-hi { margin: 0 0 0.9rem; }
.quote-hi p {
  margin: 0;
  font-family: var(--hindi);
  font-size: clamp(1.35rem, 2.7vw, 2.15rem);
  line-height: 1.55;
  color: #fff;
}
/* Verse: each half-line is a .seg that only breaks inside itself when it is wider than the screen, so a
   verse line that has to wrap breaks at its pause, never mid-phrase. Hariaudh's stanza is four short lines
   on phones and two long ones from 48em (its 1st and 3rd line breaks are <br class="br-narrow">). */
.quote-hi .seg { display: inline-block; text-wrap: balance; }
@media (min-width: 48em) { .quote-hi .br-narrow { display: none; } }
.js .quote.on .quote-hi p { animation: diya-glow 2.4s ease-in-out 3; }
@keyframes diya-glow {
  0%, 100% { text-shadow: 0 0 0 rgba(246, 183, 60, 0); }
  50% { text-shadow: 0 0 16px rgba(246, 183, 60, 0.9), 0 0 2px rgba(255, 236, 190, 0.9); }
}
.quotes.is-paused .quote.on .quote-hi p { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .js .quote, .js .quote.on { transition: none; }
  .js .quote.on .quote-hi p { animation: none; }
}
.quote-en { font-family: var(--serif); font-style: italic; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: #f8dcc0; margin: 0 0 0.9rem; max-width: 52rem; }
.quote figcaption { font-size: 0.95rem; color: #f3cfa9; max-width: 52rem; text-wrap: pretty; }
.quote figcaption strong { color: #fff; }
.quote figcaption [lang="hi"] { font-family: var(--hindi); }
.quote cite { font-style: italic; }
/* The Hindi fonts have no italic, so the browser would only slant the letters: Hindi titles stay upright */
.quote cite:lang(hi), .quote cite :lang(hi) { font-style: normal; }
.quote-bar { position: relative; display: flex; align-items: center; gap: 0.6rem; }
.no-js .quote-bar { display: none; }
.quote-dots { display: flex; gap: 0.25rem; }
.quote-dots button { position: relative; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.quote-dots button::before {
  content: ""; position: absolute; left: 6px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--marigold); box-sizing: border-box;
}
.quote-dots button[aria-current="true"]::before { border-width: 6px; }
.quote-dots button:hover::before { background: rgba(246, 183, 60, 0.45); }
.quote-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem; flex: none;
  font: inherit; font-size: 0.9rem; font-weight: 700; line-height: 1.2; color: #fff; cursor: pointer;
  background: rgba(20, 8, 4, 0.35); border: 1.5px solid rgba(255, 255, 255, 0.75); border-radius: 999px;
  padding: 0.45rem 0.95rem 0.45rem 0.8rem; min-height: 36px;
}
.quote-toggle:hover { background: rgba(20, 8, 4, 0.6); }
/* Pause icon (two bars); a play triangle once paused (site.js sets .is-paused on .quotes and swaps the words
   "Pause quotations" / "Play quotations"; the words alone carry the state) */
.quote-toggle::before {
  content: ""; flex: none; width: 10px; height: 12px; border-left: 3.5px solid currentColor; border-right: 3.5px solid currentColor;
}
.quotes.is-paused .quote-toggle::before {
  width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor;
}
@media (forced-colors: active) { .quote-toggle::before { forced-color-adjust: none; } }   /* keep the triangle's shape */
.quotes :focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
