/* ==========================================================================
   NANIS design system
   Warm Indian heritage palette (saffron, marigold, peacock, aubergine) on a
   soft cream base. Display type: Fraunces. Body: Plus Jakarta Sans.
   ========================================================================== */

:root {
  --saffron: #e9731c;
  --saffron-600: #c95e10;
  --marigold: #ffb627;
  --peacock: #0f5c63;
  --peacock-600: #0a474d;
  --rose: #d6455f;
  --ink: #1d1530;

  --bg: #fbf6ee;
  --bg-alt: #f4ebdd;
  --surface: #ffffff;
  --surface-2: #fdf9f3;
  --text: #2a2236;
  --muted: #6d6478;
  --border: #eadfce;
  --ring: rgba(233, 115, 28, .35);

  --success: #1f8a5b;
  --warning: #b7791f;
  --danger: #c53030;
  --info: #2b6cb0;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(29, 21, 48, .06), 0 1px 1px rgba(29, 21, 48, .04);
  --shadow: 0 10px 30px -12px rgba(29, 21, 48, .18);
  --shadow-lg: 0 30px 60px -20px rgba(29, 21, 48, .28);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1200px;
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15111f;
    --bg-alt: #1c1729;
    --surface: #221c31;
    --surface-2: #1f192d;
    --text: #efe9f5;
    --muted: #a99fb8;
    --border: #342b47;
    --peacock: #2aa3ad;
    --peacock-600: #22878f;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  }
}

/* Reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word; /* long emails / URLs wrap instead of overflowing */
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--saffron-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: var(--marigold); } }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Layout ------------------------------------------------------------------ */
.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding: 48px 0; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.section-head p { color: var(--muted); max-width: 56ch; margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--saffron-600); margin-bottom: 12px;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; border-radius: 2px; }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--marigold); } }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.text-center { text-align: center; }
.text-center .lead, .text-center .section-head p { margin-inline: auto; }

/* Buttons ----------------------------------------------------------------- */
.btn {
  --btn-bg: var(--saffron); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 600 .95rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(233, 115, 28, .55); background: var(--saffron-600); color: #fff; }
.btn--dark { --btn-bg: var(--ink); }
.btn--dark:hover { background: #000; box-shadow: var(--shadow); }
.btn--peacock { --btn-bg: var(--peacock); }
.btn--peacock:hover { background: var(--peacock-600); box-shadow: 0 10px 20px -8px rgba(15, 92, 99, .5); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.btn--danger { --btn-bg: var(--danger); }
.btn--danger:hover { background: #9b2c2c; box-shadow: none; }
.btn--sm { padding: 8px 14px; font-size: .85rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow .icon { transition: transform .2s; }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--bg); /* fallback for browsers without color-mix() */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 42px; height: 42px; }
.brand strong { display: block; font-family: var(--font-display); font-size: 1.35rem; line-height: 1; letter-spacing: .02em; }
.brand small { display: block; font-size: .7rem; color: var(--muted); letter-spacing: .04em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  color: var(--text); font-weight: 500; font-size: .95rem; transition: background .2s;
}
.nav a:not(.btn):hover, .nav a.is-active { background: var(--surface); box-shadow: var(--shadow-sm); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: 12px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--text); padding: 8px; cursor: pointer; }
.nav-toggle .icon { width: 28px; height: 28px; }

.user-menu { position: relative; }
.user-menu > button {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px;
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  cursor: pointer; color: var(--text); font: 500 .9rem var(--font-body);
}
.user-menu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; display: none;
}
.user-menu.is-open .user-menu__panel { display: block; }
.user-menu__panel a, .user-menu__panel button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; color: var(--text); background: none; border: 0; font: 500 .92rem var(--font-body); cursor: pointer;
}
.user-menu__panel a:hover, .user-menu__panel button:hover { background: var(--bg-alt); }
.user-menu__meta { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.user-menu__meta small { color: var(--muted); display: block; }

.avatar {
  --size: 36px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--saffron), var(--rose)); color: #fff;
  font-weight: 700; font-size: calc(var(--size) * .38); letter-spacing: .02em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { --size: 96px; }
