/* house.css — the shared discipline for the sites: one grid, one type scale,
   one set of spacing steps, flat colour in bands, one accent in one place.
   Each site sets its own faces and accent in :root; everything else is here. */

:root {
  /* colour: a site overrides these */
  /* Readaria's: the app's desk, ink, dim, faint, deskline and seal (Palette.swift) */
  --bg: #FFFFFF; --ink: #171717; --dim: #62646C; --faint: #70727A; --line: #D4D5DA; --panel: #E6E7EA;
  --accent: #A93B2A; --accent-dark: #8E3123; --link: #A93B2A; --band: #1C1612; --on-band: #EADFCF; --on-band-dim: #B4A692;
  /* faces */
  --serif: Literata, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: var(--sans); /* the app has no monospace face; small labels are the sans, small */
  /* the scale: four sizes and the small ones */
  --display: clamp(40px, 6vw, 64px); --h2: 24px; --body: 17px; --small: 14px; --label: 12.5px;
  /* spacing steps */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px; --s6: 96px;
  /* the grid */
  --wide: 1120px; --gutter: 24px; --radius: 4px;
}
/* one look, day and night: the pages are the app's white sheet, and the pictures are of the app by day */
:root { color-scheme: light; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: var(--body)/1.55 var(--sans); }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

/* the grid: one container, twelve columns, and the spans a page uses */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: var(--s4); align-items: start; }
.c6 { grid-column: span 6; } .c4 { grid-column: span 4; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
@media (max-width: 760px) { .c6, .c4, .c8 { grid-column: span 12; } .grid { row-gap: var(--s3); } }

/* type */
h1, .display { font-family: var(--serif); font-weight: 600; font-size: var(--display); line-height: 1.05; letter-spacing: -.015em; }
h2 { font-family: var(--serif); font-weight: 600; font-size: var(--h2); line-height: 1.2; letter-spacing: -.005em; }
.lede { font-family: var(--serif); font-size: 21px; line-height: 1.45; color: var(--dim); }
.small { font-size: var(--small); color: var(--dim); }
.label { font-family: var(--mono); font-size: var(--label); color: var(--faint); letter-spacing: 0; }
.label a { color: var(--dim); text-decoration: none; }
.label a:hover { text-decoration: underline; }
p + p { margin-top: var(--s2); }

/* the one button */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: #fff; text-decoration: none; padding: 14px 20px; border-radius: var(--radius); font-weight: 500; font-size: var(--body); }
.btn:hover { background: var(--accent-dark); }
.btn .arrow { font-family: var(--mono); }
.link { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.link:hover { border-color: var(--ink); }

/* sections: space does the separating; a band does it with colour */
.section { padding: var(--s5) 0; }
.section + .section { padding-top: 0; }
.band { background: var(--band); color: var(--on-band); padding: var(--s5) 0; }
.band .dim { color: var(--on-band-dim); }
.panel { background: var(--panel); border-radius: var(--radius); padding: var(--s3); }

/* a foot in the accent, with a field of print dots that thickens towards the right and, where motion
   is welcome, twinkles: drawn on a canvas by foot.js; without it, two dot patterns under gradient masks */
.foot { position: relative; overflow: hidden; background: var(--accent); color: #fff; padding: var(--s5) 0 var(--s3); min-height: 0; }
.foot .sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.foot.still::before, .foot.still::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.foot.still::before { background-image: radial-gradient(circle, rgba(255,255,255,.55) 1.1px, transparent 1.3px); background-size: 7px 7px; -webkit-mask-image: linear-gradient(to right, transparent 52%, #000 100%); mask-image: linear-gradient(to right, transparent 52%, #000 100%); }
.foot.still::after { background-image: radial-gradient(circle, rgba(255,255,255,.45) 1.1px, transparent 1.3px); background-size: 11px 11px; background-position: 3px 5px; -webkit-mask-image: linear-gradient(to right, transparent 36%, #000 72%); mask-image: linear-gradient(to right, transparent 36%, #000 72%); }
.foot > .wrap { position: relative; z-index: 1; }
.foot .mark { font-family: var(--serif); font-weight: 600; font-size: clamp(48px, 8vw, 104px); line-height: .92; letter-spacing: -.025em; }
.foot .label { color: rgba(255,255,255,.75); }
.foot .label a { color: #fff; }
.foot .links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); margin-top: var(--s3); }
.foot .links a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); font-size: var(--small); }
.foot .links a:hover { border-color: #fff; }
