/* Oxford Dynamics: the studio (the Racing Green direction, recoloured by the owner)
   A navy stage lit by the brand blue rgb(51, 181, 229) (cover, How we can help, close) below a white masthead, with paper and ink
   reading sections between. A wide display sans for statements, a grotesk for reading. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Saira";
  src: url("../fonts/saira-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fbfbf9;
  --white: #ffffff;
  --ink: #1d2125;
  --slate: #5d6670;
  --rule: #e4e7ea;
  --rule-strong: #c9ced3;
  --brand: #33b5e5;          /* rgb(51, 181, 229): the brand blue, the studio's light and accent */
  --stage: #0b1d2b;          /* the studio: a navy stage */
  --stage-floor: #06121b;    /* the stage's shadow at the floor */
  --on-stage: #eef6fa;       /* text on the stage (15.7:1) */
  --on-stage-2: #a9c9d8;     /* secondary text on the stage (9.8:1) */
  --on-brand: #0a2230;       /* text on a brand-blue fill (6.9:1) */
  --accent: #086f99;         /* blue used as text or line on the page ground (5.4:1) */
  --error: #a3261b;
  --error-bg: #fbf1ef;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --display: "Saira", "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --g: clamp(20px, 4vw, 56px);
  --col-gap: clamp(16px, 2.2vw, 32px);
  --section: clamp(72px, 9vw, 128px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

/* Dark mode: follows the system unless the visitor has chosen with the switch */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14181b;
    --white: #1c2125;
    --ink: #e8ebe9;
    --slate: #a6afb7;
    --rule: #2a3035;
    --rule-strong: #3b4248;
    --accent: #33b5e5;
    --error: #f2938a;
    --error-bg: #2b1c1a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #14181b;
  --white: #1c2125;
  --ink: #e8ebe9;
  --slate: #a6afb7;
  --rule: #2a3035;
  --rule-strong: #3b4248;
  --accent: #33b5e5;
  --error: #f2938a;
  --error-bg: #2b1c1a;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--rule-strong) var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brand); color: var(--on-brand); }

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

h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

/* Statements in the wide display face */
.section-head h2,
.feature h2,
.area-article h2,
.close h2 {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--g);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 600;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: min(1320px, 100%);
  margin-inline: auto;
  padding-inline: var(--g);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}

/* ---------- Masthead ---------- */

.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px;
}

.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.3125rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.brand sup,
.reg {
  font-size: 0.55em;
  font-weight: 500;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.05em;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 4px 8px;
}
.nav a {
  display: inline-block;
  padding: 8px 10px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}
.nav a:not(.button):hover,
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}
.nav a[aria-current="page"] { text-decoration-color: var(--accent); }
.nav .button[aria-current="page"] { text-decoration: none; }
.nav .button { margin-left: 8px; }

/* Light and dark switch */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
.theme-toggle[aria-pressed="true"] .sun { display: block; }
.theme-toggle[aria-pressed="true"] .moon { display: none; }
.theme-toggle[hidden] { display: none; }

/* ---------- Buttons and links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
}
.button:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.button:active { transform: translateY(1px); }
/* Inactive: an outline in secondary text colour, clearly visible but plainly not ready */
.button:disabled,
.button:disabled:hover { cursor: not-allowed; background: transparent; border-color: var(--slate); border-style: dashed; color: var(--slate); transform: none; }
.nav .button { min-height: 40px; padding: 8px 18px; font-size: 0.9375rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}
.text-link svg { width: 18px; height: 18px; flex: none; }

/* ---------- The studio: blue regions lit by a light that follows the pointer ---------- */

/* Inside the studio the page tokens flip, so every component reads correctly on blue in both
   themes. --lx/--ly are set by js/theme.js in page coordinates, so neighbouring regions share one
   light; with no script the light sits off-stage and the navy is flat. */
