/* Revere (revere.sh). One quiet page: sand paper, one type size, prose instead of sections. */

@font-face { font-family: "Libre Franklin"; src: url(/assets/fonts/libre-franklin-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url(/assets/fonts/libre-franklin-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/assets/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --sand: #f4efec;        /* the page */
  --sand-2: #ebe3dd;      /* hover wells, code */
  --sand-3: #e2d7cf;      /* reaction discs, rules */
  --ink: #1f2322;
  --ink-2: #5d5658;       /* secondary text: 6.4:1 on sand */
  --up: #3d8a66;
  --slow: #d4a443;
  --down: #d1453b;
  --lamp: #e8a33d;        /* selection, the lantern's flame */
  --text: clamp(18px, 0.55vw + 14px, 22px);
  --lead: 1.2;
  --gutter: clamp(16px, 3vw, 40px);
  --pop: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--sand);
  color: var(--ink);
  font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--text);
  line-height: var(--lead);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: color-mix(in srgb, var(--lamp) 45%, var(--sand)); color: var(--ink); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
h1, h2 { font-size: inherit; font-weight: inherit; }
strong { font-weight: 600; }

.skip { position: absolute; left: -999px; top: 8px; padding: 6px 10px; background: var(--ink); color: var(--sand); border-radius: 4px; font-size: 14px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.site { min-height: 100dvh; display: flex; flex-direction: column; }

/* ---- header: the lantern, two small links ---- */
.top { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px var(--gutter) 0; }
.mark { display: block; width: fit-content; color: var(--ink); }
.mark svg { width: 28px; height: auto; }
.top__links { display: flex; gap: 32px; font-size: 13px; line-height: 1.02; letter-spacing: -0.01em; white-space: nowrap; padding-top: 4px; }
.top__links a { position: relative; }
.top__links a::after { content: ""; position: absolute; inset: -16px -8px; }
.top__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- the page ---- */
.home { flex: 1; display: flex; flex-direction: column; gap: clamp(72px, 12vw, 140px); padding: clamp(64px, 12vw, 128px) var(--gutter) 20px; }
.intro { display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--text) * 1.6); max-width: 41rem; }
.intro p { font-weight: 400; }