.avatar--peacock { background: linear-gradient(135deg, var(--peacock), #3aa6a0); }
.avatar--ink { background: linear-gradient(135deg, var(--ink), #5a3f86); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px; background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%); transition: transform .3s ease; visibility: hidden;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav { max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; }
  body.nav-locked { overflow: hidden; }
  .nav a:not(.btn) { padding: 12px 14px; }
  .nav-actions { margin: 8px 0 0; flex-direction: column; align-items: stretch; }
  .user-menu__panel { position: static; box-shadow: none; margin-top: 8px; }
}

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 110px) 0 clamp(64px, 9vw, 120px); }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--saffron); font-weight: 500; }
.hero .lead { margin: 20px 0 32px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; margin-bottom: 22px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-size: .85rem; font-weight: 500; box-shadow: var(--shadow-sm);
}
.hero__badge span { white-space: nowrap; background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: .75rem; font-weight: 700; }
.hero__stats { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.hero__stats strong { display: block; font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--text); }
.hero__stats span { font-size: .85rem; color: var(--muted); }
.hero__art { position: relative; aspect-ratio: 1; }
.hero__mandala { position: absolute; inset: 0; animation: spin 120s linear infinite; opacity: .95; }
.hero__card {
  position: absolute; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px; font-size: .88rem; animation: float 6s ease-in-out infinite;
}
.hero__card strong { display: block; font-size: .95rem; }
.hero__card small { color: var(--muted); }
.hero__card--a { top: 12%; left: -4%; }
.hero__card--b { bottom: 10%; right: -2%; animation-delay: -3s; }
.hero__card .dot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--saffron); }
.hero__card--b .dot { background: var(--peacock); }
.hero::before {
  content: ""; position: absolute; width: 680px; height: 680px; right: -200px; top: -180px;
  background: radial-gradient(circle, rgba(255, 182, 39, .22), transparent 65%); pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero__mandala, .hero__card { animation: none; } }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 420px; margin: 0 auto; width: 100%; }
  .hero__card--a { left: 0; }
  .hero__card--b { right: 0; }
}

/* Page header (inner pages) ----------------------------------------------- */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 5vw, 56px); position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  background: url("../img/mandala.72a6c6c3e3a7.svg") center/contain no-repeat; opacity: .12; pointer-events: none;
}
.page-hero .lead { margin-top: 12px; }
.breadcrumb { display: flex; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--saffron); }

