/* =========================================================================
   Palle Panduga theme tokens
   Every colour, font and spacing value in the site comes from here.
   Change a value here and it changes everywhere. Do not hard-code colours
   in components.
   ========================================================================= */

:root {
  /* ---- surfaces and ink (light) ---- */
  --bg: #f3ead6;          /* mud plaster wall */
  --bg-raised: #fffbf1;   /* lime-washed panel */
  --bg-sunk: #ece0c7;     /* recessed strip */
  --ink: #25302b;         /* dark leaf green, not pure black */
  --ink-2: #5a6a5f;
  --ink-3: #8a968d;
  --line: #dcc9a6;
  --line-strong: #c8b083;

  /* ---- accents ---- */
  --terracotta: #b4472b;
  --terracotta-deep: #8f331d;
  --marigold: #e29b18;
  --marigold-deep: #b97a0c;
  --leaf: #4e7a3a;
  --leaf-deep: #3a5c2b;

  /* ---- semantic status ---- */
  --status-done: #4e7a3a;
  --status-active: #d18b0f;
  --status-planned: #6d7f88;

  /* ---- type ---- */
  --font-tel-display: 'Gurajada', 'Noto Sans Telugu', serif;
  --font-tel-body: 'Noto Sans Telugu', system-ui, sans-serif;
  --font-lat-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-lat-body: 'Karla', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.89rem);
  --step-0: clamp(1rem, 0.97rem + 0.16vw, 1.06rem);
  --step-1: clamp(1.19rem, 1.13rem + 0.3vw, 1.34rem);
  --step-2: clamp(1.42rem, 1.32rem + 0.5vw, 1.7rem);
  --step-3: clamp(1.69rem, 1.53rem + 0.8vw, 2.15rem);
  --step-4: clamp(2.01rem, 1.76rem + 1.25vw, 2.72rem);
  --step-5: clamp(2.4rem, 2rem + 2vw, 3.6rem);

  /* ---- space ---- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* ---- shape ---- */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(37, 48, 43, 0.06);
  --shadow: 0 2px 4px rgba(37, 48, 43, 0.05), 0 14px 30px -20px rgba(37, 48, 43, 0.45);

  --container: 1180px;
  --measure: 66ch;
  --header-h: 64px;
}

/* ---- dark, for people reading at night. Same identity, lamp-lit. ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #191f1b;
    --bg-raised: #212823;
    --bg-sunk: #141917;
    --ink: #f0e7d3;
    --ink-2: #b9b19c;
    --ink-3: #8b8676;
    --line: #333d35;
    --line-strong: #4a5749;

    --terracotta: #e07a58;
    --terracotta-deep: #c65f3d;
    --marigold: #eab63f;
    --marigold-deep: #cf9b23;
    --leaf: #86b46a;
    --leaf-deep: #6e9a54;

    --status-done: #86b46a;
    --status-active: #eab63f;
    --status-planned: #93a4ad;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 34px -20px rgba(0, 0, 0, 0.9);
  }
}

:root[data-theme='dark'] {
  --bg: #191f1b;
  --bg-raised: #212823;
  --bg-sunk: #141917;
  --ink: #f0e7d3;
  --ink-2: #b9b19c;
  --ink-3: #8b8676;
  --line: #333d35;
  --line-strong: #4a5749;

  --terracotta: #e07a58;
  --terracotta-deep: #c65f3d;
  --marigold: #eab63f;
  --marigold-deep: #cf9b23;
  --leaf: #86b46a;
  --leaf-deep: #6e9a54;

  --status-done: #86b46a;
  --status-active: #eab63f;
  --status-planned: #93a4ad;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 34px -20px rgba(0, 0, 0, 0.9);
}
/* =========================================================================
   Base: reset, typography, links, focus
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-lat-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Telugu needs more leading than Latin, and its own faces. */
html[lang='te'] body {
  font-family: var(--font-tel-body);
  line-height: 1.85;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  font-family: var(--font-lat-display);
}

html[lang='te'] h1,
html[lang='te'] h2,
html[lang='te'] h3,
html[lang='te'] h4,
html[lang='te'] h5 {
  font-family: var(--font-tel-display);
  font-weight: 400;
  line-height: 1.3;
}

p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--terracotta);
  text-decoration: none;
}

