/* GreenCollege — one shared stylesheet.
   Editorial restraint: warm paper, forest green primary, one clay accent,
   alternating tinted bands. No shadows, no gradients, no animation. */

:root {
  /* Surfaces */
  --paper:       #faf8f4;   /* warm off-white page background */
  --sage:        #eaeee6;   /* faint tinted band, 1.11:1 step from paper */

  /* Ink */
  --ink:         #1e1a16;   /* warm near-black — 16.3:1 on paper */
  --ink-soft:    #55504a;   /*  7.5:1 on paper */

  /* Primary */
  --green:       #1b4332;   /* 10.4:1 on paper */
  --green-dark:  #123027;

  /* Secondary. Two steps, because #b5643c is only 4.08:1 on paper:
     --clay is for LARGE marks (drop cap, card numerals) where 3:1 applies;
     --clay-ink is for small text (section numbers) where 4.5:1 applies. */
  --clay:        #b5643c;
  --clay-ink:    #96502d;   /* 5.69:1 on paper, 5.13:1 on sage */

  /* Rules */
  --rule:        #ddd8cf;
  --rule-strong: #c9c2b6;

  --measure: 42.5rem;
  --serif: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;   /* 17px */
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

@media (min-width: 40em) {
  body { font-size: 1.125rem; }  /* 18px */
}

/* Thin coloured rule across the very top of every page. The inset shadow is
   offset right so the leftmost 88px paints clay — a hard edge, not a gradient. */
body::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  height: 3px;
  background: var(--green);
  box-shadow: inset 88px 0 0 var(--clay);
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main { flex: 1 0 auto; }

.band { padding: 3rem 0; }

@media (min-width: 40em) {
  .band { padding: 4.5rem 0; }
}

main > .band:first-child { padding-top: 2.5rem; }

.band--tint { background-color: var(--sage); }

/* One band per page carries fine diagonal hatching at low opacity. */
.band--pattern {
  background-color: var(--sage);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M-1 1l2-2M0 10L10 0M9 11l2-2' stroke='%231b4332' stroke-width='0.7' stroke-opacity='0.13' fill='none'/%3E%3C/svg%3E");
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--green);
  color: var(--paper);
  font-size: 0.9375rem;
  text-decoration: none;
  transform: translateY(-130%);
}

.skip-link:focus { transform: translateY(0); }

/* ---------- Links ---------- */

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

a {
  transition: color 150ms ease, text-decoration-thickness 150ms ease,
              text-decoration-color 150ms ease;
}

a:hover {
  color: var(--green-dark);
  text-decoration-thickness: 2px;
}

a:focus { outline: 2px solid var(--green); outline-offset: 2px; }
a:focus:not(:focus-visible) { outline: none; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0 1.25rem;
}

.site-header .wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 44em) {
  .site-header .wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
}

@media (min-width: 44em) {
  .wordmark { font-size: 1.75rem; }
}

.wordmark { transition: color 150ms ease; }
.wordmark:hover { color: var(--green-dark); text-decoration: none; }

.wordmark__mark {
  width: 1.3em;
  height: 1.3em;
  flex: 0 0 auto;
  color: var(--green);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-nav li { margin: 0; max-width: none; }

.site-nav a {
  display: inline-block;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a { transition: color 150ms ease, border-bottom-color 150ms ease; }
.site-nav a:hover { color: var(--green); border-bottom-color: var(--green); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--clay); }

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
}

h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
  margin: 0 0 0.75rem;
}

/* The home page headline is the main visual event. */
.h1-display {
  font-size: clamp(2.15rem, 6.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1.3125rem;
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}

@media (min-width: 40em) {
  h2 { font-size: 1.5rem; }
}

* + h2 { margin-top: 2.75rem; }

h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  margin: 2rem 0 0.5rem;
}

/* Section numbers: small, letterspaced, warm accent. Decorative — hidden
   from assistive technology at the markup level. */
.sec {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--clay-ink);
  margin-bottom: 0.55rem;
}

p { margin: 0 0 1.2rem; }

ul, ol { margin: 0 0 1.2rem; padding-left: 1.25rem; }

li { margin-bottom: 0.55rem; }
li:last-child { margin-bottom: 0; }

/* Cap the measure at roughly 68 characters. */
p, li, figcaption { max-width: 68ch; }

.lead { color: var(--ink); }

/* Drop cap on the opening paragraph of the home page. */
.dropcap::first-letter {
  float: left;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 3.9em;
  line-height: 0.82;
  color: var(--clay);
  padding-right: 0.07em;
  margin-top: 0.05em;
}

.note { color: var(--ink-soft); font-size: 0.9375rem; }

.email { font-size: 1.25rem; margin: 0 0 1.5rem; }

@media (min-width: 40em) {
  .email { font-size: 1.4rem; }
}

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

/* ---------- Hand-drawn underline (SVG path, not a border) ---------- */

