/* =========================================================
   Luca Dal Monte — Author Website
   Design system

   Two colour tiers, on purpose:
   1. NEUTRAL / CLASSICAL — ink, paper, hairline, gold.
      Used for headings, body copy and the identity of the
      site itself. Stays the same no matter which book is
      currently "latest".
   2. FRAME — the accent pulled from the current release's
      cover (The Gentleman: #79859e / #839cb2). Used for the
      header, footer, hero backgrounds, buttons and links —
      the "frame" around the content. When the next book
      ships, only this block needs new hex values.
   ========================================================= */

:root {
  /* ---- Neutral / classical (stable) ---- */
  --ink: #262420;
  --ink-soft: #55504a;
  --ink-faint: #86807a;
  --paper: #faf8f3;
  --paper-alt: #f1ece1;
  --paper-deep: #e9e2d2;
  --line: #ddd4bf;
  --gold: #a9814a;
  --gold-soft: #c7a06b;

  /* ---- Frame (swap per latest release) ---- */
  --frame-dark: #79859e;
  --frame-light: #839cb2;
  --frame-deep: #4d5a72;   /* darkened, for text/hover on light bg */
  --frame-pale: #eef1f5;   /* tinted section background */
  --frame-ink: #2c3242;    /* near-black blue, for high-contrast text on light frame */

  /* ---- Type ---- */
  --font-serif: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ---- Layout ---- */
  --max-width: 1180px;
  --radius: 2px;
  --shadow-card: 0 1px 2px rgba(38, 36, 32, 0.06), 0 8px 24px rgba(38, 36, 32, 0.08);
  --shadow-card-hover: 0 4px 10px rgba(38, 36, 32, 0.10), 0 16px 36px rgba(38, 36, 32, 0.14);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* height:auto keeps the intrinsic width/height attributes on <img> from
   distorting the picture once max-width scales it down. The attributes are
   there so the browser reserves the right box before the file arrives. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Keyboard focus ---------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
/* On the frame-coloured areas the gold reads too dark against the blue */
.site-header :focus-visible,
.site-footer :focus-visible,
.page-banner :focus-visible,
.hero :focus-visible {
  outline-color: var(--gold-soft);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.7em 1.2em;
  font-size: 0.86rem;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9em;
}
.eyebrow.on-frame { color: #eef1f5; opacity: 0.85; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--frame-deep); }
.btn-outline {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-line {
  border-color: var(--line);
  color: var(--ink);
}
.btn-line:hover { border-color: var(--ink); }
.btn-sm { padding: 0.6em 1.2em; font-size: 0.8rem; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(120deg, var(--frame-ink), var(--frame-dark) 60%, var(--frame-light));
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: 0.02em;
}
.brand span { color: var(--gold-soft); }
.main-nav ul { display: flex; gap: 2.2rem; }
.main-nav a {
  color: rgba(255,255,255,0.86);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.3em 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: #fff;
  border-color: var(--gold-soft);
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius);
  color: #fff;
  padding: 0.4em 0.6em;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--frame-ink);
    max-height: 0;
    overflow: hidden;
    /* visibility, not just max-height: clipped links would otherwise stay
       in the tab order while the menu is shut */
    visibility: hidden;
    transition: max-height 0.25s ease, visibility 0s linear 0.25s;
  }
  .main-nav.open {
    max-height: 320px;
    visibility: visible;
    transition: max-height 0.25s ease, visibility 0s;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 28px 1.2rem;
  }
  .main-nav li { border-top: 1px solid rgba(255,255,255,0.08); }
  .main-nav a { display: block; padding: 0.9em 0; }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--frame-ink);
  color: rgba(255,255,255,0.72);
  margin-top: 100px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding: 64px 0 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-top h4 {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  margin-bottom: 1.1em;
}
.footer-top .brand { display: block; margin-bottom: 0.8em; }
.footer-top p { color: rgba(255,255,255,0.6); font-size: 0.92rem; }
.footer-top ul li { margin-bottom: 0.6em; }
.footer-top a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
  gap: 0.5em;
}

