/* Ferry Weather — ferryweathernovel.com
   The palette and type follow the book: the cover's ink (#181C2C), its off-white lettering, and TeX Gyre Pagella,
   the face the paperback is set in (GUST Font License; see /fonts/GUST-FONT-LICENSE.txt). */

@font-face {
  font-family: "Pagella";
  src: url("/fonts/texgyrepagella-regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Pagella";
  src: url("/fonts/texgyrepagella-italic.woff") format("woff");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  --ink: #181c2c;
  --ink-raised: #21263a;
  --paper: #f5f5f0;
  --muted: #b9b6ae;
  --rule: #3a4058;
  --lamp: #e9b96b;          /* the lit kitchen window */
  --lamp-ink: #2a1d08;
  --error: #f2a28f;
  --serif: "Pagella", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
html { background: var(--ink); color: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
a { color: var(--paper); text-decoration-color: var(--muted); text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--lamp); }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }
em { font-style: italic; }

main { max-width: 64rem; margin: 0 auto; padding: 4.5rem 1.5rem 2rem; }

/* the book */
.book {
  display: grid;
  grid-template-columns: minmax(0, 23.75rem) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
}
.cover { margin: 0; }
.cover img {
  display: block; width: 100%; height: auto;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.kicker {
  margin: 0 0 0.5rem;
  font-style: italic; color: var(--muted); font-size: 1.15rem;
}
h1 {
  margin: 0;
  font-weight: 400; font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.1;
}
.byline {
  margin: 1rem 0 2.25rem;
  letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.95rem; color: var(--muted);
}
.byline a { color: var(--muted); text-decoration: none; }
.byline a:hover { color: var(--paper); text-decoration: underline; text-decoration-color: var(--lamp); }
.hook { font-size: 1.3rem; line-height: 1.5; margin: 0 0 2.25rem; max-width: 30rem; }

.buy { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button, button {
  display: inline-block;
  font: inherit; font-size: 1rem; letter-spacing: 0.06em;
  padding: 0.7rem 1.4rem;
  border-radius: 2px;
  border: 1px solid var(--lamp);
  background: var(--lamp); color: var(--lamp-ink);
  text-decoration: none; cursor: pointer;
}
.button:hover, button:hover { background: #f1c985; border-color: #f1c985; }
.buy .button + .button { background: transparent; color: var(--paper); border-color: var(--rule); }
.buy .button + .button:hover { border-color: var(--lamp); }

/* about */
.about { max-width: 38rem; margin: 5rem auto 0; }
.about p { margin: 0 0 1.2rem; hyphens: auto; }
.about .closing { margin-top: 2rem; font-style: italic; color: var(--muted); }

/* signup */
.signup {
  max-width: 38rem; margin: 4.5rem auto 0;
  padding: 2.25rem 2rem 1.75rem;
  background: var(--ink-raised);
  border: 1px solid var(--rule);
}
.signup h2 {
  margin: 0 0 0.6rem;
  font-weight: 400; font-size: 1rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.signup > p { margin: 0 0 1.25rem; }
.field { display: flex; gap: 0.6rem; }
input[type="email"] {
  flex: 1; min-width: 0;
  font: inherit; font-size: 1.05rem;
  padding: 0.65rem 0.8rem;
  border-radius: 2px;
  border: 1px solid var(--rule);
  background: var(--ink); color: var(--paper);
}
input[type="email"]::placeholder { color: #7d8196; }
input[type="email"][aria-invalid="true"] { border-color: var(--error); }
button[disabled] { opacity: 0.6; cursor: progress; }
.status { min-height: 1.6em; margin: 0.8rem 0 0; font-size: 1rem; }
.status.error { color: var(--error); }
.status.done { color: var(--lamp); }
.fineprint { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--muted); }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

footer { text-align: center; color: var(--muted); font-size: 0.9rem; padding: 3rem 1.5rem 3.5rem; }
footer a { color: var(--muted); }

/* the privacy page */
.page { max-width: 38rem; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 1.5rem; }
.page h2 { font-weight: 400; font-size: 1.05rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 2rem 0 0.5rem; }
.page p { margin: 0 0 1rem; }
.back { display: inline-block; margin-bottom: 2.5rem; font-size: 0.95rem; color: var(--muted); }

/* the excerpt: set like the book page, first-line indents, no gaps between paragraphs */
.read-link { margin: 1.4rem 0 0; font-size: 1.05rem; }
.read-link a { color: var(--paper); }
.about .read-more { margin-top: 2rem; }
.excerpt { max-width: 36rem; }
.excerpt header { text-align: center; margin-bottom: 3.5rem; }
.excerpt h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
.excerpt .byline { margin-bottom: 0; }
.text h2 {
  margin: 3.5rem 0 1.75rem; text-align: center;
  font-weight: 400; font-size: 1.05rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.text h2:first-child { margin-top: 0; }
.text h2 .num { letter-spacing: 0.05em; }
.text p { margin: 0; text-indent: 1.5em; hyphens: auto; }
.text p.first { text-indent: 0; }
.text p.first::first-line { font-variant: small-caps; letter-spacing: 0.04em; }
.text p.note { text-indent: 0; margin: 1.1rem 1.5em; }
.text p.note + p { text-indent: 0; }
.continue {
  margin: 3.5rem 0 0; padding: 2rem 0 0; border-top: 1px solid var(--rule); text-align: center;
}
.continue > p:first-child { font-style: italic; color: var(--muted); margin: 0 0 1.25rem; }
.continue .buy { justify-content: center; }
.continue .fineprint { margin-top: 1.5rem; }
.rights { margin: 3rem 0 0; font-size: 0.85rem; color: var(--muted); text-align: center; }

@media (max-width: 760px) {
  main { padding-top: 2.5rem; }
  .book { grid-template-columns: 1fr; gap: 2.25rem; text-align: center; }
  .cover { width: min(70vw, 20rem); margin: 0 auto; }
  .hook { margin-left: auto; margin-right: auto; }
  .buy { justify-content: center; }
  .about { margin-top: 3.5rem; }
  .signup { padding: 1.75rem 1.25rem 1.5rem; margin-top: 3.5rem; }
  .field { flex-direction: column; }
  button { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, button, input { transition: background-color 0.15s, border-color 0.15s; }
}
