/* ==========================================================================
   St. Joan's Education Society — shared stylesheet
   Palette: indigo (institutional depth) + brass (recognition, seal-like)
   Type:    Spectral (display serif) + IBM Plex Sans (text)
   ========================================================================== */

:root {
  --paper:       #FBFBF9;
  --paper-alt:   #ECEEE9;
  --indigo:      #172A4B;
  --indigo-deep: #0F1D35;
  --indigo-soft: #2E4570;
  --brass:       #B8862F;
  --brass-light: #D7AC5C;
  --text:        #262B33;
  --muted:       #5A626F;
  --rule:        #D6D8D1;
  --rule-dark:   #34456A;

  --red:       #C1121F;   /* headings on light backgrounds */
  --red-light: #FF8C7A;   /* headings on dark backgrounds, kept legible */

  --serif: "Calibri", "Carlito", Candara, "Segoe UI", -apple-system, sans-serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap: 1120px;
  --gap: clamp(1.5rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 .6em;
  color: var(--red);
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--indigo-soft); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brass); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

img { max-width: 100%; height: auto; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.prose { max-width: 64ch; }

.skip {
  position: absolute; left: -9999px;
  background: var(--indigo); color: #fff; padding: .7rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Masthead ---------------------------------------------------- */

.masthead {
  background: var(--indigo-deep);
  color: #fff;
  border-bottom: 3px solid var(--brass);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: .85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #fff;
  text-decoration: none;
}

.brand__mark {
  width: 46px; height: 46px;
  flex: none;
  border: 1px solid var(--brass);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--brass-light);
  background: rgba(184, 134, 47, .09);
  overflow: hidden;
}
.brand__mark img { width: 100%; height: 100%; object-fit: cover; }

.brand__name {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1.14;
  color: #fff;
  display: block;
}
.brand__tag {
  font-size: .85rem;
  font-weight: 600;
  color: var(--brass-light);
  letter-spacing: .015em;
  display: block;
  margin-top: .12rem;
}

.nav { display: flex; align-items: center; gap: 1.45rem; }

.nav a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .84rem;
  letter-spacing: .01em;
  padding-block: .3rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: #fff; border-bottom-color: var(--brass); }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--brass); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font: inherit;
  font-size: .82rem;
  padding: .4rem .75rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    padding-bottom: .75rem;
  }
  .nav.is-open { display: flex; }
  .nav a {
    width: 100%;
    padding: .6rem 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
    font-size: .95rem;
  }
  .masthead__inner { flex-wrap: wrap; }
}

/* ---------- Hero -------------------------------------------------------- */

.hero {
  background: var(--indigo);
  color: #fff;
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero__figure { aspect-ratio: 4 / 5; }

.hero__est {
  font-family: var(--serif);
  font-size: .95rem;
  color: var(--brass-light);
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.4rem;
}
.hero__est::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(184,134,47,.45);
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.05rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  margin-bottom: .7em;
}

.hero p {
  color: rgba(255,255,255,.8);
  max-width: 52ch;
  font-size: 1.03rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { order: -1; }
}

/* ---------- About grid (text + large photo) ------------------------------ */

.about-grid {
  display: grid;
  grid-template-columns: .95fr 1.15fr;
  gap: clamp(2rem, 5vw, 3.6rem);
  align-items: center;
}
.about-grid .fig {
  aspect-ratio: 4 / 3;
  box-shadow: 0 20px 44px rgba(23,42,75,.16);
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .fig { order: -1; }
}

/* ---------- Buttons ----------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .88rem;
  letter-spacing: .015em;
  padding: .72rem 1.4rem;
  text-decoration: none;
  border: 1px solid var(--brass);
  transition: background .18s ease, color .18s ease;
}
.btn--solid { background: var(--brass); color: #12203a; }
.btn--solid:hover { background: var(--brass-light); color: #12203a; }
.btn--ghost { color: var(--brass-light); }
.btn--ghost:hover { background: rgba(184,134,47,.14); color: #fff; }
.btn--dark { border-color: var(--indigo); background: var(--indigo); color: #fff; }
.btn--dark:hover { background: var(--indigo-deep); color: #fff; }

/* ---------- Figures / image placeholders -------------------------------- */