a:hover {
  color: var(--terracotta-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection {
  background: var(--marigold);
  color: #25302b;
}

/* Skip link for keyboard and screen reader users. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--terracotta);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
/* =========================================================================
   Layout: container, header, footer, page shells
   ========================================================================= */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.stack {
  display: flex;
  flex-direction: column;
}

.section {
  padding-block: var(--sp-8);
}

.section--tight {
  padding-block: var(--sp-7);
}

.section--sunk {
  background: var(--bg-sunk);
  border-block: 1px solid var(--line);
}

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: var(--header-h);
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-right: auto;
  min-width: 0;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
  color: var(--terracotta);
}

.brand__name {
  font-family: var(--font-tel-display);
  font-size: var(--step-1);
  line-height: 1.1;
  display: block;
}

.brand__sub {
  font-family: var(--font-lat-body);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  white-space: nowrap;
}

@media (max-width: 1340px) {
  .brand__sub {
    display: none;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.nav__link {
  color: var(--ink-2);
  font-size: 0.94rem;
  padding-block: 4px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--terracotta);
  text-decoration: none;
}

.nav__link.is-active {
  color: var(--ink);
  border-bottom-color: var(--marigold);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 7px 13px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 0.86rem;
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav {
    display: none;
  }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-3) var(--sp-5) var(--sp-5);
    box-shadow: var(--shadow);
  }
  .nav.is-open .nav__link {
    padding-block: var(--sp-3);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav__link.is-active {
    border-bottom-color: var(--marigold);
  }
}

/* Phones: the brand tagline and the toggle label are the first things to go,
   so the mark, the language switch and the menu button always fit one line. */
@media (max-width: 620px) {
  .container {
    padding-inline: var(--sp-4);
  }
  .site-header__bar {
    gap: var(--sp-3);
  }
  .brand__sub {
    display: none;
  }
  .brand__name {
    font-size: var(--step-0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand__mark {
    width: 28px;
    height: 28px;
  }
  .lang-switch button {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .nav-toggle {
    padding: 7px 10px;
    font-size: 0;
    gap: 0;
  }
  .nav-toggle svg {
    width: 18px;
    height: 18px;
  }
}

/* ---------------- footer ---------------- */

.site-footer {
  background: var(--bg-sunk);
  border-top: 1px solid var(--line);
  padding-block: var(--sp-7) var(--sp-6);
  margin-top: var(--sp-8);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--sp-6);
}

.site-footer h3 {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-family: var(--font-lat-body);
  font-weight: 700;
  margin-bottom: var(--sp-3);
}

html[lang='te'] .site-footer h3 {
  font-family: var(--font-tel-body);
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.82rem;
}

.site-footer li {
  margin-bottom: var(--sp-2);
}

.site-footer a {
  color: var(--ink-2);
  font-size: 0.94rem;
}

.site-footer a:hover {
  color: var(--terracotta);
}

.site-footer__base {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  align-items: center;
  color: var(--ink-3);
  font-size: 0.84rem;
}

/* ---------------- generic grids ---------------- */

.grid {
  display: grid;
  gap: var(--sp-5);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: start;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
}

.prose {
  max-width: var(--measure);
}

.prose p + p {
  margin-top: var(--sp-4);
}
/* =========================================================================
   Components: ornaments, cards, buttons, badges, tables, gallery
   ========================================================================= */

/* ---------------- muggu (rangoli) ground ---------------- */

.muggu {
  background-image: radial-gradient(
    circle at 12px 12px,
    color-mix(in srgb, var(--terracotta) 22%, transparent) 1.7px,
    transparent 1.8px
  );
  background-size: 24px 24px;
}

.muggu--fine {
  background-image: radial-gradient(
    circle at 8px 8px,
    color-mix(in srgb, var(--leaf) 20%, transparent) 1.3px,
    transparent 1.4px
  );
  background-size: 16px 16px;
}

/* ---------------- garland ---------------- */

.garland {
  display: block;
  width: 100%;
  height: 16px;
  color: var(--marigold);
}

/* ---------------- eyebrow / labels ---------------- */

.eyebrow {
  font-family: var(--font-lat-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--marigold-deep);
}

html[lang='te'] .eyebrow {
  font-family: var(--font-tel-body);
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 0.82rem;
}

.label {
  font-family: var(--font-lat-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

html[lang='te'] .label {
  font-family: var(--font-tel-body);
  letter-spacing: 0.03em;
  text-transform: none;
  font-size: 0.8rem;
}

/* ---------------- page header ---------------- */

.page-head {
  padding-block: var(--sp-7) var(--sp-5);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-size: var(--step-4);
  margin-top: var(--sp-2);
}

.page-head__lede {
  color: var(--ink-2);
  max-width: var(--measure);
  margin-top: var(--sp-4);
  font-size: var(--step-1);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.section-head h2 {
  font-size: var(--step-3);
}

.section-head__link {
  font-size: 0.92rem;
  white-space: nowrap;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--terracotta);
  color: #fff;
  border: 1px solid var(--terracotta);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--terracotta-deep);
  border-color: var(--terracotta-deep);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: var(--bg-raised);
  color: var(--terracotta);
  border-color: var(--terracotta);
}

/* ---------------- language switch ---------------- */

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--bg-raised);
  flex: none;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.03em;
}

.lang-switch button[aria-current='true'] {
  background: var(--terracotta);
  color: #fff;
}

.lang-switch button:first-child {
  font-family: var(--font-tel-body);
  letter-spacing: 0;
}

/* ---------------- cards ---------------- */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--leaf);
  border-radius: var(--radius);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

a.card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: inherit;
}

