/* The school magazine (/magazine, worker/magazine.js, assets/js/magazine.js).
   Pages are drawn at a fixed size (460 × 648, like a printed page) and scaled to fit:
   a flip-book of two-page spreads on wide screens, one page under another on phones,
   and one page per sheet when printed or saved as a PDF. */

.mz-band { background: radial-gradient(ellipse at 50% 30%, #2a2c86 0, #15164f 72%); color: #fff; padding: 120px 0 40px; overflow: hidden; }
.mz-book-wrap { width: 100%; display: flex; justify-content: center; }
.mz-band .wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mz-intro { text-align: center; max-width: 640px; margin: 0; }
.mz-intro h1 { font-family: "Kalam", cursive; font-weight: 700; font-size: clamp(26px, 4vw, 36px); margin: 0; color: #fff; }
.mz-intro p { margin: 4px 0 0; color: rgba(255, 255, 255, .78); }
.mz-preview-note { background: #BFD730; color: #1F2070; font-weight: 600; padding: 8px 16px; border-radius: 10px; text-align: center; }
.mz-soon { text-align: center; max-width: 560px; margin: 0; color: rgba(255, 255, 255, .85); }
.mz-soon b { font-family: "Kalam", cursive; color: #BFD730; font-size: 22px; display: block; }

/* ----- One page ----- */
.mz-page {
  --lime: #BFD730; --deep: #1F2070; --indigo: #2E3092; --coral: #E0605A; --paper: #FFFDF7; --ink: #1e1f26; --muted: #5f606c;
  container-type: inline-size;
  position: relative; width: 460px; height: 648px; flex: none; overflow: hidden;
  background: var(--paper); color: var(--ink); padding: 34px 34px 48px;
  display: flex; flex-direction: column; gap: 10px;
  font-family: "Hind Guntur", system-ui, sans-serif; font-size: 13.5px; line-height: 1.55; text-align: left;
}
.mz-page img { display: block; max-width: 100%; }
.mz-page.is-hidden { opacity: .45; }
.mz-page.is-hidden::after { content: "Hidden"; position: absolute; top: 14px; right: 14px; background: var(--coral); color: #fff; font-weight: 700; font-size: 12px; padding: 2px 10px; border-radius: 10px; }
.mz-kicker { margin: 0; font-family: "Kalam", cursive; font-weight: 700; color: var(--coral); font-size: 15px; }
.mz-h { margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 800; font-size: 32px; line-height: 1.05; color: var(--deep); text-wrap: balance; }
.mz-h[lang="hi"] { font-family: "Rozha One", serif; font-weight: 400; }
.mz-h--big { font-size: 44px; }
.mz-lead { margin: 0; color: var(--muted); }
.mz-by { margin: 0; font-family: "Kalam", cursive; color: var(--indigo); font-size: 16px; }
.mz-prose p { margin: 0 0 8px; }
.mz-prose[lang="hi"] { font-size: 15px; }
.mz-note { margin: auto 0 0; color: var(--muted); font-size: 12.5px; }
.mz-folio { position: absolute; left: 34px; right: 34px; bottom: 16px; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); border-top: 1px solid rgba(31, 32, 112, .15); padding-top: 6px; }
.mz-folio span:first-child { font-family: "Rozha One", serif; font-size: 13px; color: var(--indigo); }
.mz-more { margin-top: auto; font-family: "Kalam", cursive; font-weight: 700; color: var(--indigo); }

/* Cover */
.mz-cover { padding: 0; color: #fff; background: var(--deep); }
.mz-cover__photo { position: absolute; left: 0; width: 100%; top: -17%; height: 117%; object-fit: cover; object-position: 50% 100%; }
.mz-cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(21, 22, 79, .95) 0, rgba(21, 22, 79, .6) 34%, rgba(21, 22, 79, 0) 55%, rgba(21, 22, 79, 0) 72%, rgba(21, 22, 79, .85) 100%); }
.mz-cover__in { position: relative; z-index: 2; text-align: center; padding: 7cqi 8cqi 0; }
.mz-cover__logo { width: 56%; height: auto; margin: 0 auto; filter: drop-shadow(0 .4cqi 1.4cqi rgba(0, 0, 0, .45)); }
.mz-cover__title { margin: 4cqi 0 0; font-family: "Rozha One", serif; font-weight: 400; font-size: 22cqi; line-height: 1.05; color: #fff; }
.mz-cover__foot { position: absolute; z-index: 2; left: 0; right: 0; bottom: 5cqi; text-align: center; }
.mz-cover__session { display: flex; align-items: center; justify-content: center; gap: 2.4cqi; margin: 0 0 2.6cqi; color: var(--lime); font-size: 2.4cqi; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.mz-cover__session i { height: .3cqi; width: 12cqi; background: var(--lime); }
.mz-pill { display: inline-block; background: var(--lime); color: var(--deep); font-family: "Kalam", cursive; font-weight: 700; font-size: 3.4cqi; padding: .8cqi 2.8cqi .2cqi; border-radius: 18px 12px 20px 14px / 14px 20px 12px 18px; }

/* Back cover */
.mz-back { background: var(--deep); color: #fff; justify-content: center; text-align: center; }
.mz-back__in { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mz-back__logo { width: 70%; height: auto; }
.mz-back__line { margin: 10px 0 0; font-family: "Rozha One", serif; font-size: 64px; line-height: 1; color: #fff; }
.mz-back__tag { margin: 0; font-family: "Kalam", cursive; font-weight: 700; font-size: 22px; color: var(--lime); }
.mz-back__addr { margin: 12px 0 0; font-size: 13px; line-height: 1.7; }
.mz-back__small { margin: 0; font-size: 12px; opacity: .7; }
.mz-blank { background: var(--paper) repeating-linear-gradient(0deg, transparent 0 25px, rgba(74, 159, 216, .14) 25px 26px); justify-content: center; }
.mz-blank .mz-h { font-family: "Kalam", cursive; font-weight: 700; color: var(--indigo); }
.mz-blank p { margin: 0; font-size: 15px; }

/* Contents */
.mz-toc { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.mz-toc li { display: flex; align-items: baseline; gap: 8px; font-size: 16px; padding: 6px 0; border-bottom: 1px dotted rgba(31, 32, 112, .3); }
.mz-toc span { flex: 1; }
.mz-toc b { font-family: "Fraunces", Georgia, serif; color: var(--indigo); }

/* Board toppers */
.mz-toppers { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.mz-toppers li { text-align: center; font-size: 12px; line-height: 1.25; }
.mz-toppers img, .mz-face { width: 86px; height: 86px; border-radius: 50%; margin: 0 auto 6px; border: 3px solid var(--lime); object-fit: cover; object-position: top; }
.mz-face { display: grid; place-items: center; background: #F4F8E2; color: var(--indigo); font-family: "Kalam", cursive; font-size: 30px; font-weight: 700; }
.mz-toppers b { display: block; font-family: "Fraunces", Georgia, serif; color: var(--coral); font-size: 17px; }
.mz-toppers em { display: block; color: var(--muted); font-size: 11px; }

/* Achievements */
.mz-stars { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.mz-stars li { background: #fff; border: 1px solid rgba(31, 32, 112, .12); border-radius: 8px; padding: 10px 14px; box-shadow: 0 8px 18px -12px rgba(31, 32, 112, .45); }
.mz-stat { display: inline-block; background: var(--lime); color: var(--deep); font-family: "Kalam", cursive; font-weight: 700; font-size: 14px; padding: 1px 10px 0; border-radius: 12px; }
.mz-stars h3 { margin: 4px 0 0; font-family: "Fraunces", Georgia, serif; font-size: 17px; color: var(--deep); }
.mz-stars p { margin: 2px 0 0; font-size: 12.5px; }
.mz-stars span { font-size: 11px; color: var(--muted); }

/* Our year */
.mz-timeline { list-style: none; margin: 4px 0 0; padding: 0 0 0 16px; border-left: 3px solid var(--lime); display: grid; gap: 10px; }
.mz-timeline li { position: relative; }
.mz-timeline li::before { content: ""; position: absolute; left: -23px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--indigo); border: 2px solid var(--paper); }
.mz-timeline time { display: block; font-size: 11.5px; color: var(--coral); font-weight: 600; }
.mz-timeline b { font-family: "Fraunces", Georgia, serif; font-size: 16px; color: var(--deep); }
.mz-timeline p { margin: 0; font-size: 12px; color: var(--muted); }

/* Photo story */
.mz-photos { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; flex: 1; min-height: 0; }
.mz-photos figure { position: relative; margin: 0; min-height: 0; background: #fff; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .45); }
.mz-photos figure:nth-child(odd) { transform: rotate(-1deg); }
.mz-photos figure:nth-child(even) { transform: rotate(1deg); }
.mz-photos img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: cover; }
.mz-photos--1 { grid-template-columns: 1fr; }
.mz-photos--3 figure:first-child { grid-column: span 2; }
.mz-photos--1 figure, .mz-photos--2 figure { grid-column: span 2; }

/* Students' and teachers' work */
.mz-art { position: relative; margin: 0; flex: 1; min-height: 120px; }
.mz-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mz-clap { margin: auto 0 0; }
.mz-clap button { font: inherit; font-weight: 700; color: var(--deep); background: #F4F8E2; border: 2px solid var(--lime); border-radius: 20px; padding: 4px 14px; cursor: pointer; }
.mz-clap button[aria-pressed="true"] { background: var(--lime); }

/* ----- Flip-book (wide screens; built by magazine.js) ----- */
.mz-stage { width: 100%; display: flex; justify-content: center; align-items: flex-start; perspective: 2600px; }
.mz-book { position: relative; width: 920px; height: 648px; transform-style: preserve-3d; transform-origin: top center; transition: transform .9s cubic-bezier(.3, .7, .2, 1); transform: translateX(var(--shift, 0)) scale(var(--s, 1)); }
.mz-leaf { position: absolute; left: 460px; top: 0; width: 460px; height: 648px; transform-origin: left center; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.35, .65, .2, 1); cursor: pointer; }
.mz-leaf.is-turned { transform: rotateY(-180deg); }
.mz-side { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.mz-side--back { transform: rotateY(180deg); }
.mz-side--front::after, .mz-side--back::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40px; pointer-events: none; }
.mz-side--front::after { left: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent); }
.mz-side--back::after { right: 0; background: linear-gradient(270deg, rgba(0, 0, 0, .18), transparent); }
.mz-ctrl { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.mz-ctrl [hidden] { display: none; }
.mz-ctrl button.mz-turn { font-family: "Kalam", cursive; font-weight: 700; font-size: 20px; width: 52px; height: 46px; border: 2px solid #BFD730; color: #BFD730; background: transparent; border-radius: 30px 24px 32px 22px / 24px 32px 22px 30px; cursor: pointer; }
.mz-ctrl button.mz-turn:hover:not(:disabled) { background: #BFD730; color: #1F2070; }
.mz-ctrl button.mz-turn:disabled { opacity: .3; cursor: default; }
.mz-where { font-family: "Kalam", cursive; font-size: 18px; min-width: 110px; text-align: center; }
.mz-pdf { color: #fff; border-color: #BFD730; }

/* ----- Phones and narrow screens: one page under another ----- */
.mz-stack { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.mz-stack .mz-page { zoom: var(--z, 1); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .7); border-radius: 4px; }

@media (prefers-reduced-motion: reduce) { .mz-leaf, .mz-book { transition: none; } }

/* ----- Printing, or "Save as PDF": one page per sheet ----- */
@media print {
  @page { size: 460px 648px; margin: 0; }
  body > *:not(main), .masthead, .footer, .mz-intro, .mz-ctrl, .mz-soon, .mz-preview-note, .assistant, .ribbon { display: none !important; }
  .mz-band { background: none; padding: 0; }
  .mz-band .wrap { display: block; padding: 0; max-width: none; }
  .mz-stack { display: block; }
  .mz-stack .mz-page { zoom: 1; box-shadow: none; border-radius: 0; break-after: page; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mz-clap { display: none; }
  .mz-page.is-hidden { display: none; }
}
@media (max-width: 759px) { .mz-wide-only { display: none; } }
