/* theyetties.com
 *
 * One page, no scripts. The type and the structure follow julianmullins.com
 * (Newsreader for display, the system stack for body, Martian Mono for small
 * labels), so the sites read as one family. The palette is this page's own,
 * taken from the photograph: the waistcoats and the red accordion for the
 * accent, a warm paper ground behind them.
 *
 * Light is the default. Dark follows the operating system; the data-theme
 * selectors exist so a host that stamps a theme can force either. In dark
 * mode the ground leans brown and the band fades into it, so the join between
 * the header and the story isn't a hard line from brown to near black.
 */

/* Both faces are served from this site, so the page makes no request to any
 * third party. Latin subsets as Google Fonts cuts them, under the SIL Open
 * Font License; the licences sit beside the files in /fonts/. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/newsreader-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/martian-mono-latin.woff2") format("woff2");
}

:root {
  --ground: #F6F1E8;
  --card: #FFFDF9;
  --ink: #241A14;
  --muted: #62544A;
  --border: #E4D9CB;
  --accent: #8C2F22;
  --accent-hover: #6C2117;
  --shadow: 0 1px 2px rgba(36, 26, 20, 0.05), 0 8px 24px -12px rgba(36, 26, 20, 0.16);

  --display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  --container: 68rem;
  --measure: 40rem;
  --edge: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;
  --band: #2A1D16;
  /* How far the band's colour runs down into the page. None in light mode,
     where the cream ground and the brown band are meant to contrast. */
  --fade: 0rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #1D1511;
    --card: #291E18;
    --ink: #EFE6DA;
    --muted: #B8A99A;
    --border: #3B2D24;
    --fade: 2.5rem;
    --accent: #E9A08F;
    --accent-hover: #F4C0B3;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #1D1511;
  --card: #291E18;
  --ink: #EFE6DA;
  --muted: #B8A99A;
  --border: #3B2D24;
  --fade: 2.5rem;
  --accent: #E9A08F;
  --accent-hover: #F4C0B3;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
}

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

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

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--edge));
  margin: 0 auto;
  padding: 0 var(--edge);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Band ------------------------------------------------------------------
 * A dark band in both themes, the colour of the waistcoats. The photograph is
 * only 600 pixels across, so it sits beside the text as a print would rather
 * than stretching behind it.
 */
.band {
  position: relative;
  background: var(--band);
  color: #FFFFFF;
}

.band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: var(--fade);
  background: linear-gradient(var(--band), transparent);
  pointer-events: none;
}