.cover,
.studio,
.close {
  --ink: var(--on-stage);
  --slate: var(--on-stage-2);
  --rule: rgba(169, 201, 216, 0.16);
  --rule-strong: rgba(169, 201, 216, 0.3);
  --accent: var(--brand);
  position: relative;
  color: var(--ink);
  background-color: var(--stage);
  background-image: radial-gradient(circle 42rem at var(--lx, -100rem) var(--ly, -100rem),
    rgba(51, 181, 229, 0.2), rgba(51, 181, 229, 0.07) 45%, rgba(51, 181, 229, 0) 70%);
  overflow: hidden;
}
.cover ::selection,
.studio ::selection,
.close ::selection { background: var(--brand); color: var(--on-brand); }
.cover :focus-visible,
.studio :focus-visible,
.close :focus-visible { outline-color: var(--brand); }
.cover .button,
.studio .button,
.close .button { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.cover .button:hover,
.studio .button:hover,
.close .button:hover { background: #ffffff; border-color: #ffffff; color: var(--on-brand); }
/* The masthead sits on paper above the studio */
.masthead { background: var(--paper); }
.brand .x { color: var(--brand); }

/* One bright control per view: the masthead's Contact us is an outline until hovered */
.masthead .nav .button { background: transparent; border-color: var(--ink); color: var(--ink); }
.masthead .nav .button:hover,
.masthead .nav .button:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* The stage's shadow: where a studio region meets the paper, the navy falls away to its floor */
.cover.page,
.studio,
.close {
  background-image:
    radial-gradient(circle 42rem at var(--lx, -100rem) var(--ly, -100rem),
      rgba(51, 181, 229, 0.2), rgba(51, 181, 229, 0.07) 45%, rgba(51, 181, 229, 0) 70%),
    linear-gradient(to bottom, rgba(6, 18, 27, 0) 45%, rgba(6, 18, 27, 0.9));
}
.masthead .nav a[aria-current="page"] { text-decoration-color: var(--brand); }

.cover .wrap { position: relative; }

.cover { padding-block: clamp(40px, 5vw, 72px) clamp(44px, 5vw, 72px); }
.cover .grid { row-gap: 28px; }

.cover h1 {
  grid-column: 1 / -1;
  text-wrap: pretty;
  font-family: var(--display);
  font-size: clamp(2.5rem, 0.9rem + 5.2vw, 5.75rem);
  font-weight: 700;
  font-stretch: 118%;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.cover .lead {
  grid-column: 1 / span 7;
  margin-top: 8px;
  color: var(--slate);
  font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4375rem);
  line-height: 1.5;
}
.cover .lead a { color: var(--ink); }
.cover .actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: 8px;
}

/* Inner pages: a shorter cover */
.cover.page { padding-block: clamp(48px, 6vw, 96px) clamp(48px, 6vw, 88px); }
.cover.page h1 { font-size: clamp(2.25rem, 1.1rem + 3.6vw, 4.5rem); }

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.cover + #help { padding-top: clamp(28px, 2.5vw, 40px); }
.studio + .section { padding-top: var(--section); }

.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}
.section-head h2 {
  grid-column: 1 / span 5;
  font-size: clamp(2rem, 1.3rem + 2.1vw, 3.375rem);
}
.section-head p {
  grid-column: 7 / span 6;
  color: var(--slate);
  font-size: 1.1875rem;
  padding-top: 0.4em;
}

/* ---------- How we can help: the contents ---------- */

.contents { margin-top: clamp(32px, 4vw, 56px); }

.entry {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 12px;
  padding-block: 30px 34px;
  border-bottom: 1px solid var(--rule-strong);
  text-decoration: none;
}
.contents li:first-child .entry { border-top: 1px solid var(--rule-strong); }

.entry::after {
  /* the rule that draws across the row on hover and focus */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 560ms var(--ease);
}
.entry:hover::after,
.entry:focus-visible::after { transform: scaleX(1); }
.entry:focus-visible { outline-offset: 6px; }

.entry h3 {
  grid-column: 1 / span 6;
  grid-row: 1;
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.375rem);
  font-weight: 600;
  font-stretch: 110%;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 220ms var(--ease);
}
.entry:hover h3,
.entry:focus-visible h3 { color: var(--accent); }
.studio .entry { transition: background-color 320ms var(--ease); }
.studio .entry:hover,
.studio .entry:focus-visible { background-color: rgba(51, 181, 229, 0.08); }

.entry .area {
  grid-column: 1 / span 6;
  grid-row: 2;
  align-self: start;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--slate);
}

.entry p {
  grid-column: 7 / span 5;
  grid-row: 1 / span 2;
  padding-top: 0.2em;
  color: var(--slate);
  transition: color 220ms var(--ease);
}
.entry:hover p,
.entry:focus-visible p { color: var(--ink); }