.fig {
  position: relative;
  margin: 0;
  background: linear-gradient(140deg, #21365c, #101f39);
  border: 1px solid rgba(184,134,47,.35);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.fig--wide { aspect-ratio: 16 / 9; }
.fig--tall { aspect-ratio: 3 / 4; }

.fig img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.fig::after {
  content: attr(data-note);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-size: .78rem;
  line-height: 1.5;
  color: rgba(215,172,92,.85);
  font-family: var(--sans);
}

/* ---------- Fact band --------------------------------------------------- */

.facts {
  background: var(--indigo-deep);
  border-top: 1px solid var(--rule-dark);
  color: #fff;
}

.facts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  justify-content: center;
  border-left: 1px solid var(--rule-dark);
}

.fact {
  padding: 1.6rem 1.4rem;
  border-right: 1px solid var(--rule-dark);
  text-align: center;
}

.fact__num {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  line-height: 1;
  color: var(--brass-light);
  display: block;
  margin-bottom: .45rem;
}

.fact__label {
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  line-height: 1.4;
}

@media (max-width: 760px) {
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .fact { border-bottom: 1px solid var(--rule-dark); }
}

/* ---------- Sections ---------------------------------------------------- */

.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section--alt { background: var(--paper-alt); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }

.section__head {
  max-width: 62ch;
  margin-bottom: 2.4rem;
}

.section__head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  margin-bottom: .5em;
}

.section__head p { color: var(--muted); }

/* ---------- Page banner (interior pages) -------------------------------- */

.banner {
  background: var(--indigo);
  color: #fff;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.banner h1 {
  color: #fff;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  margin-bottom: .45em;
}
.banner p {
  color: rgba(255,255,255,.78);
  max-width: 58ch;
  margin: 0;
}
.banner__est {
  font-family: var(--serif);
  color: var(--brass-light);
  font-size: .9rem;
  margin-bottom: 1rem;
  display: block;
}

/* ---------- Ledger (mandates / projects) -------------------------------- */

.ledger { border-top: 2px solid var(--indigo); }

.entry {
  display: grid;
  grid-template-columns: 8.5rem 1fr 11rem;
  gap: 1.5rem;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.entry__period {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--brass);
  padding-top: .1rem;
}

.entry__body h3 {
  font-size: 1.2rem;
  margin-bottom: .3em;
}

.entry__partner {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: .7rem;
}

.entry__body p { font-size: .95rem; color: var(--text); margin-bottom: 0; }

.entry__count {
  text-align: right;
  border-left: 1px solid var(--rule);
  padding-left: 1.2rem;
}

.entry__count strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.55rem;
  color: var(--indigo);
  display: block;
  line-height: 1.1;
}

.entry__count span {
  font-size: .76rem;
  color: var(--muted);
  display: block;
  margin-top: .2rem;
}

@media (max-width: 820px) {
  .entry { grid-template-columns: 1fr; gap: .9rem; }
  .entry__count {
    text-align: left;
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: .8rem;
  }
  .entry__count strong { display: inline; font-size: 1.25rem; }
  .entry__count span { display: inline; margin-left: .4rem; }
}

/* ---------- Pillars ----------------------------------------------------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}

.pillar {
  padding: 1.8rem 1.6rem 1.8rem 0;
  border-right: 1px solid var(--rule);
}
.pillar:last-child { border-right: 0; }
.pillar:not(:first-child) { padding-left: 1.6rem; }

.pillar h3 { font-size: 1.1rem; margin-bottom: .5em; }
.pillar p { font-size: .93rem; color: var(--muted); }

@media (max-width: 820px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 1.4rem 0;
  }
  .pillar:not(:first-child) { padding-left: 0; }
  .pillar:last-child { border-bottom: 0; }
}

/* ---------- States list ------------------------------------------------- */

