/* Hundred Select · stile comune del sito vetrina.
   Componenti: wrap, section, eyebrow, display, btn, rule, status, cover, shelf, card, steps, header, footer.
   Breakpoint: 640 (tablet piccolo), 1024 (desktop). Gli stili delle singole pagine stanno in css/<pagina>.css. */

:root {
  --navy: #16263D;
  --navy-2: #1d3150;
  --green: #1F3B33;
  --brass: #A8875A;
  --brass-2: #c4a77c;
  --ivory: #F2EDE3;
  --paper: #F8F5EE;
  --ink: #14171C;
  --muted: #5a5f69;
  --line: #ddd5c6;
  --line-dark: rgba(242, 237, 227, .16);

  --brand: "Marcellus", "Times New Roman", serif;
  --book: "Literata", Georgia, serif;
  --ui: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --sec: clamp(64px, 10vw, 136px);
  --radius: 4px;

  --fs-display: clamp(40px, 7.4vw, 96px);
  --fs-h1: clamp(34px, 5.2vw, 64px);
  --fs-h2: clamp(28px, 3.6vw, 44px);
  --fs-h3: clamp(20px, 2vw, 24px);
  --fs-lead: clamp(18px, 1.6vw, 21px);
  --fs-body: 17px;
  --fs-small: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-body)/1.65 var(--ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--brand); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; letter-spacing: .005em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--brass); color: var(--ivory); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--navy); color: var(--ivory); padding: 10px 16px; }
.skip:focus { top: 12px; }

/* ---------- Struttura ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: calc(820px + 2 * var(--gutter)); }
.section { padding: var(--sec) 0; }
.section--tight { padding: calc(var(--sec) * .6) 0; }
.section--ivory { background: var(--ivory); }
.section--paper { background: var(--paper); }
.section--navy { background: var(--navy); color: var(--ivory); }
.section--green { background: var(--green); color: var(--ivory); }
.section--navy .muted, .section--green .muted { color: rgba(242, 237, 227, .72); }
.section + .section--paper, .section--paper + .section--paper { border-top: 1px solid var(--line); }

.grid-2 { display: grid; gap: clamp(32px, 5vw, 72px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-2--wide-left { grid-template-columns: 1.2fr .8fr; } }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: var(--fs-lead); }
.section--navy .section-head p:not(.eyebrow), .section--green .section-head p:not(.eyebrow) { color: rgba(242, 237, 227, .75); }

/* ---------- Tipografia ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 12px/1.2 var(--ui); letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass); margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.section-head--center .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; }
.display { font-family: var(--brand); font-size: var(--fs-display); line-height: 1.02; letter-spacing: -.005em; margin: 0 0 .35em; }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--muted); max-width: 62ch; }
.section--navy .lead, .section--green .lead { color: rgba(242, 237, 227, .78); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.serif { font-family: var(--book); }
.caps { font-family: var(--brand); text-transform: uppercase; letter-spacing: .24em; font-size: 13px; }
.prose { font-family: var(--book); font-size: 18px; line-height: 1.75; }
.prose p { margin-bottom: 1.1em; }
.prose h2 { margin-top: 1.6em; font-size: var(--fs-h3); }

/* ---------- Filetti ---------- */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.rule--brass { background: var(--brass); }
.rule-dia { display: flex; align-items: center; gap: 14px; color: var(--brass); margin: 0 auto; max-width: 320px; }
.rule-dia::before, .rule-dia::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .7; }
.rule-dia i { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); flex: none; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px; border: 1px solid transparent; border-radius: var(--radius);
  font: 600 14px/1.2 var(--ui); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--navy); color: var(--ivory); }
.btn--primary:hover { background: var(--navy-2); }
.btn--brass { background: var(--brass); color: var(--navy); }
.btn--brass:hover { background: var(--brass-2); }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: rgba(168, 135, 90, .12); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 479px) { .btn-row .btn { flex: 1 1 100%; } }
.link-arrow { font: 600 14px/1.2 var(--ui); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--brass); display: inline-flex; gap: 10px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Stato edizione ---------- */
.status { display: inline-flex; align-items: center; gap: 8px; font: 600 11px/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; }
.status--open { color: var(--brass); }
.status--open::before { background: currentColor; box-shadow: 0 0 0 4px rgba(168, 135, 90, .2); }
.section--navy .status, .section--green .status { color: rgba(242, 237, 227, .7); }
.section--navy .status--open, .section--green .status--open { color: var(--brass-2); }

