:root {
  --forest: #1e3a2f;
  --forest-deep: #12241d;
  --sage: #6b8f71;
  --mist: #e8eee9;
  --cream: #f7f3ea;
  --gold: #c9a66b;
  --ink: #1a241f;
  --muted: #5c6b63;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(18, 36, 29, 0.18);
  --radius: 14px;
  --max: 1120px;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--forest-deep);
  margin: 0 0 0.4em;
}
p { margin: 0 0 1em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.container.narrow { width: min(100% - 2.5rem, 640px); }
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.muted { color: var(--muted); }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 1.4rem;
  background: rgba(247, 243, 234, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.site-header.scrolled { border-bottom-color: rgba(30, 58, 47, 0.12); }
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--forest); color: var(--cream);
  box-shadow: 0 0 0 2px rgba(30,58,47,0.15);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong {
  font-family: var(--font-serif); font-size: 1.15rem; letter-spacing: 0.04em;
  color: var(--forest);
}
.brand-text em {
  font-style: normal; font-size: 0.68rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--muted);
}
.site-nav { display: flex; align-items: center; gap: 1.35rem; }
.site-nav a { font-size: 0.95rem; font-weight: 500; color: var(--forest); opacity: 0.9; }
.site-nav a:hover { opacity: 1; color: var(--sage); }
.nav-toggle {
  display: none; background: none; border: 0; padding: 0.4rem; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--forest); margin: 5px 0;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.4rem; border-radius: 999px;
  background: var(--forest); color: var(--cream) !important;
  font-weight: 600; font-size: 0.95rem; border: 1px solid var(--forest);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(18, 36, 29, 0.22);
}
.btn:hover { background: var(--forest-deep); transform: translateY(-1px); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.85rem; box-shadow: none; }
.btn-ghost {
  background: transparent; color: var(--cream) !important;
  border-color: rgba(247,243,234,0.55); box-shadow: none;
}
.btn-ghost:hover { background: rgba(247,243,234,0.12); }
.link-cta {
  display: inline-block; margin-top: 0.3rem; font-weight: 600; font-size: 0.92rem;
  color: var(--forest); border-bottom: 1px solid rgba(30,58,47,0.3);
}
.link-cta:hover { color: var(--sage); border-color: var(--sage); }

/* Hero */
.hero {
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; text-align: center;
  color: var(--cream); overflow: hidden; padding: 6rem 1.5rem 4rem;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.04);
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(18,36,29,0.55) 0%, rgba(18,36,29,0.35) 45%, rgba(18,36,29,0.72) 100%),
    radial-gradient(ellipse at center, transparent 20%, rgba(18,36,29,0.45) 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.hero-mark {
  display: inline-grid; place-items: center;
  width: 88px; height: 88px; margin: 0 auto 1.4rem;
  border-radius: 50%; color: var(--gold);
  background: rgba(18,36,29,0.35);
  box-shadow: var(--shadow);
}
.hero h1 {
  color: var(--cream); font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 600; margin-bottom: 0.5rem;
}
.hero .eyebrow { color: var(--gold); }
.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem); font-weight: 300;
  max-width: 34rem; margin: 0 auto 1.8rem; opacity: 0.92;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.scroll-hint {
  position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  color: var(--cream); opacity: 0.7; font-size: 1.4rem; animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* Sections */
.section { padding: 5.5rem 0; }
.section-head { margin-bottom: 2.4rem; max-width: 40rem; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.section-head p { color: var(--muted); }

/* Collane */
.collana-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}
.collana-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(18,36,29,0.08);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex; flex-direction: column;
}
.collana-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(18,36,29,0.16);
}
.collana-visual {
  position: relative;
  aspect-ratio: 5 / 4;
  background: var(--mist);
  overflow: hidden;
}
.collana-visual img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
}
.collana-visual-pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
}
.collana-visual-pair img { object-position: center; }
.collana-visual-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.6rem;
  background:
    linear-gradient(160deg, rgba(30,58,47,0.08), rgba(201,166,107,0.14)),
    repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(30,58,47,0.05) 8px, rgba(30,58,47,0.05) 16px);
}
.collana-visual-empty span {
  font-size: 0.78rem; letter-spacing: 0.08em; color: var(--muted);
}
.age-badge {
  position: absolute; top: 0.7rem; left: 0.7rem; z-index: 1;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--cream); background: rgba(18,36,29,0.82);
  padding: 0.25rem 0.5rem; border-radius: 999px;
}
.collana-body { padding: 1.4rem 1.5rem 1.7rem; display: flex; flex-direction: column; gap: 0.3rem; }
.collana-body h3 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.collana-body p { color: var(--muted); font-size: 0.95rem; }

