/* Accessible Stores website styles.
   Colours have jobs: highlighter yellow always means "problem", teal and mint always mean
   "fixed" or "do this". Colour pairs used for text (WCAG contrast ratio, AA needs 4.5 for body text):
     ink on white 15.6 · ink on mist 14.0 · muted on mist 7.6 · teal on white 5.1 · teal on mist 4.6
     white on teal 5.1 · white on teal-dark 6.9 · ink on highlighter 11.0 · ink on mint 8.5
     white on ink 15.6 · mint on ink 8.5 · fog on ink 9.1
   The highlighter yellow is only 1.4 against white, so it is never used on its own on white:
   focus styles always pair it with an ink edge. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
}

:root {
  --ink: #10243E;
  --white: #FFFFFF;
  --mist: #EEF4F2;
  --teal: #0E7C66;
  --teal-dark: #0B6654;   /* hover state for buttons and links */
  --highlighter: #FFD447; /* problems */
  --mint: #5ED3B3;        /* "fixed", on the dark ink background */
  --fog: #B9C7D8;         /* secondary text on ink */
  --muted: #3D4F63;       /* secondary text on light backgrounds */
  --line: #C9D6D2;        /* decorative hairlines only */

  --measure: 62ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space-section: clamp(4rem, 9vw, 7.5rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);  /* 18px to 20px */
  line-height: 1.6;
}

img, svg { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

/* Type scale: a perfect fourth (1.333) from the body size, with the h1 pushed further for the hero. */
h1, h2, h3 {
  margin: 0 0 0.6em;
  font-weight: 700;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.75rem, 1.1rem + 6.4vw, 6.25rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 11ch;
}
h2 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 18ch;
}
h3 { font-size: 1.333em; line-height: 1.2; letter-spacing: -0.01em; }

p, li, dd { max-width: var(--measure); }
p { margin: 0 0 1em; }

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--teal-dark);
  text-decoration-thickness: 3px;
}

/* Keyboard focus: a highlighter-pen block with an ink underline (the GOV.UK pattern). */
:focus-visible {
  outline: 3px solid transparent;   /* still shows in Windows high-contrast mode */
  background-color: var(--highlighter);
  color: var(--ink);
  box-shadow: 0 -2px var(--highlighter), 0 4px var(--ink);
  text-decoration: none;
}
main:focus-visible { background: none; box-shadow: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -10rem;
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.lead { font-size: 1.2em; line-height: 1.45; }
.small { font-size: 0.889em; color: var(--muted); }

/* ---- Header ---- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15em;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark-mark { width: 1.75rem; height: 1.75rem; flex: none; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a { color: var(--ink); }
.site-nav a:hover { color: var(--teal-dark); }

/* ---- Buttons ---- */
.button {
  display: inline-block;
  padding: 1rem 1.6rem;
  border-radius: 6px;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
}
.button:hover { background: var(--teal-dark); color: var(--white); }
.button:focus-visible { background: var(--highlighter); color: var(--ink); box-shadow: 0 4px var(--ink); }

/* ---- Sections ---- */
.section { padding-block: var(--space-section); }
.section--mist { background: var(--mist); }

/* ---- Hero: a very large headline, with the pitch and button set to one side ---- */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; gap: 2rem 4rem; align-items: end; }
.hero-grid h1 { margin: 0; }
.hero-aside .lead { margin-bottom: 1.75rem; max-width: 30ch; }
.hero-aside .small { margin: 1rem 0 0; max-width: 38ch; }
@media (min-width: 60em) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
}

/* ---- The demo stage: the page's centrepiece, on ink ---- */
.stage {
  background: var(--ink);
  color: var(--white);
  padding-block: clamp(3rem, 7vw, 6rem);
}
.stage h2 { color: var(--white); margin: 0; }

.demo { container-type: inline-size; }
.demo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.toggle {
  display: inline-flex;
  border: 2px solid var(--white);
  border-radius: 999px;
  padding: 4px;
}
.toggle button {
  font: inherit;
  font-weight: 700;
  min-height: 48px;
  min-width: 6.5rem;
  padding: 0.4rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}
