/* Tessellate static front. Colour encodes something: teal = maths,
   plum = languages, saffron = group workshops. The tile band is the one
   ornament; everything else is type and rules. */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin-500-normal.woff2?v=1") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin-700-normal.woff2?v=1") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/fonts/newsreader-latin-400-normal.woff2?v=1") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("/fonts/newsreader-latin-400-italic.woff2?v=1") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/fonts/newsreader-latin-600-normal.woff2?v=1") format("woff2"); }

:root {
  --paper:     #f1f3ee;
  --paper-2:   #e5e9e1;
  --surface:   #fbfcf9;
  --ink:       #18263a;
  --ink-dim:   #4d5b6f;
  --line:      #cdd4c9;
  --maths:     #0f6e68;
  --langs:     #7a3f7e;
  --saffron:   #e0a019;
  --on-accent: #ffffff;
  --tile-q:    #dfe4da;
  --tile-q2:   #cbd3c6;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --text:    "Newsreader", "Iowan Old Style", Georgia, serif;
  --gutter: 24px;
  --maxw: 1200px;

  /* calendar islands read these seams */
  --pc-cal-ink: var(--ink);
  --pc-cal-muted: var(--ink-dim);
  --pc-cal-line: var(--line);
  --pc-cal-surface: var(--surface);
  --pc-cal-accent: var(--maths);
  --pc-cal-accent-ink: var(--on-accent);
  --pc-cal-radius: 2px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #111923;
    --paper-2:   #18222f;
    --surface:   #1a2533;
    --ink:       #e7ece3;
    --ink-dim:   #a3afbf;
    --line:      #2e3c4e;
    --maths:     #4fc2b6;
    --langs:     #d69ed9;
    --saffron:   #f0b83c;
    --on-accent: #0d151f;
    --tile-q:    #1c2735;
    --tile-q2:   #243142;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--saffron); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }

/* tiles */
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tq  { fill: var(--tile-q); }
.tq2 { fill: var(--tile-q2); }
.tm  { fill: var(--maths); }
.tl  { fill: var(--langs); }
.tw  { fill: var(--saffron); }
.band { display: block; width: 100%; height: 41.57px; }
.band-foot { margin-top: 32px; }

/* header */
.top {
  max-width: var(--maxw); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.02em; }
.mark { width: 34px; height: 30px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-family: var(--display); font-weight: 500; font-size: 1rem; }
.nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--saffron); }
.nav-signin { padding-left: 14px !important; border-left: 1px solid var(--line); }

/* hero: the live week is the page */
.hero {
  max-width: var(--maxw); margin: 0 auto; padding: 56px var(--gutter) 72px;
  display: grid; gap: 40px; align-items: start;
}
.hero h1 { font-size: clamp(2.5rem, 5vw, 4.2rem); line-height: 1.02; letter-spacing: -.03em; max-width: 11ch; }
.lede { font-size: 1.2rem; color: var(--ink-dim); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.btn {
  display: inline-block; font-family: var(--display); font-weight: 500; font-size: 1rem; line-height: 1.2;
  text-decoration: none; padding: 10px 2px; border-bottom: 2px solid var(--saffron);
}
.btn-primary {
  padding: 14px 30px 14px 20px; border: 0; background: var(--ink); color: var(--paper);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%);
}
.btn-primary:hover { background: var(--maths); color: var(--on-accent); }

