/* Vibe Clauders: the brand kit's paper, ink, Newsreader and hairline rules (../brand). One page, no build step.
   Layout: a shelf on paper. The hero's five rising bars stand on a rule, and every section below is set off by
   rules, not boxes. */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #f8f6f1;
  --paper-deep: #f0ece3;
  --card: #fdfcf9;
  --ink: #131418;
  --ink-soft: #25272c;
  --muted: #55524c;
  --line: #d6cfc0;
  --night: #121315;
  --on-night: #f3efe6;
  --on-night-muted: #bdb8ae;
  --accent: #0b5f58;
  --accent-strong: #084842;
  --accent-soft: #e2eee8;
  --mint: #8fd3c8;
  --series-teal: #0e766d;
  --series-violet: #6d28d9;
  --series-blue: #2e56c7;
  --series-ochre: #9c5408;
  --series-crimson: #b42346;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-right: max(16px, env(safe-area-inset-right, 0px));
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink-soft);
  background-color: var(--paper);
  /* The site's faint paper grain. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .025 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-right);
}

.serif {
  font-family: var(--serif);
  font-variant-numeric: oldstyle-nums proportional-nums;
}

.eyebrow {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}

.lockup {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.lockup svg {
  display: block;
  width: 33px;
  height: 22px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.wordmark em {
  font-weight: 400;
}

.site-nav {
  display: flex;
  gap: 24px;
  font-size: 0.875rem;
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Hero */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 56px;
  align-items: end;
  padding-block: 72px 0;
}

.hero-text {
  min-width: 0;
  padding-bottom: 72px;
}

.hero h1 {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.75rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

.hero h1 em {
  font-weight: 400;
}

.lede {
  margin: 24px 0 0;
  max-width: 34em;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.9vw, 1.375rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

/* The shelf: five bars standing on the hero's bottom rule. */
.shelf {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-width: 0;
}

.shelf svg {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
}

.hero-rule {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 0;
}

/* Sign-up */
.signup {
  margin-top: 32px;
  max-width: 34rem;
}

.signup label {
  display: block;
}

.signup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.signup input {
  flex: 1 1 240px;
  min-width: 0;
  height: 48px;
  padding: 0 20px;
  border: 1px solid rgb(19 20 24 / 0.25);
  border-radius: 9999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

.signup input::placeholder {
  color: rgb(85 82 76 / 0.7);
}

.signup button {
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 9999px;
  background: var(--ink);
  color: var(--paper);
  font: 500 0.875rem/1 var(--sans);
  cursor: pointer;
}

.signup button:hover {
  background: var(--accent-strong);
}

.fine {
  margin: 12px 0 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted);
}

.fine a {
  text-underline-offset: 3px;
}

.signup-closed {
  margin: 32px 0 0;
  max-width: 34rem;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Sections */
.section .wrap {
  padding-block: 72px;
  border-bottom: 1px solid var(--line);
}

.section h2 {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

.columns > div {
  padding: 24px 24px 0 0;
}

.columns > div + div {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.columns h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--ink);
}

.columns p {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
}

/* The books */
.books {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.books li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}

.books .bar {
  width: 10px;
  height: 40px;
}

.books .title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--ink);
}

.books .who {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.books a.more {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-underline-offset: 4px;
  white-space: nowrap;
}

.books a.more:hover {
  color: var(--accent-strong);
}

.books .soon {
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Night band */
.night {
  background: var(--night);
  color: var(--on-night-muted);
}

.night .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  padding-block: 72px;
}

.night .eyebrow {
  color: var(--mint);
}

.night h2 {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--on-night);
}

.night p:not(.eyebrow):not(.fine):not(.signup-closed) {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.6;
}

.night a {
  color: var(--on-night);
  text-underline-offset: 4px;
}

.night .signup input {
  border-color: rgb(243 239 230 / 0.3);
  background: transparent;
  color: var(--on-night);
}

.night .signup input::placeholder {
  color: rgb(189 184 174 / 0.8);
}

.night .signup button {
  background: var(--on-night);
  color: var(--night);
}

.night .signup button:hover {
  background: var(--mint);
}

.night .fine {
  color: var(--on-night-muted);
}

.night .signup-closed {
  border-top-color: rgb(243 239 230 / 0.2);
  color: var(--on-night-muted);
}

.night a:focus-visible,
.night button:focus-visible,
.night input:focus-visible {
  outline-color: var(--on-night);
}

/* Footer */
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  padding-block: 32px 48px;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer .legal {
  max-width: 40rem;
}

@media (max-width: 820px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-top: 48px;
  }
  .hero-text {
    padding-bottom: 0;
  }
  .shelf {
    justify-content: flex-start;
  }
  .shelf svg {
    max-width: 240px;
  }
  .columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .columns > div,
  .columns > div + div {
    padding: 20px 0;
    border-left: 0;
  }
  .columns > div + div {
    border-top: 1px solid var(--line);
  }
  .night .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .section .wrap,
  .night .wrap {
    padding-block: 56px;
  }
}

@media (max-width: 480px) {
  .site-nav {
    gap: 16px;
  }
  .books li {
    grid-template-columns: 8px minmax(0, 1fr);
  }
  .books .bar {
    width: 8px;
    grid-row: span 2;
    height: 100%;
    min-height: 40px;
  }
  .books a.more,
  .books .soon {
    grid-column: 2;
  }
}