.toggle button[data-state="before"][aria-pressed="true"] { background: var(--highlighter); color: var(--ink); }
.toggle button[data-state="after"][aria-pressed="true"] { background: var(--mint); color: var(--ink); }
.toggle button:hover:not([aria-pressed="true"]) { text-decoration: underline; text-underline-offset: 0.18em; }
/* On the toggle the colour shows which version is on, so focus is a white ring instead. */
.toggle button:focus-visible {
  background-color: transparent;
  color: var(--white);
  box-shadow: none;
  outline: 3px solid var(--white);
  outline-offset: 3px;
}
.toggle button[aria-pressed="true"]:focus-visible { color: var(--ink); }
.toggle button[data-state="before"][aria-pressed="true"]:focus-visible { background-color: var(--highlighter); }
.toggle button[data-state="after"][aria-pressed="true"]:focus-visible { background-color: var(--mint); }

.demo-body { display: grid; gap: 2.5rem; align-items: center; }
@container (min-width: 52rem) {
  .demo-body { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4rem; }
  .mock { font-size: 1.125rem; }
}

/* The store mockup is a picture of a product page: hidden from screen readers, nothing to click. */
.mock {
  background: var(--white);
  color: var(--ink);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
  font-size: 1rem;
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.9rem;
  background: #E4EBE9;
}
.mock-dots { display: flex; gap: 0.35rem; }
.mock-dots i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #B4C2BE; }
.mock-url {
  flex: 1;
  min-width: 0;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: center;
  padding: clamp(1.1rem, 4vw, 2rem);
}
.mock-image { position: relative; border-radius: 6px; outline: 4px solid transparent; outline-offset: 4px; }
.mock-image svg { border-radius: 6px; }
.mock-title { font-weight: 700; font-size: 1.15em; line-height: 1.25; margin: 0 0 0.25rem; }
.mock-price { margin: 0 0 0.9rem; font-size: 1.1em; }
.mock-sizes { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.mock-sizes span {
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.8em;
}
.mock-more { margin: 1.1rem 0 0; font-size: 0.95em; }
.mock-sizes .is-chosen { border-color: var(--ink); }
.mock-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.1rem; }
.mock-basket {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 0 0 4px transparent;
}
.mock-basket svg { width: 1.3rem; }
.mock-link {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  padding: 0 0.15em;
  white-space: nowrap;
}

/* Numbered pins: the reading order. Problems are highlighted in "before", fixed in "after". */
.pin {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
}
.mock-image .pin { position: absolute; left: -0.6rem; top: -0.6rem; }
.mock-title .pin { margin-left: 0.2rem; }
.mock-basket .pin { position: absolute; right: -0.9rem; top: -0.9rem; }
.demo[data-show="after"] .pin { background: var(--teal); border-color: var(--teal); color: var(--white); }
/* "After": the fixed parts get a teal mark, so the drawing changes as well as the words. */
.demo[data-show="after"] .mock-image { outline-color: var(--teal); }
.demo[data-show="after"] .mock-basket { box-shadow: 0 0 0 4px var(--teal); }
.demo[data-show="after"] .mock-link { box-shadow: 0 3px var(--teal); }

.demo[data-show="before"] .pin.is-problem { background: var(--highlighter); }
.demo[data-show="before"] .mock-image { outline-color: var(--highlighter); }
.demo[data-show="before"] .mock-basket { box-shadow: 0 0 0 4px var(--highlighter); }
.demo[data-show="before"] .mock-link { background: var(--highlighter); color: var(--ink); }
.demo[data-show="after"] .is-before,
.demo[data-show="before"] .is-after { display: none; }

