/* Shared foundation for partsofme.co.uk — typography, palette, layout.
   Page-specific rules stay inline in the page that needs them, so this file
   only holds what genuinely appears on more than one page. */

/* Sweet Purple is the book's own display face — the same one on the cover,
   so the site reads as the book rather than as something about it. Used only
   for the largest type: it's a display face and gets hard to read small.

   Fredoka is the app's heading face, used for smaller headings and UI-ish
   text. Nunito carries body copy.

   All three self-hosted rather than pulled from Google Fonts — a font request
   would hand every visitor's IP to a third party, which is a needless thing
   to do on a site aimed at parents of children. */
@font-face {
  font-family: 'Sweet Purple';
  src: url('sweet-purple.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Fredoka';
  src: url('Fredoka-Variable.ttf') format('truetype-variations');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('Nunito-Variable.ttf') format('truetype-variations');
  font-weight: 300 800;
  font-display: swap;
}

:root {
  /* Straight from the app's AppColors, so the site and the product are
     visibly the same thing. */
  --magenta:#A7298F; --rose:#ED3D6E; --red:#EF3E4E; --orange:#F47735;
  --gold:#FEC338;   --green:#0FA076; --teal:#10A2BE; --blue:#1663B0;

  --cream:#FFFBF5; --card:#FFF6EA; --glow:#FFF6E8;
  --ink:#3A3230; --ink-muted:#6F6560; --hairline:#EBE1D6;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream:#211C1A; --card:#2C2522; --glow:#2C2522;
    --ink:#F3ECE6; --ink-muted:#C9BDB5; --hairline:#463C37;
  }
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-size: clamp(1.0625rem, 0.5vw + 1rem, 1.1875rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

/* Display headings take the book's face. Sweet Purple has a small x-height,
   so it needs noticeably more size than Fredoka to feel equivalent. */
h1, h2 {
  font-family: 'Sweet Purple', 'Fredoka', system-ui, sans-serif;
  font-weight: 400;
}
h2 { font-size: clamp(2.5rem, 5vw, 3.5rem); line-height: 1.1; }
h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--magenta); text-underline-offset: 3px; }

.wrap { max-width: 62rem; margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--measure); }

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

.eyebrow {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

footer {
  border-top: 1px solid var(--hairline);
  padding-block: 2.5rem 3.5rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}
footer a { color: inherit; }
footer a:hover { color: var(--magenta); }
.footer-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  justify-content: space-between; align-items: baseline;
}

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