/* =========================================================
   Sito Gennaro Marco Duello — foglio di stile condiviso
   Design "letterario": serif eleganti, palette inchiostro/crema,
   accento bordeaux. Tutto responsive (funziona bene da telefono).
   ========================================================= */

:root {
  --ink: #1a1714;          /* testo principale, quasi nero caldo */
  --ink-soft: #4a443d;     /* testo secondario */
  --paper: #f6f1e7;        /* sfondo crema */
  --paper-card: #fffdf8;   /* sfondo riquadri */
  --accent: #f4502f;       /* corallo del logo */
  --accent-dark: #d43e22;
  --line: #e0d7c5;         /* bordi sottili */
  --max-width: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif {
  font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- header / navigazione ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.nav__brand:hover { text-decoration: none; }
.nav__brand img { height: 44px; width: auto; display: block; }
@media (max-width: 860px) {
  .nav__brand img { height: 34px; }
}
.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  list-style: none;
}
.nav__links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav__links a:hover { color: var(--accent); }
.nav__links a.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ----- hero ----- */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.hero__logo { margin: 12px 0 0; }
.hero__logo img { width: min(460px, 100%); height: auto; display: block; }
.hero .kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.hero p { font-size: 1.15rem; color: var(--ink-soft); margin-top: 20px; }
.hero__photo {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(26,23,20,.45);
  aspect-ratio: 1 / 1;
  background: var(--line);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

/* ----- bottoni ----- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 13px 26px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn--ghost:hover { background: var(--accent); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ----- sezioni generiche ----- */
.section { padding: 64px 0; }
.section--tight { padding: 44px 0; }
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 8px;
}
.section-lead { color: var(--ink-soft); max-width: 60ch; margin-bottom: 36px; }
.page-head {
  padding: 56px 0 24px;
  border-bottom: 1px solid var(--line);
}
.page-head .kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin-top: 10px; }

.prose p { margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose { max-width: 68ch; }

/* ----- griglia libri ----- */
.books {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 8px;
}
.book-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.book-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -20px rgba(26,23,20,.4);
}
.book-card__cover {
  background: linear-gradient(135deg, #2a2420, #4a3f36);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f6f1e7;
  text-align: center;
}
.book-card__cover img { width: 100%; height: auto; display: block; }
.book-card__cover .serif { font-size: 1.2rem; opacity: .9; padding: 90px 24px; }
.book-card__body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.book-card__body h3 { font-size: 1.3rem; margin-bottom: 6px; }
.book-card__meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 12px; }
.book-card__body p { font-size: 0.95rem; color: var(--ink-soft); flex: 1; }
.book-card__links { margin-top: 18px; display: flex; gap: 16px; font-size: 0.9rem; }

/* ----- scheda singolo libro ----- */
.book-detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
  padding: 56px 0;
}
.book-detail__cover {
  position: sticky;
  top: 96px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(26,23,20,.5);
  background: linear-gradient(135deg, #2a2420, #4a3f36);
  display: flex; align-items: center; justify-content: center;
  color: #f6f1e7; text-align: center;
}
.book-detail__cover img { width: 100%; height: auto; display: block; }
.book-detail__cover .serif { padding: 90px 28px; }
.book-detail h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.book-detail .meta { color: var(--ink-soft); margin: 12px 0 28px; }

.pull-quote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 22px;
  margin: 28px 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink);
}
.pull-quote cite { display: block; font-size: 0.9rem; font-style: normal; color: var(--ink-soft); margin-top: 10px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.tag {
  font-size: 0.8rem;
  background: #efe7d6;
  color: var(--ink-soft);
  padding: 5px 12px;
  border-radius: 999px;
}

/* ----- notizie ----- */
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.news-item:first-child { padding-top: 8px; }
.news-item time {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}
.news-item h3 { font-size: 1.35rem; margin-bottom: 10px; }
.news-item p { color: var(--ink-soft); }

/* ----- contatti ----- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
}
.contact-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
}
.field textarea { min-height: 140px; resize: vertical; }

/* ----- footer ----- */
.site-footer {
  background: var(--ink);
  color: #d8cfc0;
  padding: 48px 0 32px;
  margin-top: 24px;
}
.site-footer a { color: #f0e7d6; }
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
}
.footer-brand { font-family: 'Fraunces', Georgia, serif; font-size: 1.3rem; color: #fff; }
.social { display: flex; gap: 14px; flex-wrap: wrap; }
.social a {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 20px;
  border: 1px solid #4a443c;
  border-radius: 999px;
  color: #f0e7d6;
  transition: background .15s, border-color .15s, color .15s;
}
.social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
}
.footer-fine {
  border-top: 1px solid #3a342c;
  padding-top: 20px;
  font-size: 0.8rem;
  color: #9c9384;
  line-height: 1.6;
}

/* ----- responsive ----- */
@media (max-width: 860px) {
  body { font-size: 17px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__photo { max-width: 320px; }
  .book-detail { grid-template-columns: 1fr; }
  .book-detail__cover { position: static; max-width: 280px; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav { justify-content: center; }
}