.states {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}

.states li {
  padding: .85rem .5rem .85rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .98rem;
  display: flex;
  align-items: baseline;
  gap: .7rem;
}

.states li::before {
  content: "";
  width: 7px; height: 7px;
  flex: none;
  background: var(--brass);
  border-radius: 50%;
  transform: translateY(-2px);
}

.state-btn {
  font: inherit;
  color: var(--text);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.state-btn:hover, .state-btn.is-active { color: var(--brass); }

/* ---------- Interactive presence map ------------------------------------ */

.map-wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
  max-width: none;
}
@media (max-width: 780px) {
  .map-wrap { grid-template-columns: 1fr; }
}

.india-map { max-width: 560px; }

.india-map {
  position: relative;
  aspect-ratio: 735 / 862;
  background: #fff;
  border: 1px solid var(--rule);
}
.india-map img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  padding: 0;
  border-radius: 50%;
  background: var(--brass);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px var(--indigo);
  cursor: pointer;
  line-height: 0;
}
.map-pin::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1.5px solid var(--brass);
  opacity: 0;
  transition: opacity .15s ease;
}
.map-pin:hover::after,
.map-pin:focus-visible::after,
.map-pin.is-active::after { opacity: 1; }
.map-pin.is-active { background: var(--indigo); }

.map-pin__tip {
  position: absolute;
  left: 50%;
  bottom: 130%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--sans);
  font-size: .68rem;
  color: #fff;
  background: var(--indigo);
  padding: .18rem .5rem;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
}
.map-pin:hover .map-pin__tip,
.map-pin:focus-visible .map-pin__tip,
.map-pin.is-active .map-pin__tip { opacity: 1; }

.state-detail {
  position: relative;
  padding: 1.8rem 2rem;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--brass);
  min-height: 100%;
}
@media (min-width: 781px) {
  .state-detail { position: sticky; top: 1.5rem; }
}
.state-detail h3 {
  font-family: var(--serif);
  color: var(--red);
  font-size: 1.2rem;
  margin-bottom: .8rem;
}
.state-detail ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.state-detail li {
  padding: .55rem 0;
  border-top: 1px solid var(--rule);
  font-size: .93rem;
  color: var(--text);
}
.state-detail li:first-of-type { border-top: 0; }

/* ---------- Partner grid ------------------------------------------------ */

.partners {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.partner {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 1.2rem;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.partner__logo {
  height: 42px;
  margin-bottom: .8rem;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.partner__name {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--indigo);
  line-height: 1.25;
}

.partner__role {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .3rem;
}

/* ---------- Gallery ----------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.gallery .fig { aspect-ratio: 4 / 3; }

.gallery figcaption {
  font-size: .84rem;
  color: var(--muted);
  padding-top: .55rem;
}

.gallery__item { margin: 0; }

/* ---------- Gallery folders (programme index) --------------------------- */

.gallery-folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}

.folder-card {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.1rem 1.1rem 1.3rem;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.folder-card:hover {
  border-color: var(--brass);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(23,42,75,.1);
}
.folder-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 5.6rem;
  padding: .7rem .9rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 5px;
  flex-shrink: 0;
}
.folder-card__logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.folder-card__logo--none { background: var(--paper); }
.folder-card__icon {
  width: 2.4rem;
  height: 2.4rem;
  color: var(--brass);
  flex-shrink: 0;
}
.folder-card__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.32;
  color: var(--red);
}
.folder-card__meta {
  font-size: .78rem;
  color: var(--muted);
  margin-top: -.6rem;
}

.gallery-back {
  display: inline-block;
  margin-bottom: 1.8rem;
  font-size: .88rem;
}

