/* assets/nbsx/pages.css — the inner-page kit (blueprint v2 §5 intro + §3).
   Loaded after core.css on every template in NBSX_TEMPLATE_SECTIONS, before
   the section stylesheets. Tokens and every shared class come from core.css;
   nothing here redefines .nbsx-sec / .nbsx-btn / .nbsx-form / .nbsx-media —
   each rule starts with one of this file's own names:

     .nbsx-pagehero   the page hero          (template-parts/nbsx-page-hero.php)
     .nbsx-anchors    the sticky anchor bar  (template-parts/nbsx-anchors.php)
     .nbsx-acc        the accordion          (template-parts/nbsx-accordion.php)
     .nbsx-rail       the numbered rail      (template-parts/nbsx-rail.php)
     .nbsx-pform      the enquiry form       (template-parts/nbsx-page-form.php)
     .nbsx-pair       photo + text row       (markup written by the page)
     .nbsx-prose      a 720px measure for a run of ACF paragraphs
     .nbsx-anchor     scroll-margin for an anchor target (pages.js adds it for you)

   Motion: transform / opacity only, house ease, plus the paint-only exceptions
   of §3.9 (background-color, border-color, colour) and — for the rail's line —
   stroke-dashoffset, which changes no layout. No !important, no box-shadow on
   content, no height/width transitions. Reduced motion is handled at the end.

   Every component except .nbsx-anchors expects to sit inside a .nbsx-sec, which
   is where core puts the tokens. .nbsx-anchors is a bar between sections, so it
   carries the subset of tokens it needs itself. */

/* ══ page hero ══════════════════════════════════════════════════════════════
   White band, eyebrow → H1 → one lede → one or two buttons, optional square
   photo right. Extra top padding clears the fixed 72px header. */
.nbsx-pagehero{padding-top:clamp(128px,16vh,192px)}
.nbsx-pagehero__inner{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,clamp(280px,32vw,440px));gap:clamp(32px,5vw,80px);align-items:center}
.nbsx-pagehero--noimg .nbsx-pagehero__inner,
.nbsx-pagehero--center .nbsx-pagehero__inner{grid-template-columns:minmax(0,1fr)}
.nbsx-pagehero__text{min-width:0}
.nbsx-pagehero--center .nbsx-pagehero__text{max-width:900px;margin-inline:auto;text-align:center}
.nbsx-pagehero__eyebrow{margin-bottom:20px}
.nbsx-pagehero__h1{font-size:clamp(56px,7vw,96px);font-weight:500;letter-spacing:-.03em;line-height:1.02;margin:0;text-wrap:balance}
.nbsx-pagehero__lede{font-size:clamp(17px,1.35vw,20px);line-height:1.55;color:var(--muted);max-width:56ch;margin:24px 0 0}
.nbsx-pagehero--center .nbsx-pagehero__lede{margin-inline:auto}
.nbsx-pagehero__lede p{margin:0 0 12px}
.nbsx-pagehero__lede p:last-child{margin-bottom:0}
.nbsx-pagehero__actions{display:flex;flex-wrap:wrap;gap:12px;margin:36px 0 0}
.nbsx-pagehero--center .nbsx-pagehero__actions{justify-content:center}
.nbsx-pagehero__facts{list-style:none;margin:40px 0 0;padding:24px 0 0;border-top:1px solid var(--hair);display:flex;flex-wrap:wrap;gap:16px clamp(24px,3vw,48px)}
.nbsx-pagehero__fact{display:flex;flex-direction:column;gap:4px;min-width:0}
.nbsx-pagehero__fact-label{font-size:var(--t-eyebrow);font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);line-height:1.3}
.nbsx-pagehero__fact-value{font-size:var(--t-small);font-weight:500;line-height:1.35}
.nbsx-pagehero__media{aspect-ratio:1/1;width:100%;justify-self:end}
.nbsx-pagehero__img{width:100%;height:100%;object-fit:cover}

@media (max-width:1024px){
  .nbsx-pagehero__inner{grid-template-columns:minmax(0,1fr) minmax(0,300px);gap:32px}
}
@media (max-width:700px){
  .nbsx-pagehero{padding-top:clamp(112px,18vh,152px)}
  .nbsx-pagehero__inner{grid-template-columns:minmax(0,1fr);gap:32px}
  .nbsx-pagehero__lede{margin-top:20px}
  .nbsx-pagehero__actions{margin-top:28px}
  .nbsx-pagehero__media{order:-1;aspect-ratio:4/3;justify-self:stretch}
  .nbsx-pagehero__facts{margin-top:32px;gap:16px 24px}
}

