/* chattenborough.com — one stylesheet for every page.
   Off-white paper, deep blue-grey ink, and one light-blue accent kept for the
   things you can act on and for the words a narrator hasn't reached yet. */
@font-face { font-family: "Bodoni Moda"; src: url("fonts/BodoniModa-Roman.woff2") format("woff2");
             font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("fonts/BodoniModa-Italic.woff2") format("woff2");
             font-weight: 400 900; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #F4F5F1;    /* the page */
  --ink: #1C2733;      /* type */
  --dim: #5A6672;      /* secondary type */
  --line: #D7DCD9;
  --sky: #A9D4EE;      /* the accent: the button, the unspoken words */
  --sky-2: #8CC4E8;    /* hover */
  --link: #256FAA;     /* links: the same blue, dark enough to read */
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0 auto; padding: 0 24px 72px; max-width: 720px; color: var(--ink);
       font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
       -webkit-font-smoothing: antialiased; }

h1, h2, h3, dt, .brand { font-family: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif; font-optical-sizing: auto; }
h1 { font-size: 2.3rem; line-height: 1.15; font-weight: 500; letter-spacing: -0.005em; margin: 0 0 0.5em; }
main > h1 { margin-top: 2.2rem; }
h2 { font-size: 1.5rem; line-height: 1.2; font-weight: 600; margin: 2.4em 0 0.5em; }
h3 { font-size: 1.12rem; font-weight: 600; margin: 1.6em 0 0.3em; }
p, li, dd { max-width: 66ch; }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; max-width: 36em; }
.date { color: var(--dim); margin-top: -0.4em; }
strong { font-weight: 650; }
ul { padding-left: 1.2em; }
li { margin-bottom: 0.4em; }
code { font: 0.92em/1.4 ui-monospace, "SF Mono", Menlo, monospace; background: #E7ECEA;
       padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }

header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
         gap: 10px 20px; padding: 26px 0 18px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink);
         font-weight: 600; font-size: 1.25rem; }
/* The mark is 8-bit pixel art: keep the blocks crisp instead of letting the
   browser smooth-scale the 180px file down to 30. */
.brand .mark { display: block; border-radius: 7px; image-rendering: pixelated; }
nav { display: flex; flex-wrap: wrap; gap: 2px 18px; }
nav a { color: var(--dim); text-decoration: none; padding: 6px 0; }
nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Home: the page opens by narrating the reader, in the app's own voice.
   The words start pale blue and ink in one at a time, the way the app's
   transcript follows the audio. */
.hero { margin: 3.2rem 0 2.6rem; }
.narration { font-style: italic; font-weight: 600; font-size: 2.35rem; line-height: 1.18; margin: 0; }
.narration span { color: var(--ink); }
/* The photo sits top right and the narration wraps around it, like a caption that got carried away. */
.photo { float: right; width: 300px; height: auto; border-radius: 6px; margin: 0.3rem 0 0.8rem 1.6rem; }
.hero::after { content: ""; display: block; clear: both; }
.byline { color: var(--dim); margin: 1rem 0 0; }
.play { margin-left: 0.6em; padding: 4px 12px; border: 1px solid var(--link); border-radius: 999px;
        color: var(--link); text-decoration: none; font-size: 0.92em; white-space: nowrap; }
.play::before { content: "\25B6\FE0E"; font-size: 0.7em; margin-right: 0.5em; vertical-align: 0.1em; }
.play:hover { background: var(--sky); color: var(--ink); }
/* While the audio plays, the words follow the voice instead of the page-load reveal. */
.narration.playing span { animation: none; color: var(--sky); transition: color 120ms; }
.narration.playing span.said { color: var(--ink); }
.byline b { font-family: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif; font-weight: 600; color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .narration span { animation: speak 420ms ease-out both; animation-delay: calc(350ms + var(--i) * 65ms); }
  @keyframes speak { from { color: var(--sky); } to { color: var(--ink); } }
}

.cta { display: inline-block; margin: 1.8rem 0 0; padding: 13px 22px; border-radius: 6px;
       background: var(--sky); color: var(--ink); font-weight: 650; text-decoration: none; }
.cta:hover { background: var(--sky-2); }
.cta:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.cta-note { color: var(--dim); font-size: 0.95em; margin: 0.8rem 0 0; }

.features { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid;
            grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px 32px; }
.features li { max-width: none; margin: 0; }
.features h3 { margin: 0 0 0.2em; }
.features p { margin: 0; color: var(--dim); font-size: 0.97em; }

.narrators { margin: 1.2rem 0 0; }
.narrators dt { font-size: 1.15rem; font-weight: 600; margin-top: 1.1rem; }
.narrators dd { margin: 0.1rem 0 0; color: var(--dim); }

/* The invitation link and access key: placeholders until "Reveal secrets". */
.creds { border-left: 3px solid var(--sky); padding: 2px 0 2px 18px; margin: 1.2rem 0; }
.creds b { display: block; font-weight: 650; font-size: 0.9em; margin-bottom: 3px; }
.creds code { display: inline-block; max-width: 100%; font-size: 1em; padding: 0.3em 0.5em; user-select: all; }
.creds a { word-break: break-all; }
.secret { color: var(--dim); letter-spacing: 0.15em; }
.secret > * { letter-spacing: normal; }
.reveal { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 1.2rem 0 0; }
.reveal label { display: flex; flex-direction: column; font-size: 0.9em; font-weight: 650; gap: 3px; }
.reveal input { font: inherit; font-weight: 400; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.reveal button, .reveal-open { font: inherit; font-weight: 650; padding: 8px 16px; border: 1px solid var(--link); border-radius: 999px;
                               background: transparent; color: var(--link); cursor: pointer; }
.reveal button:hover, .reveal-open:hover { background: var(--sky); color: var(--ink); }
.reveal-open { margin: 0.4rem 0 0; }
.reveal-msg { flex-basis: 100%; margin: 0; color: #A23B2A; font-size: 0.95em; }
.reveal-msg:empty { display: none; }
.reveal[hidden], .reveal-open[hidden] { display: none; }

table { border-collapse: collapse; margin: 1rem 0 1.5rem; width: 100%; font-size: 0.95em; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 650; }
td:first-child { white-space: nowrap; font-weight: 650; }
ol { padding-left: 1.3em; }

footer { margin-top: 72px; padding-top: 22px; border-top: 1px solid var(--line);
         color: var(--dim); font-size: 0.9em; display: flex; flex-wrap: wrap; gap: 6px 22px; }
footer a { color: var(--dim); }
footer a:hover { color: var(--ink); }

@media (max-width: 640px) {
  h1 { font-size: 1.9rem; }
  .narration { font-size: 1.8rem; }
  .photo { width: 160px; margin: 0.25rem 0 0.5rem 1rem; }
  .hero { margin-top: 2.2rem; }
  nav { gap: 0 14px; font-size: 0.95em; }
  .cta { display: block; text-align: center; }
  /* The vendor table stacks: one block per service, the two answers labelled. */
  table, tr, td { display: block; }
  tr:first-child { display: none; }
  tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  td { padding: 2px 0; border: 0; }
  td:first-child { white-space: normal; font-size: 1.05em; margin-bottom: 4px; }
  td:nth-child(2)::before { content: "Receives: "; color: var(--dim); }
  td:nth-child(3)::before { content: "Then: "; color: var(--dim); }
}
