/* Layout: white pages, one photo per page header, the five Buddhist flag colours used as accents.
   The hero photo sits inside a slowly turning six-colour aura (ෂඩ්වර්ණ බුද්ධ රශ්මිය). */
:root {
  --bg: #ffffff;
  --tint: #f5f7fc;          /* faint blue-white panels */
  --ink: #18213d;
  --muted: #59617d;
  --line: #e3e7f1;

  --blue: #1f4fa8;          /* නිල් */
  --blue-deep: #13306b;
  --yellow: #f5b700;        /* කහ */
  --red: #c8102e;           /* රතු */
  --orange: #e8711a;        /* කහ රතු (kasaya) */
  --orange-ink: #b4520a;    /* orange dark enough for text on white */
  --flag-white: #e8ecf5;    /* the white band, visible on a white page */

  --flag: linear-gradient(90deg, var(--blue) 0 20%, var(--yellow) 20% 40%, var(--red) 40% 60%, var(--flag-white) 60% 80%, var(--orange) 80% 100%);
  --shadow: 0 22px 44px -26px rgba(19, 48, 107, .35);

  --f-display: "Abhaya Libre", "Noto Sans Sinhala", Georgia, serif;
  --f-body: "Hanken Grotesk", "Noto Sans Sinhala", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-si: "Noto Sans Sinhala", "Abhaya Libre", "Iskoola Pota", sans-serif;

  --s-1: clamp(2.6rem, 6vw + 1rem, 5.4rem);
  --s-2: clamp(1.8rem, 2.4vw + 1rem, 2.8rem);
  --s-3: 1.35rem;
  --radius: 16px;
  --nav-h: 76px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.05rem/1.7 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; text-wrap: balance; margin: 0 0 .5em; font-weight: 700; color: var(--ink); }
h1 { font-size: var(--s-1); }
h2 { font-size: var(--s-2); }
h3 { font-size: var(--s-3); }
p { margin: 0 0 1em; max-width: 65ch; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.si { font-family: var(--f-si); }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: max(16px, 4vw); }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section.tight { padding-block: 0 clamp(3rem, 7vw, 6rem); }
.label { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--orange-ink); margin-bottom: .8em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; margin-inline: auto; }
.lead { font-size: 1.2rem; }
.note { font-size: .85rem; color: var(--muted); border-left: 2px dashed var(--orange); padding-left: .8em; line-height: 1.6; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .95em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: .5em 1em; z-index: 100; }
.skip:focus { left: 16px; }
.flag-bar { display: block; width: 120px; height: 5px; border-radius: 3px; background: var(--flag); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; padding: .9em 1.55em; border-radius: 999px;
  font: 600 .95rem/1.2 var(--f-body); text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--blue); color: #fff; box-shadow: 0 12px 26px -14px rgba(31, 79, 168, .9); }