/* ---------- Copertina del volume (scala con la larghezza: unità cqw) ---------- */
.cover { container-type: inline-size; position: relative; aspect-ratio: 3 / 4; width: 100%; border-radius: 2px 5px 5px 2px; color: var(--brass); box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 18px 40px -16px rgba(10, 18, 30, .55); }
.cover { background: var(--cover-bg, var(--navy)); } /* tela: colore del progetto o dell edizione (hs_cover, stile in linea) */
.cover::before { /* dorso e luce della tela */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.34) 0, rgba(255,255,255,.08) 2.4%, rgba(0,0,0,.16) 4.2%, transparent 7%),
    linear-gradient(160deg, rgba(255,255,255,.06), transparent 40%, rgba(0,0,0,.14));
}
.cover__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.cover__face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 9cqw 8cqw 8cqw 10cqw; text-align: center; }
.cover__wm { font-family: var(--brand); font-size: 3.3cqw; letter-spacing: .34em; text-transform: uppercase; padding: 2.2cqw 0; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; width: 100%; padding-left: .34em; }
.cover__num { font-family: var(--brand); font-size: 31cqw; line-height: 1; margin-top: auto; letter-spacing: -.01em; }
.cover__cat { font-family: var(--brand); font-size: 4cqw; letter-spacing: .28em; text-transform: uppercase; line-height: 1.5; margin-top: 3cqw; padding-left: .28em; }
.cover__year { font-family: var(--brand); font-size: 3.6cqw; letter-spacing: .2em; margin-top: auto; }
.cover--tilt { transform: perspective(1400px) rotateY(-14deg) rotateX(2deg); transform-origin: left center; }

/* ---------- Scaffale ---------- */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: clamp(20px, 3vw, 40px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 8px var(--gutter) 28px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: thin; }
.shelf > * { scroll-snap-align: start; }
@media (min-width: 1024px) { .shelf { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; padding: 8px 0 0; margin: 0; } }
.shelf-item { display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: inherit; }
.shelf-item .cover { transition: transform .35s ease, box-shadow .35s ease; }
.shelf-item:hover .cover { transform: translateY(-6px); box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 28px 48px -18px rgba(10, 18, 30, .6); }
.shelf-item__meta { display: flex; flex-direction: column; gap: 6px; }
.shelf-item__title { font-family: var(--brand); font-size: 19px; line-height: 1.25; }

/* ---------- Schede e passi ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } .cards--4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); }
.section--ivory .card { background: var(--paper); }
.section--navy .card, .section--green .card { background: transparent; border-color: var(--line-dark); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

.steps { display: grid; gap: 0; grid-template-columns: 1fr; counter-reset: step; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding-block: 28px; padding-inline: 0 24px; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .step { padding-inline-end: 28px; } }
.step__n { font-family: var(--brand); font-size: 44px; line-height: 1; color: var(--brass); display: block; margin-bottom: 18px; }
.step h3 { font-size: 21px; }
.step p { color: var(--muted); font-size: 16px; margin: 0; }
.section--navy .steps, .section--navy .step { border-color: var(--line-dark); }
.section--navy .step p { color: rgba(242, 237, 227, .72); }

/* Elenco di fatti (dl) */
.facts { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); margin: 0; }
.facts > div { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .facts > div { grid-template-columns: 200px 1fr; gap: 24px; } }
.facts dt { font: 600 12px/1.5 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); padding-top: 3px; }
.facts dd { margin: 0; }
.section--navy .facts, .section--navy .facts > div, .section--green .facts, .section--green .facts > div { border-color: var(--line-dark); }
.section--green .facts dt { color: var(--brass-2); }

/* Cifre grandi */
.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
@media (min-width: 900px) { .figures { grid-template-columns: repeat(4, 1fr); } }
.figure__n { font-family: var(--brand); font-size: clamp(40px, 5vw, 64px); line-height: 1; color: var(--brass); display: block; }
.figure__l { display: block; margin-top: 10px; font-size: 15px; color: var(--muted); max-width: 22ch; }
.section--navy .figure__l { color: rgba(242, 237, 227, .72); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); color: var(--navy); }
/* sfocatura su un livello a parte: sul contenitore renderebbe il menu fisso relativo alla barra */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(248, 245, 238, .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.nav-open .site-header::before { background: var(--paper); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.site-header__logo { display: block; color: var(--navy); flex: none; }
.logo-h { width: 154px; }
@media (min-width: 1024px) { .site-header__in { min-height: 84px; } .logo-h { width: 172px; } }
.site-nav ul { display: flex; gap: clamp(18px, 2.2vw, 34px); }
.site-nav a:not(.btn) { font: 500 14px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--brass); }
.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.site-nav__cta { min-height: 44px; padding: 10px 20px; font-size: 13px; }
.nav-toggle { display: none; }

@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-inline-end: -12px; border: 0; background: transparent; color: var(--navy); cursor: pointer; }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 24px; height: 1.5px; background: currentColor; transition: transform .25s, opacity .2s; }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -7px; }
  .nav-toggle__bars::after { top: 7px; }
  .nav-open .nav-toggle__bars { background: transparent; }
  .nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav { position: fixed; inset: 72px 0 0 0; z-index: 49; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 32px; padding: 32px var(--gutter) calc(32px + env(safe-area-inset-bottom)); background: var(--paper); overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility 0s .25s; }
  .nav-open .site-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .25s, transform .25s; }
  .nav-open { overflow: hidden; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a:not(.btn) { display: block; padding: 20px 0; font: 400 clamp(26px, 6vw, 34px)/1.1 var(--brand); letter-spacing: .02em; text-transform: none; border: 0; }
  .site-nav a[aria-current="page"] { color: var(--brass); }
  .site-nav__cta { min-height: 54px; font-size: 14px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--ivory); padding: clamp(64px, 8vw, 104px) 0 40px; }
