/* Janani Institute: public website. Colours from the design system:
   navy and cream first, calm brick red and mustard gold as accents. */
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Noto Sans Sinhala"; font-weight: 400; font-display: swap; src: url(/fonts/noto-sans-sinhala-sinhala-400-normal.woff2) format("woff2"); unicode-range: U+0D80-0DFF, U+200C-200D; }
@font-face { font-family: "Noto Sans Sinhala"; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-sinhala-sinhala-700-normal.woff2) format("woff2"); unicode-range: U+0D80-0DFF, U+200C-200D; }

:root {
  --surface: #fffbf2; --surface-raised: #ffffff; --surface-sunken: #f7efdd; --line: #eadfcb;
  --ink: #14213d; --ink-muted: #5b6275; --navy: #14213d; --on-navy: #fffbf2;
  --sun: #e3b54a; --sun-soft: #faefd2; --sun-deep: #6b4e0a;
  --flame: #b4443a; --flame-strong: #983830; --flame-deep: #8c3129;
  --teal: #0f7c74; --teal-soft: #d9f2ef; --teal-deep: #0b5f59;
  --font: "Plus Jakarta Sans", "Noto Sans Sinhala", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-si: "Noto Sans Sinhala", "Iskoola Pota", "Plus Jakarta Sans", sans-serif;
  --radius-sm: 8px; --radius-md: 16px; --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(20,33,61,.06), 0 8px 24px rgba(20,33,61,.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 16px/1.65 var(--font); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; } /* keeps the footer at the bottom of short pages */
[lang="si"] { font-family: var(--font-si); line-height: 1.75; }
a { color: var(--flame-deep); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -.015em; margin: 0 0 .5em; }
h2 { font-size: 24px; font-weight: 700; margin: 0 0 .5em; }
h3 { font-size: 19px; font-weight: 700; margin: 0 0 .3em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.page { padding-top: 36px; padding-bottom: 56px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-muted); }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Header */
.top { background: var(--surface-raised); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 80px; height: auto; border-radius: var(--radius-sm); display: block; }
.brand-si { display: block; font-weight: 700; font-size: 15px; line-height: 1.5; }
.brand-en { display: block; font-size: 13px; color: var(--ink-muted); line-height: 1.3; }
.nav-wide { display: flex; gap: 6px; }
.nav-wide a, .nav-narrow nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: var(--radius-pill); }
.nav-wide a:hover, .nav-narrow nav a:hover { background: var(--sun-soft); }
.nav-wide a[aria-current], .nav-narrow nav a[aria-current] { background: var(--navy); color: var(--on-navy); }
.nav-narrow { display: none; }
.nav-narrow summary { cursor: pointer; list-style: none; font-weight: 700; border: 2px solid var(--ink); border-radius: var(--radius-pill); padding: 6px 16px; }
.nav-narrow summary::-webkit-details-marker { display: none; }
.nav-narrow nav { position: absolute; right: 12px; left: 12px; margin-top: 10px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow); padding: 8px; display: grid; z-index: 5; }
@media (max-width: 860px) { .nav-wide { display: none; } .nav-narrow { display: block; } .brand img { width: 64px; } .brand-si { font-size: 14px; } }

