/* Francesco Palumbo — author site
   Layout: one reading column with full-bleed colour bands; the book page alternates
   night-blue bands (Arles at night) with cream reading bands. Shared by every page. */
:root {
  --night: #12263f;       /* brand navy, from the book's launch graphics */
  --night-2: #1b3354;     /* raised surface on navy */
  --cover-blue: #26407a;  /* the blue of the cover's sky, used for text on cream */
  --gold: #f2c14e;        /* the gold of the title lettering */
  --gold-ink: #8a6512;    /* gold dark enough to read on cream */
  --cream: #fffaeb;
  --paper: #f6efdc;       /* slightly deeper cream for set-off panels */
  --ink: #1d2433;         /* body text on cream */
  --ink-soft: #4c5568;
  --line: #e4d9bd;

  --display: "Lora", Georgia, "Times New Roman", serif;
  --text: "EB Garamond", Garamond, Georgia, serif;
  --ui: "Lora", Georgia, serif;

  --measure: 38rem;
  --wide: 68rem;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.25rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: var(--wide); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.band { padding-block: clamp(3.5rem, 8vw, 6rem); }
.band--night { background: var(--night); color: var(--cream); }
.band--paper { background: var(--paper); }

.eyebrow {
  font-family: var(--ui); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-ink); margin: 0 0 0.75rem;
}
.band--night .eyebrow { color: var(--gold); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--cover-blue); margin-bottom: 1.5rem; }
.band--night h2 { color: var(--cream); }
p { margin: 0 0 1em; }

/* ---------- Site header (shared) ---------- */
.site-header { background: var(--night); color: var(--cream); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; border-bottom: 1px solid rgba(242,193,78,.25); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--night); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.85rem; flex-wrap: wrap; }
.wordmark { font-family: var(--display); font-size: 1.15rem; letter-spacing: 0.06em; text-decoration: none; text-transform: uppercase; font-weight: 600; }
.site-nav { display: flex; gap: 1.25rem; font-family: var(--ui); font-size: 0.95rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; opacity: .85; }
.site-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold); }