.btn-gold:hover { background: var(--blue-deep); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-ink); }
.btn-line { color: var(--blue); border-color: currentColor; background: transparent; }
.btn-line:hover { background: var(--tint); }
.btn.small { padding: .6em 1.1em; font-size: .85rem; }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: .4em; }
.link-arrow::after { content: "→"; transition: transform .25s; }
.link-arrow:hover::after { transform: translateX(5px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: max(16px, 4vw); min-height: var(--nav-h);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  color: var(--ink); transition: box-shadow .35s ease, min-height .35s;
}
.nav::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--flag); }
.nav.solid { box-shadow: 0 8px 30px -20px rgba(19, 48, 107, .45); min-height: 64px; }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark { width: 34px; height: 34px; color: var(--orange); flex: none; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text .si { font-weight: 600; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--blue-deep); }
.brand-text .en { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-right { display: flex; align-items: center; gap: .8rem; flex: none; }
#menu .menu-list { display: flex; gap: .2rem; align-items: center; list-style: none; margin: 0; padding: 0; }
#menu li { margin: 0; }
#menu a { color: inherit; text-decoration: none; font-size: .92rem; font-weight: 500; padding: .5em .75em; border-radius: 999px; position: relative; display: inline-block; }
#menu a::after { content: ""; position: absolute; left: .75em; right: .75em; bottom: .2em; height: 2px; border-radius: 2px; background: var(--orange); transform: scaleX(0); transition: transform .3s ease; transform-origin: left; }
#menu a:hover::after, #menu .current-menu-item > a::after, #menu .current_page_item > a::after { transform: scaleX(1); }
#menu li:last-child > a { background: var(--orange); color: #fff; margin-left: .4rem; padding-inline: 1.1em; }
#menu li:last-child > a::after { display: none; }
#menu li:last-child > a:hover, #menu li.current-menu-item:last-child > a { background: var(--orange-ink); }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; text-decoration: none; font: 600 .8rem/1 var(--f-body); color: var(--ink); background: #fff; }
.lang-switch span { padding: .45em .75em; border-radius: 999px; transition: background .25s, color .25s; }
.lang-switch span[lang="si"] { font-family: var(--f-si); }
.lang-switch span.on { background: var(--blue); color: #fff; }
.lang-switch:hover span:not(.on) { color: var(--orange-ink); }

/* Below 1180px the menu moves to a second row of the bar, always visible, wrapping as needed. */
@media (max-width: 1180px) {
  .nav { flex-wrap: wrap; row-gap: 2px; padding-top: calc(env(safe-area-inset-top, 0px) + 10px); padding-bottom: 6px; }
  .nav, .nav.solid { min-height: 0; }
  :root { --nav-space: 136px; }
  .nav-right { display: contents; }
  .brand { flex: 1 1 0; }
  .lang-switch { flex: none; order: 1; }
  #menu { order: 2; flex: 1 0 100%; border-top: 1px solid var(--line); padding-top: 4px; }
  #menu .menu-list { flex-wrap: wrap; justify-content: center; gap: 2px; }
  #menu a { font-size: .84rem; padding: .4em .55em; }
  #menu li:last-child > a { margin-left: .2rem; padding-inline: .9em; }
}
@media (max-width: 400px) { .brand-text .en { display: none; } }

/* ---------- Page load ---------- */
main { animation: pageIn .7s cubic-bezier(.2, .7, .2, 1); }
@keyframes pageIn { from { opacity: .001; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: .001; transform: translateY(26px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes zoomIn { from { transform: scale(.94); opacity: 0; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-top: calc(var(--nav-space, var(--nav-h)) + clamp(2.5rem, 7vw, 5.5rem)); padding-bottom: clamp(3.5rem, 8vw, 6.5rem);
  background:
    radial-gradient(60% 70% at 92% 10%, rgba(245, 183, 0, .16), transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(31, 79, 168, .08), transparent 60%),
    var(--bg);
}
.lamps { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-inner > * { min-width: 0; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } .hero-visual { width: min(420px, 100%); margin-inline: auto; } }
.hero .eyebrow { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--orange-ink); font-weight: 600; }
.hero-title { margin: .2em 0 .5em; font-weight: 800; }
.hero-title .si { display: block; font-family: var(--f-si); font-weight: 600; font-size: clamp(2rem, 4.6vw + .6rem, 4.2rem); line-height: 1.3;
  background: linear-gradient(100deg, var(--blue-deep) 0%, var(--blue) 30%, var(--orange-ink) 50%, var(--blue) 70%, var(--blue-deep) 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-title .en { display: block; font-size: clamp(1.3rem, 2vw + .6rem, 2.1rem); font-weight: 500; margin-top: .4em; letter-spacing: .02em; color: var(--ink); }
.hero-lead { font-size: 1.15rem; max-width: 48ch; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
@keyframes shimmer { to { background-position: -250% 0; } }

.hero-visual { position: relative; aspect-ratio: 1; display: grid; place-items: center; max-width: 100%; }
.aura { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--blue), var(--yellow), var(--red), #fff, var(--orange), var(--blue));
  filter: blur(26px); opacity: .55; animation: spin 40s linear infinite; }
.hero-photo { position: relative; margin: 0; width: 82%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 6px solid #fff; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform .2s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero .reveal { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero .eyebrow.reveal { animation-delay: .1s; }
.hero-title .si.reveal { animation: rise .9s .25s cubic-bezier(.2, .7, .2, 1) both, shimmer 10s 1.2s linear infinite; }
.hero-title .en.reveal { animation-delay: .45s; }
.hero-lead.reveal { animation-delay: .6s; }
.hero-actions.reveal { animation-delay: .75s; }
.hero-visual.reveal { animation: zoomIn 1.2s .3s cubic-bezier(.2, .7, .2, 1) both; }

/* scroll reveals: content is visible by default, JS adds .pre only to things below the fold */
.reveal.pre { opacity: .001; transform: translateY(28px); }
.reveal.shown { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }

/* ---------- Poya band ---------- */
.poya-band { background: var(--blue-deep); color: #fff; position: relative; overflow: hidden; }
.poya-band::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--flag); }
.poya-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 120% at 8% 50%, rgba(245, 183, 0, .18), transparent 70%); pointer-events: none; }
.poya-inner { display: grid; grid-template-columns: auto 1fr auto auto; gap: 1.5rem; align-items: center; padding-block: 1.7rem; position: relative; z-index: 1; }
.poya-band .label { color: var(--yellow); margin: 0; }
.poya-name { font-family: var(--f-display); font-size: 1.6rem; font-weight: 700; margin: 0; line-height: 1.25; }
.poya-date { margin: 0; opacity: .8; font-size: .95rem; }
.poya-moon { width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fffdf2, #f8dc8a 70%); position: relative; overflow: hidden; box-shadow: 0 0 40px rgba(248, 220, 138, .5); animation: glow 4s ease-in-out infinite; }
.poya-moon span { position: absolute; inset: 0; border-radius: 50%; background: var(--blue-deep); opacity: .9; }
@keyframes glow { 50% { box-shadow: 0 0 64px rgba(248, 220, 138, .8); } }
.poya-count { text-align: center; line-height: 1.1; font-variant-numeric: tabular-nums; }
.poya-count b { display: block; font-family: var(--f-display); font-size: 2.5rem; color: var(--yellow); }
.poya-count span { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.poya-band .btn-line { color: #fff; border-color: rgba(255, 255, 255, .6); }
.poya-band .btn-line:hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 720px) {
  .poya-inner { grid-template-columns: auto 1fr; }
  .poya-count { text-align: left; display: flex; align-items: baseline; gap: .5rem; }
  .poya-count b { display: inline; }
  .poya-band .btn { justify-self: start; }
}

/* ---------- Split / frames ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split > * { min-width: 0; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.frame { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; max-width: 100%; }
.frame.tall { aspect-ratio: 4 / 5; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.frame:hover img { transform: scale(1.05); }
.frame::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--flag); z-index: 2; }
.frame figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1.4rem 1.4rem; color: #fff; background: linear-gradient(transparent, rgba(19, 48, 107, .85)); display: flex; flex-direction: column; z-index: 1; }
.frame figcaption b { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.frame figcaption span { font-family: var(--f-display); font-size: 1.4rem; }

/* ---------- Tiles: one flag colour each ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr; } }
.tile { --c: var(--blue); --on: #fff; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 12px; padding: 1.6rem 1.4rem; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .7rem; position: relative; overflow: hidden; transition: color .35s, transform .35s, box-shadow .35s; }
.tile:nth-child(2) { --c: var(--yellow); --on: var(--ink); }
.tile:nth-child(3) { --c: var(--red); }
.tile:nth-child(4) { --c: var(--orange); }
.tile::before { content: ""; position: absolute; inset: 0; background: var(--c); transform: translateY(101%); transition: transform .45s cubic-bezier(.7, 0, .2, 1); z-index: 0; }
.tile > * { position: relative; z-index: 1; }
.tile:hover { color: var(--on); transform: translateY(-4px); box-shadow: var(--shadow); }
.tile:hover::before { transform: none; }
.tile-k { font-family: var(--f-display); font-size: 1.55rem; font-weight: 700; }
.tile b { font-weight: 500; font-size: .98rem; line-height: 1.5; }
.tile i { font-style: normal; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-top: auto; opacity: .75; }
.tile i::after { content: " →"; }

/* ---------- Quote ---------- */
.quote-band { background: #fffaf0; padding-block: clamp(3rem, 8vw, 6rem); text-align: center; position: relative; overflow: hidden; border-block: 1px solid #f6e8c8; }
.quote-band::before { content: ""; position: absolute; width: 560px; height: 560px; max-width: 120vw; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(31, 79, 168, .08) 0 3deg, rgba(245, 183, 0, .14) 3deg 6deg, rgba(200, 16, 46, .07) 6deg 9deg, transparent 9deg 12deg, rgba(232, 113, 26, .1) 12deg 15deg, transparent 15deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); animation: spinC 90s linear infinite; }
@keyframes spinC { to { transform: translate(-50%, -50%) rotate(360deg); } }
.quote-band blockquote { margin: 0 auto; position: relative; }
.quote-band p { font-family: var(--f-display); font-size: clamp(1.6rem, 3vw + .8rem, 2.8rem); font-style: italic; margin: 0 auto .6em; max-width: 26ch; line-height: 1.35; color: var(--blue-deep); }
.quote-band footer { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-ink); }

/* ---------- Page heads ---------- */
.page-head { padding-top: calc(var(--nav-space, var(--nav-h)) + clamp(2rem, 5vw, 3.5rem)); padding-bottom: clamp(1.5rem, 4vw, 3rem); background: linear-gradient(180deg, var(--tint), #fff); }
.page-head-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.page-head-inner > * { min-width: 0; }
.page-head h1 { margin: 0 0 .45em; font-size: clamp(2.2rem, 4.5vw + 1rem, 4.2rem); animation: rise .9s .1s cubic-bezier(.2, .7, .2, 1) both; }
.page-head .flag-bar { animation: grow 1s .4s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.page-head-photo { margin: 0; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); max-width: 100%; animation: zoomIn 1s .15s cubic-bezier(.2, .7, .2, 1) both; }
.page-head-photo img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 18s ease-out both; }
@keyframes kenburns { from { transform: scale(1.15); } to { transform: scale(1); } }
@media (max-width: 720px) { .page-head-inner { grid-template-columns: 1fr; } .page-head-photo { aspect-ratio: 16 / 8; } }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 2rem 0 0; position: relative; display: grid; gap: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: 4.6rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--flag-white); }
.timeline li { display: grid; grid-template-columns: 4rem 1fr; gap: 1.6rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(4.6rem - 6px); top: .5rem; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); }
.timeline li:nth-child(4n+2)::before { border-color: var(--yellow); }
.timeline li:nth-child(4n+3)::before { border-color: var(--red); }
.timeline li:nth-child(4n+4)::before { border-color: var(--orange); }
.timeline .yr { font-family: var(--f-display); font-weight: 700; color: var(--blue); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.timeline li > div { padding-left: .8rem; min-width: 0; }
.timeline b { font-size: 1.05rem; }
.timeline p { margin: .2em 0 0; color: var(--muted); }

/* ---------- Sacred places ---------- */
.sacred { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.6rem 1.4rem; }
@media (max-width: 900px) { .sacred { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .sacred { grid-template-columns: 1fr; } }
.sacred > div { border-top: 4px solid var(--blue); padding-top: 1rem; }
.sacred > div:nth-child(5n+2) { border-color: var(--yellow); }
.sacred > div:nth-child(5n+3) { border-color: var(--red); }
.sacred > div:nth-child(5n+4) { border-color: var(--flag-white); }
.sacred > div:nth-child(5n+5) { border-color: var(--orange); }
.sacred img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin-bottom: .9rem; background: var(--tint); }
.sacred h3 { font-size: 1.15rem; }
.sacred p { color: var(--muted); font-size: .95rem; }

/* Monks of the temple */
.monks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.8rem 1rem; }
.monks li { flex: 0 1 140px; }
.monks li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; }
.monks img { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; object-position: center 25%; border: 4px solid #fff; box-shadow: 0 0 0 3px var(--yellow), 0 12px 24px -16px rgba(19, 48, 107, .6); margin-bottom: .5rem; }
.monks li:first-child img { box-shadow: 0 0 0 3px var(--orange), 0 12px 24px -16px rgba(19, 48, 107, .6); filter: grayscale(1); }
.monks b { font-size: .95rem; line-height: 1.45; color: var(--blue-deep); }
.monks span { font-size: .85rem; color: var(--muted); line-height: 1.45; }

.visit { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; background: var(--tint); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); }
.visit > div { flex: 1 1 320px; min-width: 0; }

/* ---------- Services ---------- */
.sched-wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; align-items: start; }
@media (max-width: 820px) { .sched-wrap { grid-template-columns: 1fr; gap: 1rem; } }
.sched { list-style: none; margin: 0; padding: 0; }
.sched li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.sched li:first-child { border-top: 1px solid var(--line); }
.sched time { font-family: var(--f-display); font-size: 1.4rem; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.sched em { display: block; font-style: normal; font-size: .88rem; color: var(--muted); }
.sched em[lang="si"] { font-family: var(--f-si); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 1s; }
.card:hover img { transform: scale(1.06); }
.card > div { padding: 1.3rem 1.4rem 1.5rem; position: relative; background: #fff; border-top: 4px solid var(--blue); }
.card:nth-child(4n+2) > div { border-top-color: var(--yellow); }
.card:nth-child(4n+3) > div { border-top-color: var(--red); }
.card:nth-child(4n+4) > div { border-top-color: var(--orange); }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }
.card a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--blue); }
.poya-list { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; background: var(--blue-deep); color: #fff; border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 3rem); position: relative; overflow: hidden; }
.poya-list::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--flag); }
.poya-list h2 { color: #fff; }
.poya-list .muted { color: rgba(255, 255, 255, .75); }
@media (max-width: 820px) { .poya-list { grid-template-columns: 1fr; gap: 1rem; } }
.poya-rows { list-style: none; margin: 0; padding: 0; }
.poya-rows li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid rgba(255, 255, 255, .14); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.poya-rows b { font-family: var(--f-display); font-size: 1.2rem; }
.poya-rows b::before { content: "●"; color: var(--yellow); font-size: .7em; margin-right: .6em; vertical-align: .15em; }
.poya-rows span { opacity: .85; }

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip { font: 500 .9rem/1.2 var(--f-body); padding: .65em 1.1em; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: all .25s; }
.chip:hover { border-color: var(--orange); }
.chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.masonry { columns: 3 260px; column-gap: 12px; margin-bottom: 2rem; }
.masonry figure { margin: 0 0 12px; break-inside: avoid; position: relative; overflow: hidden; border-radius: 12px; cursor: zoom-in; transition: opacity .4s, transform .4s; }
.masonry img { width: 100%; height: auto; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.masonry figure:hover img { transform: scale(1.08); }
.masonry figcaption { position: absolute; inset: auto 0 0 0; padding: 2rem 1rem .8rem; color: #fff; font-weight: 500; background: linear-gradient(transparent, rgba(19, 48, 107, .8)); transform: translateY(100%); transition: transform .4s; }
.masonry figure:hover figcaption, .masonry figure:focus-visible figcaption { transform: none; }
.masonry figure.out { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(255, 255, 255, .97); display: grid; place-items: center; padding: 60px 16px; animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); }
.lightbox img { max-height: 78vh; width: auto; margin-inline: auto; border-radius: 10px; box-shadow: var(--shadow); animation: zoomIn .4s cubic-bezier(.2, .7, .2, 1); }
.lightbox figcaption { color: var(--ink); text-align: center; margin-top: 1rem; }
.lb-close, .lb-nav { position: absolute; background: var(--tint); color: var(--ink); border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; cursor: pointer; line-height: 1; }
.lb-close { top: calc(env(safe-area-inset-top, 0px) + 16px); right: 16px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: 12px; } .lb-nav.next { right: 12px; }
.lb-close:hover, .lb-nav:hover { background: var(--blue); color: #fff; }

/* ---------- Projects ---------- */
.projects { display: grid; gap: 1.6rem; margin: 2.5rem 0; }
.project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 720px) { .project { grid-template-columns: 1fr; } }
.project img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; }
.project-body { padding: clamp(1.4rem, 3vw, 2.2rem); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: .35em .8em; border-radius: 999px; background: #e6eefb; color: var(--blue); margin-bottom: .8rem; }
.tag.done { background: #fff1c7; color: #7a5600; }
.tag.planned { background: var(--tint); color: var(--muted); }
.meter { height: 10px; border-radius: 99px; background: var(--flag-white); overflow: hidden; margin: 1.2rem 0 .6rem; }
.meter span { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--yellow) 55%, var(--orange)); transition: width 1.6s cubic-bezier(.2, .7, .2, 1); position: relative; }
.meter span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: sheen 2.4s infinite; }
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.meter-k { font-size: .92rem; color: var(--muted); margin: 0; font-variant-numeric: tabular-nums; }
.meter-k b { color: var(--ink); }

