
:root { --green: #1b6e12; --glow: 46, 160, 30; --tint: #e6f4df; --ink: #1e2b1c; }
html { scroll-behavior: smooth; }
.about-main { color: var(--ink); font-family: "Nunito Sans", sans-serif; overflow-x: hidden; }

/* Background: fits the screen; blurs and fades into light green while scrolling. */
.about-bg   { position: fixed; inset: 0; z-index: -2; background: var(--tint) url("Background%20puc.jpeg") center / cover no-repeat;
              transform: scale(1.08); filter: blur(calc(var(--p, 0) * 14px)); }
.about-tint { position: fixed; inset: 0; z-index: -1; background: var(--tint); opacity: calc(var(--p, 0) * .97); pointer-events: none; }
.read-bar   { position: fixed; top: 0; left: 0; width: 100%; height: 4px; z-index: 1000; pointer-events: none;
              background: linear-gradient(90deg, #45b52e, var(--green)); transform-origin: left; transform: scaleX(var(--read, 0)); }

/* Top part. */
.hero { min-height: 76vh; display: flex; flex-direction: column; padding: 26px 28px 40px; }
.back-btn {
  align-self: flex-start; padding: 8px 20px; border-radius: 999px; border: 2px solid var(--green); background: rgba(255,255,255,.85);
  color: var(--green); font: 700 .95rem "Nunito Sans", sans-serif; text-decoration: none; transition: background .25s, color .25s, box-shadow .25s;
}
.back-btn:hover, .back-btn:focus-visible { background: var(--green); color: #fff; box-shadow: 0 0 14px rgba(var(--glow), .6); }
.hero-title { margin: auto; display: flex; align-items: center; gap: 22px; }
.hero-title h1 { margin: 0; font: 700 clamp(2.6rem, 7vw, 5rem) "Source Serif 4", serif; color: #fff; text-shadow: 0 4px 18px rgba(0,0,0,.65); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.panel { background: rgba(255,255,255,.93); border-radius: 26px; padding: 30px 36px; box-shadow: 0 8px 26px rgba(0,0,0,.14); }
.panel p { margin: 0; font-size: 1.08rem; line-height: 1.8; }
h2, h3 { font-family: "Source Serif 4", serif; color: var(--green); }

/* Watermark of School Badge 3 behind a block. */
.wm { position: relative; isolation: isolate; overflow: hidden; }
.wm::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .1; background: url("School%20Badge%203.jpg") center / contain no-repeat; }

.about-school { max-width: 780px; margin: 0 auto; text-align: center; border: 2px solid rgba(var(--glow), .45); }
.about-school h2 { margin: 0 0 14px; font-size: 1.9rem; }

/* The green line that divides the page. */
.green-line { border: 0; height: 4px; margin: 60px 0; border-radius: 4px; box-shadow: 0 0 14px rgba(var(--glow), .6);
              background: linear-gradient(90deg, transparent, var(--green) 15%, #45b52e 50%, var(--green) 85%, transparent); }

/* Green bars (they grow upwards when they appear). */
.bars { display: inline-flex; align-items: flex-end; gap: 5px; height: 34px; }
.bars i { width: 11px; height: 45%; border-radius: 3px; background: linear-gradient(#45b52e, var(--green)); transform-origin: bottom; }
.bars i:nth-child(2) { height: 100%; } .bars i:nth-child(3) { height: 65%; }
/* The LOWER bars are inverted: a mirror image of the upper bars, hanging downwards. */
.bars.flip { align-items: flex-start; }
.bars.flip i { transform-origin: top; background: linear-gradient(var(--green), #45b52e); }
.bars.on-dark i { background: linear-gradient(#9cf07f, #2e9c1c); }
.reveal-on .bars i { transform: scaleY(0); transition: transform .8s ease; }
.reveal-on .bars i:nth-child(2) { transition-delay: .15s; } .reveal-on .bars i:nth-child(3) { transition-delay: .3s; }
.reveal-on .is-in .bars i, .reveal-on .hero .bars i { transform: none; }
.title-row, .id-label { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.title-row h2, .id-label h3 { margin: 0; font-size: 1.6rem; }
.title-row { margin-bottom: 18px; }

/* Recognition of W. H. Samaranayaka. */
.gratitude { max-width: 780px; margin: 72px auto; text-align: center; font: italic 500 1.2rem/1.8 "Source Serif 4", serif; color: #24511d; }
.credit-grid { display: grid; grid-template-columns: 300px 1fr; gap: 34px; align-items: start; margin-bottom: 30px; }
.credit-text h3, .docs-title { margin: 0 0 8px; font-size: 1.2rem; }
.credit-text p { margin-bottom: 18px; }
.docs-title { text-align: center; margin: 10px 0 16px; }

/* The empty frame of the documents. */
.doc {
  position: relative; overflow: hidden; display: grid; place-items: center; text-align: center; margin: 0; padding: 12px;
  border-radius: 20px; border: 3px solid rgba(var(--glow), .5); color: #3d6b36; font: 600 .95rem "Nunito Sans", sans-serif;
  background: repeating-linear-gradient(45deg, #eef6ea, #eef6ea 12px, #e2f0dc 12px, #e2f0dc 24px);
}
.doc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.credits { background: #fff; }
.credit-photo { margin: 0; text-align: center; color: #3d6b36; font: 600 .95rem "Nunito Sans", sans-serif; }
.credit-photo img { display: block; width: 100%; height: auto; mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse at center, #000 62%, transparent 100%); }
.credit-photo figcaption { display: none; }
.credit-photo:not(:has(img)) figcaption { display: block; padding: 60px 0; }

/* School crest and flag images. */
.plain-img { display: grid; place-items: center; text-align: center; color: #3d6b36; font: 600 .95rem "Nunito Sans", sans-serif; }
.plain-img img { display: block; width: 100%; max-height: 340px; object-fit: contain; mix-blend-mode: multiply; }
.plain-img span { display: none; }
.plain-img.missing span { display: block; }
small { display: block; font-weight: 400; opacity: .8; }
.docs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.doc { width: 100%; aspect-ratio: 3 / 4; cursor: pointer; transition: transform .35s ease, box-shadow .45s ease; }
.doc:hover, .doc:focus-visible { transform: scale(1.05); box-shadow: 0 0 0 2px rgba(var(--glow), .75), 0 0 24px 6px rgba(var(--glow), .5); outline: none; }

/* School mission and vision content. */
.motto { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px; margin-bottom: 34px; padding: 34px 28px 38px;
  border-radius: 44px; color: #fff; background: linear-gradient(90deg, #14540d, var(--green), #14540d);
  box-shadow: 0 0 0 3px rgba(var(--glow), .3), 0 8px 22px rgba(0,0,0,.2); }
.motto span, .motto em { font: 700 .85rem "Nunito Sans", sans-serif; font-style: normal; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.motto strong { font: italic 700 clamp(2.8rem, 8vw, 4.8rem)/1.1 "Source Serif 4", serif; }
.mv-grid { display: grid; grid-template-columns: 1fr 6px 1fr; gap: 26px; }
.mv-card { min-height: 320px; padding: 36px 34px; border-radius: 34px; color: #fff; box-shadow: 0 8px 26px rgba(0,0,0,.2);
  background: linear-gradient(rgba(8,44,8,.62), rgba(8,44,8,.72)), var(--img) center / cover, var(--green); }
.mv-card h2 { margin: 0 0 14px; color: #fff; font-size: 2rem; }
.mv-card p { margin: 0; font-size: 1.08rem; line-height: 1.8; }
.mission { --img: url("mission%20image.jpg"); } .vision { --img: url("vision%20image.jpg"); }
.mv-divide { border-radius: 6px; background: #7dff5c; box-shadow: 0 0 12px 3px #7dff5c, 0 0 34px 8px rgba(var(--glow), .8); animation: glow 2.6s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .65; } to { opacity: 1; } }

/* About Identity. */
.band { margin: 10px 0 40px; }
.id-row { display: grid; gap: 26px; align-items: center; margin-bottom: 40px; }
.id-crest  { grid-template-columns: 190px 1fr 1.3fr; }
.id-flag   { grid-template-columns: 1.3fr 1fr 190px; }
.id-anthem { grid-template-columns: 190px 1fr; }
.id-houses { grid-template-columns: 1fr 190px; }
.anthem { max-width: 460px; min-height: 420px; text-align: center; }
/* School anthem and verse layout. */
@media (min-width: 901px) {
  .id-anthem { grid-template-columns: minmax(120px, 1fr) minmax(0, 580px) minmax(120px, 1fr); }
  .id-anthem .id-label { grid-column: 1; justify-self: center; }
  .anthem { grid-column: 2; width: 100%; max-width: 580px; margin-inline: auto; }
}
.anthem p + p { margin-top: 18px; }

/* School houses and their colour markers. */
.houses { list-style: none; margin: 0 0 60px; padding: 0; display: flex; justify-content: center; align-items: flex-end; gap: 26px; }
.houses li { flex: 1; max-width: 150px; text-align: center; }
.bar { display: flex; align-items: center; justify-content: center; padding: 14px 8px; box-sizing: border-box; height: 230px; border-radius: 18px 18px 8px 8px; background: var(--house); transform-origin: bottom; box-shadow: 0 8px 20px rgba(0,0,0,.2); transition: box-shadow .45s ease; }
.houses li:hover .bar { box-shadow: 0 0 0 3px #fff, 0 0 28px 8px var(--house); }
.bar b { color: #fff; text-align: center; font: 700 1.05rem "Nunito Sans", sans-serif; overflow-wrap: anywhere; text-shadow: 0 1px 5px rgba(0,0,0,.6); }
.reveal-on .houses .bar { transform: scaleY(0); transition: transform .9s ease, box-shadow .45s ease; transition-delay: calc(var(--col, 0) * 120ms); }
.reveal-on .houses .is-in .bar { transform: none; }

/* Same fade in/out while scrolling as the news page. */
.reveal-on .item { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; transition-delay: calc(var(--col, 0) * 90ms); }
.reveal-on .item.is-in { opacity: 1; transform: none; }
.reveal-on .doc.item { transition: opacity .7s ease, transform .35s ease, box-shadow .45s ease; }

/* Full-size image viewer. */
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff; cursor: pointer;
  background: var(--green); color: #fff; font-size: 1.3rem; box-shadow: 0 0 16px rgba(var(--glow), .7); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
.to-top.show { opacity: 1; pointer-events: auto; } .to-top:hover { transform: translateY(-3px); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(0,0,0,.82); }
.lightbox img { display: block; max-width: 92vw; max-height: 88vh; border-radius: 12px; }

/* Responsive layout for tablets and phones. */
@media (max-width: 900px) {
  .credit-grid, .id-crest, .id-flag, .id-anthem, .id-houses { grid-template-columns: 1fr; }
  .id-flag .id-label, .id-houses .id-label { order: -1; }
  .photo-frame { max-width: 260px; margin: 0 auto; }
  .mv-grid { grid-template-columns: 1fr; } .mv-divide { height: 6px; }
  .panel { padding: 24px 22px; } .houses { gap: 12px; } .bar { height: 170px; }
}
@media (prefers-reduced-motion: reduce) { .mv-divide { animation: none; } html { scroll-behavior: auto; } }