.mock-image, .mock-basket, .mock-link, .pin {
  transition: outline-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Transcript: what the screen reader says, line by line. */
.transcript { margin: 0; }
.transcript-intro { color: var(--fog); margin-bottom: 1.25rem; }
.speech { list-style: none; margin: 0; padding: 0; counter-reset: line; }
.speech li {
  counter-increment: line;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(185, 199, 216, 0.3);
  max-width: none;
}
.speech li:first-child { border-top: 0; padding-top: 0; }
.speech li::before {
  content: counter(line);
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  border: 2px solid var(--fog);
  font-size: 0.9rem;
  font-weight: 700;
}
.speech .problem::before { background: var(--highlighter); border-color: var(--highlighter); color: var(--ink); }
.speech .fixed::before { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.speech q {
  grid-column: 2;
  justify-self: start;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  quotes: "\201C" "\201D";
}
.speech .problem q {
  background: var(--highlighter);
  color: var(--ink);
  padding: 0.02em 0.25em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.speech .note { grid-column: 2; display: block; margin-top: 0.2rem; font-size: 0.9em; color: var(--fog); }
.speech .fixed .note { color: var(--mint); }

/* After a switch, the new lines are read in order: they appear in order too. */
.demo[data-switched] .speech li { animation: line-in 0.4s ease both; }
.demo[data-switched] .speech li:nth-child(2) { animation-delay: 0.08s; }
.demo[data-switched] .speech li:nth-child(3) { animation-delay: 0.16s; }
.demo[data-switched] .speech li:nth-child(4) { animation-delay: 0.24s; }
@keyframes line-in {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: none; }
}

.stage .small { color: var(--fog); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- Why it matters: quiet and typographic ---- */
.why h2 { margin-bottom: 0.5em; }
.statement {
  font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.6rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  max-width: 30ch;
  margin-bottom: 1.5em;
}
.why-cols { display: grid; gap: 0 4rem; }
@media (min-width: 56em) {
  .why-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.aside-note {
  font-style: italic;
  padding-left: 1.1rem;
  border-left: 4px solid var(--ink);
}

/* ---- How it works: a real sequence, so the steps are numbered ---- */
.steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 3rem 3rem;
}
@media (min-width: 56em) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.steps li {
  counter-increment: step;
  border-top: 3px solid var(--ink);
  padding-top: 1rem;
  max-width: none;
}
.steps li::before {
  content: counter(step);
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--teal);
  margin-bottom: 1.25rem;
}
.step-art { width: 100%; max-width: 20rem; margin-bottom: 1.5rem; }
.steps h3 { margin-bottom: 0.4em; }
.steps p { margin-bottom: 0; }

.honest-note {
  margin: 3.5rem 0 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--ink);
  background: var(--white);
  max-width: 48rem;
}

/* ---- Prices: one ruled price list, figures large ---- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 2.5rem;
}
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); }

.prices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  border-top: 4px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.prices li { padding: 1.5rem 0 2rem; max-width: none; }
.prices li + li { border-top: 1px solid var(--line); }
@media (min-width: 56em) {
  .prices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prices li { padding: 1.75rem 2.25rem 2.5rem; }
  .prices li:first-child { padding-left: 0; }
  .prices li + li { border-top: 0; border-left: 1px solid var(--line); }
}
.prices h3 { margin: 0 0 1.25rem; font-size: 1.15em; }
.prices .price {
  margin: 0 0 1rem;
  font-size: clamp(3rem, 2rem + 3.5vw, 4.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.prices .price span {
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.prices .price span:first-child { display: block; margin-bottom: 0.35rem; }
.prices p:last-child { margin: 0; }

/* ---- Example report, with lettered callouts ---- */
.report-grid { display: grid; gap: 3rem 5rem; align-items: center; }
@media (min-width: 60em) {
  .report-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}
.report-key { list-style: none; margin: 2rem 0 0; padding: 0; }
.report-key li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0 0.9rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}
.key {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}
.report-key .key { transform: translateY(0.45rem); }

.report-figure { margin: 0; max-width: 36rem; justify-self: center; }
.report-frame {
  position: relative;
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(16, 36, 62, 0.08), 0 30px 60px -30px rgba(16, 36, 62, 0.45);
}
.report-frame img { border-radius: 6px; }
.key--pin {
  position: absolute;
  width: clamp(1.35rem, 4.5vw, 2rem);   /* smaller on phones, so the pins don't hide the report */
  height: clamp(1.35rem, 4.5vw, 2rem);
  font-size: clamp(0.7rem, 2vw, 0.9rem);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--highlighter);
}
.report-figure figcaption { margin-top: 1.25rem; font-size: 0.889em; color: var(--muted); max-width: var(--measure); }

/* ---- Contact: the closing band ---- */
.contact {
  background: var(--teal);
  color: var(--white);
  padding-block: clamp(4rem, 9vw, 7rem);
}
.contact h2 { color: var(--white); }
.contact a { color: var(--white); }
.contact a:hover { color: var(--white); }
.contact a:focus-visible { color: var(--ink); }
.email-big {
  display: inline-block;
  font-size: clamp(1.6rem, 0.6rem + 4.6vw, 4.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.12em;
  overflow-wrap: anywhere;
}
.contact a.email-big:hover { text-decoration-thickness: 6px; }
.contact p { max-width: 46ch; }
.contact p:first-of-type { max-width: none; margin-bottom: 1.25rem; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: var(--white); padding-block: 2.5rem; }
.site-footer p { margin: 0 0 0.35rem; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--white); }

/* ---- Privacy page ---- */
.prose h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); line-height: 1.1; letter-spacing: -0.02em; max-width: none; }
.prose h2 { margin-top: 2.25em; font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem); line-height: 1.2; max-width: none; }
.prose h2:first-of-type { margin-top: 1em; }
.prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: 0.4em; }