/* Cards ------------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); position: relative;
}
.card--hover { transition: transform .25s ease, box-shadow .25s ease; }
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }

/* Bento "what we do" */
.bento { display: grid; gap: 20px; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(200px, auto); }
.bento > * { grid-column: span 2; }
.bento .bento--wide { grid-column: span 4; }
.bento .bento--tall { grid-row: span 2; }
.bento .card { display: flex; flex-direction: column; overflow: hidden; }
.bento .card .icon-chip { margin-bottom: auto; }
.bento .card h3 { margin-top: 28px; }
.bento .card--feature { background: var(--ink); color: #f3edf9; border: 0; }
.bento .card--feature h3, .bento .card--feature p { color: inherit; }
.bento .card--feature p { opacity: .8; }
.bento .card--feature::after {
  content: ""; position: absolute; right: -80px; bottom: -80px; width: 280px; height: 280px;
  background: url("../img/mandala.72a6c6c3e3a7.svg") center/contain no-repeat; opacity: .35;
}
.bento .card--saffron { background: linear-gradient(140deg, var(--saffron), var(--rose)); color: #fff; border: 0; }
.bento .card--saffron h3, .bento .card--saffron p { color: inherit; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento > *, .bento .bento--wide { grid-column: span 2; }
  .bento .bento--tall { grid-row: auto; }
}
@media (min-width: 600px) and (max-width: 900px) { .bento > .bento--half { grid-column: span 1; } }

.icon-chip {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--saffron) 14%, transparent); color: var(--saffron-600);
}
.icon-chip .icon { width: 24px; height: 24px; }
.icon-chip--peacock { background: color-mix(in srgb, var(--peacock) 14%, transparent); color: var(--peacock); }
.icon-chip--rose { background: color-mix(in srgb, var(--rose) 14%, transparent); color: var(--rose); }
.icon-chip--light { background: rgba(255, 255, 255, .16); color: #fff; }

/* Event cards ------------------------------------------------------------- */
.event-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; color: inherit; }
.event-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--bg-alt); overflow: hidden; }
.event-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.event-card:hover .event-card__media img { transform: scale(1.05); }
.event-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.event-card__body h3 { margin: 0; }
.event-card__meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85rem; color: var(--muted); margin-top: auto; }
.event-card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.date-badge {
  position: absolute; top: 14px; left: 14px; background: var(--surface); border-radius: 14px;
  padding: 8px 12px; text-align: center; line-height: 1; box-shadow: var(--shadow);
}
.date-badge strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--text); }
.date-badge small { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--saffron-600); }
.placeholder-art {
  width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255, 255, 255, .9);
  background:
    url("../img/mandala.72a6c6c3e3a7.svg") center/70% no-repeat,
    linear-gradient(135deg, var(--saffron), var(--rose) 60%, #8e3b8f);
}
.placeholder-art--peacock { background: url("../img/mandala.72a6c6c3e3a7.svg") center/70% no-repeat, linear-gradient(135deg, var(--peacock), #1b8a83 60%, #3c3a8f); }
.placeholder-art--ink { background: url("../img/mandala.72a6c6c3e3a7.svg") center/70% no-repeat, linear-gradient(135deg, var(--ink), #4b2e74); }
.placeholder-art--marigold { background: url("../img/mandala.72a6c6c3e3a7.svg") center/70% no-repeat, linear-gradient(135deg, var(--marigold), var(--saffron)); }

/* Badges / pills ---------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .03em; white-space: nowrap;
  background: var(--bg-alt); color: var(--text); border: 1px solid var(--border);
}
.pill--saffron { background: color-mix(in srgb, var(--saffron) 14%, transparent); color: var(--saffron-600); border-color: transparent; }
.pill--peacock { background: color-mix(in srgb, var(--peacock) 14%, transparent); color: var(--peacock); border-color: transparent; }
.pill--success { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); border-color: transparent; }
.pill--warning { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); border-color: transparent; }
.pill--danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); border-color: transparent; }
.pill--ink { background: var(--ink); color: #fff; border-color: transparent; }
@media (prefers-color-scheme: dark) { .pill--saffron { color: var(--marigold); } }

/* Gallery ----------------------------------------------------------------- */
.gallery { columns: 3 260px; column-gap: 16px; }
.gallery figure { margin: 0 0 16px; break-inside: avoid; border-radius: var(--radius); overflow: hidden; position: relative; background: var(--bg-alt); }
.gallery img { width: 100%; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; color: #fff; font-size: .88rem; font-weight: 500;
  background: linear-gradient(transparent, rgba(0, 0, 0, .65));
}
.gallery--placeholder figure { aspect-ratio: 4 / 3; }
.gallery--placeholder figure:nth-child(3n+2) { aspect-ratio: 3 / 4; }

/* Committee --------------------------------------------------------------- */
.person { text-align: center; padding: 32px 20px; }
.person .avatar { margin: 0 auto 16px; }
.person h3 { font-size: 1.15rem; margin-bottom: 4px; }
.person p { color: var(--muted); font-size: .9rem; margin: 0; }
.person--lead { padding: 40px 24px; }
.person--lead .avatar { --size: 112px; }

/* Timeline (about page) --------------------------------------------------- */
.timeline { position: relative; padding-left: 36px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--saffron), var(--peacock)); border-radius: 2px; }
.timeline__item { position: relative; padding-bottom: 36px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: -36px; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 4px solid var(--saffron);
}
.timeline__year { font-family: var(--font-display); font-size: 1.6rem; color: var(--saffron-600); line-height: 1; margin-bottom: 6px; }
@media (prefers-color-scheme: dark) { .timeline__year { color: var(--marigold); } }
.prose { max-width: 70ch; }
.prose p { color: var(--text); }
.prose h2 { margin-top: 1.4em; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .icon { color: var(--success); margin-top: 4px; }

/* CTA band ---------------------------------------------------------------- */
.cta {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px);
  background: var(--ink); color: #f3edf9;
  display: grid; grid-template-columns: 1.3fr auto; gap: 32px; align-items: center;
}
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { color: rgba(243, 237, 249, .78); margin: 0; max-width: 52ch; }
.cta::before {
  content: ""; position: absolute; right: -100px; top: -100px; width: 380px; height: 380px;
  background: url("../img/mandala.72a6c6c3e3a7.svg") center/contain no-repeat; opacity: .5;
}
.cta > * { position: relative; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* Forms ------------------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field { display: grid; gap: 6px; }
.field > label { font-weight: 600; font-size: .9rem; }
.field .help { font-size: .8rem; color: var(--muted); }
.field .errorlist, .form-errors { list-style: none; padding: 0; margin: 0; color: var(--danger); font-size: .85rem; }
.form-errors { padding: 12px 16px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.field select, .field textarea, .input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  outline: none; border-color: var(--saffron); box-shadow: 0 0 0 4px var(--ring);
}
.field input[type="file"] { font: inherit; font-size: .9rem; padding: 10px; border: 1.5px dashed var(--border); border-radius: var(--radius-sm); background: var(--surface-2); width: 100%; }
.field--checkbox { display: flex; align-items: flex-start; gap: 10px; }
.field--checkbox input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--saffron); }
.field--checkbox label { font-weight: 500; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }

/* Auth pages -------------------------------------------------------------- */
.auth { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth__panel { display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.auth__box { width: min(100%, 420px); }
.auth__box h1 { font-size: 2.3rem; }
.auth__aside {
  position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 56px;
  background: linear-gradient(150deg, var(--saffron), var(--rose) 55%, #7a2d8a); color: #fff;
}
.auth__aside--committee { background: linear-gradient(150deg, var(--ink), #3b2463 55%, var(--peacock)); }
.auth__aside::before {
  content: ""; position: absolute; width: 640px; height: 640px; right: -180px; top: -160px;
  background: url("../img/mandala.72a6c6c3e3a7.svg") center/contain no-repeat; opacity: .35; animation: spin 140s linear infinite;
}
.auth__aside > * { position: relative; }
.auth__aside h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.auth__aside p { opacity: .85; max-width: 42ch; }
.auth-switch { display: flex; padding: 4px; border-radius: 999px; background: var(--bg-alt); margin-bottom: 28px; border: 1px solid var(--border); }
.auth-switch a { flex: 1; text-align: center; padding: 9px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; }
.auth-switch a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth__aside { display: none; } }

/* Messages / toasts ------------------------------------------------------- */
.toasts { position: fixed; z-index: 100; top: calc(var(--header-h) + 12px); right: 16px; display: grid; gap: 10px; width: min(420px, calc(100% - 32px)); }
.toast {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--info); font-size: .92rem; animation: slidein .35s ease;
}
.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }
.toast button { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font-size: 1.2rem; line-height: 1; }
@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } }

/* Tables ------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user small { display: block; color: var(--muted); }

.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty .icon-chip { margin: 0 auto 16px; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: rgba(243, 237, 249, .75); padding: 72px 0 32px; margin-top: auto; }
.site-footer a { color: rgba(243, 237, 249, .75); text-decoration: none; }
.site-footer a:hover { color: var(--marigold); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .92rem; }
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand .brand small { color: rgba(243, 237, 249, .6); }
.footer-brand p { font-size: .92rem; max-width: 36ch; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); transition: background .2s, border-color .2s; }
.socials a:hover { background: var(--saffron); border-color: var(--saffron); color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Member dashboard -------------------------------------------------------- */
.dash-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-bottom: 36px; }
.dash-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0; }
.role-badge { display: inline-flex; align-items: center; gap: 6px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list small { color: var(--muted); display: block; }
.mini-date { width: 52px; flex: none; text-align: center; border-radius: 12px; background: var(--bg-alt); padding: 6px 0; line-height: 1.1; }
.mini-date strong { display: block; font-family: var(--font-display); font-size: 1.3rem; }
.mini-date small { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--saffron-600); }
.announcement { padding: 18px 20px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.announcement + .announcement { margin-top: 12px; }
.announcement h4 { font-family: var(--font-body); font-size: 1rem; margin: 0 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.announcement p { margin: 0; font-size: .92rem; color: var(--muted); white-space: pre-line; }

/* Event detail ------------------------------------------------------------ */
.event-hero { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 21 / 9; background: var(--bg-alt); margin-bottom: 40px; }
.event-hero img { width: 100%; height: 100%; object-fit: cover; }
.event-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.event-aside { position: sticky; top: calc(var(--header-h) + 20px); }
.meta-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 16px; }
.meta-list li { display: flex; gap: 14px; align-items: flex-start; }
.meta-list .icon-chip { width: 42px; height: 42px; border-radius: 12px; }
.meta-list .icon-chip .icon { width: 20px; height: 20px; }
.meta-list small { display: block; color: var(--muted); font-size: .8rem; }
@media (max-width: 900px) { .event-layout { grid-template-columns: 1fr; } .event-aside { position: static; } .event-hero { aspect-ratio: 16 / 9; } }

/* Pagination -------------------------------------------------------------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }

/* Utilities --------------------------------------------------------------- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Hero artwork: gradient disc with spinning mandala */
.hero__disc {
  position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, var(--marigold), var(--saffron) 38%, var(--rose) 70%, #7a2d8a);
  box-shadow: var(--shadow-lg), inset 0 0 0 10px rgba(255, 255, 255, .12);
}
.hero__mandala { inset: 10%; width: 80%; height: 80%; }
.hero__ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--saffron) 45%, transparent); }

