/* ===== css/base.css ===== */
/* base.css
 *
 * Everything that is not a single section: reset, type, links, focus, buttons,
 * layout primitives, header/nav, footer. The build concatenates this file and
 * then every components/sections/*.css (alphabetical) into dist/css/styles.css.
 *
 * Colour, type, radius, border and shadow come from the theme's tokens only.
 * No hex values, no font names, no hard-coded radii in this file.
 */

/* ---------- reset ---------- */

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

* {
  margin: 0;
  padding: 0;
}

img,
picture,
video,
svg {
  max-width: 100%;
}

/* ---------- document ---------- */

/* Layout plumbing rather than a theme token: the height of the sticky header,
   rounded well up so no theme has to know its own (about 90px at the tallest today, with the 60px logo).
   Anything scrolled to - an in-page anchor, the skip link target, an element
   focused by Shift-Tab - clears the header instead of landing under it
   (WCAG 2.2 SC 2.4.11 Focus Not Obscured). */
:root {
  --header-offset: 6.5rem;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-offset);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- headings and text ---------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-text);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

h4 {
  font-size: var(--text-base);
}

p {
  max-width: var(--measure);
}

small,
.text-small {
  font-size: 0.875em;
}

code {
  font-family: ui-monospace, "SFMono-Regular", "Consolas", monospace;
  font-size: 0.9em;
}

/* ---------- links ---------- */

a {
  color: var(--color-accent);
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  color: var(--color-accent-hover);
}

/* ---------- focus ---------- */

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-control);
}

/* The skip link's target is focusable only programmatically, so it needs no
   ring of its own around the whole page. */
main:focus {
  outline: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  min-width: 44px;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-color: var(--color-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-on-accent);
}

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-accent);
  border-color: var(--color-border);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--color-surface);
  border-color: var(--color-accent);
  color: var(--color-accent-hover);
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition:
      background-color 0.15s ease,
      border-color 0.15s ease,
      color 0.15s ease;
  }
}

/* ---------- layout ---------- */

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

.section {
  padding: var(--space-section) 0;
}

/* Surface variants. */
.section-default {
  background: var(--color-bg);
}

.section-surface {
  background: var(--color-surface);
}

.section-surface-alt {
  background: var(--color-surface-alt);
}

/* Two sections on the same background read as one block, so close the gap. */
.section-default + .section-default,
.section-surface + .section-surface,
.section-surface-alt + .section-surface-alt {
  padding-top: 0;
}

.section-header {
  margin-bottom: 2.5rem;
  max-width: var(--measure);
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: var(--text-lead);
  color: var(--color-muted);
}

/* Lead paragraph under a title. */
.lead {
  font-size: var(--text-lead);
  max-width: var(--measure);
  margin: 0 0 1.5rem;
  color: var(--color-muted);
}

/* ---------- prose ---------- */

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

/* Several section templates put .prose on the .container itself. Keep the
   container's width there, so the text column starts at the same left edge as
   every other section, and cap the children at the measure instead. */
.container.prose {
  max-width: var(--container);
}

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

.prose > * + * {
  margin-top: 1.25em;
}

.prose h2,
.prose h3 {
  margin-top: 1.75em;
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.5em;
}

.prose img {
  border-radius: var(--radius-image);
}

/* ---------- accessibility helpers ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100vh;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-radius: var(--radius-control);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- draft flag ---------- */

/* The section-level flag is injected as the first child of the drafted
   <section> (scripts/build.js), so the section-adjacency rules above are
   unaffected and the flag lines up with the section's own content. */
.draft-flag-slot {
  margin-bottom: 1.25rem;
}

.draft-flag-slot .draft-flag {
  margin: 0;
}

.draft-flag {
  display: inline-block;
  margin: 0.5rem 1rem;
  padding: 0.125rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-highlight-2);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-control);
}

/* ---------- header and navigation ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: var(--border-width) solid var(--color-border);
}

/* Direct child only: #mobile-menu lives inside the nav and has a .container of
   its own, which must stay a plain block. */
nav > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: var(--weight-heading);
}

.logo img {
  height: 60px;
  width: auto;
}

