/* tomberwick.co.uk — colours taken from The North Awakens cover */
@font-face {
  font-family: "Geologica";
  src: url("../fonts/geologica-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --tower: #1c1612;      /* glass towers in shadow */
  --tower-2: #271f19;    /* raised panels */
  --haze: #f3ddb6;       /* the sky behind the gallows */
  --text: #e9dcc8;       /* body text on dark */
  --bronze: #b39388;     /* the title's metallic tone */
  --amber: #e9a456;      /* sunset glow, used for actions */
  --rust: #c4612e;       /* the strike-through */
  --line: rgba(243, 221, 182, 0.14);

  --sans: "Geologica", system-ui, sans-serif;
  --serif: "Literata", Georgia, serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.6rem, 6vw, 4.5rem);

  --measure: 36rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--tower);
  color: var(--text);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--haze); text-decoration-color: var(--amber); text-underline-offset: 0.2em; }
a:hover { color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--sans);
  color: var(--haze);
  line-height: 1.1;
  font-weight: 600;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: var(--measure); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -3rem; background: var(--amber); color: var(--tower);
  padding: 0.5rem 1rem; font-family: var(--sans); z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap { width: min(72rem, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 2rem; padding-block: 1.1rem;
}
.logo {
  font-family: var(--sans); font-weight: 500; font-size: 1.05rem;
  letter-spacing: 0.22em; text-decoration: none; color: var(--haze);
}
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-family: var(--sans); font-size: var(--step--1); }
.nav a { text-decoration: none; color: var(--bronze); padding-block: 0.25rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--haze); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--amber); }

