/* ---------------------------------------------------------------
   Derby dyslexia support — stylesheet
   Type and colour are chosen for readability first: off-white paper
   to cut glare, generous line height, ragged-right text, short
   measure, no italics for emphasis, letterforms that distinguish
   b/d/p/q. The site should be readable by the child, not just the
   parent.
   --------------------------------------------------------------- */

:root {
  --paper:      #EEF1EA;   /* chalky sugar-paper, not white */
  --paper-deep: #E3E8DE;
  --ink:        #23313A;   /* school ink, softer than black */
  --ink-soft:   #4E5F69;
  --blue:       #3F6B8E;   /* exercise-book blue */
  --blue-deep:  #2C4E69;
  --mark:       #F6D45C;   /* highlighter */
  --white:      #FAFBF8;

  --display: "Lexend", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;

  --measure: 34rem;
  --gap: clamp(3rem, 7vw, 5.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 40rem) { body { font-size: 1.125rem; } }

p, li { max-width: var(--measure); }
em, i { font-style: normal; font-weight: 700; } /* no italics — harder to read */

a { color: var(--blue-deep); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

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

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--white);
  padding: 0.75rem 1rem;
}
.skip:focus { left: 0.5rem; top: 0.5rem; z-index: 50; }

.wrap {
  width: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}

/* --- typography ------------------------------------------------ */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 6.5vw, 3.4rem); max-width: 16ch; }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.1rem); max-width: 22ch; margin-top: 0; }
h3 { font-size: 1.2rem; font-weight: 600; max-width: 28ch; }

.eyebrow {
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin: 0 0 1.25rem;
}

.lead { font-size: 1.15em; }

/* signature: the teacher's highlighter mark */
.mark {
  background-image: linear-gradient(var(--mark), var(--mark));
  background-repeat: no-repeat;
  background-size: 100% 0.42em;
  background-position: 0 82%;
  padding: 0 0.08em;
}

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

section { padding-block: var(--gap); }
section + section { border-top: 1px solid var(--paper-deep); }

.tint { background: var(--white); }

.cols {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 48rem) {
  .cols { grid-template-columns: repeat(3, 1fr); gap: 2.75rem; }
  .cols p { max-width: none; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--paper-deep);
  border-radius: 10px;
  padding: 1.6rem 1.5rem;
}
.tint .card { background: var(--white); }
.card h3 { margin-bottom: 0.4rem; }
.card p:last-child { margin-bottom: 0; }

.price {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  color: var(--blue-deep);
  margin-top: 1rem;
}

/* --- header ---------------------------------------------------- */

.site-head {
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--paper-deep);
}
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
}
.brand span {
  display: block;
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}
.site-nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }

/* --- hero ------------------------------------------------------ */

.hero { padding-block: clamp(3.5rem, 9vw, 6rem) var(--gap); }
.hero p { font-size: 1.2rem; max-width: 32rem; }
.hero .actions { margin-top: 2.25rem; }

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

.actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.95rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  min-height: 48px;
  background: var(--blue-deep);
  color: var(--white);
  border: 2px solid var(--blue-deep);
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

.btn-quiet {
  background: transparent;
  color: var(--blue-deep);
  border-color: var(--blue);
}
.btn-quiet:hover { background: var(--blue-deep); color: var(--white); }

/* --- lists ----------------------------------------------------- */

.ticks { list-style: none; padding: 0; margin: 2rem 0 0; }
.ticks li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.9rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 0.85rem; height: 2px;
  background: var(--blue);
}

.steps { list-style: none; counter-reset: s; padding: 0; margin: 2.5rem 0 0; }
.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 3.4rem;
  margin-bottom: 2rem;
  max-width: var(--measure);
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0; top: -0.15rem;
  width: 2.3rem; height: 2.3rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--mark);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.steps h3 { margin-bottom: 0.15rem; }
.steps p { margin-top: 0; }

/* --- quote / detail -------------------------------------------- */

.pull {
  border-left: 4px solid var(--mark);
  padding-left: 1.4rem;
  margin: 2.5rem 0 0;
  font-size: 1.15rem;
  max-width: 36rem;
}

details {
  border-bottom: 1px solid var(--paper-deep);
  padding: 1.1rem 0;
  max-width: var(--measure);
}
summary {
  font-family: var(--display);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  padding-right: 2rem;
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute; right: 0; top: -0.1rem;
  font-size: 1.4rem; color: var(--blue);
  line-height: 1;
}
details[open] summary::after { content: "–"; }
details p:first-of-type { margin-top: 0.9rem; }
details p:last-child { margin-bottom: 0; }

/* --- article --------------------------------------------------- */

.article { padding-block: var(--gap); }
.article h2 { margin-top: 3rem; }
.article h3 { margin-top: 2.25rem; }

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

.site-foot {
  background: var(--ink);
  color: var(--paper);
  padding-block: 3rem;
  font-size: 0.95rem;
}
.site-foot a { color: var(--mark); }
.site-foot p { max-width: 34rem; }
.site-foot .areas { color: #A9B8C1; }

/* --- mobile call bar ------------------------------------------- */

.callbar {
  position: fixed;
  inset: auto 0 0 0;
  background: var(--blue-deep);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: center;
  z-index: 20;
}
.callbar a {
  color: var(--white);
  font-family: var(--display);
  font-weight: 500;
  text-decoration: none;
  min-height: 44px;
  display: grid;
  place-items: center;
}
@media (min-width: 48rem) { .callbar { display: none; } }
@media (max-width: 47.99rem) { .site-foot { padding-bottom: 6rem; } }

/* --- images ---------------------------------------------------- */

figure { margin: 0; }

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.hero-grid { display: grid; gap: 2.5rem; align-items: center; }

@media (min-width: 52rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 4rem;
  }
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 28% 20%;
  border: 1px solid var(--paper-deep);
}

.figure-wide { margin-top: 2.75rem; }
.figure-wide img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--paper-deep);
}

figcaption {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 0.85rem;
  max-width: var(--measure);
}

.strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  margin-top: 2.5rem;
}
.strip img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--paper-deep);
}
@media (min-width: 48rem) { .strip { gap: 1.25rem; } }
