/* Extra Eyes website
   Layout idea: a picture book read top to bottom. The story is told in three scenes while the
   page behind them goes from paper to night; the facts that follow sit in short bands. One
   sticky strip at the top holds the only action that is always in reach. */

@font-face {
  font-family: Gloock;
  src: url("assets/gloock.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("assets/dmsans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #fbf6eb;       /* page */
  --paper-deep: #f3ecdc;  /* second paper tone */
  --ink: #22203c;         /* text on paper */
  --night: #222037;       /* night spreads */
  --lamp: #f4c882;        /* lamplight accent, only on dark */
  --plum: #67517b;        /* links and numerals on paper */
  --moss: #2f4439;        /* the monitor spread */
  --muted: #575563;
  --line: #d6cfc1;
  --on-night: #f1ebe2;
  --serif: Gloock, Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(18px, 5vw, 80px);
  --block: clamp(3rem, 8vw, 7rem);
  color-scheme: only light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.6 var(--sans); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; text-wrap: balance; overflow-wrap: break-word; }
h1, h2 { letter-spacing: -.04em; line-height: 1.03; }
h2 { font-size: clamp(1.9rem, 1.3rem + 3.6vw, 4.4rem); }
h3 { font-size: clamp(1.35rem, 1.15rem + .9vw, 1.7rem); line-height: 1.15; letter-spacing: -.02em; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: .08em; }
p a { overflow-wrap: anywhere; }
strong { font-weight: 650; }
:focus-visible { outline: 3px solid #aa5a1f; outline-offset: 4px; border-radius: .2rem; }
.on-dark :focus-visible { outline-color: #ffda88; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 2 * var(--gutter), 80rem); margin-inline: auto; }
.lead { font-size: clamp(1.125rem, 1rem + .5vw, 1.3rem); line-height: 1.5; max-width: 34em; }
.note { font-size: .9375rem; line-height: 1.5; }
.text-link { color: var(--plum); font-weight: 650; display: inline-block; padding-block: .6rem; }
.on-dark .text-link { color: var(--lamp); }

.skip { position: absolute; left: 1rem; top: -8rem; z-index: 30; background: #fff; color: var(--ink); padding: .75rem 1rem; }
.skip:focus { top: 1rem; }

/* ---------- Masthead: the one persistent action ---------- */
.mast { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; min-height: 3.5rem; padding-block: .375rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; text-decoration: none; font: 400 1.5rem/1.1 var(--serif); letter-spacing: -.05em; }
.brand img { width: 2.375rem; height: 2.375rem; border-radius: 27%; }
.nav { display: none; }
.nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: .2rem; text-decoration: none; font-size: 1rem; font-weight: 550; }
.nav a:hover { text-decoration: underline; }
.btn-get { margin-left: auto; display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem 1.15rem; border-radius: 2rem; background: var(--ink); color: var(--paper); font-size: 1rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.btn-get:hover { background: #40325a; }
@media (min-width: 64em) {
  .nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.2rem); margin-left: auto; }
  .btn-get { margin-left: clamp(.5rem, 1.5vw, 1.5rem); }
}

/* ---------- App Store badge and its notes ---------- */
.store-badge { display: block; width: min(11.25rem, 100%); border-radius: .6rem; line-height: 0; }
.store-badge img { width: 100%; height: auto; }
.cta { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.5rem; }
.cta-note { font-size: 1rem; line-height: 1.5; max-width: 30em; }
.qr { display: none; }
@media (min-width: 48em) and (hover: hover) and (pointer: fine) {
  .qr { display: flex; align-items: center; gap: .8rem; font-size: .9375rem; line-height: 1.35; max-width: 15rem; }
  .qr img { width: 5.25rem; height: 5.25rem; padding: .45rem; background: var(--paper); border-radius: .5rem; flex: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: #fff7e8; display: flex; flex-direction: column; }
.hero-inner { position: relative; padding-block: 1.9rem 1rem; }
.hero h1 { font-size: clamp(2rem, 1rem + 9.8vw, 6.9rem); line-height: .99; letter-spacing: -.045em; margin-bottom: 1.15rem; }
.hero h1 em { color: var(--lamp); }
.hero .intro { max-width: 31ch; color: #eee6da; font-size: clamp(1.15rem, 1rem + .55vw, 1.4rem); line-height: 1.5; margin-bottom: 1.25rem; }
.hero .cta-note { color: #e9e2d8; }
.hero .cta-note a { color: var(--lamp); }
.hero-art { position: relative; margin-top: -.5rem; }
.hero-art img { width: 100%; aspect-ratio: 1.62; object-fit: cover; object-position: 60% 56%; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--night), rgba(34, 32, 55, 0) 20%); }
.paper-edge { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(1.9rem, 5.5vw, 4.75rem); filter: drop-shadow(0 -2px 3px rgba(16, 14, 34, .4)); z-index: 2; }
.paper-edge .back { fill: #e6dcc6; }
.paper-edge .front { fill: var(--paper); }
@media (min-width: 48em) {
  .hero { display: block; }
  .hero-inner { padding-block: clamp(4.5rem, 8vw, 8.5rem) clamp(6rem, 11vw, 11rem); }
  .hero-copy { width: 48%; }
  .hero h1 { font-size: clamp(4.2rem, 7.4vw, 6.9rem); }
  .hero-art { position: absolute; inset: 0 0 0 auto; width: 64%; z-index: -1; margin-top: 0; }
  .hero-art img { height: 100%; aspect-ratio: auto; object-position: 65% 45%; }
  .hero-art::after { background: linear-gradient(90deg, var(--night), rgba(34, 32, 55, .83) 6%, rgba(34, 32, 55, 0) 34%); }
}

/* ---------- Spread: the evening you are away ---------- */
/* Three scenes read top to bottom on a phone and left to right on a wide screen. The page
   behind them runs from paper through dusk to night, so scrolling is what makes it get late. */
.evening {
  position: relative; overflow: clip;
  padding-block: var(--block) calc(var(--block) + clamp(1.9rem, 5.5vw, 4.75rem));
  background: linear-gradient(180deg, var(--paper) 0, var(--paper) 17rem, #f4dfc8 34%, #dcb4ad 50%, #8d7099 67%, #3b3559 84%, var(--night) 100%);
}
.evening h2 { margin-bottom: 1.1rem; max-width: 11em; }
.evening::before {
  content: ""; position: absolute; inset: 52% 0 0; pointer-events: none; opacity: .85;
  background-image:
    radial-gradient(1.5px 1.5px at 6% 22%, #fff7e8 98%, transparent),
    radial-gradient(1px 1px at 17% 61%, #fff7e8 98%, transparent),
    radial-gradient(2px 2px at 29% 38%, #ffe7b0 98%, transparent),
    radial-gradient(1px 1px at 41% 80%, #fff7e8 98%, transparent),
    radial-gradient(1.5px 1.5px at 52% 30%, #fff7e8 98%, transparent),
    radial-gradient(1px 1px at 63% 66%, #fff7e8 98%, transparent),
    radial-gradient(2px 2px at 74% 44%, #ffe7b0 98%, transparent),
    radial-gradient(1px 1px at 83% 74%, #fff7e8 98%, transparent),
    radial-gradient(1.5px 1.5px at 93% 52%, #fff7e8 98%, transparent),
    radial-gradient(1px 1px at 97% 86%, #fff7e8 98%, transparent);
}
.evening .wrap { position: relative; }
.scenes { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 2.25rem); margin-top: clamp(1.75rem, 4vw, 3rem); }
.scene { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; overflow: clip; border-radius: 1.1rem; background: var(--paper); box-shadow: 0 1px 0 rgba(34, 32, 60, .08), 0 .9rem 1.9rem rgba(34, 32, 60, .2); }
/* isolation keeps the layers drawn over a picture (and their blending) inside its own frame. */
.scene-art { position: relative; overflow: clip; isolation: isolate; background: #1c2a23; view-timeline-name: --scene; }
.scene-art img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.scene-words { display: grid; gap: .4rem; align-content: start; padding: 1rem 1.15rem 1.25rem; }
.when { font-size: .9375rem; font-weight: 650; color: var(--plum); }
.scene-words p:not(.when) { color: var(--muted); }
.ui { width: min(100%, 16.75rem); margin-top: .5rem; border-radius: .95rem; }
.ui-play { width: min(100%, 11.625rem); }

/* A paper card lying on the desk. It is a drawing of the idea, not a screen from the app. */
.rec-card { position: absolute; left: 50%; top: 50%; translate: -50% -50%; rotate: -2.5deg; width: min(64%, 15rem); display: grid; gap: .55rem; padding: .7rem .9rem .85rem; border-radius: .5rem; background: var(--paper); color: var(--ink); box-shadow: 0 .4rem 1rem rgba(0, 0, 0, .38); font-size: .9375rem; line-height: 1.2; }
.rec-card p { display: flex; align-items: center; gap: .45rem; font-weight: 650; }
.rec-card b { margin-left: auto; font-weight: 550; font-variant-numeric: tabular-nums; }
.rec-dot { flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: #b3261e; }
.wave { display: flex; align-items: center; gap: 3px; height: 1.9rem; }
.wave i { flex: 1; height: 34%; border-radius: 2px; background: var(--plum); }
.wave i:nth-child(2n) { height: 58%; }
.wave i:nth-child(3n) { height: 86%; }
.wave i:nth-child(5n) { height: 44%; }
.wave i:nth-child(7n) { height: 100%; }
.wave i:nth-child(11n) { height: 24%; }

/* The nursery: a night layer, the lamp glow and the small player sit over the picture.
   The night layer is clear unless the scroll effect below is running. */
.scene-night .scene-art::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: #2a2550; mix-blend-mode: multiply; opacity: 0; }
.glow { position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(circle at 61% 48.7%, rgba(255, 219, 158, .5) 0, rgba(255, 198, 116, .2) 15%, rgba(255, 184, 96, 0) 40%); }
.now-playing { position: absolute; left: .75rem; right: .75rem; bottom: .75rem; z-index: 3; display: flex; align-items: center; gap: .6rem; padding: .5rem .85rem; border-radius: 2rem; background: rgba(24, 22, 44, .86); color: #fff7e8; font-size: .9375rem; font-weight: 650; line-height: 1.2; }
.eq { flex: none; display: inline-flex; align-items: flex-end; gap: 2px; height: .9rem; }
.eq i { width: 3px; height: 45%; border-radius: 1px; background: var(--lamp); }
.eq i:nth-child(2) { height: 100%; }
.eq i:nth-child(3) { height: 70%; }
.track { flex: 1; min-width: 2rem; height: 3px; border-radius: 2px; background: rgba(255, 247, 232, .25); overflow: clip; }
.track i { display: block; width: 45%; height: 100%; background: var(--lamp); }

/* Large phones on their side and tablets: picture beside the words. The picture fills the card's height. */
@media (min-width: 40em) {
  .scene { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-rows: auto; }
  .scene-art img { aspect-ratio: 4 / 3; height: 100%; }
  .scene-desk .scene-art img { object-position: 6% 50%; }
  .scene-words { align-content: center; padding: 1.5rem 1.75rem; }
}
@media (min-width: 64em) {
  .scenes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.4vw, 2.25rem); }
  .scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .scene-art img { height: auto; }
  .scene-desk .scene-art img { object-position: 50% 50%; }
  .scene-words { align-content: start; padding: 1.25rem 1.4rem 1.6rem; }
}

/* ---------- Which voice is which ---------- */
/* A solid outline is a real recording. A dashed outline with a plum label is a generated voice. */
.h-compact { font-size: clamp(1.7rem, 1.3rem + 1.9vw, 2.6rem); line-height: 1.08; }
.voices { padding-block: clamp(2.25rem, 6vw, 4.5rem) clamp(2.75rem, 6.5vw, 5.5rem); }
.voice-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; margin-top: 1.25rem; }
.voice { display: grid; gap: .25rem; align-content: start; padding: .85rem 1.1rem 1rem; border-radius: 1rem; }
.voice-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 .75rem; }
.voice h3 { font-size: 1.4rem; }
.voice-real { border: 1.5px solid var(--ink); }
.voice-made { border: 1.5px dashed #8b789c; }
.tag { font-size: .9375rem; font-weight: 650; color: var(--plum); }
.voice-real .tag { color: var(--moss); }
.voice > p:not(.tag) { color: var(--muted); }
@media (min-width: 60em) {
  .voice-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

/* ---------- Fine print behind a tap ---------- */
details.more > summary { list-style: none; display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .25rem 0; font-weight: 650; color: var(--plum); cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; font: 400 1.45rem/1 var(--sans); translate: 0 -.06em; }
details.more[open] > summary::after { content: "\2212"; }
details.more > p { margin: .15rem 0 .6rem; max-width: 40em; color: var(--muted); }
.on-dark details.more > summary { color: var(--lamp); }

/* ---------- Spread: the free library ---------- */
/* On a phone the three books sit on a shelf you can swipe. From tablet width they stand in a row. */
.library { background: var(--paper-deep); padding-block: var(--block); }
.library-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.library h2 { margin-bottom: 1.1rem; max-width: 11em; }
.books { display: flex; gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: .25rem var(--gutter) .9rem; }
.books::-webkit-scrollbar { display: none; }
.book { flex: 0 0 min(64%, 15.5rem); scroll-snap-align: start; }
.jacket { position: relative; overflow: hidden; height: 100%; border-radius: .25rem .8rem .8rem .25rem; background: #2c3048; color: #fff6de; box-shadow: 2px 3px 0 #cfc3aa, 3px 5px 0 #dfd5c0; }
.jacket::after { content: ""; position: absolute; inset: 0 auto 0 0; width: .7rem; background: linear-gradient(90deg, #0002, #fff1 55%, #0002); pointer-events: none; }
.book-tiggy .jacket { background: #34493e; }
.book-windows .jacket { background: #734832; }
.jacket img { width: 100%; aspect-ratio: 1.33; object-fit: cover; }
.jacket-type { display: flex; flex-direction: column; justify-content: center; min-height: 7rem; padding: .9rem 1rem 1rem; text-align: center; }
.jacket h3 { font-size: clamp(1.3rem, 1rem + 1.6vw, 2.2rem); line-height: 1.12; letter-spacing: -.025em; }
.jacket p { margin-top: .45rem; font-size: .9375rem; }
.shelf-notes { display: grid; gap: .7rem; margin-top: -.5rem; }
.shelf-note { color: var(--muted); max-width: 30em; }
.also-free { max-width: 34em; font-size: .9375rem; line-height: 1.5; }
.clip { display: grid; gap: .75rem; justify-items: start; }
.clip img { width: min(100%, 17.625rem); border-radius: 1.5rem; border: 1px solid #45446a; background: #15152c; box-shadow: 0 .6rem 1.4rem rgba(34, 32, 60, .18); }
.clip figcaption { font-size: .9375rem; line-height: 1.45; color: var(--muted); max-width: 19rem; }
/* The playlist screen is an extra from tablet width. Phones get the sentence in the lead. */
.library-clip { display: none; }
@media (min-width: 48em) {
  .library-grid { grid-template-columns: minmax(0, 1fr) 17.625rem; column-gap: clamp(2.5rem, 6vw, 6rem); }
  .library-head { grid-column: 1; grid-row: 1; align-self: center; }
  .library-clip { grid-column: 2; grid-row: 1; display: grid; }
  .books { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3.2vw, 3rem); overflow: visible; margin-inline: 0; padding: 0; }
  .jacket-type { min-height: 8.5rem; padding: 1rem 1.2rem 1.1rem; }
  .shelf-notes { grid-column: 1 / -1; grid-row: 3; grid-template-columns: minmax(0, 30em) minmax(0, 30em); column-gap: clamp(2rem, 5vw, 5rem); align-items: start; }
}

/* ---------- Band: the monitor ---------- */
.monitor { background: var(--moss); color: var(--on-night); padding-block: clamp(2.5rem, 6.5vw, 5rem); }
.monitor-band { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.monitor h2 { margin-bottom: .9rem; max-width: 13em; }
.monitor-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; align-content: start; }
.monitor .note { color: #d5dcd2; max-width: 40em; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; margin: .35rem 0 .6rem; }
.facts dt { font-weight: 650; margin-bottom: .1rem; }
.facts dd { max-width: 32em; color: #dfe5dc; }
.caution { border-left: 3px solid var(--lamp); padding: .15rem 0 .15rem 1rem; max-width: 40em; }
.caution strong { color: #fff7e8; }
@media (min-width: 60em) {
  .monitor-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); }
}

/* ---------- Spread: what it costs ---------- */
.pricing { background: var(--paper-deep); padding-block: var(--block); }
.pricing .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.75rem, 3.5vw, 3rem); }
.pricing h2 { max-width: 12em; }
.plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }
.plan { border-radius: 1.1rem; padding: clamp(1.4rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: .9rem; }
.plan-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem 1rem; }
.plan-get { margin-top: auto; padding-top: .6rem; display: grid; gap: .6rem; justify-items: start; }
.plan-free { background: var(--paper); border: 1.5px solid var(--ink); }
.plan-lifetime { background: var(--night); color: var(--on-night); }
.plan-price { font: 400 clamp(2.4rem, 2rem + 2.6vw, 3.6rem)/1 var(--serif); letter-spacing: -.03em; }
.plan-price span { font: 550 1.0625rem/1.3 var(--sans); letter-spacing: 0; }
.plan-lifetime .plan-price { color: var(--lamp); }
.plan-terms { font-weight: 650; }
.ticks { display: grid; gap: .55rem; }
.ticks li { position: relative; padding-left: 1.5rem; }
.ticks li::before { content: ""; position: absolute; left: .15rem; top: .62em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--plum); }
.plan-lifetime .ticks li::before { background: var(--lamp); }
.plan .note { color: var(--muted); }
.plan-lifetime .note { color: #d8d3dc; }
.trial { border-top: 1px solid #cfc6b3; border-bottom: 1px solid #cfc6b3; padding-block: clamp(1.25rem, 2.6vw, 2rem); display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; }
.trial-head p { color: var(--muted); max-width: 34em; margin-top: .4rem; }
.trial dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; margin: .35rem 0 .5rem; }
.trial dt { font-weight: 650; }
.trial dd { color: var(--muted); max-width: 30em; }
@media (min-width: 48em) {
  .plans { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1.75rem; }
  .trial dl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
}
@media (min-width: 64em) {
  .plan-lifetime .ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
  .trial { grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
}

/* ---------- Band: privacy ---------- */
.privacy { padding-block: clamp(2.5rem, 6.5vw, 5rem); }
.privacy-band { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.privacy h2 { max-width: 11em; margin-bottom: .35rem; }
.privacy-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.plain-facts { gap: .55rem; font-weight: 650; }
@media (min-width: 36em) {
  .plain-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
}
@media (min-width: 60em) {
  .privacy-band { grid-template-columns: minmax(0, .85fr) minmax(0, 1.6fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
}
/* The support page's questions. */
.answers details { border-top: 1px solid var(--line); }
.answers details:last-of-type { border-bottom: 1px solid var(--line); }
.answers summary { cursor: pointer; font-weight: 650; padding: 1rem .25rem; }
.answers details p { margin: 0 .25rem 1.1rem; color: var(--muted); max-width: 40em; }
.answers details p + p { margin-top: -.3rem; }

/* ---------- Last spread ---------- */
.closing { background: var(--night); color: var(--on-night); padding-block: var(--block); }
.closing-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.75rem, 3vw, 2.5rem); }
.closing h2 { color: #fff7e8; max-width: 9em; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.maker { border-top: 1px solid #4a486a; padding-top: 1.5rem; max-width: 34em; }
.letter blockquote { margin: 0; display: grid; gap: .8rem; color: #e9e2d8; }
.letter figcaption { margin-top: 1rem; font: 400 1.4rem/1.2 var(--serif); letter-spacing: -.02em; color: #fff7e8; }
.letter figcaption span { display: block; margin-top: .2rem; font: 400 .9375rem/1.4 var(--sans); letter-spacing: 0; color: #cfc9d6; }
.maker-contact { margin-top: 1.1rem; font-size: .9375rem; line-height: 1.5; color: #cfc9d6; }
.maker a { color: var(--on-night); }
@media (min-width: 48em) {
  .closing-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
  .maker { border-top: 0; border-left: 1px solid #4a486a; padding: .25rem 0 .25rem 1.75rem; }
}

/* ---------- Footer ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-block: 1.75rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.foot nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 1rem; font-weight: 550; text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot small { font-size: .9375rem; color: var(--muted); }
footer { border-top: 1px solid var(--line); }
@media (min-width: 48em) { .foot nav { margin-left: auto; } }

/* ---------- Support, legal and not-found pages ---------- */
.doc, .legal, .lost { padding-block: clamp(3rem, 7vw, 6rem); }
.doc-title h1, .legal h1, .lost h1 { font-size: clamp(2.6rem, 1.6rem + 5vw, 5.5rem); margin-bottom: 1rem; }
.doc-title p { font-size: 1.2rem; color: var(--muted); max-width: 42rem; }
.doc-grid { display: grid; gap: 2rem; margin-top: 2rem; }
.doc-grid aside nav { display: flex; flex-wrap: wrap; gap: 0 1.3rem; }
.doc-grid aside a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 650; }
.answers section { margin-bottom: 3rem; scroll-margin-top: 5.5rem; }
.answers h2, .legal h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem); letter-spacing: -.03em; margin-bottom: 1.1rem; }
.legal article { max-width: 46rem; margin: auto; }
.legal h2 { margin: 2.25rem 0 .6rem; }
.legal p + p { margin-top: 1rem; }
.date { color: var(--muted); }
.lost p { max-width: 34em; margin-bottom: 1rem; }
@media (min-width: 48em) {
  .doc-grid { grid-template-columns: 1fr 2.1fr; gap: 4rem; margin-top: 3.5rem; }
  .doc-grid aside nav { position: sticky; top: 6rem; display: grid; gap: .1rem; }
}

/* When text is very large for the width of the screen (a phone at 150% text or more),
   the strip scrolls with the page and side-by-side pairs stack. */
@media (max-width: 22em) {
  .mast { position: static; }
  .books { display: grid; grid-template-columns: minmax(0, 1fr); overflow: visible; margin-inline: 0; padding: 0; }
  .rec-card { width: 88%; }
  .now-playing .track { display: none; }
}

/* ---------- The evening happens as you scroll ---------- */
/* Only on screens, where the browser can tie an animation to scrolling, and only for people who
   have not asked for less motion. Everyone else, and print, gets the finished picture: lamp on,
   player showing. The ranges are set so the nursery is still dark when it first comes fully into
   view on a phone, and fully lit a little below the middle of the screen. */
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    .evening::before { animation: stars-out linear both; animation-timeline: view(); animation-range: cover 30% cover 62%; }
    .scene-night .scene-art img { animation: lamp-on linear both; animation-timeline: --scene; animation-range: cover 18% cover 44%; }
    .scene-night .scene-art::before { animation: night-off linear both; animation-timeline: --scene; animation-range: cover 18% cover 44%; }
    .scene-night .glow { animation: fade-up linear both; animation-timeline: --scene; animation-range: cover 26% cover 46%; }
    .scene-night .now-playing { animation: fade-up linear both; animation-timeline: --scene; animation-range: cover 42% cover 50%; }
    .scene-night .track i { animation: play-on linear both; animation-timeline: --scene; animation-range: cover 50% exit 70%; }
  }
}
@keyframes stars-out { from { opacity: 0; } to { opacity: .85; } }
@keyframes lamp-on { from { filter: brightness(.8) saturate(.7); } to { filter: brightness(1) saturate(1); } }
@keyframes night-off { from { opacity: .62; } to { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; } to { opacity: 1; } }
@keyframes play-on { from { width: 4%; } to { width: 78%; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .mast, footer, .skip, .store-badge, .qr, .paper-edge { display: none; }
  body { background: #fff; color: #000; }
}