/* Hero */
.hero { background: #120e0b; }
.hero img { width: 100%; max-width: 1920px; margin-inline: auto; aspect-ratio: 900 / 576; object-fit: cover; }
@media (min-width: 720px) { .hero img { aspect-ratio: 1920 / 800; } }

/* Sections */
.section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.section + .section { border-top: 1px solid var(--line); }

/* Book feature */
.book {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
@media (min-width: 760px) { .book { grid-template-columns: minmax(14rem, 22rem) 1fr; } }
.book__cover img {
  width: 100%;
  box-shadow: 0 2.5rem 4rem -1.5rem rgba(233, 164, 86, 0.28), 0 1rem 2rem rgba(0, 0, 0, 0.5);
}
.series { font-family: var(--sans); color: var(--bronze); font-size: var(--step--1); margin-bottom: 0.75rem; }
.pull {
  margin: 1.5rem 0; padding-left: 1.25rem; border-left: 3px solid var(--amber);
  font-style: italic; font-size: var(--step-1); line-height: 1.45; color: var(--haze); max-width: 30rem;
}
.status { font-family: var(--sans); font-size: var(--step--1); color: var(--haze); margin-bottom: 1rem; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  padding: 0.85rem 1.4rem; border-radius: 2px; text-decoration: none; line-height: 1.2;
  border: 1px solid var(--amber); background: var(--amber); color: var(--tower); cursor: pointer;
}
.btn:hover { background: var(--haze); border-color: var(--haze); color: var(--tower); }
.btn--quiet { background: transparent; color: var(--haze); border-color: rgba(243, 221, 182, 0.4); }
.btn--quiet:hover { background: transparent; color: var(--amber); border-color: var(--amber); }
.btn--waiting { background: transparent; color: var(--bronze); border: 1px dashed rgba(179, 147, 136, 0.6); cursor: default; }
.btn--waiting:hover { background: transparent; color: var(--bronze); border-color: rgba(179, 147, 136, 0.6); }

/* Newsletter: the one bold moment */
.dream { background: radial-gradient(120% 90% at 85% 0%, rgba(233, 164, 86, 0.16), transparent 60%), var(--tower); }
.slogan {
  font-family: var(--sans); font-weight: 700; color: var(--bronze);
  font-size: clamp(1.6rem, 4.5vw, 3.1rem); line-height: 1.1; letter-spacing: -0.01em;
  margin: 0 0 0.6rem; max-width: none;
}
.slogan s {
  text-decoration: none;
  background: linear-gradient(var(--rust), var(--rust)) no-repeat 0 58% / 100% 0.11em;
}
.js .slogan s { background-size: 0% 0.11em; transition: background-size 1.1s cubic-bezier(0.7, 0, 0.2, 1) 0.2s; }
.js .slogan.is-seen s { background-size: 100% 0.11em; }
@media (prefers-reduced-motion: reduce) {
  .js .slogan s { transition: none; background-size: 100% 0.11em; }
}
.dream h2 { font-size: var(--step-4); margin-bottom: 1.25rem; }

.signup { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; max-width: 32rem; }
.signup label { flex-basis: 100%; font-family: var(--sans); font-size: var(--step--1); color: var(--bronze); }
.signup input[type="email"] {
  flex: 1 1 14rem; min-width: 0; padding: 0.85rem 1rem; font: inherit; font-size: 1rem;
  color: var(--haze); background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(243, 221, 182, 0.35); border-radius: 2px;
}
.signup input[type="email"]::placeholder { color: rgba(233, 220, 200, 0.5); }
.small { font-size: var(--step--1); color: var(--bronze); }

/* Bio */
.bio { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 640px) { .bio { grid-template-columns: 11rem 1fr; } }
.bio img { width: 11rem; aspect-ratio: 1; object-fit: cover; object-position: 50% 25%; border-radius: 50%; }

/* Page intro */
.page-head { padding-block: clamp(2.5rem, 7vw, 5rem) 0; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--haze); }

/* Books grid */
.shelf { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); margin-top: 2.5rem; }
.shelf a { text-decoration: none; display: block; }
.shelf h2 { font-size: var(--step-1); margin: 1rem 0 0.25rem; }
.shelf .status { margin: 0; color: var(--bronze); }
.shelf img { box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.5); }
.next-cover {
  aspect-ratio: 1838 / 2800; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem; background: linear-gradient(180deg, #3a2c22, var(--tower-2) 55%);
  border: 1px solid var(--line);
}
.next-cover span { font-family: var(--sans); font-weight: 700; font-size: 1.6rem; line-height: 1.05; color: var(--bronze); }

/* Book page */
.blurb p:first-child { font-family: var(--sans); font-weight: 600; color: var(--haze); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.5rem; margin: 2rem 0 0; font-size: var(--step--1); }
.details dt { font-family: var(--sans); color: var(--bronze); }
.details dd { margin: 0; }
.buy h3 { font-size: var(--step-0); margin: 1.5rem 0 0.5rem; color: var(--bronze); font-weight: 500; }

/* About */
.about { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 760px) { .about { grid-template-columns: 1fr 18rem; } }
.about img { width: 100%; max-width: 18rem; }
.links { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.5rem; font-family: var(--sans); font-size: var(--step--1); }
.links span { color: var(--bronze); display: inline-block; min-width: 6.5rem; }

/* Prose pages */
.prose h2 { font-size: var(--step-2); margin-top: 2.5rem; }
.prose ul { max-width: var(--measure); padding-left: 1.2rem; }
.notice { border-left: 3px solid var(--amber); padding-left: 1rem; color: var(--haze); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem; font-size: var(--step--1); color: var(--bronze); }
.site-footer .wrap { display: grid; gap: 2rem; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1.4fr 1fr; align-items: end; } }
.site-footer h2 { font-size: var(--step-1); margin-bottom: 0.25rem; }
.site-footer .signup { margin-top: 0.75rem; }
.footer-meta { display: grid; gap: 0.35rem; }
.footer-meta p { margin: 0; }
.footer-meta a { color: var(--text); }

/* Recommended reads */
.picks { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 2.5rem; }
.picks h2 { font-size: var(--step-1); margin: 0 0 0.25rem; }
.picks .by { font-family: var(--sans); color: var(--bronze); font-size: var(--step--1); margin-bottom: 0.5rem; }
.picks li p:last-child { margin-bottom: 0; }