.entry .go {
  grid-column: 12;
  grid-row: 1;
  justify-self: end;
  width: 28px;
  height: 28px;
  margin-top: 4px;
  color: var(--ink);
  transition: color 220ms var(--ease);
}
.entry:hover .go,
.entry:focus-visible .go { color: var(--accent); }

/* ---------- Leadership as well as delivery: the pull-out ---------- */

.pullout .grid { row-gap: 0; }
.pullout .rule {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--ink);
  margin-bottom: 18px;
}
.pullout h2 {
  grid-column: 1 / span 4;
  font-family: var(--display);
  font-size: clamp(2rem, 1.3rem + 2.1vw, 3.375rem);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.pullout blockquote {
  grid-column: 5 / span 8;
  font-family: var(--sans);
  font-size: clamp(1.75rem, 1.15rem + 2vw, 3rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.pullout blockquote em { font-style: normal; color: var(--accent); }
.points {
  grid-column: 5 / span 8;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--col-gap);
  margin-top: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--ink);
}
.points div { padding-block: 20px 24px; border-top: 1px solid var(--ink); }
.points dt { font-family: var(--sans); font-weight: 500; font-size: 1.5rem; line-height: 1.25; }
.points dd { margin-top: 6px; color: var(--slate); font-size: 1.0625rem; line-height: 1.55; }

/* ---------- Two-column feature (heading left, text right) ---------- */

.feature .grid { row-gap: 24px; }
.feature .rule {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--ink);
}
.feature h2 {
  grid-column: 1 / span 5;
  font-size: clamp(2rem, 1.3rem + 2.1vw, 3.375rem);
}
.feature .body { grid-column: 7 / span 6; }
.feature .body .standfirst {
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.feature .body p + p { margin-top: 1em; }
.feature .body .text-link { margin-top: 28px; }

/* ---------- How a project runs ---------- */

/* The four steps run along one unbroken line */
.steps {
  position: relative;
  margin-top: clamp(32px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding-top: 26px;
}
.steps::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--accent);
}
.steps li { position: relative; }
.steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: -32px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}
.steps .n {
  display: block;
  font-family: var(--display);
  font-size: clamp(3rem, 2rem + 2.6vw, 4.5rem);
  font-weight: 700;
  font-stretch: 118%;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: lining-nums;
}
.steps h3 { margin-top: 20px; font-size: 1.375rem; line-height: 1.3; }
.steps p { margin-top: 8px; color: var(--slate); font-size: 1.0625rem; line-height: 1.55; }

/* ---------- Ways to work together ---------- */

.terms {
  margin-top: clamp(32px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.terms div { grid-column: span 4; padding-top: 18px; border-top: 1px solid var(--rule-strong); }
.terms dt { font-family: var(--sans); font-weight: 600; font-size: 1.375rem; line-height: 1.3; }
.terms dd { margin-top: 8px; color: var(--slate); font-size: 1.0625rem; line-height: 1.55; max-width: 26em; }

/* ---------- Services: one article per area ---------- */

.area-article {
  padding-block: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--ink);
  scroll-margin-top: 16px;
}
.area-article:first-child { border-top: 0; padding-top: 0; }
.area-article .grid { row-gap: 20px; }
.area-article h2 {
  grid-column: 1 / span 5;
  grid-row: 1 / span 3;
  align-self: start;
  position: sticky;
  top: 24px;
  font-size: clamp(2rem, 1.3rem + 2.1vw, 3.375rem);
}
.area-article .standfirst {
  grid-column: 7 / span 6;
  font-size: clamp(1.375rem, 1.15rem + 0.7vw, 1.75rem);
  line-height: 1.35;
}
.area-article .body { grid-column: 7 / span 6; color: var(--slate); }
.area-article .body p + p { margin-top: 1em; }
.area-article .body strong { color: var(--ink); font-weight: 600; }
.area-article .lists {
  grid-column: 7 / span 6;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 28px;
  margin-top: 16px;
}
.lists h3 {
  font-size: 1.0625rem;
  line-height: 1.3;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-strong);
}
.lists li {
  padding-block: 10px;
  border-bottom: 1px solid var(--rule);
  font-size: 1.0625rem;
  line-height: 1.45;
}