/* ══ sticky anchor bar ══════════════════════════════════════════════════════
   Sticks under the fixed header. pages.js toggles .is-stuck from the sentinel
   that precedes it (core's single observer), and the state is paint-only: the
   hairline appears, nothing moves. Horizontally scrollable ≤700px. */
.nbsx-anchors{
  --ink:#221c4a; --paper:#fff; --muted:#6f6890; --hair:rgba(34,28,74,.14);
  --indigo:#4800FF; --ease:cubic-bezier(.65,0,.35,1);
  --t-small:15px; --pad-x:clamp(20px,4vw,64px);
  position:sticky;top:88px;z-index:400;
  font-family:"Epilogue",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  color:var(--ink);background:var(--paper);
  border-top:1px solid transparent;border-bottom:1px solid transparent;
  transition:border-color .25s var(--ease),background-color .25s var(--ease);
}
.nbsx-anchors *{box-sizing:border-box}
.nbsx-anchors.is-stuck{border-bottom-color:var(--hair)}
.nbsx-anchors__sentinel{display:block;height:1px;margin:0;padding:0}
.nbsx-anchors__inner{display:flex;align-items:center;gap:24px;min-height:56px}
.nbsx-anchors__list{list-style:none;display:flex;align-items:center;gap:clamp(16px,2vw,32px);margin:0;padding:0;min-width:0;flex:1 1 auto;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}
.nbsx-anchors__list::-webkit-scrollbar{display:none}
.nbsx-anchors__item{margin:0;flex:none}
.nbsx-anchors__link{
  display:inline-block;padding:16px 0;white-space:nowrap;text-decoration:none;
  font-size:var(--t-small);font-weight:500;line-height:1;color:var(--muted);
  border-bottom:2px solid transparent;
  transition:color .2s var(--ease),border-color .2s var(--ease);
}
.nbsx-anchors__link:hover,.nbsx-anchors__link:focus-visible{color:var(--ink)}
.nbsx-anchors__link[aria-current]{color:var(--ink);border-bottom-color:var(--indigo)}
.nbsx-anchors :focus-visible{outline:2px solid var(--indigo);outline-offset:2px}
.nbsx-anchors__cta{flex:none}
/* pages.js sets these on <body> so an anchor target clears the header + the bar */
.nbsx-anchor{scroll-margin-top:104px}
.nbsx-has-anchors .nbsx-anchor{scroll-margin-top:160px}

@media (max-width:1024px){
  .nbsx-anchors{top:80px}
  .nbsx-anchors__inner{gap:16px}
  .nbsx-anchor{scroll-margin-top:96px}
  .nbsx-has-anchors .nbsx-anchor{scroll-margin-top:152px}
}
@media (max-width:700px){
  .nbsx-anchors{top:76px}
  .nbsx-anchors__inner{gap:12px;min-height:48px}
  .nbsx-anchors__list{gap:20px;padding-inline:0}
  .nbsx-anchors__link{padding:14px 0}
  .nbsx-anchors__cta{display:none}
  .nbsx-anchor{scroll-margin-top:92px}
  .nbsx-has-anchors .nbsx-anchor{scroll-margin-top:140px}
}

/* ══ accordion ══════════════════════════════════════════════════════════════
   Disclosure rows on a hairline grid. The panel is shown/hidden with the
   `hidden` attribute — instant, no height animation (§3.9). Only the chevron
   moves. */
.nbsx-acc{border-top:1px solid var(--hair)}
.nbsx-acc__item{border-bottom:1px solid var(--hair)}
.nbsx-acc__h{margin:0;font-size:inherit;font-weight:inherit;line-height:inherit}
.nbsx-acc__btn{
  display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:16px;
  width:100%;margin:0;padding:24px 0;
  font-family:inherit;font-size:var(--t-title);font-weight:500;line-height:1.25;
  color:inherit;text-align:left;background:none;border:0;border-radius:0;cursor:pointer;
  transition:color .2s var(--ease);
}
.nbsx-acc__btn:hover{color:var(--indigo)}
[data-theme=ink] .nbsx-acc__btn:hover{color:#fff}
.nbsx-acc__title{min-width:0}
.nbsx-acc__meta{font-size:var(--t-small);font-weight:400;color:var(--muted);white-space:nowrap}
.nbsx-acc__icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex:none;transition:transform .25s var(--ease)}
.nbsx-acc__btn[aria-expanded=true] .nbsx-acc__icon{transform:rotate(180deg)}
.nbsx-acc__panel{padding:0 0 28px}
.nbsx-acc__panel[hidden]{display:none}
.nbsx-acc__body{max-width:68ch;font-size:var(--t-body);line-height:1.6}
.nbsx-acc__body > :first-child{margin-top:0}
.nbsx-acc__body > :last-child{margin-bottom:0}
.nbsx-acc__body ul,.nbsx-acc__body ol{margin:0 0 12px;padding-left:20px}
.nbsx-acc__body li{margin:0 0 6px}
.nbsx-acc__body p{margin:0 0 12px}
.nbsx-acc__text{margin:0}