@media (max-width: 780px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* =========================================================
   Hero (frame-coloured)
   ========================================================= */
.hero {
  background: linear-gradient(135deg, var(--frame-ink) 0%, var(--frame-dark) 48%, var(--frame-light) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  align-items: center;
  gap: 3rem;
  padding-top: 88px;
  padding-bottom: 88px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin-bottom: 0.3em;
}
.hero .subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.1em;
}
.hero p.lede {
  color: rgba(255,255,255,0.82);
  font-size: 1.02rem;
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 0.9rem; margin-top: 1.8em; flex-wrap: wrap; }
.hero-cover {
  justify-self: center;
  filter: drop-shadow(0 24px 46px rgba(0,0,0,0.35));
  transform: rotate(1.5deg);
  max-width: 300px;
}
.hero-cover img { border-radius: 3px; }

.page-banner {
  background: linear-gradient(120deg, var(--frame-ink), var(--frame-dark) 55%, var(--frame-light));
  color: #fff;
  padding: 68px 0 56px;
}
.page-banner h1 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.page-banner p { color: rgba(255,255,255,0.82); max-width: 60ch; font-size: 1.02rem; margin-bottom: 0; }
.breadcrumb {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.2em;
}
.breadcrumb a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; text-align: left; padding-top: 56px; padding-bottom: 56px; }
  .hero-cover { justify-self: start; max-width: 220px; order: -1; }
}

/* =========================================================
   Sections
   ========================================================= */
section { padding: 88px 0; }
section.alt { background: var(--paper-alt); }
section.tinted { background: var(--frame-pale); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2.6rem;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 0; }
.section-head .lede { color: var(--ink-faint); max-width: 56ch; margin: 0.4em 0 0; }

/* =========================================================
   Book grid / cards
   ========================================================= */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 2rem 1.6rem;
}
.book-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.book-card .cover { aspect-ratio: 2 / 3; overflow: hidden; background: var(--paper-deep); }
.book-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card .info { padding: 1.1rem 1.2rem 1.4rem; }
.book-card .tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--frame-deep);
}
.book-card h3 {
  font-size: 1.05rem;
  margin: 0.4em 0 0.3em;
}
.book-card .hook {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin: 0;
}
.book-card .read-more {
  display: inline-block;
  margin-top: 0.8em;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Featured strip (home) */
.featured-book {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 3rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 2.6rem;
}
.featured-book .cover img { box-shadow: 0 18px 34px rgba(38,36,32,0.18); }
.featured-book .tag {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold);
}
@media (max-width: 720px) {
  .featured-book { grid-template-columns: 1fr; text-align: left; padding: 1.8rem; }
  .featured-book .cover { max-width: 200px; }
}

/* =========================================================
   About teaser (home)
   ========================================================= */
.about-teaser {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 3.2rem;
  align-items: center;
}
.about-teaser img {
  border-radius: 3px;
  box-shadow: var(--shadow-card);
}
.about-teaser blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink);
  border-left: 3px solid var(--gold);
  padding-left: 1em;
  margin: 1.2em 0;
}
@media (max-width: 780px) {
  .about-teaser { grid-template-columns: 1fr; }
  .about-teaser img { max-width: 320px; }
}

/* =========================================================
   Book detail page
   ========================================================= */
.book-detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3.5rem;
  align-items: start;
}
.book-detail .cover-col { position: sticky; top: 110px; }
.book-detail .cover-col img { box-shadow: 0 20px 40px rgba(38,36,32,0.2); }
.book-detail .meta { margin-top: 1.4rem; font-size: 0.85rem; color: var(--ink-faint); }
.book-detail .meta div { margin-bottom: 0.5em; }
.book-detail .meta strong { color: var(--ink-soft); font-weight: 600; }
.book-detail h1 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); }
.book-detail .subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 1.1rem;
  margin-bottom: 1.4em;
}
.book-detail .body-copy p { max-width: 70ch; }
.pull-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--frame-ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.6em 0;
  margin: 2em 0;
  max-width: 60ch;
}
.pull-quote cite {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.6em;
}
.rights-box {
  background: var(--frame-pale);
  border: 1px solid var(--line);
  padding: 1.4rem 1.6rem;
  margin-top: 2.4rem;
  font-size: 0.9rem;
}
.rights-box strong { color: var(--ink); }