.card--marigold {
  border-left-color: var(--marigold);
}

.card--terracotta {
  border-left-color: var(--terracotta);
}

.card__icon {
  width: 30px;
  height: 30px;
  color: var(--marigold-deep);
}

.card__title {
  font-size: var(--step-2);
}

.card__text {
  color: var(--ink-2);
  font-size: 0.96rem;
}

.card__meta {
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--line);
  color: var(--ink-3);
  font-size: 0.85rem;
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: center;
}

/* ---------------- stat strip ---------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised);
}

.stats > div {
  padding: var(--sp-4) var(--sp-5);
  border-right: 1px solid var(--line);
}

.stats > div:last-child {
  border-right: 0;
}

@media (max-width: 640px) {
  .stats > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stats > div:last-child {
    border-bottom: 0;
  }
}

.stats__value {
  font-family: var(--font-lat-display);
  font-size: var(--step-2);
  margin-top: var(--sp-1);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

html[lang='te'] .stats__value {
  font-family: var(--font-tel-display);
}

.stats__note {
  color: var(--ink-3);
  font-size: 0.85rem;
  margin-top: var(--sp-1);
}

/* ---------------- badges ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  padding: 3px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--done {
  color: var(--status-done);
}

.badge--active {
  color: var(--status-active);
}

.badge--planned {
  color: var(--status-planned);
}

/* ---------------- timeline (festival rituals) ---------------- */

.timeline {
  position: relative;
  padding-left: var(--sp-6);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--marigold), var(--leaf));
  border-radius: 2px;
}

.timeline li {
  position: relative;
  padding-bottom: var(--sp-5);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: calc(var(--sp-6) * -1);
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--marigold);
}

.timeline h4 {
  font-size: var(--step-1);
}

.timeline p {
  color: var(--ink-2);
  font-size: 0.96rem;
  margin-top: var(--sp-1);
}

/* ---------------- data list / table ---------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

th,
td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  background: var(--bg-sunk);
  font-family: var(--font-lat-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

html[lang='te'] thead th {
  font-family: var(--font-tel-body);
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 0.84rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------------- photo frame ---------------- */

.photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo__placeholder {
  display: grid;
  place-items: center;
  gap: var(--sp-2);
  text-align: center;
  padding: var(--sp-5);
  color: var(--ink-3);
  font-size: 0.84rem;
}

.photo__placeholder svg {
  width: 34px;
  height: 34px;
  color: var(--line-strong);
}

.photo__caption {
  padding: var(--sp-3) var(--sp-4);
  font-size: 0.88rem;
  color: var(--ink-2);
}

/* ---------------- notices ---------------- */

.notice {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--line);
}

.notice:last-child {
  border-bottom: 0;
}

@media (max-width: 560px) {
  .notice {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
}

.notice__date {
  font-family: var(--font-lat-body);
  font-size: 0.8rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}

.notice__title {
  font-size: var(--step-1);
}

.notice__body {
  color: var(--ink-2);
  font-size: 0.96rem;
  margin-top: var(--sp-1);
}

/* ---------------- states ---------------- */

.state {
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
  color: var(--ink-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto var(--sp-3);
  border: 3px solid var(--line);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-8) var(--sp-8);
  border-bottom: 1px solid var(--line);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 46rem;
}

.hero h1 {
  font-size: var(--step-5);
  margin-top: var(--sp-3);
}

.hero__lede {
  color: var(--ink-2);
  font-size: var(--step-1);
  margin-top: var(--sp-4);
  max-width: 40rem;
}

.hero__actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-5);
}

.hero__hut {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: min(320px, 42vw);
  color: var(--terracotta);
  opacity: 0.09;
  z-index: 0;
  pointer-events: none;
}

/* ---------------- misc ---------------- */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.chip {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 0.84rem;
  color: var(--ink-2);
  background: var(--bg-raised);
}

.callout {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--marigold);
  border-radius: var(--radius);
  padding: var(--sp-5);
  color: var(--ink-2);
}

.callout strong {
  color: var(--ink);
}

/* =========================================================================
   Static site additions
   The language switch is a pair of links here, not buttons, so the same
   look has to apply to <a> as well.
   ========================================================================= */

.lang-switch a {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.03em;
  text-decoration: none;
}