.gallery-empty {
  padding: 3rem 1.5rem;
}
.gallery-empty .fig {
  aspect-ratio: 16 / 6;
}

/* ---------- Contact ----------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}

.office h3 {
  font-size: 1.15rem;
  margin-bottom: .8em;
}

.office__addr {
  font-style: normal;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1.1rem;
}

.office dl {
  margin: 0;
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  row-gap: .45rem;
  font-size: .94rem;
}
.office dt { color: var(--muted); }
.office dd { margin: 0; }

.office__map {
  margin-top: 1.3rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--rule);
  aspect-ratio: 4 / 3;
}
.office__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.office__map-link {
  display: inline-block;
  margin-top: .6rem;
  font-size: .88rem;
}

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Callout ----------------------------------------------------- */

.callout {
  background: var(--indigo);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.2rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.callout h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .4em; }
.callout p { color: rgba(255,255,255,.78); margin: 0; max-width: 46ch; font-size: .97rem; }

@media (max-width: 760px) {
  .callout { grid-template-columns: 1fr; }
}

/* ---------- Footer ------------------------------------------------------ */

.foot {
  background: var(--indigo-deep);
  color: rgba(255,255,255,.72);
  padding-block: 2.6rem 1.6rem;
  font-size: .88rem;
}

.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr .8fr;
  gap: 2rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--rule-dark);
}

.social-links { display: flex; gap: .85rem; }
.social-links a {
  width: 2.7rem;
  height: 2.7rem;
  flex: none;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.social-links a:hover,
.social-links a:focus-visible { background: var(--brass); border-color: var(--brass); }
.social-links svg { width: 1.35rem; height: 1.35rem; fill: #fff; }

.foot h4 {
  color: #fff;
  font-size: .95rem;
  margin-bottom: .8em;
}

.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .45rem; }
.foot a { color: rgba(255,255,255,.72); text-decoration: none; }
.foot a:hover { color: var(--brass-light); text-decoration: underline; }

.foot__base {
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: .8rem;
  color: rgba(255,255,255,.55);
}

@media (max-width: 760px) {
  .foot__grid { grid-template-columns: 1fr; gap: 1.6rem; }
}

/* ---------- Brand mark on white chip ------------------------------------ */

.brand__mark {
  background: #fff;
  border-radius: 5px;
  border: 0;
  width: 64px; height: 64px;
  padding: 5px;
}
.brand__mark img { object-fit: contain; }

/* ---------- Flagship (RAMP) feature ------------------------------------- */

.flagship {
  background: var(--paper-alt);
  border-top: 3px solid var(--brass);
  border-bottom: 1px solid var(--rule);
}

.flagship__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2.8rem, 6vw, 4.2rem);
}

.flagship__tag {
  font-family: var(--serif);
  font-size: .92rem;
  color: var(--brass);
  display: block;
  margin-bottom: .9rem;
}

.flagship h2 {
  font-size: clamp(1.7rem, 3.8vw, 2.5rem);
  margin-bottom: .5em;
}

.flagship__meta {
  list-style: none;
  margin: 1.6rem 0 1.8rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.flagship__meta li {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .93rem;
}
.flagship__meta dt, .flagship__meta .k { color: var(--muted); }

@media (max-width: 860px) {
  .flagship__grid { grid-template-columns: 1fr; }
  .flagship__meta li { grid-template-columns: 1fr; gap: .1rem; }
}

/* ---------- Story cards ------------------------------------------------- */

.stories { display: grid; gap: 0; border-top: 2px solid var(--indigo); }

.story {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: 2.2rem;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--rule);
}

.story__side { border-right: 1px solid var(--rule); padding-right: 1.6rem; }

.story__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.28rem;
  color: var(--red);
  line-height: 1.2;
  margin: 0 0 .35rem;
}
.story__enterprise { font-size: .88rem; color: var(--brass); margin-bottom: 1rem; }