.site-footer__top { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-bottom: 48px; border-bottom: 1px solid var(--line-dark); }
@media (min-width: 900px) { .site-footer__top { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.site-footer__logo { color: var(--brass); }
.logo-v { width: 168px; }
.site-footer__line { font-family: var(--brand); font-size: clamp(18px, 2vw, 22px); line-height: 1.45; margin: 0; color: rgba(242, 237, 227, .85); max-width: 34ch; }
@media (min-width: 900px) { .site-footer__line { text-align: end; } }
.site-footer__cols { display: grid; grid-template-columns: 1fr; gap: 36px; padding: 48px 0; }
@media (min-width: 640px) { .site-footer__cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .site-footer__cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { font: 600 12px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin-bottom: 18px; }
.site-footer li { margin-bottom: 10px; }
.site-footer li a { text-decoration: none; color: rgba(242, 237, 227, .82); font-size: 15px; }
.site-footer li a:hover { color: var(--ivory); text-decoration: underline; }
.site-footer__legal { border-top: 1px solid var(--line-dark); padding-top: 28px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: rgba(242, 237, 227, .6); }
.site-footer__legal p { margin: 0; }
@media (min-width: 900px) { .site-footer__legal { flex-direction: row; justify-content: space-between; } }

/* ---------- Moduli ---------- */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field label { font: 600 12px/1.3 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--navy); }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font: 400 16px/1.4 var(--ui); color: var(--ink); }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(168, 135, 90, .2); }
.field .hint { font-size: 13px; color: var(--muted); }
.fields-2 { display: grid; grid-template-columns: 1fr; gap: 0 20px; }
@media (min-width: 640px) { .fields-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Comparsa leggera ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: hs-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .reveal--2 { animation-delay: .12s; }
  .reveal--3 { animation-delay: .24s; }
}
@keyframes hs-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.site-footer__motto { font-family: var(--brand); font-size: 15px; letter-spacing: .04em; color: var(--brass-2); }

/* ---------- Selettore della lingua (compare solo con almeno due lingue attive) ---------- */
.lang-switch { flex: none; }
.lang-switch select {
  appearance: none; -webkit-appearance: none; min-height: 40px; max-width: 12em; padding-block: 8px; padding-inline: 12px 30px;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--navy); cursor: pointer;
  font: 500 13px/1.2 var(--ui); letter-spacing: .04em; text-overflow: ellipsis;
  background: transparent no-repeat; background-size: 5px 5px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
}
.lang-switch select:hover, .lang-switch select:focus-visible { border-color: var(--brass); }
.lang-switch button { margin-inline-start: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--navy); font: 500 13px/1 var(--ui); cursor: pointer; }
@media (min-width: 1024px) { .site-nav { margin-inline-start: auto; } }
@media (max-width: 1023px) { .lang-switch { margin-inline-start: auto; } }
@media (max-width: 479px) { .site-header__in { gap: 12px; } }

/* ---------- Da destra a sinistra: solo ciò che le proprietà logiche non coprono ---------- */
/* Copertine, impaginati d'esempio e pin del sigillo restano come sono: raffigurano oggetti stampati in alfabeto latino. */
[dir="rtl"] .lang-switch select { background-position: 12px 52%, 17px 52%; }
[dir="rtl"] .link-arrow::after { content: "←"; }
[dir="rtl"] .link-arrow:hover::after { transform: translateX(-4px); }
[dir="rtl"] svg { direction: ltr; } /* scritte del sigillo e del logo: forme fisse */