.logo-mobile {
  display: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

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

#mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  line-height: 1;
  color: var(--color-text);
  background: none;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-control);
  cursor: pointer;
}

#mobile-menu {
  display: none;
  background: var(--color-bg);
  border-top: var(--border-width) solid var(--color-border);
  padding: 0.5rem 0 1rem;
}

#mobile-menu a:not(.btn) {
  display: block;
  padding: 0.75rem 0;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: var(--border-width) solid var(--color-border);
}

#mobile-menu .btn {
  margin-top: 1rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .logo-desktop {
    display: none;
  }

  .logo-mobile {
    display: block;
    height: 50px;
  }

  .nav-links,
  .nav-buttons {
    display: none;
  }

  #mobile-menu-btn {
    display: inline-flex;
  }

  #mobile-menu {
    display: block;
  }
}

/* ---------- footer ---------- */

footer {
  background: var(--color-surface-alt);
  border-top: var(--border-width) solid var(--color-border);
  padding: 2.5rem 0 2rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* inline-flex, so the link is only as wide as the logo: a full-width link is a
   large invisible target for a pointer and a confusing one for a screen reader. */
.footer-logo .logo {
  display: inline-flex;
}

.footer-logo .logo img {
  height: 50px;
  width: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--color-text);
  text-decoration: underline;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--color-accent-hover);
}

.footer-social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--color-text);
  text-decoration: underline;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: var(--color-accent-hover);
}

.footer-social-icon {
  flex: none;
}

.footer-legal {
  max-width: none;
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* ===== components/sections/about-intro.css ===== */
/* about-intro
 *
 * Portrait beside heading, paragraphs and optional credentials; stacked on a
 * phone with the portrait first. .about-intro-image is a stable hook: themes
 * mask it into their own shapes.
 */

.about-intro-layout {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (min-width: 48rem) {
  .about-intro-layout {
    grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  }
}

.about-intro-image {
  display: block;
  width: 100%;
  max-width: 22rem;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-image);
}

.about-intro-body:only-child {
  grid-column: 1 / -1;
}

.about-intro-body > * + * {
  margin-top: 1.25em;
}

.about-intro-title {
  margin-bottom: 0;
}

.about-intro-credentials {
  max-width: var(--measure);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: var(--radius-card);
  background: var(--color-highlight-1);
  color: var(--color-text);
}

.about-intro-credentials h3 {
  margin-bottom: 0.5rem;
}

.about-intro-credentials ul {
  list-style: disc;
  padding-left: 1.25em;
}

.about-intro-credentials li + li {
  margin-top: 0.375rem;
}

.about-intro-more {
  max-width: none;
}

/* ===== components/sections/audience-picker.css ===== */
/* audience-picker
 *
 * Three large choices, each a tinted block with an optional symbol, a heading
 * and its links in order. The tints cycle through the theme's three highlight
 * colours; text on them is always --color-text and links keep an underline in
 * the same colour, so nothing depends on the tint's contrast.
 */

.audience-picker-items {
  list-style: none;
  display: grid;
  /* min(15rem, 100%), so a raised base font size can't push a track wider than
     the container and force the page to scroll sideways. */
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: var(--space-gap);
  margin: 0;
  padding: 0;
}

.audience-picker-item {
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-card);
  color: var(--color-text);
  background: var(--color-highlight-1);
}

.audience-picker-item:nth-child(3n + 2) {
  background: var(--color-highlight-2);
}

.audience-picker-item:nth-child(3n) {
  background: var(--color-highlight-3);
}

/* align-self, because the item is a column flex box and a stretched image
   would be squashed out of its aspect ratio. */
.audience-picker-symbol {
  display: block;
  align-self: flex-start;
  width: auto;
  max-width: 100%;
  max-height: clamp(3.5rem, 10vw, 5rem);
  margin-bottom: 1rem;
}

