/* Embrace Publishing — trade site
   Palette and typography derived from the Embrace Publishing logo.
   Colours are checked against WCAG AA on the paper background. */

:root {
  /* Navy, used for all body copy — 18.7:1 on white. Deliberately kept from
     the previous palette: the new wordmark is near-black (#111212), but navy
     is softer over a page of copy. Not an oversight — do not "correct" it. */
  --ink: #0a1128;
  /* Secondary copy — 6.9:1 on white */
  --muted: #5a5a60;
  /* Logo teal (#19c1f3) darkened to meet AA for text — 6.1:1 on white */
  --link: #076a88;
  --link-hover: #0a1128;
  /* Logo emblem teal, exactly as sampled. Decorative only: rules, markers,
     never text — it is 2.1:1 on white and fails AA by a wide margin */
  --accent: #19c1f3;
  /* Logo magenta darkened for the rare occasion it carries text — 6.1:1.
     A different hue from --link on purpose, so an availability note is never
     mistaken for a link. Nothing relies on the colour alone to be understood. */
  --accent-ink: #a23981;

  --paper: #ffffff;
  --tint: #f7fafc;
  --line: #dce3e8;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", "Liberation Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas,
    "Liberation Mono", monospace;

  --measure: 64rem;
  --gap: 1.5rem;

  color-scheme: light;
}

/* ---------- reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- layout ---------- */

.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

main {
  padding-block: 0 3rem;
}

section {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
}

section:first-of-type {
  border-top: 0;
}

/* ---------- typography ---------- */

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.4rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.6rem);
}

h3 {
  font-size: 1.1rem;
}

h4 {
  font-size: 1rem;
}

p {
  margin: 0 0 1rem;
  max-width: 42em;
}

.lead {
  font-size: 1.125rem;
  color: var(--ink);
}

/* Aggregate reader-rating line, under the opening paragraph */
.rating {
  font-weight: 600;
  color: var(--ink);
}

.stockists-note {
  color: var(--muted);
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--link-hover);
}

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

/* Section label above a heading, echoing the logo's spaced capitals */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
  color: var(--paper);
}

/* ---------- notice ---------- */

.notice {
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  padding-block: 0.6rem;
}

/* ---------- masthead ---------- */

.masthead {
  padding-block: 2rem 1.75rem;
  border-bottom: 3px solid var(--accent);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

.masthead__brand {
  display: block;
  flex: none;
}

.masthead__logo {
  display: block;
  width: 118px;
  height: auto;
}

.masthead__nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
}

.masthead__nav a {
  display: inline-block;
  padding: 0.35rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.masthead__nav a:hover {
  border-bottom-color: var(--line);
}

.masthead__nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- title cards ---------- */

.series {
  margin-block: 2rem 0;
}

.series:first-of-type {
  margin-top: 1rem;
}

.series__name {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.titles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
  /* Fixed column counts rather than auto-fill: a buyer gets a scannable two-up
     list on a phone, and covers stay a sensible size on a wide screen instead
     of splitting into ever more columns. */
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 34rem) {
  .titles {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 52rem) {
  .titles {
    grid-template-columns: repeat(4, 1fr);
  }
}

.title-card {
  display: flex;
  flex-direction: column;
}

.title-card__cover {
  display: block;
  margin-bottom: 0.9rem;
}

/* Covers are supplied at slightly different aspect ratios, so each one sits in
   a box of the same shape. Titles and metadata then line up across a row. */
.title-card__cover img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  object-position: center bottom;
}

/* Drawn stand-in jacket for a title whose artwork has not arrived. It is a
   real graphic, not a placeholder marker, so a production build is not held up
   by artwork that simply is not ready. */
.cover-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
}

.cover-placeholder .ph-ground {
  fill: var(--tint);
  stroke: var(--line);
  stroke-width: 2;
}

.cover-placeholder .ph-rule {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.cover-placeholder text {
  text-anchor: middle;
  font-family: var(--serif);
  fill: var(--ink);
}

.cover-placeholder .ph-eyebrow {
  font-family: var(--sans);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 6px;
  fill: var(--muted);
}

.cover-placeholder .ph-title {
  font-size: 58px;
  font-weight: 700;
}

.cover-placeholder .ph-date {
  font-family: var(--sans);
  font-size: 30px;
  fill: var(--muted);
}

/* Stand-in for a title with no cover artwork yet. Sized to sit at roughly the
   same optical weight as a real cover beside it. */
.cover-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  text-align: center;
  width: 84%;
  margin-inline: auto;
  aspect-ratio: 5 / 8;
  background: var(--tint);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
  padding: 1rem;
}