/* Responsive safety net --------------------------------------------------- */
.list .grow, .cell-user > span, .event-card__body, .announcement h4, .meta-list li > span { min-width: 0; }
.list small, .cell-user small, .meta-list small, .announcement p, .app-card dd { overflow-wrap: anywhere; }
input, select, textarea, button { max-width: 100%; }
table { max-width: 100%; }

@media (max-width: 480px) {
  .card { padding: 20px; }
  .section { padding: 56px 0; }
  .btn { padding: 11px 18px; }
  .btn-row > .btn { flex: 1 1 auto; }
  .hero__stats { gap: 24px; }
  .hero__stats strong { font-size: 1.8rem; }
  .cta { padding: 32px 22px; }
  .person--lead .avatar { --size: 88px; }
  .date-badge strong { font-size: 1.3rem; }
  .auth__panel { padding: 32px 16px; }
  .toasts { right: 16px; left: 16px; width: auto; }
  .list > li { gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .breadcrumb { flex-wrap: wrap; }
  .dash-hero .btn-row { margin-left: 0 !important; width: 100%; }
}
@media (max-width: 360px) {
  .brand small { display: none; }
  h1 { font-size: 2.1rem; }
}
/* In tight list rows, let trailing badges drop below the text instead of crushing it */
.list > li { flex-wrap: wrap; }
.list .grow { flex: 1 1 140px; }

/* iOS Safari zooms into any field with text under 16px; keep forms at 16px on touch screens */
@media (max-width: 1024px) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea,
  .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea, .input { font-size: 16px; }
}
/* Respect notches / home indicators on modern phones */
@supports (padding: max(0px)) {
  .site-footer { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
  .toasts { right: max(16px, env(safe-area-inset-right)); }
}
@media (max-width: 360px) {
  .auth-switch a { font-size: .8rem; padding: 9px 6px; white-space: nowrap; }
}

/* Membership: plan cards, apply steps, family editor ------------------------ */
.apply-step { position: relative; padding-top: 32px; margin-bottom: 4px; }
.apply-step h2 { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.apply-step__num {
  position: absolute; top: -16px; left: 24px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--saffron), var(--rose)); box-shadow: var(--shadow);
}
.field--wide { grid-column: 1 / -1; }

