@font-face { font-family: 'Libre Bodoni'; font-style: normal; font-weight: 400; font-display: swap; src: url('/font/libre-bodoni-400.woff2') format('woff2'); }
@font-face { font-family: 'Libre Bodoni'; font-style: italic; font-weight: 400; font-display: swap; src: url('/font/libre-bodoni-400i.woff2') format('woff2'); }
@font-face { font-family: 'Libre Bodoni'; font-style: normal; font-weight: 700; font-display: swap; src: url('/font/libre-bodoni-700.woff2') format('woff2'); }

@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('/font/eb-garamond-400.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('/font/eb-garamond-400i.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('/font/eb-garamond-600.woff2') format('woff2'); }

:root {
--pv-sfondo-primario: #f5eed6;
--pv-sfondo-secondario: #e8dcc0;
--pv-testo-primario: #3a2a14;
--pv-testo-secondario: #6b4c2a;
--pv-accento: #8b6b45;
--pv-accento-chiaro: #b89870;
--pv-bordo-finestra: #c4a878;
--pv-ombra: rgba(58, 42, 20, 0.12);
--pv-font-titolo: 'Libre Bodoni', serif;
--pv-font-corpo: 'EB Garamond', serif;
--pv-nebbia-base: #000000;
--pv-nebbia-scuro: #15120e;
--pv-nebbia-medio: #2a2118;
--pv-nebbia-chiaro: #c4a882;
}

/* Capolettera — Pergamena (Insulare/Celtico) */
.capolettera {
  color: #6b4c2a;
  background: linear-gradient(145deg, #f5eed6 0%, #e8dcc0 60%, #d4c4a0 100%);
  border: 2.5px solid #8b6b45;
  border-radius: 3px;
  box-shadow: inset 0 0 8px rgba(139,107,69,0.2), 2px 2px 6px rgba(58,42,20,0.15);
  text-shadow: 1px 1px 0 rgba(196,168,120,0.6);
  padding: 0.1em 0.14em 0.06em 0.1em;
}
.capolettera::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(139,107,69,0.3);
  border-radius: 2px;
  pointer-events: none;
}
.capolettera::after {
  content: '';
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  border: 1px solid rgba(139,107,69,0.15);
  border-radius: 4px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M0 4Q2 0 4 4Q6 8 8 4' fill='none' stroke='%238b6b45' stroke-width='.4' opacity='.25'/%3E%3C/svg%3E") repeat;
  opacity: 0.5;
  z-index: -1;
}

/* Fregi — Pergamena (intrecci celtici, nodi) */
.finestra-parola .contenuto-finestra::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(139,107,69,0.15);
  border-radius: 4px;
  pointer-events: none;
  z-index: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M4 2C2 2 2 4 4 6C6 4 6 2 4 2ZM4 6C2 8 4 10 6 8C8 6 6 4 4 6Z' fill='none' stroke='%238b6b45' stroke-width='.6' opacity='.35'/%3E%3C/svg%3E") no-repeat top left,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M20 2C22 2 22 4 20 6C18 4 18 2 20 2ZM20 6C22 8 20 10 18 8C16 6 18 4 20 6Z' fill='none' stroke='%238b6b45' stroke-width='.6' opacity='.35'/%3E%3C/svg%3E") no-repeat top right,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M4 22C2 22 2 20 4 18C6 20 6 22 4 22ZM4 18C2 16 4 14 6 16C8 18 6 20 4 18Z' fill='none' stroke='%238b6b45' stroke-width='.6' opacity='.35'/%3E%3C/svg%3E") no-repeat bottom left,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M20 22C22 22 22 20 20 18C18 20 18 22 20 22ZM20 18C22 16 20 14 18 16C16 18 18 20 20 18Z' fill='none' stroke='%238b6b45' stroke-width='.6' opacity='.35'/%3E%3C/svg%3E") no-repeat bottom right;
}
.fregio-divisore {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16'%3E%3Cpath d='M10 8C30 2 50 14 70 8C90 2 110 14 130 8C150 2 170 14 190 8' fill='none' stroke='%238b6b45' stroke-width='1' opacity='.4'/%3E%3Ccircle cx='100' cy='8' r='2.5' fill='%238b6b45' opacity='.3'/%3E%3C/svg%3E");
}