/* listrn.app. Colours come from tokens.css (generated from packages/design-tokens); the
   rules here are the design system's, written for a page instead of a phone screen. */

@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Inter-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/Inter-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Inter-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Literata';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Literata-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Literata';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Literata-600.ttf') format('truetype');
}

:root {
  --book: 'Literata', 'Noto Serif SC', Georgia, serif;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 40rem;
  --page: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font: 400 1.0625rem/1.65 var(--ui);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--text-primary);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: var(--accent-hover);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding-inline: max(20px, env(safe-area-inset-left, 0px))
    max(20px, env(safe-area-inset-right, 0px));
}

/* Header and footer */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 600 1.375rem/1 var(--book);
  text-decoration: none;
  letter-spacing: -0.01em;
}
/* The mark (scripts/brand-icons.ts): its own slate, on either page colour. */
.brand img {
  width: 34px;
  height: auto;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font: 500 0.9375rem/1 var(--ui);
}
.top nav a:not(.button) {
  text-decoration: none;
  color: var(--text-secondary);
}
.top nav a:not(.button):hover {
  color: var(--text-primary);
}

.foot {
  border-top: 1px solid var(--border);
  margin-top: 5rem;
  padding-block: 2rem 3rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}
.foot nav {
  display: flex;
  gap: 1.25rem;
}
.foot a {
  color: var(--text-secondary);
}

/* The one action: a slate outline around ink words (docs/design-system: words never sit on the accent). */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  color: var(--text-primary);
  text-decoration: none;
  font: 600 1rem/1 var(--ui);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  transition:
    background-color 120ms,
    box-shadow 120ms;
}
.button:hover {
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1.5px var(--accent-hover);
}
.button:active {
  box-shadow: inset 0 0 0 2px var(--accent-pressed);
}
.button.small {
  min-height: 40px;
  padding: 0 1.1rem;
  font-size: 0.9375rem;
}
.text-link {
  font: 500 1rem/1 var(--ui);
}

/* Home */
.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-block: 3rem 4rem;
}
.hero h1 {
  font: 600 clamp(2.25rem, 6vw, 3.5rem)/1.1 var(--book);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.hero p.lede {
  font-size: 1.1875rem;
  color: var(--text-secondary);
  max-width: 34rem;
  margin: 1.25rem 0 0;
}
.hero .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}
.staging {
  margin: 1rem 0 0;
  max-width: 34rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.early {
  display: inline-block;
  margin-bottom: 1.25rem;
  font: 500 0.8125rem/1 var(--ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.hero figure {
  margin: 0;
}
.page-sample {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow:
    0 1px 0 rgba(57, 52, 47, 0.06),
    0 18px 40px -28px rgba(57, 52, 47, 0.5);
}
.page-sample img {
  margin: 0 auto 1rem;
  width: 70%;
}
.page-sample .over {
  text-align: center;
  font: 500 0.75rem/1 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.page-sample h2 {
  text-align: center;
  font: 600 1.5rem/1.25 var(--book);
  margin: 0.5rem 0 1.25rem;
}
.page-sample p {
  font: 400 1.0625rem/1.7 var(--book);
  margin: 0;
}
.reading {
  background: var(--highlight);
  border-radius: 3px;
  box-shadow: 0 0 0 2px var(--highlight);
}

section {
  padding-block: 3.5rem;
}
section > .wrap > h2 {
  font: 600 clamp(1.625rem, 3.5vw, 2.125rem)/1.2 var(--book);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
section > .wrap > p.intro {
  color: var(--text-secondary);
  max-width: var(--measure);
  margin: 0 0 2.25rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}
.steps li {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.steps .n {
  font: 600 0.875rem/1 var(--ui);
  color: var(--text-secondary);
}
.steps h3 {
  font: 600 1.1875rem/1.3 var(--book);
  margin: 0;
}
.steps p {
  margin: 0;
  color: var(--text-secondary);
}

.shelf {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.shelf img {
  width: 88px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--border);
}

.voices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 1.75rem 1rem;
}
.voices li {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.25rem;
}
.voices img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin-bottom: 0.5rem;
}
.voices strong {
  font: 600 1.125rem/1.3 var(--book);
}
.voices span {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.calm {
  background: var(--surface);
}
.calm ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.25rem;
  max-width: var(--measure);
}
.calm li strong {
  display: block;
  font: 600 1.0625rem/1.4 var(--book);
}
.calm li span {
  color: var(--text-secondary);
}

.closing {
  text-align: center;
}
.closing img {
  width: 200px;
  margin: 0 auto 1.5rem;
}
/* The paintings carry a paper grain across their whole canvas; a soft round mask lets it melt
   into the page instead of showing a rectangle. */
.closing img,
.page-sample img {
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.closing h2 {
  margin-inline: auto;
}
.closing p {
  color: var(--text-secondary);
  margin: 0 auto 2rem;
  max-width: 30rem;
}

/* Legal pages */
.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding-block: 2rem 1rem;
}
.doc h1 {
  font: 600 clamp(2rem, 5vw, 2.5rem)/1.15 var(--book);
  margin: 0 0 0.5rem;
}
.doc .updated {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin: 0 0 2.5rem;
}
.doc h2 {
  font: 600 1.375rem/1.3 var(--book);
  margin: 2.5rem 0 0.75rem;
}
.doc p,
.doc li {
  color: var(--text-primary);
}
.doc ul {
  padding-left: 1.25rem;
}
.doc li + li {
  margin-top: 0.5rem;
}

@media (min-width: 52rem) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
    padding-block: 4.5rem 5rem;
  }
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