/* ---------- About ---------- */

.story .body { grid-column: 1 / span 7; }
.story .body p + p { margin-top: 1em; }
.story .body p:first-child { font-size: clamp(1.375rem, 1.15rem + 0.7vw, 1.75rem); line-height: 1.4; }
.story .details {
  grid-column: 9 / span 4;
  align-self: start;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.4;
}
.story .details h2 { font-size: 1.0625rem; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.story .details div { padding-block: 12px; border-bottom: 1px solid var(--rule-strong); }
.story .details dt { color: var(--slate); }
.story .details dd { margin-top: 2px; font-weight: 600; }

.principles {
  margin-top: clamp(32px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.principles div { padding-top: 18px; border-top: 1px solid var(--rule-strong); }
.principles dt { font-family: var(--sans); font-size: 1.625rem; font-weight: 500; line-height: 1.3; color: var(--ink); }
.principles dd { margin-top: 10px; color: var(--slate); font-size: 1.0625rem; line-height: 1.55; }

.gallery {
  margin-top: clamp(32px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--col-gap);
}
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--rule); }

/* ---------- Contact and the form ---------- */

.contact-layout .form-wrap { grid-column: 1 / span 7; }
.contact-layout aside { grid-column: 9 / span 4; align-self: start; }
.contact-layout aside h2 { font-size: 1.0625rem; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.contact-layout aside div { padding-block: 14px; border-bottom: 1px solid var(--rule-strong); }
.contact-layout aside dt { font-family: var(--sans); font-size: 0.9375rem; color: var(--slate); }
.contact-layout aside dd { margin-top: 2px; font-size: 1.0625rem; overflow-wrap: anywhere; }

.form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px var(--col-gap); }
.field { display: grid; gap: 8px; align-content: start; }
.field label { font-family: var(--sans); font-size: 1rem; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--slate); }
.req { margin-left: 0.15em; color: var(--accent); font-family: var(--sans); font-weight: 600; }
.footnote { margin-top: -6px; font-family: var(--sans); font-size: 0.9375rem; color: var(--slate); }
.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.4;
  caret-color: var(--accent);
}
.field textarea { min-height: 180px; resize: vertical; }
.field input:hover,
.field textarea:hover { border-color: var(--accent); }
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form [aria-invalid="true"] { border-color: var(--error); }

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
}
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }

.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-status { font-family: var(--sans); font-size: 0.9375rem; color: var(--slate); }
.form-note { color: var(--slate); font-size: 1rem; }

.field-error { font-family: var(--sans); font-size: 0.9375rem; font-weight: 600; color: var(--error); }
.notice {
  padding: 16px 18px;
  border: 1px solid var(--error);
  background: var(--error-bg);
  color: var(--ink);
  font-size: 1.0625rem;
}
.notice:focus { outline: 2px solid var(--error); outline-offset: 2px; }
.notice[hidden] { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Prose (privacy) ---------- */

.prose { grid-column: 3 / span 8; }
.prose h2 { margin-top: 2.2em; margin-bottom: 0.5em; font-size: clamp(1.5rem, 1.25rem + 0.6vw, 1.875rem); }
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: 1em; }

/* ---------- Close ---------- */

.close { padding-block: clamp(64px, 8vw, 112px); }
.close h2 {
  grid-column: 1 / span 8;
  font-size: clamp(2.5rem, 1.4rem + 3.4vw, 4.75rem);
  line-height: 1.0;
  letter-spacing: -0.035em;
}
.close p {
  grid-column: 1 / span 6;
  margin-top: 24px;
  font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  color: var(--on-stage-2);
}
.close .actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: 36px;
}

/* ---------- Footer: the colophon ---------- */

