/* ==========================================================================
   ETGAR EDIZIONI — Foglio di stile unico e integrato
   ========================================================================== */

/* ---------- Font OpenDyslexic (per stampa e accessibilità) ---------- */
@font-face {
  font-family: 'OpenDyslexic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/fontsource/fonts/opendyslexic@latest/latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'OpenDyslexic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/fontsource/fonts/opendyslexic@latest/latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'OpenDyslexic';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/fontsource/fonts/opendyslexic@latest/latin-400-italic.woff2') format('woff2');
}

/* ---------- Variabili globali ---------- */
:root {
  --ink: #2A1E3A;
  --violet: #6C2FA0;
  --violet-deep: #4A1E73;
  --violet-soft: #EDE4F5;
  --gold: #B98A2E;
  --paper: #F6F1EA;
  --card: #FCF9F3;
  --line: #E1D6E6;
  --font-display: 'Frank Ruhl Libre', Georgia, serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
}

/* ---------- Reset & Base ---------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.7;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(108, 47, 160, 0.14), transparent 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* Base Link */
a {
  color: var(--violet);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--violet-soft);
  transition: border-color 0.2s;
}
a:hover {
  border-bottom-color: var(--violet);
}
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Layout Centrato (Homepage) */
body.centered-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stage {
  max-width: 620px;
  width: 100%;
  padding: 3rem 1.5rem;
  margin: 0 auto;
}

.wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem 1rem 1rem;
}

/* ---------- Componenti Comuni ---------- */
.logo {
  width: 150px;
  height: 150px;
  display: block;
  margin: 0 auto;
}

.rule {
  width: 64px;
  height: 2px;
  background: var(--gold);
  border: 0;
  margin: 1.8rem auto;
}

.eyebrow {
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 1rem;
  color: var(--violet);
}

/* ---------- Topbar Navigazione Schede ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}
.topbar .logo {
  width: 75px;
  height: 75px;
  margin: 0;
}
.topbar .name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--violet-deep);
  font-size: 1.1rem;
  border-bottom: none;
}

/* ---------- Masthead (Pagine Editoriali) ---------- */
.masthead {
  text-align: center;
  padding: 3.4rem 1.5rem 0;
}
.masthead .logo {
  width: 75px;
  height: 75px;
  margin: 0 auto 1rem;
}
.masthead .imprint {
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--violet);
  font-size: 1rem;
  margin: 0 0 1.3rem;
}
.masthead h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 5.2vw, 2.9rem);
  line-height: 1.14;
  color: var(--violet-deep);
  margin: 0 auto;
  max-width: 16ch;
}
.masthead .collana {
  color: var(--ink);
  font-size: 1rem;
  margin: 0.9rem auto 0;
  max-width: 44ch;
}

/* ---------- Elementi Homepage ---------- */
.mark {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  color: var(--violet-deep);
  margin: 0.5rem 0 0;
  line-height: 1;
}
.kicker {
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--violet);
  font-size: 1rem;
  margin: 0.2rem 0 1.5rem;
}
.intro {
  color: #000000;
  max-width: 50ch;
  margin: 16px auto 0;
  font-size: 20px;
}
.tag {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--violet-deep);
  margin: 1.5rem 0;
}
.status {
  font-size: 1rem;
  color: var(--ink);
  margin-top: 2rem;
}
.contact {
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* ---------- Pulsanti e Callout ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--violet);
  color: #ffffff !important;
  border-color: var(--violet);
}
.btn-primary:hover {
  background: var(--violet-deep);
  border-color: var(--violet-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--violet) !important;
  border-color: var(--violet);
}
.btn-ghost:hover {
  background: var(--violet-soft);
}

.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 8px 24px -12px rgba(42, 30, 58, 0.15);
}
.callout b {
  display: block;
  color: var(--violet-deep);
  font-size: 1.05rem;
}
.callout .sub {
  display: block;
  font-size: 1rem;
  color: var(--ink);
}

/* ---------- Scheda Libro (Hero, Prezzi, Liste) ---------- */
.hero {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin: 2rem 0 3rem;
}
.hero .cover {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 12px 32px -8px rgba(42, 30, 58, 0.3);
}
.overline {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 1rem;
  font-weight: 700;
  color: var(--violet);
  margin: 0 0 0.4rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
  color: var(--violet-deep);
  margin: 0 0 0.8rem;
}
.authors {
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
}
.pref {
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 1.5rem;
}
.price {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.price .num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--violet-deep);
}
.price .lbl {
  font-size: 1rem;
  color: var(--ink);
}
.cta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 2.8vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink);
  text-align: left;       /* Cambiato da 'center' a 'left' per una resa migliore a piena larghezza */
  max-width: 100%;        /* Occupa l'intera larghezza del contenitore padre (oppure: max-width: none;) */
  margin: 0 0 2.8rem;     /* Rimosso il centramento 'auto' mantenendo lo spazio inferiore */
}