.story__facts { margin: 0; font-size: .86rem; }
.story__facts dt { color: var(--muted); margin-top: .55rem; }
.story__facts dd { margin: 0; color: var(--text); }

.story__result {
  margin-top: 1.1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--indigo);
  line-height: 1.35;
}

.story__body p { font-size: .96rem; }
.story__body p:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; gap: 1.3rem; }
  .story__side { border-right: 0; border-bottom: 1px solid var(--rule); padding-right: 0; padding-bottom: 1.2rem; }
}

/* ---------- Product strip ----------------------------------------------- */

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}
.products figure { margin: 0; }
.products .fig { aspect-ratio: 3 / 4; background: #fff; border-color: var(--rule); }
.products .fig img { object-fit: contain; background: #fff; }
.products figcaption { font-size: .84rem; color: var(--muted); padding-top: .5rem; }

/* ---------- Team -------------------------------------------------------- */

.team {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.team li {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.2rem 1.3rem;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.team__photo {
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
}
.team__photo-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: .3rem;
  text-align: center;
  font-size: .55rem;
  line-height: 1.2;
  color: var(--muted);
  font-family: var(--sans);
}
.team__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}
.team strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--indigo-deep);
}
.team span { font-size: .85rem; color: var(--muted); }

/* ---------- Compliance strip in footer ---------------------------------- */

.compliance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .9rem 1.6rem;
  padding: 1.4rem 0 .2rem;
  font-size: .8rem;
  line-height: 1.45;
}
.compliance div { color: rgba(255,255,255,.55); }
.compliance strong { display: block; color: rgba(255,255,255,.9); font-weight: 500; }

/* ---------- Enquiry form ------------------------------------------------- */

.enquiry-form { display: flex; flex-direction: column; gap: 1.1rem; }
.enquiry-form label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--indigo-deep);
  margin-bottom: .4rem;
}
.enquiry-form input,
.enquiry-form textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: .7rem .9rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}
.enquiry-form input:focus,
.enquiry-form textarea:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
  border-color: var(--brass);
}
.enquiry-form textarea { resize: vertical; }
.enquiry-form button { align-self: flex-start; margin-top: .2rem; }

/* ---------- WhatsApp floating button -------------------------------------- */

.whatsapp-fab {
  position: fixed;
  right: 1.3rem;
  bottom: 1.3rem;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  z-index: 60;
  transition: transform .15s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab svg { width: 1.7rem; height: 1.7rem; fill: #fff; }

/* ---------- Scroll progress bar ------------------------------------------- */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--brass);
  z-index: 200;
  transition: width .1s linear;
}

/* ---------- Sticky header shrink ------------------------------------------ */

.masthead { position: sticky; top: 0; z-index: 100; transition: box-shadow .2s ease; }
.masthead.is-scrolled { box-shadow: 0 2px 14px rgba(0,0,0,.15); }

/* ---------- Scroll reveal --------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Counter numbers -------------------------------------------- */

.fact__num { display: inline-block; }

/* ---------- Gallery lightbox --------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15,29,53,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255,255,255,.28); }
.lightbox__close { top: 1.2rem; right: 1.2rem; }
.lightbox__prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
.gallery-grid a, .gallery-grid figure { cursor: zoom-in; }


/* ==========================================================================
   Justified body copy
   Applied to running prose only. Short lead-ins, captions, labels and
   table-like cells stay left-aligned, where justification would open
   visible gaps between words.
   ========================================================================== */

.prose p,
.entry__body p,
.story__body p,
.flagship__grid > div > p,
.section__body p,
.programme-body p,
.page-intro p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Never justify these — too short, or the gaps look wrong */
.hero p,
.banner p,
.section__head p,
.callout p,
figcaption,
.entry__partner,
.story__enterprise,
.fact__label,
.partner__role,
.office__addr,
.foot p,
.gallery figcaption {
  text-align: left;
  hyphens: manual;
}