.audience-picker-title {
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.audience-picker-blurb {
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.audience-picker-links {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
}

.audience-picker-link {
  display: block;
  padding: 0.625rem 0;
  color: var(--color-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: max(1px, 0.06em);
}

.audience-picker-links li + li .audience-picker-link {
  border-top: var(--border-width) solid var(--color-border);
}

.audience-picker-link:hover,
.audience-picker-link:focus-visible {
  color: var(--color-text);
  text-decoration-thickness: max(3px, 0.16em);
}

.audience-picker-link::after {
  content: "\00a0\2192";
}

@media (prefers-reduced-motion: no-preference) {
  .audience-picker-link {
    transition: text-decoration-thickness 0.15s ease;
  }
}

/* ===== components/sections/contact.css ===== */
/* contact
 *
 * Prose, then the ways to get in touch: the email address set large, and any
 * other links beneath it. Both are optional.
 */

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

.contact-body > h2:first-child {
  margin-top: 0;
}

.contact-email {
  max-width: none;
  margin-top: 1.75rem;
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  line-height: var(--leading-heading);
  overflow-wrap: break-word;
}

.contact-email a {
  display: inline-block;
  min-height: 24px;
  text-decoration: underline;
  text-decoration-thickness: max(1px, 0.06em);
}

.contact-email a:hover,
.contact-email a:focus-visible {
  text-decoration-thickness: max(2px, 0.12em);
}

.contact-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
}

.contact-link {
  display: inline-block;
  padding: 0.375rem 0;
  min-height: 24px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: max(1px, 0.06em);
}

.contact-link:hover,
.contact-link:focus-visible {
  text-decoration-thickness: max(2px, 0.12em);
}

@media (prefers-reduced-motion: no-preference) {
  .contact-email a,
  .contact-link {
    transition: text-decoration-thickness 0.15s ease;
  }
}

/* ===== components/sections/cta.css ===== */
/* cta
 *
 * An invitation, not a SaaS banner: heading and lead text on the left, the
 * button beside them on desktop and beneath on a phone. Nothing centred.
 */

.cta-layout {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: center;
}

@media (min-width: 48rem) {
  .cta-layout {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.cta-title {
  margin-bottom: 0.5rem;
}

.cta-subtitle {
  font-size: var(--text-lead);
  color: var(--color-muted);
  margin: 0;
}

.cta-actions {
  max-width: none;
  margin: 0;
}

/* ===== components/sections/faq.css ===== */
/* faq
 *
 * Questions and answers as a plain divided list, not boxes. Everything is
 * visible: no disclosure widget, so nothing has to be opened to be read or
 * found with the browser's own find.
 */

.faq-items {
  list-style: none;
  max-width: var(--measure);
  margin: 0;
  padding: 0;
}

.faq-item {
  padding: clamp(1rem, 3vw, 1.5rem) 0;
}

.faq-item + .faq-item {
  border-top: var(--border-width) solid var(--color-border);
}

.faq-item:first-child {
  padding-top: 0;
}

.faq-item:last-child {
  padding-bottom: 0;
}

.faq-question {
  margin-bottom: 0.375rem;
}

/* ===== components/sections/hero.css ===== */
/* hero
 *
 * The home page opening: heading, lead, optional symbol strip and button on
 * one side, image on the other. Sits on the page background - no dark band, no
 * full-bleed tinted photo. Without an image it is a single text column.
 */

.hero {
  padding: var(--space-section) 0;
}

.hero .hero-inner {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
}

/* Two columns only once there is room for both to read well. Text comes first
   in the markup, so the phone order is text then image with no reordering. */
@media (min-width: 52em) {
  .hero.hero-has-image .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 3.5rem);
  }
}

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

.hero .hero-body > * + * {
  margin-top: 1.25rem;
}

/* An optional symbol sits beside the heading; it carries no meaning of its own
   (alt=""), so it shrinks freely and wraps above the heading if space runs out. */
.hero .hero-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.hero .hero-symbol {
  display: block;
  width: clamp(2.75rem, 8vw, 4.5rem);
  height: auto;
  flex: 0 0 auto;
}

.hero .hero-title {
  flex: 1 1 12rem;
}

.hero .hero-lead {
  font-size: var(--text-lead);
  color: var(--color-muted);
  max-width: var(--measure);
}

.hero .hero-actions {
  max-width: none;
}

.hero .hero-media {
  min-width: 0;
}

.hero .hero-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-image);
}