/* things Revere watches: hovering (or tapping) one pops a doodle above it */
.tasks { position: relative; }
.task { position: relative; cursor: default; border-radius: 3px; -webkit-tap-highlight-color: transparent; text-decoration: underline dotted color-mix(in srgb, var(--ink) 35%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.task:focus-visible { outline-offset: 2px; }
.pop {
  position: absolute; left: -4px; bottom: calc(100% + 2px);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sand-3); pointer-events: none;
  opacity: 0; scale: .4; transform-origin: 0 100%;
  transition: scale 0s .15s, opacity .15s;
}
.pop img { width: 20px; height: 20px; scale: .4; transition: scale 0s .15s; }
.task:focus-visible .pop, .task.is-reacting .pop { opacity: 1; scale: 1; transition: scale .5s var(--pop), opacity .12s; }
.task:focus-visible .pop img, .task.is-reacting .pop img { scale: 1; transition: scale .43s .07s var(--pop); }
@media (hover: hover) {
  .task:hover .pop { opacity: 1; scale: 1; transition: scale .5s var(--pop), opacity .12s; }
  .task:hover .pop img { scale: 1; transition: scale .43s .07s var(--pop); }
}

/* the one command */
.cmd { color: var(--ink-2); }
.code {
  font: inherit; color: var(--ink); background: var(--sand-2); border: 0; border-radius: 6px;
  padding: .12em .45em; margin-left: .1em; cursor: pointer; display: inline-flex; align-items: baseline; gap: .55em;
  max-width: 100%; text-align: left;
}
.code code { font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82em; letter-spacing: 0; overflow-wrap: anywhere; }
.code__hint { font-size: 12px; color: var(--ink-2); letter-spacing: 0; }
.code:hover { background: var(--sand-3); }
.code.is-copied .code__hint { color: var(--up); }

/* calls to action: label, chevron, a soft well on hover */
.ctas { display: flex; flex-direction: column; gap: 10px; }
.cta { display: inline-flex; align-items: center; font-weight: 600; position: relative; }
.cta--quiet { font-weight: 400; }
.cta__label { position: relative; }
.cta__label::before { content: ""; position: absolute; inset: -3px -6px; border-radius: 4px; background: transparent; z-index: -1; transition: background-color .15s; }
.cta:hover .cta__label::before { background: var(--sand-2); }
.cta__chevron { width: .9em; height: .9em; margin-left: .12em; }

/* ---- status rows: the example page and the questions ---- */
.rows { max-width: 41rem; display: flex; flex-direction: column; gap: 14px; }
.rows__title { font-weight: 600; }
.rows__note { font-size: 15px; line-height: 1.35; letter-spacing: -0.01em; color: var(--ink-2); max-width: 36rem; margin-bottom: 10px; }
.rows__list { display: flex; flex-direction: column; border-top: 1px solid var(--sand-3); }
.row { border-bottom: 1px solid var(--sand-3); }
.row summary {
  list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.row summary::-webkit-details-marker { display: none; }
.row__label { font-weight: 600; }
.row__state { color: var(--ink-2); margin-left: auto; text-align: right; font-size: .82em; font-variant-numeric: tabular-nums; }
/* the chevron: points right, turns down when open */
.row summary::after {
  content: ""; flex: none; width: 8px; height: 8px; margin: 0 5px 0 0;
  border-right: 1.8px solid var(--ink-2); border-bottom: 1.8px solid var(--ink-2);
  transform: rotate(-45deg); transition: transform .2s;
}
.row summary .row__label:last-child { margin-right: auto; }
.row[open] summary::after { transform: rotate(45deg); }
.row summary:hover .row__label { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.row__body { padding: 0 0 18px; font-size: 15px; line-height: 1.4; letter-spacing: -0.01em; color: var(--ink-2); display: flex; flex-direction: column; gap: 10px; max-width: 36rem; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.dot--up { background: var(--up); }
.dot--slow { background: var(--slow); }
.dot--down { background: var(--down); }

/* 90 days as bars: green every day, then one red (--down-day) and one amber (--slow-day) day by index */
.bars {
  --down-day: -9; --slow-day: -9;
  position: relative; height: 26px; overflow: hidden;
  background-image: linear-gradient(90deg, var(--up) 0 calc(100% - 2px), transparent 0);
  background-size: calc(100% / 90) 100%; background-repeat: repeat-x;
  border-radius: 2px; opacity: .9;
}
.bars::before, .bars::after { content: ""; position: absolute; top: 0; bottom: 0; width: calc(100% / 90 - 2px); }
.bars::before { left: calc(var(--down-day) * 100% / 90); background: var(--down); }
.bars::after { left: calc(var(--slow-day) * 100% / 90); background: var(--slow); }

/* ---- footer ---- */
.legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px;
  margin-top: auto; font-size: 13px; line-height: 1.02; letter-spacing: -0.01em; color: var(--ink);
}
.legal__nav { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.legal__nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .legal__mail { display: none; } }

/* ---- arrival: everything settles in, one line after another ---- */
@keyframes settle { from { opacity: 0; translate: 0 8px; } }
.top, .intro > *, .rows, .legal { animation: settle .6s cubic-bezier(.22, 1, .36, 1) both; }
.top { animation-delay: 0ms; }
.intro > :nth-child(1) { animation-delay: 90ms; }
.intro > :nth-child(2) { animation-delay: 180ms; }
.intro > :nth-child(3) { animation-delay: 270ms; }
.intro > :nth-child(4) { animation-delay: 360ms; }
.intro > :nth-child(5) { animation-delay: 450ms; }
.intro > :nth-child(6) { animation-delay: 540ms; }
.rows { animation-delay: 630ms; }
.legal { animation-delay: 720ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pop, .pop img { scale: 1; }
}