.plan-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 8px; }
.plan-card { position: relative; display: block; cursor: pointer; }
.plan-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.plan-card__body {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px; border-radius: var(--radius);
  border: 2px solid var(--border); background: var(--surface-2); transition: border-color .2s, box-shadow .2s, transform .15s;
}
.plan-card__body strong { font-size: 1.08rem; }
.plan-card__body .muted { font-size: .9rem; }
.plan-card:hover .plan-card__body { transform: translateY(-2px); }
.plan-card input:checked + .plan-card__body { border-color: var(--saffron); box-shadow: 0 0 0 4px var(--ring); background: var(--surface); }
.plan-card input:focus-visible + .plan-card__body { outline: 3px solid var(--ring); outline-offset: 2px; }
.plan-card__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--rose) 14%, transparent); color: var(--rose); margin-bottom: 4px; }
.plan-card__icon--peacock { background: color-mix(in srgb, var(--peacock) 14%, transparent); color: var(--peacock); }
.plan-card__family { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; font-size: .82rem; font-weight: 600; color: var(--success); }
.plan-info h2 { font-size: 1.7rem; }

.family__list { display: grid; gap: 14px; margin-bottom: 14px; }
.family__empty { margin: 0 0 14px; font-size: .92rem; }
.family-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; background: var(--surface-2); }
.family-row.has-error { border-color: var(--danger); }
.family-row__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.family-row__badge { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--peacock) 14%, transparent); color: var(--peacock); flex: none; }
.family-row__remove {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: 600 .8rem var(--font-body); cursor: pointer;
}
.family-row__remove:hover { color: var(--danger); border-color: var(--danger); }
.family-row__grid { display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
/* Without JavaScript: show Django's plain "Delete" checkbox instead of the Remove button */
.family-row__delete { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }
.family-row__remove, [data-formset-add] { display: none; }
.js .family-row__delete { display: none; }
.js .family-row__remove { display: inline-flex; }
.js [data-formset-add] { display: inline-flex; }
[data-formset-add][disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.family-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.family-chips li { padding: 5px 12px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); font-size: .85rem; }

@media (max-width: 480px) {
  .apply-step { padding-top: 30px; }
  .apply-step__num { left: 16px; }
  .family-row { padding: 14px; }
  .family-row__remove span { display: none; }
}

/* Event booking: family attendee picker -------------------------------------- */
.attendees { border: 0; padding: 0; margin: 0; min-width: 0; }
.attendees legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 2px; }
.attendees .help { margin: 0 0 10px; font-size: .82rem; }
.attendees > div { display: grid; gap: 8px; }
.attendee { position: relative; display: block; cursor: pointer; }
.attendee input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.attendee__card {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface-2); transition: border-color .15s, background .15s;
}
.attendee__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.attendee__text small { color: var(--muted); font-size: .78rem; }
.attendee__tick {
  width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--border); color: transparent; transition: all .15s;
}
.attendee__tick .icon { width: 14px; height: 14px; }
.attendee input:checked + .attendee__card { border-color: var(--saffron); background: color-mix(in srgb, var(--saffron) 7%, var(--surface)); }
.attendee input:checked + .attendee__card .attendee__tick { background: var(--saffron); border-color: var(--saffron); color: #fff; }
.attendee input:focus-visible + .attendee__card { outline: 3px solid var(--ring); outline-offset: 2px; }
.attendee input:not(:checked) + .attendee__card { opacity: .75; }

/* Event booking: named attendees ------------------------------------------- */
.booking { gap: 16px; }
.booking__label { font-weight: 600; font-size: .9rem; margin: 0 0 8px; }
.booking__me { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--saffron); background: color-mix(in srgb, var(--saffron) 7%, var(--surface)); }
.booking__me-tick { background: var(--saffron); border-color: var(--saffron); color: #fff; }
.people__list { display: grid; gap: 8px; margin-bottom: 8px; }
.people__list:empty { margin: 0; }
.people__empty { font-size: .82rem; margin: 0 0 8px; }
.person-row { display: flex; align-items: flex-start; gap: 10px; }
.person-row > .avatar { margin-top: 6px; }
.person-row__field { flex: 1; min-width: 0; }
.person-row__field input { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.person-row__field input:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 4px var(--ring); }
.person-row.has-error input { border-color: var(--danger); }
.person-row__field .errorlist { list-style: none; padding: 0; margin: 4px 0 0; color: var(--danger); font-size: .8rem; }
.person-row .family-row__remove { margin: 4px 0 0; padding: 8px; }
@media (max-width: 1024px) { .person-row__field input { font-size: 16px; } }

/* Ticket prices: event price list, per-person prices, live summary --------- */
.meta-list .grow { flex: 1; min-width: 0; }
.price-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.price-list li { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.price-list li span { color: var(--muted); }
.attendee__price { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-size: .9rem; line-height: 1.2; white-space: nowrap; }
.attendee__price small { font-weight: 500; font-size: .7rem; color: var(--muted); }
.person-row__age { width: 78px; flex: none; }
.person-row__age input { width: 100%; padding: 10px 8px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: center; }
.person-row__age input:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 4px var(--ring); }
.person-row__age .errorlist { list-style: none; padding: 0; margin: 4px 0 0; color: var(--danger); font-size: .75rem; }
.price-summary { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface-2); }
.price-summary__lines { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.price-summary__lines li { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; }
.price-summary__lines li span { min-width: 0; overflow-wrap: anywhere; }
.price-summary__lines li small { display: block; color: var(--muted); font-size: .75rem; }
.price-summary__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--border); font-weight: 700; }
.price-summary__total strong { font-family: var(--font-display); font-size: 1.5rem; }
.price-summary .help { font-size: .75rem; margin-top: 8px; }
@media (max-width: 1024px) { .person-row__age input { font-size: 16px; } }

/* Payments ------------------------------------------------------------------ */
.notice--success { background: color-mix(in srgb, var(--success) 12%, transparent); }
.notice--success .icon { color: var(--success); }
.notice--warning { background: color-mix(in srgb, var(--warning) 14%, transparent); }
.notice--warning .icon { color: var(--warning); }
.paid-lines { margin: 4px 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 0; font-size: .78rem; color: var(--muted); }
.secure-note .icon { width: 14px; height: 14px; }
