/*
 * hushward.app in the app's Nocturne design. design/STYLE-GUIDE.md owns every value here:
 * the palette, the two typefaces, the 4px space scale, the radii and the motion. The
 * website adds only larger headings and section spacing, still on the 4px scale.
 */
@font-face { font-family: Newsreader; src: url(/fonts/newsreader-300.woff2) format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: Newsreader; src: url(/fonts/newsreader-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url(/fonts/instrument-sans-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url(/fonts/instrument-sans-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url(/fonts/instrument-sans-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url(/fonts/instrument-sans-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --ground: #0B0D14;
  --surface: #141824;
  --text: #E8E4DA;
  --muted: #8A8578;
  --line: #232838;
  --edge: #3A4056;
  --serif: Newsreader, Georgia, serif;
  --sans: 'Instrument Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: 24px;
  --settle: cubic-bezier(0.2, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a {
  color: inherit;
  text-decoration: underline 1px var(--edge);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 240ms var(--settle), color 240ms var(--settle);
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 2px; }
::selection { background: var(--edge); color: var(--text); }

.skip {
  position: absolute;
  top: -64px;
  left: var(--gutter);
  z-index: 3;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 16px; }

/* Header and footer, the same on every page. */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 72rem;
  margin: 0 auto;
  padding: 16px var(--gutter);
}
.home .masthead { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.brand { display: block; padding: 12px 0; }
.masthead nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
}
.masthead nav a:hover { color: var(--text); }

.colophon {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 64px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}
.colophon .brand { padding: 0 0 8px; }
.colophon p { margin: 0; }
.colophon ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.colophon nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); }

/* Small capitals above a heading, and the AI disclosure: caption size, muted. */
.eyebrow {
  margin: 0;
  font: 500 13px/18px var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The front page: a night sky behind the title, as on the page it replaced. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  min-height: min(84vh, 800px);
  padding: 112px var(--gutter) 80px;
  text-align: center;
}
.sky { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.sky .arc { fill: none; stroke: var(--edge); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0.7; }
.sky .star { fill: var(--text); opacity: 0.45; animation: twinkle 8s ease-in-out infinite alternate; }
.sky .star:nth-of-type(3n) { animation-duration: 11s; animation-delay: -4s; }
.sky .star:nth-of-type(3n + 1) { animation-duration: 13s; animation-delay: -9s; }
.hero .mark { width: 160px; animation: wash 2200ms cubic-bezier(0.4, 0, 0.6, 1) both; }
.hero h1 {
  margin: 0;
  font: 300 clamp(44px, 16px + 6.2vw, 96px)/1.1 var(--serif);
  letter-spacing: -0.015em;
}
.hero h1 span { display: block; animation: curtain 2000ms var(--settle) 400ms both; }
.hero h1 span + span { animation-delay: 1000ms; }

.intro {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 var(--gutter) 128px;
  text-align: center;
}
.lede { margin: 0; font-size: clamp(19px, 15px + 0.6vw, 23px); line-height: 1.55; text-wrap: balance; }
.note { margin: 0; font-size: 15px; color: var(--muted); text-wrap: balance; }

.ritual { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter) 128px; }
.ritual h2 {
  margin: 0 0 64px;
  font: 400 clamp(32px, 20px + 2.4vw, 48px)/1.2 var(--serif);
  text-align: center;
  text-wrap: balance;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 48px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { display: grid; align-content: start; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font: 500 13px/18px var(--sans);
  letter-spacing: 0.18em;
  color: var(--muted);
}
.steps h3 { margin: 0; font: 400 26px/1.25 var(--serif); }
.steps p { margin: 0; }

.glimpse { padding: 112px var(--gutter); background: var(--surface); }
.glimpse > div { display: grid; justify-items: center; gap: 24px; max-width: 46rem; margin: 0 auto; text-align: center; }
.glimpse h2 { margin: 0; font: 400 clamp(30px, 22px + 1.6vw, 40px)/1.2 var(--serif); text-wrap: balance; }
.disclosure { margin: 0; font: 400 13px/18px var(--sans); color: var(--muted); }
.story { margin: 0; font: 300 clamp(21px, 17px + 0.7vw, 26px)/1.7 var(--serif); text-wrap: pretty; }

/* The documents: one readable column. */
.document { max-width: 44rem; margin: 0 auto; padding: 32px var(--gutter) 96px; }
.document h1 {
  margin: 0 0 16px;
  font: 400 clamp(34px, 24px + 1.8vw, 46px)/1.15 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.document h1 + p { margin: 0 0 32px; font-size: 15px; color: var(--muted); }
.document h2 { margin: 56px 0 16px; font: 400 28px/1.25 var(--serif); scroll-margin-top: 24px; }
.document h3 { margin: 32px 0 8px; font: 600 17px/1.5 var(--sans); scroll-margin-top: 24px; }
.document h4 { margin: 24px 0 8px; font: 600 15px/1.5 var(--sans); color: var(--muted); }
.document p { margin: 0 0 16px; line-height: 1.65; }
.document ul, .document ol { margin: 0 0 16px; padding-inline-start: 24px; }
.document li { margin: 8px 0; padding-inline-start: 4px; line-height: 1.65; }
.document li::marker { color: var(--muted); }
.document strong { font-weight: 600; }
.document code { font: 15px ui-monospace, Menlo, Consolas, monospace; }
.document table { width: 100%; margin: 24px 0 32px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.document th, .document td { padding: 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.document th { font-weight: 600; background: var(--surface); }

.contents { margin: 32px 0 48px; padding: 24px; background: var(--surface); border-radius: 14px; }
.contents p { margin: 0 0 12px; font: 500 13px/18px var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.contents ol { margin: 0; padding: 0; list-style: none; columns: 2 16rem; column-gap: 32px; }
.contents li { margin: 0; padding: 0; break-inside: avoid; }
.contents a { display: block; padding: 8px 0; font-size: 15px; line-height: 1.4; text-decoration: none; }
.contents a:hover { text-decoration: underline 1px currentColor; }

@media (max-width: 40rem) {
  .hero { min-height: 0; padding-top: 104px; padding-bottom: 64px; gap: 24px; }
  .hero .mark { width: 128px; }
  .intro, .ritual { padding-bottom: 96px; }
  .ritual h2 { margin-bottom: 40px; }
  .glimpse { padding: 80px var(--gutter); }
  /* Each table row becomes a block, every cell under its column's name. */
  .document table, .document tbody, .document tr, .document td { display: block; }
  .document thead { display: none; }
  .document tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .document td { padding: 4px 0; border: 0; }
  .document td::before { content: attr(data-label); display: block; font: 500 13px/18px var(--sans); color: var(--muted); }
}

/* Nothing on this site should wake anybody: the moon and the title settle once, and the
   stars only breathe. */
@keyframes wash { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: none; } }
@keyframes curtain { from { opacity: 0; } to { opacity: 1; } }
@keyframes twinkle { from { opacity: 0.15; } to { opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* On paper, ink on the page. */
@media print {
  :root { color-scheme: light; --text: #1B1D24; --muted: #4A4C55; --line: #C9C6BE; --surface: transparent; }
  html, body { background: none; }
  .skip, .masthead nav, .sky { display: none; }
  .contents { border: 1px solid var(--line); }
}