/* ---------- Give / contact ---------- */
.give { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .give { grid-template-columns: 1fr; } }
.give-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--yellow); border-radius: var(--radius); padding: 1.8rem; display: flex; flex-direction: column; align-items: flex-start; }
.give-card:nth-child(3) { border-top-color: var(--orange); }
.give-card:first-child { background: var(--blue-deep); color: #fff; border-color: var(--blue-deep); position: relative; overflow: hidden; }
.give-card:first-child::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--flag); }
.give-card:first-child h3 { color: #fff; }
.give-card:first-child .note { color: rgba(255, 255, 255, .78); border-color: var(--yellow); }
.give-card:first-child .note-tag { color: var(--yellow); }
.give-card .note { margin-top: 1rem; margin-bottom: 0; }
.bank { margin: 0 0 1.2rem; display: grid; gap: .8rem; width: 100%; }
.bank div { display: grid; gap: .1rem; }
.bank dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.bank dd { margin: 0; font-size: 1.05rem; font-weight: 500; overflow-wrap: anywhere; }
.give-card:first-child .btn-line { color: #fff; border-color: rgba(255, 255, 255, .6); }
.give-card:first-child .btn-line:hover { background: rgba(255, 255, 255, .12); }
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); }
.contact > * { min-width: 0; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.8rem; display: grid; gap: 1rem; }
.contact-list li { display: grid; gap: .1rem; }
.contact-list li > span:first-child { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-ink); font-weight: 600; }
.contact-list a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
.contact-list a:hover { color: var(--blue); }
.socials { display: flex; flex-wrap: wrap; gap: .6rem; }
.socials a { display: inline-flex; align-items: center; gap: .5em; padding: .6em 1em; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; font-size: .92rem; background: #fff; transition: all .3s; }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.socials a:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.form { background: var(--tint); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; padding: .75em .9em; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); width: 100%; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 79, 168, .15); }
.field.bad input, .field.bad textarea { border-color: var(--red); }
.form .btn { justify-self: start; }
.form-msg { margin: 0; font-size: .92rem; min-height: 1.4em; color: var(--red); }
.form-notice { margin: 0; padding: .8em 1em; border-radius: 10px; font-weight: 500; background: #e6eefb; color: var(--blue-deep); }
.form-notice.bad { background: #fde8eb; color: #8a0b20; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.foot { background: var(--blue-deep); color: #fff; padding-block: 3.2rem calc(2rem + env(safe-area-inset-bottom, 0px)); position: relative; }
.foot::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--flag); }
.foot .muted { color: rgba(255, 255, 255, .75); }
.foot-inner { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 3rem; align-items: start; }
.foot-inner > p { grid-column: 1 / -1; margin: 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .15); max-width: none; }
.foot-si { font-family: var(--f-si); font-size: 1.3rem; font-weight: 600; color: var(--yellow); margin: 0 0 .2em; }
.foot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.foot nav a { color: inherit; text-decoration: none; opacity: .85; }
.foot nav a:hover { opacity: 1; color: var(--yellow); }
.foot-social { display: flex; gap: .6rem; margin-top: 1rem; }
.foot-social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .3); color: #fff; transition: all .3s; }
.foot-social a:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); transform: translateY(-2px); }
.foot-social svg { width: 17px; height: 17px; fill: currentColor; }
.foot-widgets { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1.5rem; }
.foot-widgets a { color: var(--yellow); }
.foot-widget-title { font-size: 1.1rem; color: var(--yellow); }
@media (max-width: 720px) { .foot-inner { grid-template-columns: 1fr; } }

