/* The app's faces (DESIGN.md → Typography), served from fonts/ with their licences. */
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-300-italic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-800-italic.woff2") format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --surface: #f7faf5;
  --card: #ffffff;
  --ink: #191c1a;
  --green: #154212;
  --muted: #404943;
  --line: #d8dfd4;
  --soft: #e7eee2;
  --night: #1d211e;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gutter: max(1.5rem, env(safe-area-inset-left, 0px));
  font-family: var(--sans);
  color: var(--ink);
  background: var(--surface);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); text-underline-offset: .22em; }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; border-radius: 2px; }
strong { font-weight: 700; }  /* a policy's bold, as sansStrong in the app */
.skip { position: absolute; left: 1rem; top: -6rem; padding: 1rem; background: white; z-index: 2; }
.skip:focus { top: 1rem; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
header { border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; gap: .7rem; padding-top: 1rem; padding-bottom: 1rem; }
header img { width: 34px; height: 34px; border-radius: 9px; }
.wordmark { font: 800 1.75rem/1 var(--serif); color: var(--ink); text-decoration: none; }  /* Wordmark: ExtraBold, primary */
main { padding: 2.5rem 0 4rem; }
h1, h2 { font-family: var(--serif); font-weight: 600; color: var(--ink); }
/* A screen title, as SheetTitle: ExtraBold, near-black, its first word in italic. */
h1, .second h2 { font-weight: 800; }
h1 em, .second h2 em { font-style: italic; }
h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.12; letter-spacing: -.01em; margin: 0 0 1rem; text-wrap: balance; }
h2 { font-size: 1.55rem; line-height: 1.3; margin: 2.6rem 0 .8rem; text-wrap: balance; }
p, li { font-size: 1.05rem; line-height: 1.75; }
p { margin: 0 0 1rem; }
ul { padding-left: 1.3rem; }
.lead { font: italic 300 1.3rem/1.5 var(--serif); color: var(--muted); }
.join { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; margin-top: .5rem; padding: .7rem 1.75rem; border-radius: 999px; background: var(--green); color: #fff; font-size: 1.05rem; text-decoration: none; }
.join:focus-visible { outline-offset: 3px; }
.note { background: var(--soft); border-radius: .8rem; padding: .9rem 1.1rem; }
.eyebrow { color: var(--muted); font-size: .9rem; }
.document h2 { font-size: 1.3rem; }
.table-scroll { overflow-x: auto; margin: 0 0 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { border: 1px solid var(--line); padding: .55rem .65rem; text-align: left; vertical-align: top; line-height: 1.55; }
th { background: var(--soft); }
code { font-size: .9em; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; padding-top: 1.4rem; padding-bottom: 2rem; }

/* The home page (owner, 25 November 2026): no header; on a computer the name big
   above the film at the left and the words at the right, the whole first screen
   centred; one scroll down, "See how it works", eight cards in a 4 x 2 grid, each a
   phone's top half playing a loop of the app, its title and its line. On a phone:
   the name, the film the screen's width, the button right under it, then the words;
   the cards one under another. A video is never squeezed: the film keeps 9:16 and
   each loop the window it was cut to. */
.home main { padding: 0 0 3rem; }
.first { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; row-gap: .9rem;
  grid-template-areas: "brand" "film" "join" "head" "lead"; max-width: 1240px; margin: 0 auto; padding: 1rem 1.25rem 0; }
.brand { grid-area: brand; margin: .2rem 0 0; font: 800 clamp(2.4rem, 11vw, 3rem)/1 var(--serif); letter-spacing: -.015em; }
.first .film { grid-area: film; }
.first h1 { grid-area: head; justify-self: stretch; margin: 1.2rem 0 0; padding: 0 .4rem; }
.first .lead { grid-area: lead; justify-self: stretch; padding: 0 .4rem; }
.first .join, .first .note { grid-area: join; }
.first .join { display: flex; width: 100%; max-width: 24rem; margin: 0; }
.first .qr { grid-area: qr; display: none; }
.film { position: relative; width: 100%; max-width: 26rem; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: var(--night); }
.film video { display: block; width: 100%; height: 100%; object-fit: contain; }
.film img { display: block; width: 100%; height: 100%; object-fit: cover; }  /* the film's still, until the film is in */
/* When the film ends (site.js): the QR code in its place on a computer, the button on a phone. */
.film .end { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 1.2rem;
  padding: 2rem; background: var(--surface); text-align: center; animation: end-in .6s ease both; }
.film .end[hidden] { display: none; }
.film .end img { display: none; width: min(62%, 240px); height: auto; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.film .end p { display: none; margin: 0; max-width: 16rem; font: italic 300 1.2rem/1.45 var(--serif); color: var(--muted); }
.film .end .join { display: flex; width: auto; }
@keyframes end-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .film .end { animation: none; } }
.qr { margin: 0; display: flex; align-items: center; gap: 1.4rem; }
.qr img { width: 116px; height: 116px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.qr figcaption { color: var(--muted); font-size: 1.02rem; line-height: 1.5; max-width: 12rem; padding-left: 1.4rem; border-left: 1px solid var(--line); }

/* See how it works: the eight features. */
.features { max-width: 1320px; margin: 4rem auto 0; padding: 0 .75rem; display: grid; justify-items: center; }
.features h2 { margin: 0; font: 800 clamp(2.3rem, 9vw, 4rem)/1.08 var(--serif); letter-spacing: -.015em; text-align: center; }
.features > .lead { margin: .7rem 0 2.2rem; max-width: 46rem; text-align: center; font-size: 1.15rem; }
/* Two columns even on a phone (owner, 25 November 2026), smaller type to fit. */
/* On a phone the loops as big as two columns allow, so what is in them can be seen (owner, 25 November 2026). */
.cards { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.card { width: 100%; background: #eef2ea; border-radius: 16px; padding: .5rem .5rem .9rem; display: grid; gap: .3rem; align-content: start; }
.card .screen { position: relative; width: 100%; justify-self: center; aspect-ratio: 720 / 820; overflow: hidden;
  border: 3px solid #141614; border-bottom: 0; border-radius: 18px 18px 0 0; background: var(--surface); }
.card .screen video { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .screen::after { content: ""; position: absolute; inset: auto 0 0; height: 18%; background: linear-gradient(to bottom, rgba(238,242,234,0), #eef2ea); pointer-events: none; }
.card h3 { margin: .55rem .3rem 0; font: 800 1.12rem/1.15 var(--serif); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.card p { margin: 0 .3rem; font: italic 300 .95rem/1.38 var(--serif); color: var(--muted); }
.features > .join { margin-top: 2.4rem; }
@media (min-width: 600px) {
  .cards { gap: 1.1rem; }
  .features { padding: 0 1.25rem; }
  .card { border-radius: 22px; padding: 1.3rem 1.3rem 1.5rem; gap: .45rem; }
  .card .screen { width: 84%; border-width: 6px; border-radius: 30px 30px 0 0; }
  .card h3 { margin: .7rem 0 0; font-size: 1.55rem; }
  .card p { margin: 0; font-size: 1.15rem; line-height: 1.45; }
}
@media (max-width: 899px) {
  .first.ended > .join { visibility: hidden; }  /* the button is in the film's place now, once */
}
@media (min-width: 900px) {
  .first { min-height: 100vh; min-height: 100svh; padding: 2.5rem var(--gutter); justify-content: center; align-content: center;
    justify-items: start; column-gap: clamp(3rem, 8vw, 8rem); row-gap: 0;
    grid-template-columns: auto minmax(0, 40rem); grid-template-rows: auto 1fr auto auto auto auto 1fr;
    grid-template-areas: "brand ." "film ." "film head" "film lead" "film join" "film qr" "film ."; }
  .brand { justify-self: center; margin: 0 0 1.6rem; font-size: clamp(3.2rem, 4.6vw, 4.4rem); }
  .film { width: min(420px, calc((100vh - 14rem) * 9 / 16)); width: min(420px, calc((100svh - 14rem) * 9 / 16)); max-width: none; border-radius: 18px; }
  .first h1 { margin: 0 0 1.4rem; padding: 0; font-size: clamp(2.8rem, 4.1vw, 4.3rem); line-height: 1.06; max-width: 9.2em; }
  .first .lead { margin: 0 0 2.2rem; padding: 0; font-size: 1.45rem; max-width: 34rem; }
  .first .join { display: inline-flex; width: auto; min-height: 64px; padding: 0 2.8rem; font-size: 1.25rem; font-weight: 700; }
  .first .qr { display: flex; margin-top: 2.4rem; }
  .first.ended > .qr { visibility: hidden; }
  .film .end img, .film .end p { display: block; }
  .film .end .join { display: none; }
  .features { margin-top: 2rem; padding: 0 var(--gutter); }
  .features > .lead { font-size: 1.35rem; margin-bottom: 2.8rem; }
}
@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; }
}
