/* Jasper Kovan — The Disciplined
   Palette: channel night, sea fog, cover ochre */
@font-face { font-family: "Bebas Neue"; src: url("/fonts/bebas-neue-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
:root {
  --channel: #121212;
  --channel-2: #1f1f1f;
  --fog: #ece6d9;
  --fog-2: #d8d0bf;
  --ink: #121212;
  --slate: #625b50;
  --mist: #b3ab9d;
  --ochre: #c9912c;
  --cream: #ede3cf;
  --ochre-dark: #a87d1e;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --title: "Bebas Neue", "Barlow Condensed", "Arial Narrow", sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --max: 76rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.25rem);
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p, blockquote, figure, dl, dd { margin: 0; }

:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--ochre); color: var(--ink); padding: .6rem 1rem;
  font-family: var(--cond); font-weight: 600; font-size: 1.1rem; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem var(--gutter);
  background: color-mix(in srgb, var(--channel) 94%, transparent);
  backdrop-filter: blur(8px);
  color: var(--fog);
}
.wordmark {
  font-family: var(--title); font-weight: 400; font-size: 1.6rem;
  letter-spacing: .16em; color: var(--ochre); text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.site-header ul {
  display: flex; align-items: center; gap: clamp(.9rem, 2.4vw, 2rem);
  list-style: none; margin: 0; padding: 0;
}
.site-header nav a {
  font-family: var(--cond); font-weight: 500; font-size: 1.15rem; letter-spacing: .02em;
  text-decoration: none; color: var(--mist);
}
.site-header nav a:hover { color: var(--fog); }
.site-header .nav-cta {
  color: var(--ink); background: var(--ochre); padding: .35rem .85rem;
}
.site-header .nav-cta:hover { color: var(--ink); background: #d9a03a; }

/* ---------- Hero ---------- */
.hero {
  background: var(--channel);
  color: var(--fog);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(3rem, 8vw, 7rem) var(--gutter) clamp(3.5rem, 9vw, 8rem);
  position: relative;
  overflow: hidden;
}
/* a faint horizon line, the coast at night */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.28));
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero-kicker {
  font-style: italic; color: var(--mist); font-size: 1.15em; margin-bottom: 1rem;
}
.title {
  font-family: var(--title); font-weight: 400; text-transform: uppercase;
  font-size: clamp(4.6rem, 11vw, 11rem);
  line-height: .84; letter-spacing: .005em;
  color: var(--cream);
  /* worn print, like the cover lettering */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -10 7.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -10 7.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.title span { display: block; font-size: .42em; letter-spacing: .04em; line-height: 1; margin-bottom: .06em; }
.logline {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 30ch;
  font-size: clamp(1.3rem, 1.6vw + .8rem, 1.9rem);
  line-height: 1.35;
}
.actions { display: flex; flex-wrap: wrap; gap: .9rem 1.25rem; align-items: center; margin-top: clamp(2rem, 4vw, 2.75rem); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.1rem; padding: .55rem 1.5rem;
  font-family: var(--cond); font-weight: 600; font-size: 1.25rem; letter-spacing: .02em;
  text-decoration: none; border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--ochre); color: var(--ink); }
.btn-primary:hover { background: #d9a03a; }
.btn-quiet { border-color: rgba(237,227,207,.45); color: var(--fog); }
.btn-quiet:hover { border-color: var(--fog); }

.availability { margin-top: 1.25rem; color: var(--mist); font-size: .95em; }

.cover { justify-self: center; width: min(100%, 25rem); }
.cover img {
  width: 100%;
  box-shadow: 0 2px 0 rgba(255,255,255,.06), 0 30px 60px -12px rgba(0,0,0,.65), 0 12px 24px -8px rgba(0,0,0,.45);
}

/* ---------- Statement ---------- */
.statement {
  padding: clamp(4rem, 11vw, 10rem) var(--gutter) clamp(2rem, 5vw, 4rem);
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
}
.statement p {
  font-weight: 400;
  font-size: clamp(2.9rem, 9vw, 8.5rem);
  line-height: .98; letter-spacing: -.025em;
}

/* ---------- Novel ---------- */
.novel {
  padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(4rem, 10vw, 8rem);
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
}
.novel-grid {
  display: grid; grid-template-columns: minmax(0, 36rem) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 7rem); align-items: start;
}
h2 {
  font-family: var(--cond); font-weight: 600; font-size: 1.35rem; letter-spacing: .03em;
  color: var(--slate); margin-bottom: 1.25rem;
}
.lede { font-size: 1.4em; line-height: 1.3; margin-bottom: 1.5rem; }
.novel-copy p + p { margin-top: 1.1em; }
.novel-copy p:not(.lede) { max-width: 62ch; }

.novel-side { border-top: 3px solid var(--ink); padding-top: 1.75rem; }
.novel-side blockquote p {
  font-style: italic; font-size: clamp(1.5rem, 1.4vw + 1rem, 2.1rem); line-height: 1.25;
}
.facts { margin-top: 2.5rem; display: grid; gap: 1rem; }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--fog-2); }
.facts dt { font-family: var(--cond); font-weight: 600; font-size: 1.1rem; color: var(--slate); }
.facts dd { font-size: .95em; }