@media (max-width:700px){
  .nbsx-acc__btn{grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:20px 0;font-size:17px}
  .nbsx-acc__meta{grid-column:1;font-size:13px}
  .nbsx-acc__panel{padding-bottom:24px}
}

/* ══ numbered rail ══════════════════════════════════════════════════════════
   One SVG line drawn once when the block enters the viewport: the wrapper has
   data-nbsx-reveal, core adds .is-in, and stroke-dashoffset runs 1 → 0 on a
   pathLength="1" line, so nothing has to be measured. Layout never moves. */
.nbsx-rail{position:relative}
.nbsx-rail__line{position:absolute;top:22px;bottom:22px;left:21px;width:2px;pointer-events:none}
.nbsx-rail__svg{display:block;width:2px;height:100%;overflow:visible}
.nbsx-rail__stroke{stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset 1200ms var(--ease)}
.nbsx-rail.is-in .nbsx-rail__stroke{stroke-dashoffset:0}
.nbsx-rail__items{list-style:none;margin:0;padding:0;position:relative;display:grid;gap:clamp(32px,4vw,56px)}
.nbsx-rail__item{margin:0;display:grid;grid-template-columns:44px minmax(0,1fr);gap:clamp(20px,2.5vw,32px);align-items:start}
.nbsx-rail__n{
  display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;flex:none;
  font-size:var(--t-small);font-weight:500;line-height:1;font-variant-numeric:tabular-nums;
  color:var(--fg);background:var(--bg);border:1px solid var(--hair);border-radius:999px;
  transition:border-color .3s var(--ease),color .3s var(--ease);
}
.nbsx-rail.is-in .nbsx-rail__n{border-color:var(--indigo)}
.nbsx-rail__body{min-width:0;padding-top:6px}
.nbsx-rail__title{margin:0;text-wrap:balance}
.nbsx-rail__meta{margin:8px 0 0}
.nbsx-rail__desc{margin:12px 0 0;max-width:68ch;line-height:1.6;text-wrap:pretty}
.nbsx-rail__extras{margin-top:20px;max-width:68ch}
.nbsx-rail__extras > :first-child{margin-top:0}
.nbsx-rail__extras > :last-child{margin-bottom:0}
.nbsx-rail__extras ul,.nbsx-rail__extras ol{margin:0 0 12px;padding-left:20px}
.nbsx-rail__extras li{margin:0 0 8px}

@media (max-width:1024px){
  .nbsx-rail__items{gap:40px}
}
@media (max-width:700px){
  .nbsx-rail__line{top:18px;bottom:18px;left:17px}
  .nbsx-rail__items{gap:32px}
  .nbsx-rail__item{grid-template-columns:36px minmax(0,1fr);gap:16px}
  .nbsx-rail__n{width:36px;height:36px;font-size:13px}
  .nbsx-rail__body{padding-top:2px}
}

/* ══ enquiry form ═══════════════════════════════════════════════════════════
   Field styling itself is core's .nbsx-form; this is only the layout around
   it, the required marker and the two send states. */