/* ---------- symbol strip inside the hero ----------
 *
 * Duplicated from components/sections/symbol-strip.css, scoped under .hero.
 * The build has no partial mechanism, so the markup is duplicated too; keep
 * both copies in step. Sentence meaning is carried once, by the role="img"
 * wrapper's aria-label.
 */

.hero .symbol-strip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(0.5rem, 2vw, 1.25rem);
}

.hero .symbol-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

/* Sized by height, not width, for the reason given in symbol-strip.css: the
   symbols' widths differ, their drawn scale does not. */
.hero .symbol-strip-symbol {
  display: block;
  height: clamp(3.25rem, 10vw, 4.5rem);
  width: auto;
}

.hero .symbol-strip-word {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-text);
}

/* ===== components/sections/offer-list.css ===== */
/* offer-list
 *
 * Symbol-led rows, not boxed cards: a symbol column, then title, summary and
 * an optional link. The symbol column is always reserved, so rows still line
 * up when an offer has no symbol (every consultancy offer today).
 */

.offer-list-items {
  list-style: none;
  max-width: 52rem;
  margin: 0;
  padding: 0;
}

.offer-list-item {
  display: grid;
  grid-template-columns: clamp(2.75rem, 9vw, 4.5rem) 1fr;
  gap: clamp(0.875rem, 3vw, 1.75rem);
  align-items: start;
  padding: clamp(1.25rem, 3vw, 1.75rem) 0;
}

.offer-list-item + .offer-list-item {
  border-top: var(--border-width) solid var(--color-border);
}

.offer-list-item:first-child {
  padding-top: 0;
}

.offer-list-item:last-child {
  padding-bottom: 0;
}

/* When no offer in the list has a symbol (every consultancy offer today), the
   reserved column is empty space the whole list is indented past: collapse it.
   A browser without :has() drops the rule and keeps the reserved column. */
.offer-list-items:not(:has(.offer-list-symbol img)) .offer-list-item {
  grid-template-columns: 0 1fr;
  column-gap: 0;
}

.offer-list-symbol {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.offer-list-symbol img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: clamp(2.75rem, 9vw, 4.5rem);
}

/* The offer title is an h3 under a section title and an h2 when the list sits
   straight under the page h1, so the size is set by the class, not the element. */
.offer-list-title {
  font-size: var(--text-h3);
  margin-bottom: 0.375rem;
}

.offer-list-summary {
  color: var(--color-text);
}

.offer-list .draft-flag {
  margin: 0 0 0.5rem;
}

.offer-list-more {
  margin-top: 0.75rem;
}

.offer-list-link {
  display: inline-block;
  min-height: 24px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: max(1px, 0.06em);
}

.offer-list-link::after {
  content: "\00a0\2192";
}

.offer-list-link:hover,
.offer-list-link:focus-visible {
  text-decoration-thickness: max(2px, 0.12em);
}

@media (prefers-reduced-motion: no-preference) {
  .offer-list-link {
    transition: text-decoration-thickness 0.15s ease;
  }
}

/* ===== components/sections/page-hero.css ===== */
/* page-hero
 *
 * The opening of an inner page: a large h1 with an optional Widgit symbol
 * beside it, on the page background. No band, no image. There is no bottom
 * padding: the section below supplies the gap, so the heading and the content
 * read as one block separated by a single --space-section, the same as two
 * sections that share a background.
 */

.page-hero {
  padding: var(--space-section) 0 0;
}

/* The symbol is decorative (alt=""): it shrinks with the viewport and wraps
   above the heading rather than squeezing it. The heading keeps at least 14rem
   before it takes a line of its own. */
.page-hero .page-hero-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.5rem);
}

.page-hero .page-hero-symbol {
  display: block;
  width: clamp(2.75rem, 9vw, 5rem);
  height: auto;
  flex: 0 0 auto;
}

.page-hero .page-hero-title {
  flex: 1 1 14rem;
  min-width: 0;
}

.page-hero .page-hero-lead {
  margin-top: 1rem;
  font-size: var(--text-lead);
  color: var(--color-muted);
  max-width: var(--measure);
}

.page-hero .page-hero-actions {
  margin-top: 1.5rem;
  max-width: none;
}