/* ---------- Excerpt ---------- */
.excerpt {
  background: var(--channel); color: #ddd5c6;
  padding: clamp(4rem, 10vw, 8rem) var(--gutter);
}
.manuscript { max-width: 36rem; margin: 0 auto; }
.excerpt h2 { color: var(--ochre); margin-bottom: 2.5rem; }
.manuscript p { line-height: 1.72; }
.manuscript p + p { text-indent: 1.5em; }
.manuscript .first { font-size: 1.7em; line-height: 1.25; color: var(--fog); margin-bottom: 1.25rem; }
.manuscript .first + p { text-indent: 0; }
.manuscript .last { color: var(--fog); font-size: 1.15em; }
.excerpt-end {
  margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid rgba(179,171,157,.25);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
}
.excerpt-end p { font-style: italic; color: var(--mist); text-indent: 0 !important; }

/* ---------- Author ---------- */
.author {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(1.5rem, 6vw, 6rem);
}
.author h2 {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: -.015em; line-height: 1.05;
}
.author-copy { max-width: 40rem; }
.author-copy p:not(.lede) { max-width: 62ch; }

/* ---------- Updates ---------- */
.updates { background: var(--ochre); color: var(--ink); padding: clamp(3.5rem, 8vw, 6rem) var(--gutter); }
.updates-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: end;
}
.updates h2 {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: -.015em; line-height: 1.05; margin-bottom: .75rem;
}
.updates-inner > div p { max-width: 38ch; }

.signup label[for="email"] { display: block; font-family: var(--cond); font-weight: 600; font-size: 1.15rem; margin-bottom: .4rem; }
.field { display: flex; gap: 0; }
.field input {
  flex: 1; min-width: 0; min-height: 3.4rem; padding: .6rem 1rem;
  font: inherit; color: var(--ink); background: #f3f1ea;
  border: 2px solid var(--ink); border-right: 0; border-radius: 0;
}
.field input:focus-visible { outline-offset: -4px; outline-color: var(--channel); }
.field button {
  min-height: 3.4rem; padding: .5rem 1.5rem; cursor: pointer;
  font-family: var(--cond); font-weight: 600; font-size: 1.25rem; letter-spacing: .02em;
  background: var(--ink); color: var(--fog); border: 2px solid var(--ink); border-radius: 0;
}
.field button:hover { background: var(--channel-2); }
.field button:disabled { opacity: .75; cursor: progress; }
.field button:focus-visible { outline-color: var(--channel); }
.consent { font-size: .85em; margin-top: .6rem; color: #3b3216; }
.form-status:empty { display: none; }
.form-status { margin-top: 1rem; font-weight: 500; }
.form-status.err { color: #5a0e0e; }
.signup.is-done .field, .signup.is-done label[for="email"], .signup.is-done .consent { display: none; }
.signup.is-done .form-status { margin-top: 0; font-size: 1.2em; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: var(--mist);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.75rem var(--gutter);
  font-family: var(--cond); font-size: 1.1rem; letter-spacing: .02em;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--fog); }

/* ---------- Simple pages (thanks / 404) ---------- */
.simple {
  min-height: 70vh; display: grid; place-content: center; text-align: left;
  padding: 4rem var(--gutter); background: var(--channel); color: var(--fog);
}
.simple h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1.05; letter-spacing: -.02em; margin-bottom: 1rem; }
.simple p { max-width: 40ch; color: #ddd5c6; margin-bottom: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .cover { width: min(70%, 20rem); justify-self: start; order: -1; }
  .novel-grid, .author, .updates-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; row-gap: .4rem; padding-top: .7rem; padding-bottom: .7rem; }
  .site-header ul { gap: 1rem; width: 100%; justify-content: space-between; }
  .site-header nav a { font-size: 1.05rem; }
  .wordmark { font-size: 1.4rem; }
  .cover { width: 62%; }
  .actions .btn { flex: 1 1 100%; }
  .field { flex-direction: column; }
  .field input { border-right: 2px solid var(--ink); border-bottom: 0; }
  .excerpt-end .btn { width: 100%; }
}
@media (max-width: 640px) { .site-header { position: static; } }