.title-card__name {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.title-card__name a {
  text-decoration-thickness: 1px;
}

.meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.meta > div + div {
  margin-top: 0.1rem;
}

.meta dt {
  display: inline;
  font-weight: 400;
}

.meta dt::after {
  content: " ";
}

.meta dd {
  display: inline;
  margin: 0;
  color: var(--ink);
}

.isbn {
  font-family: var(--mono);
  font-size: 0.9em;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.tbc {
  color: var(--accent-ink);
  font-style: italic;
}

/* ---------- title page ---------- */

.book {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 46rem) {
  .book {
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    gap: 3rem;
  }
}

.book__cover .title-card__cover {
  margin-bottom: 0;
}

.book__detail h1 {
  margin-bottom: 0.5rem;
}

.details {
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  border-top: 1px solid var(--line);
}

.details > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.details dt {
  color: var(--muted);
  margin: 0;
}

.details dd {
  margin: 0;
}

.note {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Stock or supply news, e.g. "Reprinting — available from 1 December" */
.availability {
  font-weight: 600;
  color: var(--accent-ink);
  margin-bottom: 0.5rem;
}

/* Series framing and the content advisory sit apart from the story blurb */
.series-note,
.content-note {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-top: 1.25rem;
}

.content-note {
  padding-left: 0.9rem;
  border-left: 3px solid var(--line);
  margin-top: 0.75rem;
}

.endorsement {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent);
}

.endorsement blockquote {
  margin: 0;
  font-size: 1.0625rem;
  font-style: italic;
}

.endorsement figcaption {
  color: var(--muted);
  font-size: 0.875rem;
}

.series-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
}

/* Each card takes half the row, so a lone "next" sits on the right where a
   reader expects it rather than stretching the full width. */
.series-nav a {
  flex: 0 1 calc(50% - 0.5rem);
  min-width: 15rem;
}

.series-nav__next {
  margin-left: auto;
}

.series-nav a {
  display: block;
  padding: 0.9rem 1.1rem;
  background: var(--tint);
  border: 1px solid var(--line);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
}

.series-nav a:hover {
  border-color: var(--link);
}

.series-nav span {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.series-nav__next {
  text-align: right;
}

.plain + h3 {
  margin-top: 1.75rem;
}

/* ---------- lists ---------- */

.plain {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  max-width: 42em;
}

.plain > li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}

.plain > li:first-child {
  border-top: 1px solid var(--line);
}

.stockists .stockist__name {
  font-weight: 600;
}

.stockists .meta {
  display: block;
  margin-top: 0.1rem;
}

/* ---------- events ---------- */

.events {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 44em;
}

.event {
  display: grid;
  gap: 0.15rem 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.event:first-child {
  border-top: 1px solid var(--line);
}

@media (min-width: 40rem) {
  .event {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
}

.event p {
  margin: 0;
}

.event__date {
  color: var(--muted);
  font-size: 0.9375rem;
}

.event__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.0625rem;
}

.event__sub {
  font-size: 0.9375rem;
}

.event__where {
  color: var(--muted);
  font-size: 0.9375rem;
}

.event__type {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- press releases ---------- */

.embargo {
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.release__subhead {
  font-size: 1.125rem;
  color: var(--muted);
  margin-top: -0.4rem;
}

.release__dateline {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.release__local {
  font-weight: 600;
}

.release__quote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent);
}

.release__quote blockquote {
  margin: 0;
  font-size: 1.0625rem;
  font-style: italic;
}

.release__quote figcaption {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.3rem;
}

.release__event {
  padding: 0.75rem 1rem;
  background: var(--tint);
  border: 1px solid var(--line);
}

.release__notes .details {
  margin-bottom: 1.25rem;
}

/* ---------- coverage ---------- */

.coverage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 44em;
}

.coverage {
  display: grid;
  gap: 0.15rem 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.coverage:first-child {
  border-top: 1px solid var(--line);
}

@media (min-width: 40rem) {
  .coverage {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
}

.coverage p {
  margin: 0;
}

.coverage__date {
  color: var(--muted);
  font-size: 0.9375rem;
}

.coverage__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.0625rem;
}

.coverage__outlet {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- press ---------- */

.press-photo {
  margin: 0 0 1rem;
  max-width: 22rem;
}

.press-photo figcaption {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.4rem;
}

.cover-pending--wide {
  margin-inline: 0;
  aspect-ratio: auto;
  width: 100%;
  max-width: 22rem;
  min-height: 9rem;
}

.press-downloads {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 34rem) {
  .press-downloads {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 52rem) {
  .press-downloads {
    grid-template-columns: repeat(5, 1fr);
  }
}

.press-downloads a {
  display: block;
  text-decoration: none;
}

.press-downloads img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  object-position: center bottom;
  margin-bottom: 0.5rem;
}

.press-download__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.press-downloads .meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
}

/* ---------- contact ---------- */

.panel {
  background: var(--tint);
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.contact-grid h3 {
  margin-bottom: 0.4rem;
}

address {
  font-style: normal;
  margin: 0;
  color: var(--ink);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.75rem 2.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0 0 0.35rem;
}

.site-footer__legal {
  color: var(--ink);
  font-weight: 600;
}

.site-footer a {
  color: var(--link);
}

/* ---------- print ---------- */

@media print {
  body {
    font-size: 11pt;
  }

  .skip-link,
  .masthead__logo {
    display: none;
  }

  a {
    color: var(--ink);
    text-decoration: none;
  }

  section {
    break-inside: avoid;
  }
}
