/* ---------------------------------------------------
   Luca Donato — Author Website
   Plain CSS, no build step, no framework.
--------------------------------------------------- */

:root {
  --bg: #0b1613;
  --bg-alt: #16231f;
  --bg-card: #1c2925;
  --text: #ece6dc;
  --text-muted: #aab3ac;
  --accent: #7a2416;
  --accent-dark: #551a10;
  --gold: #cf9a54;
  --border: #2a3c37;
  --max-width: 1080px;
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --display: "Cinzel", var(--serif);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.25;
  color: #f5ece1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header / Nav ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 22, 19, 0.92);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(4px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav__brand {
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav__brand:hover {
  text-decoration: none;
  color: var(--gold);
}

.nav__toggle {
  display: none;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: var(--text-muted);
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--gold);
  text-decoration: none;
}

.nav__toggle-label {
  display: none;
  cursor: pointer;
  font-size: 1.6rem;
  color: var(--text);
  line-height: 1;
  padding: 0.25rem 0.5rem;
}

@media (max-width: 720px) {
  .nav__toggle-label {
    display: block;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav__links li {
    border-top: 1px solid var(--border);
  }

  .nav__links a {
    display: block;
    padding: 1rem 1.5rem;
  }

  .nav__toggle:checked ~ .nav__links {
    max-height: 20rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(122, 36, 22, 0.28), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero__eyebrow {
  font-family: var(--display);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0 0 1rem;
}

.hero__tagline {
  max-width: 640px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.3rem;
  font-style: italic;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  padding: 0.9rem 2rem;
  border: 1px solid var(--gold);
  border-radius: 2px;
  color: var(--gold);
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--gold);
  color: #11201b;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #f5ece1;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #f5ece1;
}

/* ---------- Sections ---------- */

.section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section--alt {
  background: var(--bg-alt);
}

.section__heading {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section__heading .kicker {
  display: block;
  font-family: var(--display);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

/* ---------- Book teaser / layout ---------- */

.book-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 720px) {
  .book-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.book-cover {
  width: 100%;
  border: 1px solid var(--border);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

.book-copy h3 {
  margin-top: 0;
  font-size: 1.8rem;
}

.book-copy .genre {
  color: var(--gold);
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.book-copy p {
  color: var(--text-muted);
}

.book-copy .btn {
  margin-top: 1rem;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ---------- Contact ---------- */

.contact-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3rem 2rem;
  border-radius: 4px;
}

.contact-card .email {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--gold);
  word-break: break-word;
}

.social-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  padding: 0;
  margin: 2rem 0 0;
  flex-wrap: wrap;
}

.social-list a {
  color: var(--text-muted);
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.social-list a:hover {
  color: var(--gold);
}

/* ---------- Excerpt ---------- */

.excerpt {
  max-width: 680px;
  margin: 0 auto;
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--text-muted);
}

.note {
  max-width: 680px;
  margin: 1.5rem auto 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Newsletter ---------- */

.newsletter-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

/* ---------- Legal pages ---------- */

.legal h2 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
}

.legal p,
.legal li {
  color: var(--text-muted);
}

.legal ul {
  padding-left: 1.3rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--gold);
}

.site-footer .social-list {
  margin-bottom: 1.5rem;
}

/* ---------- Newsletter modal (our own, no MailerLite popup involved) ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.modal__close:hover {
  color: var(--gold);
}

/* ---------- Utility ---------- */

.center {
  text-align: center;
}

.mt-lg {
  margin-top: 2.5rem;
}