.hand-rule {
  display: block;
  width: 8.5rem;
  height: auto;
  margin: 0 0 1.9rem;
  fill: none;
  stroke: var(--clay);
  stroke-width: 2;
  stroke-linecap: round;
}

/* ---------- Pull quote ---------- */

.pullquote {
  margin: 3rem 0 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--clay);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.2vw, 1.7rem);
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.pullquote p { margin: 0; max-width: none; }
.pullquote + p { margin-top: 3rem; }

@media (min-width: 58em) {
  .pullquote { padding-left: 2rem; }
}

/* ---------- Session flow diagram ---------- */

.flow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 2.5rem 0 0;
}

.flow__step { display: flex; align-items: baseline; gap: 0.7rem; }

.flow__num {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--clay-ink);
}

.flow__label {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--ink);
}

.flow__seg { fill: none; stroke: var(--rule-strong); stroke-width: 1.4; stroke-linecap: round; }
.flow__seg path { vector-effect: non-scaling-stroke; }

.flow__seg--h { display: none; }
.flow__seg--v { display: block; width: 8px; height: 2rem; margin-left: 0.45rem; }

@media (min-width: 46em) {
  .flow { flex-direction: row; align-items: center; }
  .flow__step { flex-direction: column; align-items: center; gap: 0.3rem; text-align: center; }
  .flow__label { font-size: 1.375rem; }
  .flow__seg--v { display: none; }
  .flow__seg--h { display: block; flex: 1 1 auto; width: auto; height: 8px; margin: 0 0.9rem; }
}

/* ---------- Topic cards ---------- */

.cards {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 40em) {
  .cards { grid-template-columns: 1fr 1fr; gap: 1rem; }
}

.card {
  position: relative;
  margin: 0;
  max-width: none;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  padding: 1.1rem 3.4rem 1.2rem 1.15rem;
  line-height: 1.5;
}

.card { transition: border-color 150ms ease; }
.card:hover { border-color: var(--green); }

.card__num {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--clay);
}

/* ---------- Founders ---------- */

.founders {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.75rem;
  margin-top: 2.25rem;
}

@media (min-width: 44em) {
  .founders { grid-template-columns: 1fr 1fr; gap: 2.25rem; }

  /* Line the two columns up row for row — portrait, name, detail — so a
     longer caption in one column does not push its name out of step. */
  @supports (grid-template-rows: subgrid) {
    .founders { grid-template-rows: auto auto auto; }
    .founder { display: grid; grid-row: span 3; grid-template-rows: subgrid; }
  }
}

.founder h2 { margin-top: 1.1rem; }
.founder p:last-child { margin-bottom: 0; }

/* ---------- The safeguarding page stays plain ----------
   No tint, no hatching, no pull quote, no drawn rules. Sections are divided by
   a thin line and numbered in muted ink, so the page reads as a document
   rather than as a designed page. Decoration there would undermine it. */

.plain .band { background: none; padding: 2.25rem 0; }
.plain .band + .band { border-top: 1px solid var(--rule); }
.plain .sec { color: var(--ink-soft); letter-spacing: 0.16em; }

@media (min-width: 40em) {
  .plain .band { padding: 2.75rem 0; }
}

/* ---------- Photography slots ---------- */

.photo { margin: 0; }

.slot {
  border: 1px dashed var(--rule-strong);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='2' cy='2' r='1' fill='%231b4332' fill-opacity='0.14'/%3E%3C/svg%3E");
}

.slot--banner { aspect-ratio: 3 / 1; }
.slot--portrait { aspect-ratio: 4 / 5; max-width: 19rem; }

.photo figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

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

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0 3rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.site-footer p { margin: 0 0 0.3rem; }
.site-footer p:last-child { margin-bottom: 0; }
.site-footer a { color: var(--green); }

/* ---------- Breaking the column ----------
   Pull quotes, diagrams, card grids and photo slots step outside the text
   measure. This must come AFTER the component rules above: several of them
   set a `margin` shorthand, which would otherwise reset these margins. */

@media (min-width: 58em) {
  .wide { margin-left: -3.25rem; margin-right: -3.25rem; }
}

/* ---------- Motion ----------
   A gentle fade and rise as each section enters, driven entirely by CSS
   scroll-driven animation. No JavaScript is involved, so there is no state in
   which a script failing to run can leave the page blank: browsers without
   `animation-timeline` simply render every section, which is the correct
   result. Motion applies only when the visitor has expressed no preference
   against it. */

@keyframes band-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    main > .band {
      animation: band-rise 300ms ease-out both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  main > .band { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------- Print ---------- */

@media print {
  body { background: #fff; font-size: 11pt; }
  body::before { display: none; }
  main > .band { animation: none !important; opacity: 1 !important; transform: none !important; }
  .site-nav, .skip-link, .slot, .pullquote { display: none; }
  .band, .band--tint, .band--pattern { background: none; padding: 1rem 0; }
  a { color: #000; text-decoration: underline; }
  .wrap { max-width: none; padding: 0; }
}
