/* Shilbarihat High School — public site styles.
   Layout: a school "record" — masthead, sticky forest nav, the notice board as the centrepiece; one 1120px column. */
:root {
  --paper: #FBFAF7;
  --surface: #FFFFFF;
  --surface-2: #F3F4F0;
  --ink: #14211C;
  --muted: #5A6A62;
  --forest: #1E4D3B;
  --forest-deep: #123227;
  --forest-soft: #E7EFEA;
  --on-forest: #FFFFFF;
  --brass: #9C6B1E;
  --brass-bright: #B07C2A;
  --brass-soft: #F6EEDF;
  --alert: #A3322A;
  --alert-soft: #F9ECE9;
  --rule: #E2E4DE;
  --rule-strong: #CFD5CE;
  --band-ink: #D6E4DB;      /* text on the dark nav and footer bands */
  --band-bright: #FFFFFF;
  --scrim: rgba(10, 20, 16, .72); /* over photos, same in both themes */
  --on-photo: #FFFFFF;
  --backdrop: rgba(8, 14, 11, .9);
  --shadow: 0 1px 2px rgba(18, 50, 39, .06), 0 8px 24px -16px rgba(18, 50, 39, .28);

  --f-display: "Newsreader", "Noto Serif Bengali", Georgia, "Times New Roman", serif;
  --f-body: "Source Sans 3", "Noto Sans Bengali", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-bn: "Noto Serif Bengali", "Newsreader", serif;
  --maxw: 1120px;
  --gutter: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101613; --surface: #17201C; --surface-2: #1D2823; --ink: #E8EDE9; --muted: #9AAAA1;
    --forest: #8FCFAF; --forest-deep: #0C1512; --forest-soft: #1B2A23; --on-forest: #0C1512;
    --brass: #D9A653; --brass-bright: #E7BC72; --brass-soft: #2A2417;
    --alert: #F08A7E; --alert-soft: #3A201C;
    --rule: #26332C; --rule-strong: #33443A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101613; --surface: #17201C; --surface-2: #1D2823; --ink: #E8EDE9; --muted: #9AAAA1;
  --forest: #8FCFAF; --forest-deep: #0C1512; --forest-soft: #1B2A23; --on-forest: #0C1512;
  --brass: #D9A653; --brass-bright: #E7BC72; --brass-soft: #2A2417;
  --alert: #F08A7E; --alert-soft: #3A201C;
  --rule: #26332C; --rule-strong: #33443A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.bn { font-family: var(--f-bn); font-weight: 600; line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--forest); color: var(--on-forest); padding: 8px 14px; border-radius: 3px; z-index: 100; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin-bottom: 10px; }
.eyebrow .bn { letter-spacing: 0; text-transform: none; font-size: 13px; font-family: var(--f-body); font-weight: 600; }
.lede { color: var(--muted); font-size: 17px; max-width: 62ch; }
.muted { color: var(--muted); }

/* ---------- urgent-notice ticker ---------- */
.ticker { background: var(--alert-soft); border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.ticker .wrap { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.ticker-label {
  flex: none; background: var(--alert); color: var(--surface); font-weight: 700; font-size: 12px;
  letter-spacing: .06em; padding: 3px 9px; border-radius: 2px;
}
.ticker-viewport { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.ticker.moving .ticker-viewport { mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
.ticker-track { display: flex; width: max-content; }
.ticker.moving .ticker-track { animation: tick var(--dur, 30s) linear infinite; }
.ticker-group { display: flex; gap: 48px; padding-right: 48px; white-space: nowrap; }
.ticker.static .ticker-group { white-space: normal; flex-wrap: wrap; gap: 2px 28px; padding-right: 0; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-group a, .ticker-group span { text-decoration: none; color: var(--ink); font-weight: 600; }
.ticker-group a:hover { text-decoration: underline; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- utility bar + masthead ---------- */
.util { border-bottom: 1px solid var(--rule); background: var(--surface); font-size: 13.5px; color: var(--muted); }
.util .wrap { display: flex; gap: 8px 20px; align-items: center; justify-content: space-between; min-height: 40px; flex-wrap: wrap; padding-block: 6px; }
.util-list { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; }
.util a { text-decoration: none; }
.util a:hover { color: var(--ink); }

.masthead { background: var(--surface); border-bottom: 1px solid var(--rule); }
.masthead .wrap { display: flex; gap: 18px; align-items: center; padding-block: 18px; }
.crest { flex: none; width: 58px; height: 64px; }
.names { flex: 1 1 auto; min-width: 0; }
.names .bn { font-size: 19px; color: var(--forest); margin-bottom: 1px; }
.names h1 { font-size: 27px; line-height: 1.15; font-weight: 600; }
.names h1 a { text-decoration: none; }
.names .sub { font-size: 13px; color: var(--muted); margin-top: 3px; letter-spacing: .02em; }

nav.main { background: var(--forest-deep); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; }
nav.main .wrap { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
nav.main .wrap::-webkit-scrollbar { display: none; }
nav.main a {
  flex: none; color: var(--band-ink); text-decoration: none; font-size: 14px; font-weight: 600;
  letter-spacing: .03em; padding: 13px 14px; display: block; border-bottom: 2.5px solid transparent;
}
nav.main a:hover { color: var(--band-bright); border-bottom-color: var(--brass-bright); }
nav.main a[aria-current="page"] { color: var(--band-bright); border-bottom-color: var(--brass-bright); }
nav.main a:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: -4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 14.5px;
  padding: 11px 20px; border-radius: 3px; border: 1.5px solid var(--forest); cursor: pointer;
  background: var(--forest); color: var(--on-forest); letter-spacing: .02em; line-height: 1.2;
}
.btn.ghost { background: transparent; color: var(--forest); }
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .55; cursor: progress; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.textlink { color: var(--forest); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.textlink:hover { border-bottom-color: var(--forest); }

/* ---------- hero ---------- */
.hero { padding-block: 52px 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h2 { font-size: 44px; line-height: 1.1; margin-bottom: 16px; }
.hero .lede { font-size: 18px; }
.hero-photo {
  aspect-ratio: 4 / 3; max-width: 100%; border-radius: 4px; overflow: hidden; position: relative;
  background: var(--surface-2); border: 1px solid var(--rule-strong);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo svg { width: 100%; height: 100%; display: block; }

.facts { margin-top: 48px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 18px 22px; border-right: 1px solid var(--rule); margin: 0; }
.fact:last-child { border-right: 0; }
.fact dt { font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.fact dd { margin: 5px 0 0; font-family: var(--f-display); font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- sections ---------- */
.section { padding-block: 64px; }
.section.band { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sec-head { margin-bottom: 28px; display: flex; gap: 16px 32px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.sec-head > div { min-width: 0; }
.sec-head h2 { font-size: 31px; }
.sec-head p { margin-top: 8px; }

/* ---------- notice board ---------- */
.board { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--forest); border-radius: 2px; box-shadow: var(--shadow); }
.notice { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 8px 20px; align-items: baseline; padding: 18px 24px; border-bottom: 1px solid var(--rule); scroll-margin-top: 70px; }
.notice:last-child { border-bottom: 0; }
.notice.is-target { background: var(--brass-soft); }
.notice .date { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--brass); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.notice .body { min-width: 0; }
.notice .title { font-family: var(--f-display); font-size: 19px; line-height: 1.35; overflow-wrap: anywhere; }
.notice .title a { text-decoration: none; }
.notice .title a:hover { text-decoration: underline; text-decoration-color: var(--rule-strong); }
.notice .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.notice .details { color: var(--muted); font-size: 14.5px; margin-top: 6px; white-space: pre-line; overflow-wrap: anywhere; }
.notice .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tag { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 2px; border: 1px solid var(--rule-strong); color: var(--muted); line-height: 1.5; }
.tag.new { border-color: var(--brass); color: var(--brass); }
.tag.urgent { border-color: var(--alert); color: var(--alert); background: var(--alert-soft); }
.dl { font-size: 13px; font-weight: 600; color: var(--forest); text-decoration: none; white-space: nowrap; border: 1px solid var(--rule-strong); padding: 5px 11px; border-radius: 2px; display: inline-flex; align-items: center; gap: 6px; }
.dl:hover { border-color: var(--forest); background: var(--forest-soft); }
.dl svg { flex: none; }
.board-foot { padding: 14px 24px; background: var(--surface-2); font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.empty { padding: 28px 24px; color: var(--muted); font-size: 15px; }
.skeleton { height: 18px; border-radius: 2px; background: var(--surface-2); margin: 22px 24px; }

/* notices page filters */
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-bottom: 14px; }
.search { position: relative; }
.search input { padding-left: 38px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chips button {
  font-size: 13.5px; font-weight: 600; cursor: pointer; background: transparent; color: var(--muted);
  border: 1px solid var(--rule-strong); padding: 6px 14px; border-radius: 100px;
}
.chips button:hover { color: var(--ink); }
.chips button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--on-forest); }
.chips .count { opacity: .7; font-weight: 500; margin-left: 4px; font-variant-numeric: tabular-nums; }
.more-row { display: flex; justify-content: center; margin-top: 24px; }

/* ---------- at a glance + headmaster ---------- */
.glance { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.glance > div { padding: 26px 22px 0; border-right: 1px solid var(--rule); }
.glance > div:last-child { border-right: 0; }
.glance .n { font-family: var(--f-display); font-size: 40px; line-height: 1; color: var(--forest); font-variant-numeric: tabular-nums; }
.glance .l { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

.hm { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 56px; }
.hm-portrait { aspect-ratio: 3 / 4; max-width: 100%; border: 1px solid var(--rule-strong); border-radius: 3px; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; color: var(--muted); }
.hm-portrait img { width: 100%; height: 100%; object-fit: cover; }
.hm blockquote { margin: 0; font-family: var(--f-display); font-size: 20px; line-height: 1.55; border-left: 3px solid var(--brass); padding-left: 22px; white-space: pre-line; }
.sig { margin-top: 20px; font-size: 14.5px; }
.sig strong { display: block; font-size: 16px; font-family: var(--f-display); font-weight: 600; }
.sig span { color: var(--muted); }

/* ---------- academics ---------- */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.cols article { background: var(--surface); padding: 26px 24px; min-width: 0; }
.cols h3 { font-size: 20px; margin-bottom: 6px; }
.cols p { color: var(--muted); font-size: 15px; }
.cols ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.cols li { margin-bottom: 5px; }
.stream-tag { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); font-weight: 700; }

/* ---------- gallery ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile {
  position: relative; aspect-ratio: 4 / 3; max-width: 100%; border: 1px solid var(--rule-strong); border-radius: 3px;
  background: var(--surface-2); overflow: hidden; cursor: zoom-in; padding: 0; display: block; color: inherit; width: 100%;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile:hover img { transform: scale(1.03); }
.tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px; text-align: left;
  background: linear-gradient(180deg, transparent, var(--scrim)); color: var(--on-photo); font-size: 13px; font-weight: 600; line-height: 1.3;
}
.tile .cap small { display: block; font-weight: 500; opacity: .85; font-size: 12px; }
.tile.slot { cursor: default; background: repeating-linear-gradient(135deg, var(--surface-2) 0 11px, var(--surface) 11px 22px); }
.tile.slot .cap { background: none; color: var(--muted); }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 90; background: var(--backdrop); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; color: var(--on-photo); }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.lb-stage { --lb-pad: 56px; position: relative; min-height: 0; }
.lb-stage img { position: absolute; top: 0; left: var(--lb-pad); width: calc(100% - 2 * var(--lb-pad)); height: 100%; object-fit: contain; }
.lb-cap { padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 15px; }
.lb-cap small { display: block; opacity: .75; font-size: 13px; margin-top: 2px; }
.lb button { background: transparent; color: var(--on-photo); border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; }
.lb button:hover { background: rgba(255, 255, 255, .12); }
.lb .prev, .lb .next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
.lb .prev { left: 8px; }
.lb .next { right: 8px; }

/* ---------- admissions ---------- */
.adm { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: start; }
.adm > * { min-width: 0; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; padding-bottom: 20px; border-left: 1px solid var(--rule); margin-left: 13px; }
.steps { counter-reset: s; }
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: -13px; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--forest); color: var(--on-forest); display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.steps h4 { font-size: 17px; margin-bottom: 3px; }
.steps p { font-size: 14.5px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 2px; padding: 24px; }
.panel h3 { font-size: 19px; margin-bottom: 12px; }
.panel dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 14.5px; }
.panel dt { color: var(--muted); }
.panel dd { margin: 0; font-weight: 600; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact > * { min-width: 0; }
.addr { font-size: 15.5px; line-height: 1.7; }
.addr .row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.addr .row > span:first-child { color: var(--muted); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; padding-top: 3px; }
.addr strong { display: block; font-family: var(--f-display); font-size: 18px; font-weight: 600; }
.addr a { color: var(--forest); text-underline-offset: 3px; overflow-wrap: anywhere; }
.map { margin-top: 18px; border: 1px solid var(--rule-strong); border-radius: 3px; overflow: hidden; aspect-ratio: 16 / 10; max-width: 100%; background: var(--surface-2); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

.stack { display: grid; gap: 14px; }
.stack > * { min-width: 0; }
label, .label { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; }
input, textarea, select {
  font: inherit; font-size: 16px; width: 100%; padding: 10px 12px; margin-top: 5px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: 3px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--forest); outline-offset: -1px; border-color: var(--forest); }
.formnote { font-size: 14px; color: var(--muted); }
.formnote.ok { color: var(--forest); font-weight: 600; }
.formnote.err { color: var(--alert); font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- page header (inner pages) ---------- */
.page-head { padding-block: 44px 8px; }
.page-head h2 { font-size: 38px; line-height: 1.15; }
.page-head p { margin-top: 10px; }

/* ---------- footer ---------- */
footer.site { background: var(--forest-deep); color: var(--band-ink); padding-block: 46px 30px; margin-top: 20px; }
footer.site a { color: var(--band-ink); }
footer.site a:hover { color: var(--band-bright); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
footer.site h4 { color: var(--band-bright); font-size: 16px; margin-bottom: 10px; }
footer.site ul { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
footer.site li { margin-bottom: 7px; }
.foot-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .hm, .adm, .contact { grid-template-columns: 1fr; }
  .hm-portrait { max-width: 200px; }
  .facts, .glance { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(2), .glance > div:nth-child(2) { border-right: 0; }
  .fact:nth-child(1), .fact:nth-child(2) { border-bottom: 1px solid var(--rule); }
  .glance > div { padding-bottom: 20px; }
  .cols { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .hero h2 { font-size: 34px; }
  nav.main a { padding: 12px 12px; font-size: 13.5px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .masthead .wrap { gap: 12px; padding-block: 14px; }
  .crest { width: 44px; height: 49px; }
  .names .bn { font-size: 16px; }
  .names h1 { font-size: 21px; }
  .hero { padding-block: 32px 0; }
  .hero h2 { font-size: 30px; }
  .section { padding-block: 48px; }
  .sec-head h2, .page-head h2 { font-size: 27px; }
  .notice { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 16px 18px; }
  .notice .actions { justify-content: flex-start; margin-top: 8px; }
  .facts, .glance { grid-template-columns: 1fr 1fr; }
  .fact { padding: 14px 14px; }
  .fact dd { font-size: 18px; }
  .glance .n { font-size: 32px; }
  .grid { gap: 8px; }
  .toolbar { grid-template-columns: 1fr; }
  .lb-stage { --lb-pad: 8px; }
  .lb .prev, .lb .next { top: auto; bottom: -54px; transform: none; }
  .lb .prev { left: 14px; }
  .lb .next { right: 14px; }
  .lb-cap { padding-inline: 70px; }
  .addr .row { grid-template-columns: 1fr; gap: 2px; }
  .util .util-list:first-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