.colophon {
  padding-block: 56px 40px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.colophon .grid { row-gap: 32px; }
.colophon .about { grid-column: 1 / span 5; }
.colophon .about p { margin-top: 10px; color: var(--slate); max-width: 30em; }
.colophon nav { grid-column: 7 / span 3; }
.colophon .contact { grid-column: 10 / span 3; }
.colophon .label { color: var(--slate); font-weight: 600; margin-bottom: 8px; }
.colophon li + li { margin-top: 4px; }
.colophon .icon-links { display: flex; align-items: center; gap: 8px; margin-left: -10px; }
.colophon .icon-links li + li { margin-top: 0; }
.colophon .icon-links a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  color: var(--ink);
  transition: color 180ms var(--ease);
}
.colophon .icon-links a:hover { color: var(--accent); }
.colophon .icon-links .icon { width: 24px; height: 24px; flex: none; }
.colophon .icon-links .email-link { gap: 10px; text-decoration: none; }
.colophon .icon-links .email-link span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.colophon .icon-links { flex-wrap: wrap; }
.colophon .icon-links .ext { width: 13px; height: 13px; flex: none; align-self: flex-start; margin-top: 9px; color: var(--slate); }
.colophon .legal {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid var(--rule-strong);
  color: var(--slate);
  font-size: 0.875rem;
}
.colophon .legal p + p { margin-top: 2px; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}

/* Phone-only extras: a Contact us after How we can help, and the theme switch in the footer */
.help-cta,
.footer-theme { display: none; }
.footer-theme .theme-toggle { width: auto; gap: 10px; padding: 0 14px; min-height: 44px; font-family: var(--sans); font-size: 0.9375rem; }
.footer-theme .theme-toggle[aria-pressed="true"] .sun,
.footer-theme .theme-toggle:not([aria-pressed="true"]) .moon { display: block; }
.footer-theme .theme-toggle { display: inline-flex; align-items: center; }
.footer-theme .theme-toggle[hidden] { display: none; }

/* ---------- Tablet ---------- */

@media (max-width: 1023px) {
  .area-article .body,
  .area-article .standfirst { max-width: 38em; }
  .cover h1 { grid-column: 1 / -1; }
  .cover .lead { grid-column: 1 / span 10; }

  .section-head h2 { grid-column: 1 / -1; }
  .section-head p { grid-column: 1 / span 10; padding-top: 0; }

  .entry h3, .entry .area { grid-column: 1 / span 10; }
  .entry p { grid-column: 1 / span 10; grid-row: 3; }
  .entry .go { grid-column: 11 / span 2; }

  .pullout h2, .pullout blockquote { grid-column: 1 / -1; }
  .pullout blockquote { margin-top: 16px; }
  .points { grid-column: 1 / -1; }

  .feature h2, .feature .body { grid-column: 1 / -1; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .terms div { grid-column: span 12; }
  .terms div + div { margin-top: 28px; }

  .area-article h2 { grid-row: auto; position: static; }
  .area-article h2,
  .area-article .standfirst,
  .area-article .body,
  .area-article .lists { grid-column: 1 / -1; }

  .story .body, .story .details { grid-column: 1 / -1; }
  .story .details { margin-top: 40px; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }

  .contact-layout .form-wrap, .contact-layout aside { grid-column: 1 / -1; }
  .contact-layout aside { margin-top: 48px; }

  .prose { grid-column: 1 / span 11; }

  .close h2, .close p { grid-column: 1 / -1; }

  .colophon .about { grid-column: 1 / -1; }
  .colophon nav { grid-column: 1 / span 6; }
  .colophon .contact { grid-column: 7 / span 6; }
}

/* ---------- Phone ---------- */

@media (max-width: 600px) {
  body { font-size: 1.125rem; }
  .masthead .wrap { padding-block: 16px 12px; }
  .nav { width: 100%; }
  .nav ul { gap: 4px 20px; }
  .nav a { padding-inline: 0; }
  .nav li:nth-last-child(2) { margin-left: auto; }
  .nav .button { padding-inline: 16px; margin-left: 0; }

  .cover .lead { grid-column: 1 / -1; }
  .section-head p { grid-column: 1 / -1; }
  .help-cta { display: block; margin-top: 32px; }
  .nav .theme-item { display: none; }
  .footer-theme { display: block; margin-top: 16px; }
  .entry { padding-block: 24px 26px; }
  .entry h3, .entry .area, .entry p { grid-column: 1 / span 11; }
  .entry .go { grid-column: 12; width: 22px; height: 22px; }

  .points,
  .steps,
  .principles,
  .area-article .lists,
  .form-row { grid-template-columns: 1fr; }
  .steps { row-gap: 32px; }

  .gallery { grid-template-columns: 1fr; }
  .prose { grid-column: 1 / -1; }
  .colophon nav, .colophon .contact { grid-column: 1 / -1; }
}