/* ===== components/sections/project-cards.css ===== */
/* project-cards
 *
 * Image-led cards in the spirit of sarahsilverwood.com/work: a big landscape
 * image, the title in plain text beneath it, and nothing else. No border, no
 * shadow, no background, no padding box: the card is image + caption sitting
 * on the section background.
 *
 * Structure, which themes may rely on:
 *   .project-cards-grid   the grid
 *     .project-cards-card   a direct grid child, one per project
 *       .project-cards-link   the whole card is this one link
 *         .project-cards-image   <img>, or an empty <span> when no image
 *         .project-cards-title   h2 or h3 depending on the section heading
 *
 * Cards are direct children of the grid, so a theme can cycle irregular image
 * shapes with, for example:
 *   .project-cards-card:nth-child(3n + 2) .project-cards-image { ... }
 */

.project-cards-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--space-gap) * 2) calc(var(--space-gap) * 1.5);
}

/* Two columns from tablet up; one on phones. */
@media (min-width: 40rem) {
  .project-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(var(--space-gap) * 2.5) calc(var(--space-gap) * 1.5);
  }
}

.project-cards-link {
  display: block;
  color: var(--color-text);
  text-decoration: none;
}

/* Focus ring around the whole card, image and title together. */
.project-cards-link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 6px;
  border-radius: var(--radius-image);
}

.project-cards-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-image);
  /* Also the placeholder tint when a project has no image yet. */
  background: var(--color-surface-alt);
}

.project-cards-title {
  margin-top: 0.75rem;
  font-size: var(--text-h3);
  text-wrap: pretty;
}

/* Hover and focus-visible are deliberately identical, and touch both halves of
   the card. */
.project-cards-link:hover .project-cards-title,
.project-cards-link:focus-visible .project-cards-title {
  color: var(--color-accent);
  text-decoration: underline;
}

.project-cards-link:hover .project-cards-image,
.project-cards-link:focus-visible .project-cards-image {
  opacity: 0.85;
}

@media (prefers-reduced-motion: no-preference) {
  .project-cards-image {
    transition: opacity 0.15s ease;
  }

  .project-cards-title {
    transition: color 0.15s ease;
  }
}

.project-cards-more {
  margin-top: calc(var(--space-gap) * 2);
}

/* ===== components/sections/project-detail.css ===== */
/* project-detail
 *
 * One project's page: its h1, a lead image, the story in prose, an optional
 * grid of further images, an optional list of links out, and the way back.
 *
 * Structure, which themes may rely on:
 *   .project-detail-title     the page h1
 *   .project-detail-lead      the lead <img>
 *   .project-detail-body      prose, capped at --measure
 *   .project-detail-gallery   grid of further images
 *     .project-detail-image   one <img> in that grid
 *   .project-detail-links     list of links out, capped at --measure
 *   .project-detail-back      back to /projects
 *
 * Gallery items are direct children of the grid, so a theme can cycle
 * irregular image shapes with, for example:
 *   .project-detail-gallery > li:nth-child(2n) .project-detail-image { ... }
 */

.project-detail-title {
  max-width: var(--measure);
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

/* Wider than the text column so the photograph leads the page, but not the
   full width of the container: at 1280px that would be a 760px-tall image
   sitting over a 65ch paragraph. */
.project-detail-lead {
  display: block;
  width: 100%;
  max-width: calc(var(--measure) * 1.4);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-image);
  background: var(--color-surface-alt);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.project-detail-body,
.project-detail-links {
  max-width: var(--measure);
}

.project-detail-gallery {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-gap);
  /* Same width as the lead image, so the page has one right-hand edge. */
  max-width: calc(var(--measure) * 1.4);
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

@media (min-width: 40rem) {
  .project-detail-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-detail-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-image);
  background: var(--color-surface-alt);
}

