/* ==========================================================================
   New Rochelle
   Single stylesheet. Plain CSS, no build step.
   Tokens and shared pieces follow the Reformation Louisiana site so the two
   read as one family.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts, self hosted so there is no third party request at runtime.
   Spectral for headings (transitional serif, drawn for screen).
   Source Sans 3 for body (humanist sans, variable weight 400 to 600).
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/spectral-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/spectral-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/spectral-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/spectral-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/source-sans-3-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/source-sans-3-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Palette. Warm paper, near black ink, one deep oxblood accent. */
  --paper: #FBFAF7;
  --ink: #1A1917;
  --muted: #5C574E;
  --rule: #E2DDD2;
  --accent: #6E1E1E;
  --accent-deep: #561717;
  /* Paper at 88%, for the sticky masthead: type scrolling under it stays
     faintly visible rather than being cut off by an opaque bar. */
  --paper-veil: rgba(251, 250, 247, 0.88);

  --font-serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Type scale, roughly a 1.2 ratio, fluid so mobile needs no extra queries. */
  --size-h1: clamp(2.5rem, 1.6rem + 4vw, 4.5rem);
  --size-h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --size-h3: 1.1875rem;
  --size-lead: clamp(1.1875rem, 1.1rem + 0.5vw, 1.4375rem);
  --size-body: 1.0625rem;
  --size-small: 0.9375rem;
  --size-eyebrow: 0.8125rem;

  --space: 1rem;
  /* Tighter than the conference site's: that page has full width image bands
     filling the gaps between sections, and this one deliberately has none. */
  --section-gap: clamp(3.25rem, 2.5rem + 4vw, 5.5rem);

  --container: 68rem;
  --measure: 33rem; /* holds body copy near 65 characters per line */

  /* Height of the sticky masthead band. Anything that has to clear it
     (anchor targets, the sticky section headings) is measured from this. */
  --masthead-h: 4.35rem;
  --ease: cubic-bezier(0.2, 0.6, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* Nothing on the page depends on motion, so it can all be switched off. */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1.15em;
}

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

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-deep);
}

/* Ink rather than accent: the accent ring was invisible against the oxblood
   buttons, which is exactly where it matters. */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--paper);
}

.button:focus-visible {
  outline-color: var(--paper);
  box-shadow: 0 0 0 5px var(--accent-deep);
}

::selection {
  background-color: rgba(110, 30, 30, 0.15);
}

/* Anchor targets have to clear the sticky masthead. */
[id] {
  scroll-margin-top: calc(var(--masthead-h) + 1.5rem);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* Hidden without widening the page, so no stray horizontal scrollbar. */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  background-color: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 50;
}

.skip-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  left: 0;
  top: 0;
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Shared pieces
   -------------------------------------------------------------------------- */

/* .eyebrow, .lead, .prose and .plain-list are unused while the page is just
   the flyer plus a way to pay. They are kept because they are shared
   vocabulary with the Reformation Louisiana site, and any copy added later
   will want them. */
