:root {
  --bg: #faf8f5;
  --bg-alt: #f2ede4;
  --surface: #ffffff;
  --ink: #1f2421;
  --ink-muted: #525b56;
  --accent: #8c4a27;
  --accent-dark: #6d371b;
  --border: #e3dcd0;
  --shadow: 0 12px 32px rgba(31, 36, 33, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.main-nav {
  display: flex;
  gap: 1.75rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 4.5rem 0 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 3rem;
  align-items: center;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(140, 74, 39, 0.1);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.4rem, 4.4vw, 3.5rem);
  line-height: 1.12;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--ink);
}

.lead {
  font-size: 1.08rem;
  color: var(--ink-muted);
  margin-bottom: 1.9rem;
  max-width: 55ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}

.availability-note {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
}

.amazon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* Featured Author + Books Photo Frame */
.hero-media {
  background: var(--surface);
  padding: 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  border-radius: calc(var(--radius) - 4px);
  object-fit: cover;
}

.hero-media figcaption {
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: center;
  padding: 0.75rem 0.4rem 0.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.45rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-tiktok {
  background: #ffffff;
  color: #111111;
  font-weight: 700;
  padding: 0.95rem 1.6rem;
}

.btn-tiktok:hover {
  background: #f3f3f3;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.eyebrow-light {
  color: #e6c7b2;
}

.section-header h2,
.author-content h2,
.contact-section h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: 0.85rem;
}

.section-header p {
  color: var(--ink-muted);
}

/* Books */
.books-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.book-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  align-items: start;
}

.book-cover img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.genre {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(140, 74, 39, 0.1);
  padding: 0.28rem 0.7rem;
  border-radius: 6px;
}

.isbn {
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.book-body h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.book-subtitle {
  font-style: italic;
  color: var(--ink-muted);
  font-size: 1rem;
  margin-bottom: 1.15rem;
}

.synopsis p {
  margin-bottom: 0.85rem;
  color: var(--ink);
  font-size: 0.97rem;
}

.book-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.25rem 0 1.4rem;
}

.format-pill {
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

/* Author Bio */
.author-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 3rem;
  align-items: center;
}

.author-photo {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.author-content p {
  margin-bottom: 1rem;
  color: var(--ink);
  font-size: 1.02rem;
}

/* Contact Banner */
.contact-section {
  background: #232925;
  color: #ffffff;
}

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.contact-section p {
  color: #d6dcd8;
  max-width: 54ch;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Responsive */
@media (max-width: 860px) {
  .hero-grid,
  .author-grid,
  .book-card {
    grid-template-columns: 1fr;
  }

  .hero-media {
    max-width: 440px;
    margin: 0 auto;
  }

  .book-cover {
    max-width: 240px;
    margin: 0 auto;
  }

  .author-photo-wrap {
    max-width: 300px;
    margin: 0 auto;
  }

  .contact-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .main-nav {
    gap: 1rem;
    font-size: 0.88rem;
  }

  .book-card {
    padding: 1.35rem;
  }
}

/* Layout aligned with the current HTML */
html { scroll-padding-top: 100px; }
.hero-text, .book-body { min-width: 0; }
.books-section { background: var(--bg-alt); }
.section-intro { margin-top: .8rem; }
.book-body > p { margin-bottom: .85rem; }
.book-footer { margin-top: 1.25rem; }
.formats { font-size: .87rem; color: var(--ink-muted); margin-bottom: .85rem; }
.btn-amazon { background: var(--accent); color: white; }
.btn-amazon:hover { background: var(--accent-dark); }
.author-inner { max-width: 960px; }
.author-content { display: flow-root; }
.author-photo { float: left; width: min(32%, 260px); margin: 0 2rem 1rem 0; }
.contact-inner { flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
.contact-section .eyebrow { color: #e6c7b2; }
.contact-section .btn-primary { background: white; color: #232925; }
.contact-section .btn-primary:hover { background: #f2ede4; }
.availability-note { display: block; }
a:focus-visible { outline: 3px solid #b77d50; outline-offset: 4px; }
@media (max-width: 560px) {
  .header-inner { height: auto; flex-direction: column; gap: .4rem; padding: .65rem 0; }
  .main-nav { flex-wrap: wrap; justify-content: center; gap: .35rem 1rem; }
  .main-nav a { font-size: .85rem; }
  .hero, .section { padding: 2.6rem 0; }
  .hero h1 { font-size: 2.25rem; }
  .book-card { gap: 1.5rem; }
  .author-photo { float: none; width: min(100%, 260px); margin: 0 auto 1.5rem; }
  .contact-inner { align-items: center; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* Finalizzazione: accessibilità e proporzioni immagini */
img { height: auto; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 100; padding: .7rem 1rem; background: white; color: var(--ink); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.hero-media img { object-fit: contain; }
.main-nav a { padding: .3rem 0; }
@media (max-width: 380px) { html { scroll-padding-top: 140px; } .main-nav { gap: .2rem .75rem; } .book-card { padding: 1rem; } }

/* v11 */
.title-link { color: inherit; text-decoration: none; }
.title-link:hover { color: var(--accent); text-decoration: underline; }
.book-footer { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.book-footer .formats { flex-basis: 100%; }
.breadcrumb { font-size: .9rem; color: var(--ink-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--accent); }
.book-title { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.2; margin-bottom: .4rem; }
.book-facts { list-style: none; margin: 1.25rem 0; padding: 1rem 1.25rem; background: var(--bg-alt); border-radius: var(--radius); }
.book-facts li { margin: .25rem 0; }
.other-books { margin-top: 3rem; }
.other-books h2 { font-size: 1.3rem; margin-bottom: .75rem; }
.other-books ul { padding-left: 1.2rem; }
.other-books a, .footer-links a, .site-footer a { color: inherit; }
.footer-links { margin-top: .5rem; font-size: .92rem; }
.book-facts a { color: var(--accent); }