/* Sotto-sezioni catalogo (dentro #collane) */
.subsection { margin-top: 4rem; }
.subsection:first-of-type { margin-top: 3rem; }
.subsection-head { max-width: 46rem; margin-bottom: 1.6rem; }
.subsection-head h3 {
  font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: 0.3rem;
}
.subsection-head p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

/* Griglia titoli compatta (piu libri per collana) */
.title-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.3rem;
}
.title-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(18,36,29,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.title-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(18,36,29,0.14);
}
.title-cover { aspect-ratio: 5/8; overflow: hidden; background: var(--mist); position: relative; }
.title-cover img { width: 100%; height: 100%; object-fit: cover; }
.title-info { padding: 0.85rem 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.title-info h4 {
  font-family: var(--font-serif); font-size: 1.02rem; font-weight: 600;
  color: var(--forest-deep); margin: 0; line-height: 1.2;
}
.title-info .title-sub { font-size: 0.78rem; color: var(--muted); margin: 0; }
.title-buy {
  margin-top: auto; display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.82rem; font-weight: 700; color: var(--forest);
  padding-top: 0.5rem;
}
.title-buy:hover { color: var(--sage); }
.title-soon {
  margin-top: auto; padding-top: 0.5rem; font-size: 0.78rem; color: var(--muted); font-style: italic;
}

/* Selettore lingua */
.lang-switch { display: flex; gap: 0.3rem; align-items: center; font-size: 0.85rem; font-weight: 600; }
.lang-switch a { padding: 0.2rem 0.4rem; border-radius: 4px; color: var(--muted); }
.lang-switch a.active { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.lang-switch a:hover { color: var(--sage); }

/* Chi siamo */
.chi-siamo { background: var(--mist); }
.split {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 2.5rem; align-items: center;
}
.split-visual img {
  width: 100%; border-radius: 18px; box-shadow: var(--shadow);
  aspect-ratio: 4 / 5; object-fit: cover;
}
.split-copy h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.split-copy p { color: var(--muted); }

/* Contatti */
.newsletter {
  display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 0.7rem;
  margin: 1.5rem 0 1rem;
}
.newsletter input {
  border: 1px solid rgba(30,58,47,0.18);
  background: var(--white);
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  font: inherit; color: var(--ink);
}
.newsletter input:focus {
  outline: 2px solid var(--sage); outline-offset: 1px;
}
.contact-note { text-align: center; font-size: 0.95rem; }

.contact-form {
  margin: 1.5rem 0 1rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.contact-form .row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem;
}
.contact-form input, .contact-form textarea {
  border: 1px solid rgba(30,58,47,0.18);
  background: var(--white);
  border-radius: 16px;
  padding: 0.85rem 1.1rem;
  font: inherit; color: var(--ink);
  width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--sage); outline-offset: 1px;
}
.contact-form button { align-self: center; }
@media (max-width: 620px) {
  .contact-form .row { grid-template-columns: 1fr; }
}

/* Pagine legali (privacy/cookie) */
.legal-page {
  padding: 7rem 0 4rem;
}
.legal-page .container {
  width: min(100% - 2.5rem, 820px); margin: 0 auto;
}
.legal-page h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.3rem; }
.legal-page .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 2.2rem; }
.legal-page h2 { font-size: 1.3rem; margin-top: 2.2rem; }
.legal-page p, .legal-page li { color: var(--ink); }
.legal-page ul { padding-left: 1.3rem; }
.legal-page a { color: var(--forest); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.contact-note a { color: var(--forest); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Footer */
.site-footer {
  background: var(--forest-deep); color: rgba(247,243,234,0.88);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
  margin-bottom: 2rem;
}
.footer-label {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.65; margin-bottom: 0.6rem;
}
.site-footer a { display: inline-block; margin-right: 0.9rem; opacity: 0.85; }
.site-footer a:hover { opacity: 1; color: var(--gold); }
.copyright {
  width: min(100% - 2.5rem, var(--max)); margin: 0 auto;
  padding-top: 1.2rem; border-top: 1px solid rgba(247,243,234,0.12);
  font-size: 0.8rem; opacity: 0.65;
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-visual { order: -1; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .newsletter { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 64px 0 auto; display: none; flex-direction: column;
    align-items: stretch; gap: 0; padding: 1rem 1.2rem 1.2rem;
    background: rgba(247,243,234,0.97); border-bottom: 1px solid rgba(30,58,47,0.1);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.75rem 0; border-bottom: 1px solid rgba(30,58,47,0.08); }
  .site-nav .btn-sm { margin-top: 0.6rem; text-align: center; }
}