.lang-switch a:hover {
  color: var(--terracotta);
  text-decoration: none;
}

.lang-switch a[aria-current='page'] {
  background: var(--terracotta);
  color: #fff;
}

.lang-switch a:first-child {
  font-family: var(--font-tel-body);
  letter-spacing: 0;
}

/* Breadcrumb back link on detail pages. */
.backlink {
  display: inline-block;
  margin-top: var(--sp-7);
}

/* Definition lists used on the village and contact pages. */
.deflist {
  margin: 0;
  display: grid;
  gap: var(--sp-3);
}

.deflist > div {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
}

.deflist dt {
  color: var(--ink-3);
}

.deflist dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.contact-list {
  display: grid;
  gap: var(--sp-4);
  margin: var(--sp-3) 0 0;
}

.contact-list dd {
  margin: 4px 0 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.subhead {
  font-size: var(--step-2);
  margin-bottom: var(--sp-4);
}

.year-block {
  margin-bottom: var(--sp-8);
}

.year-block h2 {
  font-size: var(--step-2);
  margin-bottom: var(--sp-5);
}

.muted {
  color: var(--ink-3);
  font-size: 0.9rem;
}

.center {
  text-align: center;
}

/* ---------------- home banner (managed in the admin portal) ---------------- */

.banner {
  background: linear-gradient(90deg, color-mix(in srgb, var(--marigold) 26%, var(--bg)) 0%, var(--bg) 70%);
  border-bottom: 1px solid var(--line);
}

.banner__inner {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: center;
  padding-block: var(--sp-5);
}

.banner__art {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(180, 71, 43, 0.25));
}

.banner__art--photo {
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 3px solid var(--bg-raised);
  box-shadow: var(--shadow);
}

.banner h2 {
  font-size: var(--step-3);
  margin-top: var(--sp-1);
}

.banner p {
  color: var(--ink-2);
  max-width: 60ch;
  margin-top: var(--sp-2);
}

.banner__link {
  display: inline-block;
  margin-top: var(--sp-3);
  font-weight: 600;
}

@media (max-width: 640px) {
  .banner__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: var(--sp-4);
  }
  .banner__art {
    width: 150px;
    height: 150px;
  }
  .banner p {
    margin-inline: auto;
  }
}

/* ---------------- donations ---------------- */

.progress {
  height: 12px;
  border-radius: 999px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--marigold), var(--terracotta));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.amounts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.amounts label {
  cursor: pointer;
}

.amounts input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.amounts span {
  display: inline-block;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-weight: 600;
  background: var(--bg-raised);
  font-variant-numeric: tabular-nums;
}

.amounts input:checked + span {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

.amounts input:focus-visible + span {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

.field-public {
  display: grid;
  gap: 6px;
}

.field-public label {
  font-weight: 600;
  font-size: 0.92rem;
}

.field-public .hint {
  font-size: 0.82rem;
  color: var(--ink-3);
}

.input-public {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
}

.input-public:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--terracotta) 18%, transparent);
}

.donor-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-2) var(--sp-4);
}

.donor-wall li {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.94rem;
}

.donor-wall b {
  font-weight: 600;
}

.donor-wall span {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.flash-public {
  border: 1px solid var(--line);
  border-left: 4px solid var(--terracotta);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
}

.qr {
  width: 220px;
  height: 220px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 auto;
}

.qr canvas, .qr img {
  width: 100%;
  height: 100%;
}

/* ---------------- receipt ---------------- */

.receipt {
  max-width: 640px;
  margin: var(--sp-7) auto;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.receipt__head {
  padding: var(--sp-6) var(--sp-6) var(--sp-4);
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.receipt__head .brand__mark {
  width: 44px;
  height: 44px;
  margin: 0 auto var(--sp-3);
}

.receipt__head h1 {
  font-size: var(--step-3);
}

.receipt__no {
  display: inline-block;
  margin-top: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
}

.receipt__body {
  padding: var(--sp-5) var(--sp-6);
}

.receipt__body dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--sp-3) var(--sp-5);
}

.receipt__body dt {
  color: var(--ink-3);
  font-size: 0.86rem;
}

.receipt__body dd {
  margin: 0;
  font-weight: 600;
}

.receipt__amount {
  font-family: var(--font-lat-display);
  font-size: var(--step-4);
  color: var(--terracotta);
}

.receipt__wish {
  padding: var(--sp-5) var(--sp-6);
  background: var(--bg-sunk);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}

.receipt__foot {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.82rem;
}

@media print {
  .site-header, .site-footer, .no-print, .garland { display: none !important; }
  body { background: #fff; }
  .receipt { box-shadow: none; border-color: #ccc; margin: 0 auto; }
}