.pull {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--violet-deep);
  border-left: 3px solid var(--gold);
  padding-left: 1.2rem;
  margin: 2rem 0;
}
.pull cite {
  display: block;
  font-size: 1rem;
  font-style: normal;
  color: var(--ink);
  margin-top: 0.5rem;
  font-family: var(--font-body);
}

.sec {
  font-family: var(--font-display);
  color: var(--violet-deep);
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
}

.reasons {
  list-style: none;
  padding: 0;
  margin: 0;
}
.reasons li {
  margin-bottom: 1.2rem;
}
.reasons b {
  display: block;
  color: var(--violet-deep);
}
.reasons span {
  font-size: 1rem;
  color: var(--ink);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}
.chips li {
  background: var(--violet-soft);
  color: var(--violet-deep);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 700;
}

.spec dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.6rem 1.2rem;
  margin: 0;
}
.spec dt {
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
}
.spec dd {
  margin: 0;
  font-size: 1rem;
}

.community {
  background: var(--violet-deep);
  color: #ffffff;
  padding: 2rem;
  border-radius: 6px;
  margin: 3rem 0;
  text-align: center;
}
.community h2 {
  font-family: var(--font-display);
  margin-top: 0;
}
.community a {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.4);
}
.community .big {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}

/* ---------- Note e Pagine Editoriali ---------- */
.note {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 3px;
  padding: 2.3rem 2rem 2rem;
  margin: 0 0 2.4rem;
  box-shadow: 0 18px 44px -34px rgba(42, 30, 58, 0.5);
}
.note .tag {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1rem;
}
.note .tag::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.note h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--violet-deep);
  margin: 0 0 1.2rem;
}
.note p {
  margin: 0 0 1.05rem;
}
.note p:last-child {
  margin-bottom: 0;
}
.note strong {
  color: var(--violet-deep);
  font-weight: 700;
}

.fleuron {
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.6em;
  padding-left: 0.6em;
  margin: 0.2rem 0 2.4rem;
  font-size: 1.05rem;
}

.refs {
  list-style: none;
  margin: 0.5rem 0 1.2rem;
  padding: 0;
  border-left: 2px solid var(--gold);
}
.refs li {
  padding: 0.4rem 0 0.4rem 1.1rem;
  font-size: 1rem;
}
.refs li + li {
  border-top: 1px solid var(--line);
}

.signoff {
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-style: italic;
  color: var(--ink);
  font-size: 1rem;
}

/* ---------- Footer ---------- */
footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.2rem 1.5rem 3.4rem;
  text-align: center;
  color: var(--ink);
  font-size: 1rem;
}
footer .imprint {
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1rem;
}

/* ---------- Responsive Mobile ---------- */
@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero .cover {
    max-width: 200px;
    margin: 0 auto;
  }
  .price {
    justify-content: center;
  }
  .cta {
    justify-content: center;
  }
  .callout {
    flex-direction: column;
    text-align: center;
  }
  .spec dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 18px;
  }
  .note {
    padding: 1.7rem 1.3rem 1.5rem;
  }
}

/* ---------- Stampa: Massima Leggibilità con OpenDyslexic ---------- */
@media print {
  body {
    background: #ffffff;
    font-size: 12pt;
    line-height: 1.7;
    font-family: 'OpenDyslexic', 'Atkinson Hyperlegible', sans-serif;
  }
  .masthead {
    padding: 0 0 1rem;
  }
  .masthead .logo {
    width: 150px;
  }
  .masthead h1,
  .note h2,
  .lede {
    font-family: 'OpenDyslexic', 'Atkinson Hyperlegible', sans-serif;
  }
  .lede {
    font-style: normal;
    text-align: left;
    max-width: none;
    margin: 1rem 0 1.5rem;
  }
  main {
    padding: 1rem 0;
  }
  .note {
    box-shadow: none;
    border: none;
    border-top: 1.5pt solid var(--gold);
    padding: 1rem 0;
    page-break-inside: avoid;
  }
  .fleuron {
    display: none;
  }
  a {
    border: none;
    text-decoration: underline;
    color: var(--violet-deep);
  }
  footer {
    border-top: 1px solid var(--line);
  }
}