/* Buttons */
.btn { display: inline-block; font: 700 15px/20px var(--font); padding: 13px 24px; border-radius: var(--radius-pill); border: 2px solid transparent; text-decoration: none; cursor: pointer; }
.btn-main { background: var(--flame); color: #fff; } .btn-main:hover { background: var(--flame-strong); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; } .btn-outline:hover { background: var(--sun-soft); }
.btn-small { padding: 7px 16px; font-size: 14px; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* Home */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.eyebrow, .eyebrow-title { display: inline-block; font: 700 12px/16px var(--font); letter-spacing: .08em; text-transform: uppercase; background: var(--sun-soft); color: var(--sun-deep); padding: 5px 12px; border-radius: var(--radius-pill); margin: 0 0 14px; }
.eyebrow-title { background: none; padding: 0; color: var(--ink-muted); }
.hl { background: var(--sun); color: var(--ink); padding: 0 8px; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tag-si { color: var(--ink-muted); font-size: 17px; }
.lead { font-size: 17px; color: var(--ink-muted); max-width: 460px; }
.latest { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow); }
.latest-item { display: block; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.latest-item:first-of-type { border-top: 0; padding-top: 0; }
.latest-item strong { display: block; margin-top: 6px; font-size: 16px; line-height: 1.4; }
.latest-item:hover strong { text-decoration: underline; }
.more { display: inline-block; margin-top: 8px; font-weight: 700; }
.band { background: var(--navy); color: var(--on-navy); padding: 44px 0; }
.band-title { color: var(--sun); font-size: clamp(26px, 4vw, 32px); font-weight: 800; text-shadow: 3px 3px 0 #000; margin-bottom: 24px; }
.band-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.band-teacher { display: flex; gap: 14px; align-items: center; color: var(--on-navy); text-decoration: none; background: rgba(255,251,242,.06); border-radius: var(--radius-md); padding: 12px; }
.band-teacher:hover { background: rgba(255,251,242,.12); }
.band-teacher strong { display: block; } .band-teacher span span { display: block; font-size: 14px; opacity: .85; }
.band-more { display: inline-block; margin-top: 20px; color: var(--sun); font-weight: 700; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 32px; } }

/* Badges (news categories) */
.badge { display: inline-block; color: #fff; font: 700 12px/16px var(--font); padding: 4px 10px; border-radius: var(--radius-pill); }
.c-14213D { background: #14213D; } .c-B4443A { background: #B4443A; } .c-0F7C74 { background: #0F7C74; } .c-6B4E0A { background: #6B4E0A; }
.c-B45309 { background: #B45309; } .c-C2410C { background: #C2410C; } .c-B91C1C { background: #B91C1C; } .c-BE185D { background: #BE185D; }
.c-7E22CE { background: #7E22CE; } .c-6D28D9 { background: #6D28D9; } .c-1D4ED8 { background: #1D4ED8; } .c-0E7490 { background: #0E7490; }
.c-0F766E { background: #0F766E; } .c-15803D { background: #15803D; } .c-4D7C0F { background: #4D7C0F; } .c-475569 { background: #475569; }

/* News */
.filter { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.filter label { font-weight: 700; }
.filter select { font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); min-width: 200px; }
.news-card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px 22px; margin-bottom: 14px; }
.news-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--ink-muted); margin-bottom: 8px; }
.pin { font-weight: 700; color: var(--sun-deep); }
.news-card h2 { font-size: 21px; margin-bottom: .4em; }
.news-card p { overflow-wrap: anywhere; }

/* Classes */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--surface-raised); padding: 6px 14px; border-radius: var(--radius-pill); font-weight: 700; font-size: 14px; }
.chip[aria-current] { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.grade-group { margin-bottom: 32px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.class-card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; }
.class-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.class-when { font-weight: 700; margin: 6px 0 2px; }
.class-teacher, .class-notes { margin: 0; color: var(--ink-muted); }
.class-notes { margin-top: 8px; font-size: 15px; }
.status { font: 700 12px/16px var(--font); padding: 4px 10px; border-radius: var(--radius-pill); white-space: nowrap; }
.status-open { background: var(--teal-soft); color: var(--teal-deep); }
.status-full { background: var(--surface-sunken); color: var(--ink-muted); }
.note { color: var(--ink-muted); }

/* Teachers */
.avatar { display: block; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-lg { width: 160px; height: 160px; } .avatar-sm { width: 72px; height: 72px; }
.avatar-initials { background: var(--sun); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.avatar-lg.avatar-initials { font-size: 52px; } .avatar-sm.avatar-initials { font-size: 24px; }
.teacher-list { display: grid; gap: 20px; }
.teacher { display: flex; gap: 28px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 24px; scroll-margin-top: 20px; }
.teacher-subjects { font-weight: 700; color: var(--teal-deep); margin-bottom: .2em; }
.teacher-qual { font-style: italic; color: var(--ink-muted); }
.teacher-classes { margin: 0 0 1em; padding-left: 20px; }
.teacher-contact { font-weight: 700; }
@media (max-width: 640px) { .teacher { flex-direction: column; gap: 16px; } .avatar-lg { width: 120px; height: 120px; } }

/* About / contact */
.about-si { font-size: 22px; font-weight: 700; margin-bottom: .2em; }
.about-tag { color: var(--ink-muted); margin-bottom: 1.5em; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.contact-item { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px 22px; }
.contact-item h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.big-link { font-size: 24px; font-weight: 800; color: var(--ink); }

/* Footer */
.foot { background: var(--navy); color: var(--on-navy); padding: 36px 0; border-top: 1px solid rgba(255,251,242,.14); }
.foot-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot a { color: var(--sun); }
.foot p { margin: 0 0 .4em; }
.foot-si { font-weight: 700; font-size: 17px; }
.foot-tag { opacity: .85; font-size: 15px; }