@media (max-width: 620px) {
  /* Narrow columns produce rivers of white space when justified */
  .prose p,
  .entry__body p,
  .story__body p,
  .flagship__grid > div > p,
  .section__body p,
  .programme-body p,
  .page-intro p {
    text-align: left;
  }
}

/* ==========================================================================
   Login button (masthead, right corner)
   ========================================================================== */

.btn-login {
  display: inline-block;
  flex: none;
  font-family: var(--sans);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .015em;
  line-height: 1;
  padding: .6rem 1.15rem;
  margin-left: 1.4rem;
  color: #12203a;
  background: var(--brass);
  border: 1px solid var(--brass);
  border-radius: 3px;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.btn-login:hover,
.btn-login:focus-visible {
  background: var(--brass-light);
  border-color: var(--brass-light);
  color: #12203a;
}

@media (max-width: 900px) {
  .btn-login {
    order: 2;
    margin-left: auto;
    margin-right: .6rem;
    padding: .5rem .9rem;
    font-size: .8rem;
  }
  .nav-toggle { order: 3; }
  .nav { order: 4; }
}
/* Contact page: fit all 3 offices in one row */
.contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.2rem;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}
/* Contact page: perfectly align the three office columns, row by row */
.contact-grid {
  grid-template-rows: auto auto auto auto auto;
}
.office {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
}

@media (max-width: 760px) {
  .contact-grid { grid-template-rows: none; }
  .office { display: block; grid-row: auto; }
}

/* ==========================================================================
   Contact page — three matching office cards
   ========================================================================== */

.offices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
  align-items: stretch;
}

.office {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--red);
  border-radius: 6px;
  padding: 1.5rem 1.4rem 1.3rem;
  box-shadow: 0 1px 2px rgba(23, 42, 75, .05);
}

.office__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
  padding-bottom: .8rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.office__head h3 {
  font-size: 1.12rem;
  margin: 0;
  color: var(--red);
}

.office__tag {
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.office__addr {
  font-style: normal;
  font-weight: 600;
  color: var(--indigo-deep);
  line-height: 1.62;
  font-size: .97rem;
  margin: 0 0 1.1rem;
  min-height: 8.2em;          /* five lines — keeps all three maps on the same line */
}

.office__rows {
  margin: 0 0 1.2rem;
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  row-gap: .4rem;
  font-size: .92rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.office__rows dt { color: var(--muted); }
.office__rows dd { margin: 0; }
.office__rows dd a { color: var(--indigo-soft); }

.office__map {
  margin: 0 0 .7rem;
  border: 1px solid var(--rule);
  border-radius: 5px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-alt);
}
.office__map iframe { width: 100%; height: 100%; border: 0; display: block; }

.office__map-link {
  margin-top: auto;
  font-size: .86rem;
  text-decoration: none;
  color: var(--indigo-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .15rem;
  align-self: flex-start;
}
.office__map-link:hover { color: var(--brass); border-bottom-color: var(--brass); }

.contact-cta { margin-top: 2.6rem; }

@media (max-width: 980px) {
  .offices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .office__addr { min-height: 0; }
}
@media (max-width: 620px) {
  .offices { grid-template-columns: 1fr; gap: 1.2rem; }
}

.contact-form-head {
  margin-top: 3.2rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--rule);
  max-width: 46rem;
}
.contact-form-head h2 { font-size: 1.5rem; margin-bottom: .4em; }
.contact-form-head p { color: var(--muted); margin: 0; }
.enquiry-form { margin-top: 1.6rem !important; }


/* Keep the enlarged masthead in check on phones */
@media (max-width: 900px) {
  .brand__mark { width: 54px; height: 54px; }
  .brand__name { font-size: 1.12rem; }
  .brand__tag  { font-size: .78rem; }
  .brand { gap: .8rem; }
}
@media (max-width: 420px) {
  .brand__mark { width: 46px; height: 46px; }
  .brand__name { font-size: 1rem; }
  .brand__tag  { font-size: .72rem; }
}