.nbsx-pform__inner{display:block}
.nbsx-pform__head{margin-bottom:32px;max-width:720px}
.nbsx-pform__h{margin:0}
.nbsx-pform__lede{margin:16px 0 0}
.nbsx-pform__form{max-width:720px}
.nbsx-pform__fields{display:grid;grid-template-columns:1fr 1fr;gap:16px var(--gutter);transition:opacity .3s var(--ease)}
.nbsx-pform__field{min-width:0}
.nbsx-pform__field--wide{grid-column:1/-1}
.nbsx-pform__req{color:var(--magenta)}
[data-theme=light] .nbsx-pform__req,[data-theme=warm] .nbsx-pform__req{color:#c8007f}
.nbsx-pform__note{margin:16px 0 0}
.nbsx-pform__submit{margin:24px 0 0}
.nbsx-pform__error,.nbsx-pform__ok{margin-top:16px}
.nbsx-pform__ok{font-size:var(--t-statement);font-weight:300;line-height:1.3}
.nbsx-pform__form.is-sending .nbsx-pform__send{opacity:.6}
.nbsx-pform__form.is-sent .nbsx-pform__fields{opacity:0}

@media (max-width:700px){
  .nbsx-pform__head{margin-bottom:24px}
  .nbsx-pform__fields{grid-template-columns:1fr}
  .nbsx-pform__field--wide{grid-column:auto}
}

/* ══ photo + text row ═══════════════════════════════════════════════════════
   The "row of image + text" block several inner pages repeat (About community,
   Career services, International benefits). Write the markup in your template:

     <div class="nbsx-pair nbsx-pair--reverse">
       <figure class="nbsx-media nbsx-pair__media"><?php echo nbsx_img(...); ?></figure>
       <div class="nbsx-pair__text">
         <p class="nbsx-eyebrow nbsx-pair__eyebrow">…</p>
         <h3 class="nbsx-h3 nbsx-pair__h">…</h3>
         <p class="nbsx-pair__body">…</p>
         <p class="nbsx-pair__actions"><a class="nbsx-link" …>…</a></p>
       </div>
     </div>

   --reverse puts the photo on the right; on mobile the photo is always first. */
.nbsx-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(24px,4vw,64px);align-items:center}
.nbsx-pair + .nbsx-pair{margin-top:clamp(48px,6vw,96px)}
.nbsx-pair--reverse .nbsx-pair__media{order:2}
.nbsx-pair--top{align-items:start}
.nbsx-pair__media{aspect-ratio:4/3;width:100%}
.nbsx-pair__media img{width:100%;height:100%;object-fit:cover}
.nbsx-pair--square .nbsx-pair__media{aspect-ratio:1/1}
.nbsx-pair--portrait .nbsx-pair__media{aspect-ratio:4/5}
.nbsx-pair__text{min-width:0}
.nbsx-pair__eyebrow{margin-bottom:12px}
.nbsx-pair__h{margin:0;text-wrap:balance}
.nbsx-pair__sub{margin:8px 0 0;color:var(--muted)}
.nbsx-pair__body{margin:16px 0 0;max-width:60ch;line-height:1.6;text-wrap:pretty}
.nbsx-pair__body p{margin:0 0 12px}
.nbsx-pair__body p:last-child{margin-bottom:0}
.nbsx-pair__actions{margin:24px 0 0}

@media (max-width:700px){
  .nbsx-pair{grid-template-columns:minmax(0,1fr);gap:20px}
  .nbsx-pair + .nbsx-pair{margin-top:48px}
  .nbsx-pair--reverse .nbsx-pair__media{order:0}
  .nbsx-pair__body{margin-top:12px}
  .nbsx-pair__actions{margin-top:16px}
}

/* ══ prose measure ══════════════════════════════════════════════════════════ */
.nbsx-prose{max-width:720px}
.nbsx-prose > :first-child{margin-top:0}
.nbsx-prose > :last-child{margin-bottom:0}
.nbsx-prose p{margin:0 0 16px;line-height:1.6;text-wrap:pretty}
.nbsx-prose ul,.nbsx-prose ol{margin:0 0 16px;padding-left:20px}
.nbsx-prose li{margin:0 0 8px}

/* ══ reduced motion ═════════════════════════════════════════════════════════
   The rail's line is already drawn, nothing transitions, nothing rotates. */
@media (prefers-reduced-motion:reduce){
  .nbsx-rail__stroke{stroke-dashoffset:0;transition:none}
  .nbsx-rail__n,.nbsx-anchors,.nbsx-anchors__link,.nbsx-acc__btn,.nbsx-acc__icon,.nbsx-pform__fields,.nbsx-pform__send{transition:none}
  .nbsx-acc__btn[aria-expanded=true] .nbsx-acc__icon{transform:rotate(180deg)}
}

/* The enquiry form cannot succeed without script (reCAPTCHA v3 has no non-JS
   flow), so with script off the fields and the button step aside and the
   <noscript> line with the school's address takes their place. */
.nbsx-pform__nojs{margin:0 0 4px;color:var(--muted);font-size:var(--t-small,15px);line-height:1.6}
.no-js .nbsx-pform__fields,
.no-js .nbsx-pform__submit{display:none}
