/* A night sea and paper. One picture, one voice, no chrome. */
:root {
  --night: #0B1A2B;
  --deep: #15314B;
  --moon: #EEF2F4;
  --mist: #8FA6B8;
  --gold: #D8C48E;
  --hair: rgba(143, 166, 184, 0.2);

  /* One scale: 13, 19, 32, and the title. */
  --size-label: 13px;
  --size-body: 19px;
  --size-h2: 32px;
  --size-h1: clamp(44px, 7vw, 88px);

  --measure: 34rem;
  --page: 48rem;
  --gutter: clamp(16px, 5vw, 40px);
  --air: clamp(4rem, 12vh, 7.5rem);
  --sea-air: clamp(5rem, 40vh, 18rem);
}

* { box-sizing: border-box; }

html { background: var(--night); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--moon);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: var(--size-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One page-wide grain, like the tooth of paper. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

::selection {
  background: var(--deep);
  color: var(--moon);
}

p { margin: 0 0 1.5rem; }
p:last-child { margin-bottom: 0; }

img { display: block; }

/* The one column and the one left edge. */
.page {
  width: 100%;
  max-width: var(--page);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.column { max-width: var(--measure); }

/* Type */
h1, h2 {
  font-family: Fraunces, Georgia, "Times New Roman", serif;
  font-weight: 300;
  color: var(--moon);
  margin: 0;
}

h2 { text-wrap: balance; }

h1 {
  font-size: var(--size-h1);
  font-variation-settings: "opsz" 144, "SOFT" 100;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 1.75rem;
}

h2 {
  font-size: var(--size-h2);
  font-variation-settings: "opsz" 48, "SOFT" 100;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin-bottom: 1.5rem;
}

.label,
.signup label {
  font-size: var(--size-label);
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mist);
  margin: 0;
}

.small { color: var(--mist); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--mist);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

a:hover { text-decoration-color: var(--moon); }

/* Hairlines: a change of pace, never a box. */
hr {
  border: 0;
  height: 1px;
  margin: 0;
  max-width: var(--measure);
  background: var(--hair);
}

/* The cover: the label, the drawing in the night, the title. */
.cover .label {
  text-align: center;
  padding: 2.5rem var(--gutter) 0;
}

.sea {
  margin: 0;
  padding: var(--sea-air) 10%;
  background: radial-gradient(
    ellipse 56% 64% at 50% 50%,
    var(--deep) 0%,
    var(--night) 70%
  );
}

.hero-art {
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 0 auto;
}

@media (min-width: 720px) {
  .sea { padding-left: 20vw; padding-right: 20vw; }
  .hero-art { width: min(56vw, 720px); }
}

.lede { margin-bottom: 1.75rem; }

.cover .page { padding-bottom: var(--air); }

/* The story and what follows. */
.story { padding: var(--air) 0; }

.story p:last-child { color: var(--mist); }

/* The four lines from the book, each beside a small sketch. */
.lessons { padding-bottom: var(--air); }

.lessons h2 { margin-bottom: 2.5rem; }

.lessons ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 2.5rem 2rem;
}

.lessons li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
}

.lessons img {
  width: 72px;
  height: 72px;
}

.lessons li p { margin: 0; }

@media (min-width: 720px) {
  .lessons ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.hand { padding: var(--air) 0; }

/* The sign-up band: a tonal step into deeper water, not a border. */
.coming {
  background: var(--deep);
  padding: var(--air) 0;
}

.coming ::selection {
  background: var(--night);
}

.signup {
  display: grid;
  gap: 0.75rem 2.5rem;
  margin: 2.5rem 0 2rem;
  align-items: baseline;
}

.signup label { grid-column: 1 / -1; }

.signup input,
.signup button {
  font: inherit;
  color: var(--moon);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.signup input {
  width: 100%;
  padding: 0.25rem 0 0.5rem;
  border-bottom: 1px solid var(--hair);
}

.signup input::placeholder {
  color: var(--mist);
  opacity: 1;
}

.signup input:disabled {
  color: var(--mist);
  -webkit-text-fill-color: var(--mist);
  opacity: 1;
  cursor: not-allowed;
}

/* The one gold accent on the page. */
.signup button {
  justify-self: start;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  white-space: nowrap;
}

.signup button:disabled {
  color: var(--moon);
  opacity: 1;
  cursor: not-allowed;
}

@media (min-width: 30rem) {
  .signup { grid-template-columns: minmax(0, 1fr) auto; }
}

footer {
  font-size: var(--size-label);
  line-height: 1.6;
  color: var(--mist);
}

footer p {
  padding: 3rem 0 3.5rem;
  margin: 0;
}

footer .publisher {
  display: block;
  margin-top: 0.25rem;
  color: var(--moon);
}