.plate { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--saffron); padding: 24px 24px 28px; min-width: 0; }
.plate-head { display: grid; gap: 4px 24px; margin-bottom: 18px; }
.plate-head h2 { font-size: 1.6rem; margin: 0; }
.plate-head p { margin: 0; color: var(--ink-dim); font-size: 1rem; }
.legend { list-style: none; margin: 6px 0 0; padding: 0; display: flex; gap: 18px; font-family: var(--display); font-size: .9rem; }
.legend li, .subjects span { display: inline-flex; align-items: center; gap: 7px; }
.legend li::before, .subjects span::before {
  content: ""; width: 12px; height: 10.4px; background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.s-maths { color: var(--maths); }
.s-languages { color: var(--langs); }
.island { min-height: 180px; }
.island-fallback { color: var(--ink-dim); font-size: 1rem; }

/* calendar island, restyled by tokens and pc-* hooks only */
.plate .pc-cal { font-family: var(--display); font-size: .95rem; }
.plate .pc-cal-title { font-weight: 500; }
.plate .pc-wl { gap: 0; }
.plate .pc-wl-day { border-radius: 0; margin: -1px 0 0 -1px; background: var(--paper); }
.plate .pc-wl-day.today { background: var(--surface); box-shadow: inset 0 3px 0 var(--saffron); border-color: var(--line); }
.plate .pc-wl-day.today .pc-wl-dayhead { color: var(--ink); }
.plate .pc-wl-dayhead { text-transform: none; letter-spacing: 0; font-size: .9rem; font-weight: 700; color: var(--ink); }
.plate .pc-wl-class { border-left-width: 4px; border-radius: 0; background: var(--surface); }
.plate .pc-wl-class strong { font-weight: 700; }
.pc-cal .pc-cal-btn-primary { color: var(--pc-accent-ink); }
.plate .pc-cal-summary { border-radius: 0; border-left: 4px solid var(--pc-accent); }
.plate .pc-cal-form input, .plate .pc-cal-form select, .plate .pc-cal-form textarea { font-family: var(--text); font-size: 1rem; }
.pc-wg-style-maths { --pc-accent: var(--maths); }
.pc-wg-style-languages { --pc-accent: var(--langs); }

/* the two ways in */
.route {
  max-width: var(--maxw); margin: 0 auto; padding: 64px var(--gutter);
  display: grid; gap: 28px 56px; border-top: 1px solid var(--line);
}
.route h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.route-text p { color: var(--ink-dim); max-width: 32em; }
.more { font-family: var(--display); font-weight: 500; }
.route-workshops h2 { box-shadow: inset 0 -6px 0 color-mix(in srgb, var(--saffron) 55%, transparent); display: inline; }
.route-workshops .route-text p { margin-top: 1em; }

.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-content: start; padding: 1px 0 0 1px; }
.price-card {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  margin: -1px 0 0 -1px; padding: 22px 22px 24px; border: 1px solid var(--line); background: var(--surface);
}
.price-card h3 { font-size: 1.15rem; font-weight: 500; margin: 0; }
.price-card .price { font-family: var(--display); font-weight: 700; font-size: 1.9rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-card .price small { font-size: .6em; }
.price-unit, .price-per, .price-note { margin: 0; font-size: .98rem; color: var(--ink-dim); }
.price-flag { font-family: var(--display); font-size: .85rem; font-weight: 500; color: var(--saffron); }
.price-card.is-featured { background: var(--ink); color: var(--paper); border-color: var(--ink); z-index: 1; }
.price-card.is-featured .price-unit, .price-card.is-featured .price-per, .price-card.is-featured .price-note { color: color-mix(in srgb, var(--paper) 78%, var(--ink)); }
.price-card .btn { margin-top: auto; align-self: flex-start; padding: 12px 2px 2px; border: 0; border-bottom: 2px solid var(--saffron); background: none; color: inherit; clip-path: none; }

/* how a package works: a real sequence */
.how { max-width: var(--maxw); margin: 0 auto; padding: 64px var(--gutter); border-top: 1px solid var(--line); }
.how h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.steps { list-style: none; counter-reset: step; margin: 28px 0 0; padding: 0; display: grid; gap: 32px 28px; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 14px; }
.steps li::before { content: counter(step); display: block; font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--ink-dim); margin-bottom: 10px; }
.steps h3 { font-size: 1.2rem; }
.steps p { color: var(--ink-dim); margin: 0; }

.tutors { max-width: var(--maxw); margin: 0 auto; padding: 64px var(--gutter) 24px; border-top: 1px solid var(--line); }
.tutors h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.people { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 32px 40px; }
.people h3 { font-size: 1.35rem; margin-bottom: 4px; }
.subjects { font-family: var(--display); font-size: .95rem; color: var(--ink-dim); margin-bottom: 8px; }
.subjects span { margin-right: 6px; font-weight: 500; }
.people p:last-child { color: var(--ink-dim); margin: 0; }

.foot { max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter) 48px; font-size: 1rem; color: var(--ink-dim); }
.foot p { max-width: 46em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--display); font-weight: 500; }
.foot-links a { color: var(--ink); }

/* lessons page */
.lessons-head { max-width: var(--maxw); margin: 0 auto; padding: 48px var(--gutter) 40px; }
.lessons-head h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); letter-spacing: -.03em; }
.plate-wide { margin: 0 max(var(--gutter), (100% - var(--maxw)) / 2 + var(--gutter)) 32px; }

@media (min-width: 640px) {
  .steps, .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 56px; padding-top: 72px; }
  .hero-copy { position: sticky; top: 24px; }
  .route { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plate-head { grid-template-columns: 1fr auto; align-items: end; }
  .plate-head .legend { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 1.0625rem; }
  .hero { padding-top: 36px; padding-bottom: 48px; }
  .plate { padding: 18px 14px 20px; margin: 0 calc(-1 * var(--gutter) + 4px); }
  .plate.plate-wide { margin: 0 4px 32px; }
  .route, .how { padding-top: 48px; padding-bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
