/* schoolweb.page look "Playful". Round, friendly headings in Bricolage Grotesque, text in
   Figtree. Soft shapes: pill buttons and status, round-cornered photos, date tiles set down
   a little crooked, a wavy line under the current page. One mark: a hand-drawn highlighter
   stroke in the school's colour behind the name and the page title. Ink is kept for text;
   edges are soft lines, so the shapes carry the mood and the page stays calm. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../../fonts/BricolageGrotesque.29255a21060d.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("../../fonts/Figtree.c5e0fe0ec016.woff2") format("woff2"); }
@font-face { font-family: "Rare Latin"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../../fonts/NotoSansRare.746d07864173.woff2") format("woff2");
  unicode-range: U+0149, U+0300-036F, U+1E00-1EFF; }

:root {
  --serif: "Bricolage Grotesque", "Rare Latin", "Bricolage Grotesque fallback", system-ui, sans-serif;
  --sans: "Figtree", "Rare Latin", "Figtree fallback", system-ui, sans-serif;
  --ink: #1b1c20;
  --muted: #4a4d57;
  --line: #E2E4EA;
  /* the page: white with a breath of the school's colour */
  --paper: #fff;
  --card: #fff;
  /* the highlighter: the school's own hue, made light and kept vivid, always under ink.
     The mixes here serve a browser without relative colour; the @supports block below
     sets the real values */
  --hl: var(--accent-tint);
  /* a second soft tint, for bands */
  --tint2: var(--accent-tint);
  --stroke: 1.5px;
  /* drawn by hand: the stroke leans a little across the line */
  --mark: linear-gradient(179.2deg, transparent 50%, var(--hl) calc(50% + 1px), var(--hl) calc(90% - 1px), transparent 90%);
  --round: 20px;
  --prose: 30.5em;
}
@supports (color: color-mix(in srgb, red, red)) { :root { --hl: color-mix(in srgb, var(--accent) 45%, #fff); } }
@supports (color: color-mix(in srgb, red, red)) { :root { --paper: color-mix(in srgb, var(--accent-tint) 45%, #fff); } }
@supports (color: color-mix(in srgb, red, red)) { :root { --line: color-mix(in srgb, var(--ink) 14%, transparent); } }
/* a custom property takes any value, so these must not reach a browser that cannot
   compute them: the fallbacks above would never apply */
@supports (color: oklch(from red l c h)) {
  :root {
    /* a black or grey school has no hue to keep (it reads as 0, a pink), so below a chroma
       of .02 the mark is a marker yellow and the bands a cream. clamp(0, (.02 - c) * 1e4, 1)
       is 1 for such a school and 0 for any other */
    --hl: oklch(from var(--accent) .85
      calc(c * c * 3 + .03 + (.11 - c * c * 3) * clamp(0, (.02 - c) * 1e4, 1))
      calc(h + (95 - h) * clamp(0, (.02 - c) * 1e4, 1)));
    /* the school's hue turned a little */
    --tint2: oklch(from var(--accent) .965 .028 calc(h + 15 + (80 - h) * clamp(0, (.02 - c) * 1e4, 1)));
  }
}

body { font-size: 1.125rem; line-height: 1.55; background: var(--paper); }
h1, h2, h3 { font-weight: 700; letter-spacing: -.012em; line-height: 1.04; }
h3 { font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.date h2 { font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
a { text-decoration-thickness: 2px; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* the mark: a highlighter stroke under the lower half of each line, on the name and the
   page title only, so it keeps its force */
.hero h1, .page-head h1 {
  background-image: var(--mark); background-repeat: repeat-y; background-size: 100% 1lh;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  padding-inline: .1em; margin-inline: -.1em;
  /* the stroke's ends are rounded, as a felt tip leaves them */
  border-radius: .12em .3em .4em .18em;
}

/* header */
.top { background: #fff; border-bottom: 1px solid var(--line); min-height: 64px; }
.top .name { font-weight: 700; letter-spacing: -.025em; font-size: 1.25rem; }
.top .name.long { font-size: 1.0625rem; letter-spacing: -.015em; }
.top .menu { border: var(--stroke) solid var(--line); background: var(--tint2); border-radius: 999px; padding: 0 18px; font-weight: 600; margin-right: 6px; }
.nav > nav { background: #fff; border-bottom: 1px solid var(--line); border-radius: 0 0 var(--round) var(--round); box-shadow: 0 18px 30px rgb(20 25 40 / .1); }
.nav > nav a { font-weight: 600; font-size: 1.25rem; }
.nav > nav a[aria-current="page"] { color: var(--ink); }
/* the current page: a wavy line in the school's colour */
.nav > nav a[aria-current="page"], .top-links a[aria-current="page"] { text-decoration: underline wavy var(--link); text-decoration-thickness: 2px; text-underline-offset: 7px; }

/* hero: the name first, on the page, then the photo */
.hero { display: flex; flex-direction: column; justify-content: flex-start; min-height: 0; overflow: visible; background: none; padding: 20px var(--pad) 0; }
.hero::after { content: none; }
.hero-text { padding: 0; background: none; color: var(--ink); }
/* the name is inline for its stroke, so its lines are balanced from the box around it */
.hero-text { text-wrap: balance; }
.hero h1 { display: inline; color: var(--ink); text-shadow: none; font-size: 2.5rem; line-height: 1.04; }
.hero h1.long { font-size: 1.875rem; line-height: 1.08; letter-spacing: -.025em; }
.hero .town { color: var(--muted); font-weight: 500; font-size: 1.0625rem; margin-top: 6px; }
.hero img { order: 2; position: static; display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; margin-top: 16px; border-radius: var(--round); object-fit: cover; }
.hero.tall { min-height: 0; }
.hero.tall img { aspect-ratio: 4 / 3; }
.hero.bare { min-height: 0; padding-bottom: 4px; }
.hero.bare .hero-text { padding-top: 0; color: var(--ink); }
.hero.bare h1 { color: var(--ink); }
.hero.bare .hero-text { color: var(--muted); }

/* first screen */
.first { padding: 14px var(--pad) 10px; }
.status { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 10px; row-gap: 0; padding: 9px 22px 9px 18px; border-radius: 28px; border: var(--stroke) solid currentColor; font-weight: 650; }
.status::before { width: 12px; height: 12px; align-self: center; }
.status span, .first .status span { grid-column: 2; margin-left: 0; justify-self: start; font-weight: 500; text-decoration-thickness: 2px; }
.status.open { background: #fff; }
.status.wait { background: #fff; }
.lines { margin-top: 12px; font-size: 1.0625rem; line-height: 1.45; }

/* pills; the main button keeps the school's edge tone, so a pale colour still shows its edge */
.btn { min-height: 54px; border-radius: 999px; padding: 0 22px; font-weight: 650; font-size: 1.125rem; border: 2px solid var(--edge);
  box-shadow: none; transition: transform .08s, background-color .12s; }
.btn.main { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.btn.alt { background: #fff; color: var(--ink); border-color: var(--link); box-shadow: none; }
.btn.alt:hover { background: var(--accent-tint); }
/* second#DES-66: the main button darkens on hover, like Call tints */
.btn.main:hover { background: color-mix(in oklch, var(--accent) 86%, #000); }
.btn:active { transform: translateY(2px); }
.acts { margin-top: 14px; gap: 10px; }
/* the pill buttons need 330 px side by side, so a 360 px phone stacks them */
@media (max-width: 374px) { .acts { grid-template-columns: minmax(0, 1fr); } }
/* the buttons stand clear of the rows under them */
.acts + .rows { margin-top: 20px; }
.share { color: var(--ink); font-weight: 600; margin-top: 6px; }
.share .ic { color: var(--link); }

/* dates: soft tiles, set down crooked, leaning one way then the other */
.tile { background: var(--tint2); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; rotate: -7deg; }
.dates li:nth-child(even) .tile { rotate: 6deg; }
.tile small { font-weight: 600; }
.tile b { font-weight: 700; }
.next { margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--round); }
.next .cal { color: var(--ink); font-weight: 600; }
.next .cal .ic { color: var(--link); }
.date h3, .date h2 { font-size: 1.3125rem; }
.date p { color: var(--muted); }
.dates li { border-top: 1px solid var(--line); }
.dates li:first-child { border-top: 1px solid var(--line); }
.dates li:last-child { border-bottom: 1px solid var(--line); }

/* blocks */
.block { padding: 44px var(--pad); }
.block.band { background: var(--tint2); border-block: 0; }
.block h2 { font-size: 2.125rem; }
.block h2 + * { margin-top: 18px; }
.lede, .welcome p { font-family: var(--sans); }
.lede { font-size: 1.3125rem; line-height: 1.5; font-weight: 500; }
.more { color: var(--ink); font-weight: 650; text-decoration: underline; text-decoration-color: var(--link); }
.head2 a { color: var(--ink); text-decoration-color: var(--link); font-weight: 600; }

.facts { border-top: 1px solid var(--line); }
.facts div { min-width: 0; border-bottom: 1px solid var(--line); }
.facts div:nth-child(even) { border-left: 1px solid var(--line); }
.facts b { font-size: 1.1875rem; font-weight: 700; letter-spacing: -.02em; overflow-wrap: break-word; }
.facts span { color: var(--muted); font-size: 1rem; }

.letter { background: #fff; border: 1px solid var(--line); border-radius: var(--round); box-shadow: none; }
.letter span { color: var(--ink); text-decoration-color: var(--link); text-decoration-thickness: 2px; }
.letter svg { box-shadow: 0 0 0 1px var(--line); }

.photos { gap: 8px; border-radius: 0; overflow: visible; }
.photos img { border-radius: 16px; }

.visit address { font-size: 1.1875rem; }
.visit .map { color: var(--ink); text-decoration: underline; text-decoration-color: var(--link); }
.rows a { border-top: 1px solid var(--line); font-weight: 600; }
.rows a:last-child { border-bottom: 1px solid var(--line); }

/* inner pages */
.page-head { background: none; border-bottom: 0; padding: 36px var(--pad) 8px; }
.page-head h1 { display: inline; font-size: 2.75rem; }
.table { border-top: 1px solid var(--line); }
.table div { border-bottom: 1px solid var(--line); }
.table dt { font-weight: 400; }
.table dd { font-weight: 700; letter-spacing: -.02em; }
.table.plain dd { letter-spacing: 0; }
.list { border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); font-weight: 500; align-items: flex-start; padding-block: 12px; }
.steps li { border-top: 1px solid var(--line); }
.steps li::before { background: var(--tint2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); border: 0; font-weight: 700; }
.steps li:nth-child(odd)::before { rotate: -7deg; }
.steps li:nth-child(even)::before { rotate: 6deg; }
.doc { border-top: 1px solid var(--line); }
.doc .cover { box-shadow: 0 0 0 1px var(--line); }
.byline b { font-weight: 700; letter-spacing: -.02em; }
.welcome { border-left: 0; padding-left: 0; }
.welcome p { font-size: 1.1875rem; }
.items li { border-top: 1px solid var(--line); }
.items .mark { background: var(--tint2); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; }
.gallery img { border-radius: 16px; }
.block .cal { color: var(--ink); text-decoration-color: var(--link); }

/* the first block under a page title sits close to it */
.page-head + .block, .page-head + .first { padding-top: 22px; }
/* second#DES-65: a section heading under the title keeps a clear step from it */
.page-head + .block:has(> h2:first-child) { padding-top: 36px; }

/* footer */
.foot .who b { font-weight: 700; letter-spacing: -.03em; font-size: 1.625rem; }
/* the pages: a small plain list under the name, so it never reads as a second header */
.foot { display: block; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 10px; border-top: 0; }
.foot nav a { min-height: 44px; border-bottom: 0; font-weight: 400; font-size: 1rem; }
.foot nav a:hover { text-decoration: underline; }
.foot nav a[aria-current="page"] { text-decoration: none; }

/* phone, home: the name stands large right under the header, so the header keeps only
   the logo; the name is clipped to 1 px and still read aloud */
@media (max-width: 959px) {
  body:has(> main > .opening) .top .home:has(> .logo) .name { position: absolute; left: 0; top: 0; width: 1px; height: 1px; font-size: 1px; line-height: 1; clip-path: inset(50%); white-space: nowrap; }
  body:has(> main > .opening) .top .home:has(> .logo) { min-width: 44px; }
  body:has(> main > .opening) .top .logo { max-width: 70vw; }
  /* the stroke stops at the gutter, on the left */
  .hero h1, .page-head h1 { padding-inline: 0 .1em; margin-inline: 0 -.1em; }
  /* Coming up and the newsletter share one band; the block after it is plain */
  .pair { background: var(--tint2); }
  .pair > .block, .pair + .block.band { background: none; }
  .pair > .block:last-child { padding-top: 0; }
}

@media (min-width: 960px) {
  body { font-size: 1.1875rem; }
  .top { min-height: 80px; }
  /* the two pills share one width */
  .acts:not(.one) { grid-template-columns: 1fr 1fr; }
  .top .name { font-size: 1.5rem; }
  .top-links { gap: 6px; }
  .top-links a { font-weight: 600; font-size: 1.0625rem; color: var(--ink); }
  .top-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
  .top-links a[aria-current="page"]::after { content: none; }

  /* the opening, headline first: the name across the page, one ruled strip with the status,
     the facts, the buttons and the date, then the photo as a wide panel */
  .opening { display: flex; flex-direction: column; }
  .hero { display: contents; }
  .hero-text { order: 1; padding: 64px var(--side) 0; }
  .hero.bare .hero-text { padding-top: 72px; }
  .hero h1 { font-size: 5.25rem; line-height: 1; letter-spacing: -.03em; }
  .hero h1.long { font-size: 4rem; line-height: 1.02; }
  .hero .town { font-size: 1.25rem; margin-top: 20px; }
  .opening > .first { order: 2; margin: 40px var(--side) 0; padding: 28px 0 56px; border-top: 1px solid var(--line); }
  /* the status, the lines and the buttons in one column under the name */
  .opening > .first:not(:has(> .next)) { display: block; }
  .opening > .first .acts { max-width: 460px; margin-top: 20px; }
  .opening > .first .status { justify-self: start; width: fit-content; max-width: 100%; }
  /* second#DES-26: the photo keeps a 2:1 shape, not a thin strip, up to 560 px tall */
  .hero img { order: 3; width: auto; height: auto; aspect-ratio: 2 / 1; max-height: 560px; margin: 0 var(--side); border-radius: 28px; box-shadow: none; }
  .hero.tall img { height: auto; aspect-ratio: 16 / 9; max-height: 640px; }
  /* with no blocks under it, the photo stands clear of the footer */
  .opening:last-child { padding-bottom: 72px; }
  .lines { font-size: inherit; line-height: 1.5; }

  .first { border-bottom: 0; padding: 36px var(--side) 56px; }
  .first .share { color: var(--ink); }
  .block { padding: 72px var(--side); }
  .block h2 { font-size: 2.25rem; }
  .facts b { font-size: 1.375rem; }
  .pair { background: none; }
  .block.band, .pair { background: none; border-block: 0; }
  .block.band-wide, .pair.band-wide { background: var(--tint2); border-block: 0; }
  .pair > .block.band-wide { border-block: 0; }
  .photos { grid-template-columns: 2fr repeat(5, 1fr); gap: 12px; }
  .page-head { padding: 64px var(--side) 12px; }
  .page-head + .block, .page-head + .first { padding-top: 32px; }
  .page-head h1 { font-size: 4.5rem; }


  /* inner pages: one white sheet with round corners on the tinted page, as wide as its
     text column (40rem) and its margins, so lists and rows end where the text does (MP-35) */
  main:has(> .page-head) > * { box-sizing: border-box; width: min(840px, 100% - 64px); margin-inline: auto; padding-inline: 100px; background: #fff; border-inline: 1px solid var(--line); }
  main:has(> .page-head) > :first-child { margin-top: 48px; border-top: 1px solid var(--line); border-radius: 32px 32px 0 0; }
  main:has(> .page-head) > :last-child { margin-bottom: 80px; border-bottom: 1px solid var(--line); border-radius: 0 0 32px 32px; }
  main:has(> .page-head) > .block.band, main:has(> .page-head) > .block.band-wide { background: #fff; }
  main:has(> .page-head) > .block { padding-block: 44px; }
  main:has(> .page-head) > .page-head + .block { padding-top: 32px; }
  main:has(> .page-head) > .page-head + .block:has(> h2:first-child) { padding-top: 56px; }
  /* text inside the sheet ends at one edge; lists, rows and the status use the sheet's width */
  main:has(> .page-head) > * :is(.prose, .text, .lede, .note, p), main:has(> .page-head) > .block:is(.prose, .text) > * { max-width: 40rem; }
  main:has(> .page-head) > .block > :is(.rows, .status, .acts, .next) { max-width: none; }
  /* second#DES-64: Contact's buttons too */
  main:has(> .page-head) > :is(.block, .first) > .acts { max-width: 460px; }
  /* second#DES-27: the status is a pill at its own width, as on Home */
  main:has(> .page-head) > .block > .status { width: fit-content; max-width: 100%; }
  /* a fee or a name stays near its label */
  main:has(> .page-head) > .block > .table { max-width: 40rem; }
  main:has(> .page-head) .block:has(> .gallery, > .list) > :not(.gallery, .list, .more-photos) { margin-inline: 0; }
  /* the sheet is one column: Visit us and the campuses run down it, as on a phone */
  main:has(> .page-head) > .block.visit { display: block; }

  /* Welcome: the words left, the facts right, whenever there are facts */
  main .block.intro.intro:has(.facts) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); grid-template-rows: auto auto 1fr; column-gap: 80px; }
  main .block.intro.intro:has(.facts) > * { max-width: none; }
  main .block.intro.intro:has(.facts) > :not(.facts) { max-width: 65ch; }
  main .intro .facts { grid-column: 2; grid-row: 2 / span 2; margin-top: 18px; }

  /* an inner page's status sits under the title at its own width */
  .page-head + .first { display: block; }
  .page-head + .first.touch > .rows { margin-top: 20px; }
  .page-head + .first .status { width: fit-content; max-width: 100%; }


}

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active { transform: none; } }

/* design-director#1: on a short phone screen the photo takes what the first screen leaves,
   so Call and WhatsApp stay on it (audit-public-css) */
@media (max-width: 599px) {
  :is(.hero, .hero.tall) img { max-height: max(120px, 100svh - 491px); }
}