/* ---------- Sinhala text ---------- */
body.lang-si { line-height: 1.85; }
body.lang-si h1, body.lang-si h2, body.lang-si h3 { line-height: 1.4; }
body.lang-si .page-head h1 { font-size: clamp(2rem, 3.6vw + 1rem, 3.6rem); }
body.lang-si .label, body.lang-si .eyebrow, body.lang-si .tile i, body.lang-si .tag, body.lang-si .bank dt,
body.lang-si .contact-list li > span:first-child, body.lang-si .poya-count span, body.lang-si .quote-band footer,
body.lang-si .frame figcaption b, body.lang-si .hero .eyebrow { letter-spacing: 0; text-transform: none; font-size: .9rem; }
body.lang-si .hero-lead, body.lang-si .lead { line-height: 1.9; }
body.lang-si .poya-name { font-family: var(--f-si); font-weight: 600; font-size: 1.4rem; }
body.lang-si #menu a { font-family: var(--f-si); }
body.lang-si .btn { font-family: var(--f-si); line-height: 1.3; }

/* ---------- WordPress ---------- */
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }
.note-tag { display: inline-block; margin-left: .4em; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-ink); }
.pager { margin-top: 2.5rem; }
.pager .nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.pager .page-numbers { padding: .5em .9em; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.pager .page-numbers.current { background: var(--blue); color: #fff; border-color: var(--blue); }
.entry-content { max-width: 72ch; }
.entry-content > * + * { margin-top: 1em; }
.entry-content p { margin-bottom: 0; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content img { height: auto; border-radius: 10px; }
.entry-content a { text-underline-offset: 3px; }
.entry-content blockquote { margin-inline: 0; padding-left: 1.2em; border-left: 3px solid var(--orange); font-family: var(--f-display); font-size: 1.25rem; }
.entry-content .wp-block-image figcaption, .entry-content figcaption { font-size: .85rem; color: var(--muted); text-align: center; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content .alignwide { max-width: 1100px; }
.lead.entry-content { font-size: 1.2rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

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