.project-detail-links {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

/* 24px tall, so the link clears the WCAG 2.2 target size minimum with the gap
   its list leaves around it. */
.project-detail-links li a {
  display: inline-block;
  min-height: 24px;
}

.project-detail-back {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.project-detail-back a {
  display: inline-block;
  min-height: 24px;
  text-decoration: none;
}

.project-detail-back a:hover,
.project-detail-back a:focus-visible {
  text-decoration: underline;
}

/* ===== components/sections/quote.css ===== */
/* quote
 *
 * One testimonial, set large. A figure with a blockquote and a figcaption: no
 * stars, no carousel, nothing that moves.
 */

.quote-figure {
  max-width: var(--measure);
  padding-left: clamp(1rem, 3vw, 1.75rem);
  border-left: max(4px, calc(var(--border-width) * 3)) solid var(--color-accent);
}

.quote-text p {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.75rem);
  font-weight: var(--weight-heading);
  line-height: 1.35;
  text-wrap: pretty;
}

.quote-attribution {
  margin-top: 1rem;
  color: var(--color-muted);
}

.quote-role {
  white-space: normal;
}

/* ===== components/sections/stats.css ===== */
/* stats
 *
 * Open grid of symbol-led figures, not bordered cards in a row. Each figure is
 * one paragraph (number then label) so it reads as a single run of text to a
 * screen reader: "1,100 days of artist residencies in SEND schools".
 */

.stats-items {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem) var(--space-gap);
  margin: 0;
  padding: 0;
}

/* Below about 23rem two columns stop fitting the longest figures. */
@media (max-width: 22.5rem) {
  .stats-items {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 56rem) {
  .stats-items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stats-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: start;
}

.stats-symbol {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: clamp(2.75rem, 8vw, 4rem);
}

.stats-figure {
  max-width: none;
  margin: 0;
}

.stats-value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 1.1rem + 2.8vw, 3rem);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-accent);
  overflow-wrap: break-word;
}

.stats-label {
  display: block;
  margin-top: 0.25rem;
  color: var(--color-text);
}

.stats-more {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

/* ===== components/sections/steps.css ===== */
/* steps
 *
 * A real ordered list. The numbers are the list's own markers, styled large,
 * so they are never read twice or lost: no circles, no boxed cards.
 */

.steps-list {
  list-style: decimal;
  max-width: 50rem;
  margin: 0;
  padding-left: clamp(1.75rem, 6vw, 2.75rem);
}

.steps-item {
  padding: clamp(1rem, 2.5vw, 1.5rem) 0;
}

.steps-item + .steps-item {
  border-top: var(--border-width) solid var(--color-border);
}

.steps-item:first-child {
  padding-top: 0;
}

.steps-item::marker {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: var(--weight-heading);
  color: var(--color-accent);
}

.steps-title {
  margin-bottom: 0.375rem;
}

.steps-description {
  color: var(--color-text);
}

.steps-more {
  max-width: none;
  margin-top: 1.75rem;
}

/* ===== components/sections/symbol-strip.css ===== */
/* symbol-strip
 *
 * A row of Widgit symbols, each with its word beneath, spelling one sentence.
 * The sentence is exposed once (role="img" + aria-label on the row); the
 * symbols are alt="" and the printed words are aria-hidden, so it is never
 * read out symbol by symbol.
 *
 * The same markup and the same class names appear inside hero.html, where the
 * matching rules are scoped under .hero in hero.css. Keep the two in step.
 */

.symbol-strip .symbol-strip-title {
  margin-bottom: 1.5rem;
}

.symbol-strip .symbol-strip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(0.75rem, 3vw, 1.75rem);
}

.symbol-strip .symbol-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

/* Sized by height, not width. The symbols were drawn at one scale and then
   trimmed, so their widths differ a lot; matching heights is what makes the
   figures look the same size. Never taller than the source files (~190px). */
.symbol-strip .symbol-strip-symbol {
  display: block;
  height: clamp(4rem, 14vw, 6rem);
  width: auto;
}

.symbol-strip .symbol-strip-word {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: var(--text-h3);
  line-height: var(--leading-heading);
  color: var(--color-text);
}

/* ===== components/sections/text.css ===== */
/* text
 *
 * A plain run of prose, capped at the measure. Spacing and lists come from the
 * shared .prose rules in css/base.css.
 */

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

.text-content > h2:first-child {
  margin-top: 0;
}

.text .text-more {
  max-width: none;
  margin-top: 1.75em;
}