@media (max-width: 860px) {
  .book-detail { grid-template-columns: 1fr; }
  .book-detail .cover-col { position: static; max-width: 220px; }
}

/* =========================================================
   About page
   ========================================================= */
.about-hero {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.about-hero img { border-radius: 3px; box-shadow: var(--shadow-card); }
.about-hero h1 { color: #fff; }
@media (max-width: 780px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-hero img { max-width: 300px; }
}

.bio-columns {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3.5rem;
}
.bio-columns .body-copy p { max-width: 68ch; }
.fact-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow-card);
}
.fact-card h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--frame-deep);
  margin-bottom: 1em;
}
.fact-card dl { margin: 0; }
.fact-card dt { font-size: 0.78rem; color: var(--ink-faint); margin-top: 1em; }
.fact-card dt:first-child { margin-top: 0; }
.fact-card dd { margin: 0.15em 0 0; font-size: 0.92rem; color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
  .bio-columns { grid-template-columns: 1fr; }
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.gallery-strip img { border-radius: 2px; box-shadow: var(--shadow-card); }
@media (max-width: 720px) {
  .gallery-strip { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   Earlier works (skinny list, pending full pages/cover art)
   ========================================================= */
.earlier-works-list {
  border-top: 1px solid var(--line);
}
.earlier-work {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--line);
}
.earlier-work h3 {
  font-size: 1.05rem;
  display: inline;
  margin: 0;
}
.earlier-work .year { color: var(--ink-faint); font-size: 0.85rem; margin-left: 0.6em; }
.earlier-work .hook { display: block; font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.3em; }
.earlier-work .credit { display: block; font-size: 0.8rem; color: var(--ink-faint); font-style: italic; margin-top: 0.4em; }

/* =========================================================
   Press page
   ========================================================= */
.screen-feature {
  display: grid;
  grid-template-columns: 0.6fr 1fr;
  gap: 3rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 2.6rem;
}
.screen-feature .cover img { box-shadow: 0 18px 34px rgba(38,36,32,0.18); }
.screen-feature h3 { font-size: 1.5rem; margin-top: 0.3em; }
.screen-feature .credits { margin: 1.2em 0; font-size: 0.88rem; color: var(--ink-faint); }
.screen-feature .credits div { margin-bottom: 0.4em; }
.screen-feature .credits strong { color: var(--ink-soft); font-weight: 600; }
@media (max-width: 780px) {
  .screen-feature { grid-template-columns: 1fr; padding: 1.8rem; }
  .screen-feature .cover { max-width: 200px; }
}

.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
}
.press-card {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 1.8rem 2rem;
  display: flex;
  flex-direction: column;
}
.press-card .outlet {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--frame-deep);
  margin-bottom: 0.8em;
}
.press-card blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 0.8em;
  flex-grow: 1;
}
.press-card .press-book {
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.press-card .press-link {
  margin-top: 0.9em;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold);
}

.honours-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}
.honours-list .honour {
  border-left: 3px solid var(--gold);
  padding-left: 1.1rem;
}
.honours-list .honour .book { font-size: 0.78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.honours-list .honour p { margin: 0.3em 0 0; font-weight: 600; color: var(--ink); }

.tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.8rem;
}
.tour-card {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 1.8rem 2rem;
}
.tour-card h3 { font-size: 1.2rem; margin-top: 0; }
.tour-card .tour-dates { font-size: 0.78rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-bottom: 0.6em; }
.tour-card p { font-size: 0.92rem; color: var(--ink-soft); margin: 0.6em 0; }
.tour-card p strong { color: var(--ink); }

/* =========================================================
   Shop (placeholder)
   ========================================================= */
.shop-empty {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 60px 0 20px;
}
.shop-empty .icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.6rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 1.6rem;
}
.shop-empty h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); }

/* =========================================================
   Misc
   ========================================================= */
.divider {
  width: 56px; height: 2px;
  background: var(--gold);
  margin: 1.4rem 0;
}
.text-center { text-align: center; }
.small-print { font-size: 0.82rem; color: var(--ink-faint); }