.eyebrow {
  font-size: var(--size-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.lead {
  font-family: var(--font-serif);
  font-size: var(--size-lead);
  line-height: 1.45;
}

.button {
  display: inline-block;
  background-color: var(--accent);
  color: var(--paper);
  font-size: var(--size-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 2rem;
  border: 1px solid var(--accent);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease);
}

.button:hover {
  background-color: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--paper);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.prose {
  max-width: var(--measure);
}

.plain-list {
  list-style: none;
  margin: 0 0 1.15em;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.plain-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.note {
  color: var(--muted);
  font-size: var(--size-small);
}

/* --------------------------------------------------------------------------
   Masthead. A thin band, not a navigation menu.
   -------------------------------------------------------------------------- */

/* Sticky, so the name and the way back to Enroll stay reachable down a long
   single page. Translucent paper rather than a solid bar: the rules and type
   passing underneath stay faintly visible, which keeps it feeling like a band
   printed on the sheet rather than a floating toolbar. */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--masthead-h);
  border-bottom: 1px solid var(--rule);
  background-color: var(--paper-veil);
  backdrop-filter: blur(10px) saturate(1.4);
}

/* Where the backdrop cannot be blurred, fall back to solid paper so the band
   never reads as muddy. */
@supports not (backdrop-filter: blur(10px)) {
  .masthead {
    background-color: var(--paper);
  }
}

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

.masthead__wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.masthead__lion {
  width: auto;
  height: 1.7rem;
  flex-shrink: 0;
}

.masthead__wordmark:hover {
  color: var(--accent);
}

.masthead__link {
  position: relative;
  font-size: var(--size-eyebrow);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

/* A hairline that grows in from the left, in place of an underline: it lands
   at the same weight as every other rule on the page. */
.masthead__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}

.masthead__link:hover::after {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   Hero, composed like the title page of a printed program.
   The drawn wordmark carries the title, so it stands in for the h1 text.
   -------------------------------------------------------------------------- */

.hero {
  text-align: center;
  padding-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
  /* Deliberately tighter than --section-gap so the wordmark sits near the top
     of the screen rather than below a screenful of paper. */
  padding-top: clamp(1.75rem, 1rem + 2.5vw, 3rem);
}

.hero__title {
  margin: 0;
}

.hero__title img {
  /* Not a full 100% on narrow screens: the lion's paw wants a little air
     before the gutter. */
  width: min(34rem, 96%);
  margin-inline: auto;
}

/* The year, set the way the printed calendar sets it: letterspaced serif
   capitals directly under the wordmark. */
.hero__year {
  margin: clamp(0.75rem, 2vw, 1.25rem) 0 clamp(1rem, 2.5vw, 1.5rem);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 0.85rem + 0.7vw, 1.375rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   The double rule under the title, lifted straight off the printed calendar:
   a heavy line with a hairline beneath it. It is the strongest single piece of
   brand on the flyer, so it does the same job here.
   -------------------------------------------------------------------------- */

.rule-double {
  margin: 0;
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  height: 3px;
}

.hero__cta {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
}

/* --------------------------------------------------------------------------
   Section headings. Each one sits in its own column and holds there while its
   section scrolls past, the way a running head sits on a printed page. It
   releases at the section boundary because it is stuck inside the grid rather
   than to the viewport, so one heading is never on screen with another's
   content.
   -------------------------------------------------------------------------- */

.section__title {
  font-size: var(--size-h2);
  margin-bottom: 1.75rem;
}

.section__body {
  min-width: 0;
}

@media (min-width: 56rem) {
  .section__grid {
    display: grid;
    grid-template-columns: 16rem 1fr;
    gap: 4rem;
    align-items: start;
  }

  .section__title {
    position: sticky;
    top: calc(var(--masthead-h) + 2.25rem);
    margin-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   Sections. Heading sits in its own column on wide screens.
   -------------------------------------------------------------------------- */

/* With no imagery, a hairline at each section boundary is what keeps the page
   structured rather than drifting. */
.section {
  padding-block: var(--section-gap);
  border-top: 1px solid var(--rule);
}

/* The flyer's closing line, set the way it sets it: centred italic serif at
   the foot of the schedule. */
.closing-note {
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  max-width: 46ch;
  text-wrap: pretty;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Course entries, set the way the printed calendar sets them: the title on the
   left, the day and date ranged right against it, then a line of format and
   instructor in italics with middots between.
   -------------------------------------------------------------------------- */

.entry {
  padding-top: 1.35rem;
  margin-top: 1.35rem;
  border-top: 1px solid var(--rule);
}

.entry:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 2rem;
}

/* Takes the remaining width so the dates keep their own column, and drops to
   full width when there are no dates (the nine lecture series). */
.entry__body {
  flex: 1 1 22rem;
  min-width: 0;
}

.entry__title {
  font-size: var(--size-h3);
  font-weight: 500;
  margin: 0;
}

/* The dates column. Ranged right on wide screens, left underneath the title
   on narrow ones, where a right aligned scrap of text just looks stranded. */
.entry__when {
  margin: 0;
  font-family: var(--font-serif);
  font-variant-numeric: lining-nums;
  line-height: 1.35;
}

.entry__when em {
  display: block;
  color: var(--muted);
  font-size: var(--size-small);
}

.entry__when strong {
  font-weight: 500;
}

@media (min-width: 40rem) {
  .entry__when {
    text-align: right;
  }
}

.entry__subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.entry__meta {
  margin: 0.35rem 0 0;
  font-family: var(--font-serif);
  font-size: var(--size-small);
  color: var(--muted);
}

.entry__meta em {
  font-style: italic;
}

.entry__meta strong {
  font-weight: 500;
  color: var(--ink);
}

/* The nine lectures, boxed in a three by three grid the way the calendar
   prints them. One hairline per cell, overlapped so the grid reads as a single
   ruled table rather than a set of stacked boxes. */
.lectures {
  list-style: none;
  margin: clamp(1.25rem, 3vw, 1.75rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--rule);
}

.lectures li {
  padding: 0.7rem 1rem;
  text-align: center;
  border-top: 1px solid var(--rule);
}

.lectures li:first-child {
  border-top: 0;
}

.lectures time {
  display: block;
  font-family: var(--font-serif);
  font-variant-numeric: lining-nums;
}

/* Accent on the numerals: with no imagery the course lists are most of the
   page, and this keeps them from reading as an undifferentiated grey block. */
.lectures__no {
  display: block;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (min-width: 40rem) {
  .lectures {
    grid-template-columns: repeat(3, 1fr);
  }

  .lectures li {
    border-left: 1px solid var(--rule);
  }

  /* Only the first row keeps a clear top; the rest of the rules come from the
     cells above, so nothing doubles up. */
  .lectures li:nth-child(-n + 3) {
    border-top: 0;
  }

  .lectures li:nth-child(3n + 1) {
    border-left: 0;
  }
}

/* --------------------------------------------------------------------------
   Tuition and payment. Stripe hosted, so no card details ever touch this site.
   -------------------------------------------------------------------------- */

.pay {
  max-width: 34rem;
  margin-inline: auto;
  text-align: center;
}

.pay__mark {
  width: 2rem;
  margin: 0 auto clamp(1.25rem, 3vw, 1.75rem);
}

.pay__amount {
  font-family: var(--font-serif);
  font-size: var(--size-h2);
  line-height: 1.2;
  max-width: 22ch;
  margin-inline: auto;
  margin-bottom: 1rem;
  font-variant-numeric: lining-nums;
  text-wrap: balance;
}

.pay__terms {
  color: var(--muted);
  max-width: 44ch;
  margin-inline: auto;
  margin-bottom: clamp(1.75rem, 4vw, 2.25rem);
  text-wrap: pretty;
}

.pay__action {
  margin-bottom: 0;
}

.pay__fine {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: var(--size-small);
}

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

.footer {
  border-top: 1px solid var(--rule);
  padding-block: 3rem;
  color: var(--muted);
  font-size: var(--size-small);
  text-align: center;
}

.footer p {
  margin: 0;
}

.footer__hosts {
  margin-bottom: 0.35rem;
}

.footer__download {
  margin-top: 1.5rem;
}

.footer__meta {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Print. A calendar of dates is a thing families print and stick on a fridge,
   so the page is set for paper: no colour bands, no navigation, no buttons,
   and every link's destination spelled out.
   -------------------------------------------------------------------------- */

@media print {
  :root {
    --section-gap: 1.5rem;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .masthead,
  .pay__action,
  .pay,
  .skip-link {
    display: none;
  }

  .masthead,
  .section__title {
    position: static;
  }

  /* Spell out where links go, since a printed page cannot be clicked. */
  .prose a[href^="http"]::after,
  .footer a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    word-break: break-all;
  }

  /* Never break a course or a lecture across a page. */
  .entry,
  .lectures li {
    break-inside: avoid;
  }

  .section__title {
    break-after: avoid;
  }
}