/* ---------- Hero ---------- */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero-cover { box-shadow: 0 24px 50px -18px rgba(0,0,0,.65); border-radius: 2px; }
.hero h1 { font-size: clamp(3rem, 8vw, 5.2rem); color: var(--gold); font-weight: 600; letter-spacing: -0.01em; }
.hero .subtitle { font-family: var(--text); font-style: italic; font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 0.4rem 0 1.6rem; color: var(--cream); }
.hero .lede { max-width: 32rem; color: #e9e3d2; }
.hero .meta { font-family: var(--ui); font-size: 0.9rem; color: #c9c3b2; margin-top: 1.25rem; }

/* ---------- Buy block (swappable module) ---------- */
.buy { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: stretch; }
.buy-store { position: relative; }
.buy-store label { position: absolute; left: -9999px; }
.buy select {
  font: 600 1rem var(--ui); color: var(--night); background: var(--cream);
  border: 0; border-radius: 3px; padding: 0.85rem 2.4rem 0.85rem 1rem; height: 100%;
  appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--night) 50%), linear-gradient(135deg, var(--night) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%; background-size: 6px 6px; background-repeat: no-repeat;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 1rem var(--ui); text-decoration: none; border-radius: 3px; padding: 0.85rem 1.4rem;
  background: var(--gold); color: var(--night); border: 0; cursor: pointer; transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1px rgba(255,250,235,.5); }
.buy-note { flex-basis: 100%; font-family: var(--ui); font-size: .85rem; color: #c9c3b2; margin: 0; }

/* ---------- The novel ---------- */
.novel .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.novel-text { max-width: var(--measure); font-size: 1.3rem; }
.novel-text h2 + p::first-letter { font-family: var(--display); float: left; font-size: 3.6em; line-height: .85; padding: .08em .1em 0 0; color: var(--cover-blue); }
.novel-photo figcaption, .figcap { font-family: var(--ui); font-size: .8rem; color: var(--ink-soft); margin-top: .6rem; line-height: 1.45; }

/* ---------- Excerpt ---------- */
.excerpt .wrap { display: grid; gap: 2.5rem; }
.excerpt figure { margin: 0; }
.excerpt-quote { font-family: var(--text); font-style: italic; font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.35; max-width: 44rem; margin: 0; color: var(--cream); }
.excerpt-quote::before { content: "“"; color: var(--gold); }
.excerpt-quote::after { content: "”"; color: var(--gold); }
.excerpt cite { display: block; font-style: normal; font-family: var(--ui); font-size: .9rem; color: var(--gold); margin-top: 1rem; }
.excerpt .figcap { color: #c9c3b2; }

/* ---------- Paintings ---------- */
.paintings-intro { max-width: var(--measure); color: var(--ink-soft); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.5rem; margin-top: 2rem; }
.gallery figure { margin: 0; }
.gallery .frame { background: #fff; padding: .6rem; box-shadow: 0 1px 0 var(--line), 0 12px 24px -16px rgba(29,36,51,.35); aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery img { max-height: 100%; width: auto; object-fit: contain; }
.gallery figcaption { font-family: var(--ui); font-size: .82rem; color: var(--ink-soft); margin-top: .7rem; line-height: 1.45; }
.gallery figcaption strong { display: block; font-family: var(--text); font-size: 1.1rem; color: var(--ink); font-style: italic; font-weight: 400; }

/* ---------- Readers ---------- */
.reviews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.review { margin: 0; background: var(--cream); padding: 1.75rem; border-top: 3px solid var(--gold); }
.stars { color: var(--gold-ink); letter-spacing: .15em; font-size: 1rem; margin-bottom: .75rem; }
.review blockquote { margin: 0; font-style: italic; font-size: 1.3rem; line-height: 1.5; }
.review figcaption { font-family: var(--ui); font-size: .85rem; color: var(--ink-soft); margin-top: 1rem; }
.review figcaption b { color: var(--ink); font-weight: 600; }

/* ---------- Author ---------- */
.author .wrap { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.author-photo { border-radius: 2px; filter: saturate(.92); }
.author-text { max-width: var(--measure); }
.links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; font-family: var(--ui); font-size: .95rem; margin-top: .5rem; }
.links a { color: var(--cover-blue); text-decoration-color: var(--gold-ink); text-underline-offset: 4px; }

/* ---------- Newsletter ---------- */
.newsletter .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.newsletter p { color: #e9e3d2; max-width: var(--measure); margin: 0; }

/* ---------- Trade ---------- */
.trade dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1.5rem; margin: 0 0 1.5rem; font-size: 1.1rem; }
.trade dt { font-family: var(--ui); font-size: .85rem; color: var(--ink-soft); padding-top: .2rem; }
.trade dd { margin: 0; font-variant-numeric: tabular-nums; }
.trade .wrap > div { max-width: var(--measure); }

/* ---------- Footer (shared) ---------- */
.site-footer { background: var(--night); color: #c9c3b2; font-family: var(--ui); font-size: .85rem; padding-block: 2.5rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--cream); }

/* ---------- Narrow screens ---------- */
@media (max-width: 760px) {
  body { font-size: 1.15rem; }
  .hero .wrap, .novel .wrap, .author .wrap, .newsletter .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-cover { max-width: 15rem; margin-inline: auto; }
  .hero-text { text-align: left; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
  .reviews { grid-template-columns: minmax(0, 1fr); }
  .author-photo { max-width: 14rem; }
  .novel-photo { max-width: 18rem; }
  .site-nav { gap: .9rem; font-size: .9rem; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.copy { font: 600 .75rem var(--ui); letter-spacing: .06em; text-transform: uppercase; margin-left: .5rem; padding: .25rem .6rem; border: 1px solid var(--line); background: var(--cream); color: var(--cover-blue); border-radius: 3px; cursor: pointer; vertical-align: middle; }
.copy:hover { border-color: var(--gold-ink); }
.trade dd { overflow-wrap: anywhere; }