.mast {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.mast a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.mast a:hover { color: #FFFFFF; }
.mast a:focus-visible { outline-color: #FFFFFF; }
.brand { display: inline-block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em; }
/* The band's logo, cut from its grey card so it sits on the band. */
.brand img { width: 7.5rem; height: auto; }
@media (min-width: 40rem) {
  .brand img { width: 10rem; }
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-top: clamp(1rem, 4vw, 2.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 52rem) {
  .intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.band .eyebrow { color: #F0B9A9; }

.name {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(3rem, 1.6rem + 6vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

/* The header photo is a 1200 pixel scan now, so it can take half the band. */
.photo { margin: 0; justify-self: center; max-width: 32rem; }
.photo img {
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---- Timeline -------------------------------------------------------------
 * Eight dates from the story, each a link to its chapter. Two across on a
 * phone, four on a tablet, all eight in one row on a wide screen, with a rule
 * along the top of each so the row reads as a line through time.
 */
/* Qualified with the class on purpose: .container sets the side padding with
   a shorthand, and a bare main selector loses to it and drops to zero. */
main.container { padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: 1rem; }

.timeline ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 40rem) {
  .timeline ol { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .timeline ol { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

.timeline a {
  display: block;
  height: 100%;
  padding-top: 0.75rem;
  border-top: 2px solid var(--border);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
}
.timeline a:hover { color: var(--ink); border-top-color: var(--accent); }
.timeline .year {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--accent);
}

/* ---- Reading layout --------------------------------------------------------
 * On a wide screen the chapter list sits in the left margin and stays in view,
 * with an empty column of the same width on the right so the story stays in
 * the middle of the page. Narrower, the list becomes a details menu above the
 * story.
 */
.reading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.chapters { display: none; }

.chapters ol,
.chapters-menu ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.15rem;
}
.chapters a,
.chapters-menu li a {
  display: block;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
}
.chapters a:hover,
.chapters-menu li a:hover { color: var(--ink); background: color-mix(in srgb, var(--accent) 10%, transparent); }

.chapters-menu {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.chapters-menu summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.chapters-menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }
.chapters-menu ol { padding: 0 0.4rem 0.6rem; }

@media (min-width: 68rem) {
  .reading {
    grid-template-columns: 12rem minmax(0, var(--measure)) 12rem;
    justify-content: center;
    gap: 3rem;
  }
  .chapters {
    display: block;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
  }
  .chapters .eyebrow { padding-left: 0.6rem; }
  .chapters-menu { display: none; }
  .story { grid-column: 2; grid-row: 1; }
}

/* ---- Story ----------------------------------------------------------------- */
.story {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  line-height: 1.7;
}
.story p { margin: 0 0 1.1em; }

.story h2 {
  margin: 2.25em 0 0.6em;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.story, .story h2 { scroll-margin-top: 1.5rem; }

.byline {
  margin-bottom: 1.75em;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* The story opens a size up, with a drop cap in the accent colour three lines
   deep. */
.story .opening {
  font-size: 1.15em;
  line-height: 1.6;
}
.story .opening::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  font-size: 3.4em;
  line-height: 0.8;
  font-weight: 500;
  color: var(--accent);
}

/* The story ends on Bonny's name as a signature: a short rule, then the name
   in the display face. */
.story .signoff {
  margin: 2.5em 0 0;
  padding-top: 1.25em;
  width: fit-content;
  min-width: 6rem;
  border-top: 2px solid var(--accent);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.75em;
  line-height: 1.1;
  color: var(--ink);
}

/* ---- Photographs in the story ---------------------------------------------
 * Full width of the column for landscape photos. Portrait ones are held
 * narrower so a single photo never fills more than a screen.
 */
.story figure { margin: 2.25em 0; }
.story figure img {
  width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.story figure.portrait { max-width: 28rem; margin-left: auto; margin-right: auto; }
.story figcaption {
  margin-top: 0.7em;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--muted);
}

/* ---- Village card ---------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

.village {
  max-width: var(--measure);
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.village h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.25rem + 0.8vw, 1.875rem);
  line-height: 1.1;
}
.village p { margin: 0; color: var(--muted); }
.village .eyebrow { margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn--accent { background: var(--accent); color: var(--card); }
.btn--accent:hover { background: var(--accent-hover); color: var(--card); }
.btn--light { background: #FFFFFF; color: #2A1D16; }
.btn--light:hover { background: #F6E4DE; color: #2A1D16; }
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---- Footer ---------------------------------------------------------------- */
.foot {
  max-width: var(--measure);
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.foot p { margin: 0; }
.foot-name { color: var(--ink); font-weight: 600; }

/* ---- Privacy --------------------------------------------------------------- */
.band--page .mast { display: flex; justify-content: space-between; gap: 1rem; }
.band--page .intro { grid-template-columns: minmax(0, 1fr); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.band--page .name { font-size: clamp(2.75rem, 1.8rem + 4vw, 4.5rem); margin-bottom: 0.75rem; }

.legal { max-width: var(--measure); margin: 0 auto; display: grid; gap: 0.9rem; }
.legal h2 {
  margin: 1.25rem 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  line-height: 1.15;
}
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0; }
.legal ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.legal .meta { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }

/* ---- Not found ------------------------------------------------------------- */
.band--short .intro { grid-template-columns: minmax(0, 1fr); padding-bottom: clamp(4rem, 10vw, 7rem); }
.band--short .lead { margin-bottom: 1.75rem; }
