/* ==========================================================================
   Il Tempio della Luce – CSS comune (font, variabili, reset, header, footer)
   Caricato da TUTTE le pagine. Grafica di riferimento: PDF (larghezza 1280px)
   ========================================================================== */
/* ==========================================================================
   Il Tempio della Luce – foglio di stile
   Grafica di riferimento: PDF "1. HOME" (larghezza di progetto 1280px)
   ========================================================================== */

/* ---------- Font (self-hosted, nessuna richiesta a servizi esterni) ---------- */

@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); }

@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); }

@font-face { font-family: "Great Vibes"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/great-vibes-latin-400-normal.woff2") format("woff2"); }

@font-face { font-family: "Marck Script"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/marck-script-latin-400-normal.woff2") format("woff2"); }


/* ---------- Font aggiuntivi per le pagine interne ---------- */
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/eb-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/eb-garamond-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/eb-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 600; font-display: swap; src: url("../fonts/eb-garamond-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 700; font-display: swap; src: url("../fonts/eb-garamond-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: "Josefin Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/josefin-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Josefin Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/josefin-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Josefin Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/josefin-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Josefin Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/josefin-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/open-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Mrs Saint Delafield"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/mrs-saint-delafield-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Pinyon Script"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/pinyon-script-latin-400-normal.woff2") format("woff2"); }

/* ---------- Variabili ---------- */

:root {
  --brown:        #765339;   /* titoli, menu */
  --brown-dark:   #472c21;   /* testi sulle card */
  --rose:         #bd816d;   /* sottotitoli, card Eventi */
  --rose-text:    #96706b;   /* testi rosati, icone */
  --taupe:        #6b5e54;   /* testo biografia */
  --nav-bg:       #fff6f4;
  --card-sand:    #e9ceb9;
  --card-sage:    #cbcfc0;
  --bio-bg:       #f1e9dc;
  --footer-bg:    #ebd8c9;
  --pill-bg:      #d9c9b2;
  --line:         #763502;
  --line-soft:    #a47864;   /* linee di separazione sottili (1px) */

  --serif:  "EB Garamond", Garamond, "Times New Roman", serif;
  --script: "Great Vibes", "Brush Script MT", cursive;
  --hand:   "Marck Script", "Segoe Script", cursive;
  --script-thin: "Mrs Saint Delafield", "Great Vibes", cursive;   /* sostituisce Aviola Memories (licenza solo uso personale) */
  --script-edw:  "Pinyon Script", "Great Vibes", cursive;           /* sostituisce Edwardian Script ITC */
  --sans-josefin: "Josefin Sans", "Segoe UI", sans-serif;
  --sans-ui:      "Open Sans", "Segoe UI", sans-serif;
  --sans-mont:    "Montserrat", "Segoe UI", sans-serif;

  --page: 1280px;
}

/* ---------- Reset leggero ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--brown);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, address, blockquote, figure { margin: 0; padding: 0; }

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

ul { list-style: none; }

a { color: inherit; text-decoration: none; }

a:focus-visible { outline: 2px solid var(--rose); outline-offset: 4px; border-radius: 4px; }

.br-desktop { display: inline; }

/* Riga verticale decorativa */

.vline {
  display: block;
  width: 1px;
  height: 80px;
  margin: 0 auto;
  background: var(--line-soft);
  transform-origin: top;
  transition: transform .6s cubic-bezier(.25, .46, .45, .94) .3s;
}
/* con JS la linea "scende" quando entra nello schermo */
/* Filo orizzontale sottile in cima a ogni sezione + filo verticale che scende */
main > section + section { border-top: 1px solid var(--line-soft); }
.has-vline-top { position: relative; }
.vline--top { position: absolute; top: 0; left: calc(50% - .5px); margin: 0; height: 44px; }
@media (max-width: 860px) { .vline--top { height: 32px; } }
.js .vline:not(.is-in) { transform: scaleY(0); }
.js .vline.is-in { transform: scaleY(1); }

/* ==========================================================================
   NAVIGAZIONE
   ========================================================================== */

.site-header {
  position: relative;
  background: var(--nav-bg);
  height: 139px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle, .menu-button { display: none; }

.logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 104px;
  z-index: 2;
}

.logo img { width: 100%; height: auto; }

.main-nav { width: 100%; max-width: var(--page); padding: 0 24px; }

.main-nav ul {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 150px 1fr 1fr 1fr;
  align-items: center;
  text-align: center;
}

.main-nav a {
  display: inline-block;
  font-size: clamp(1.1rem, 1.9vw, 1.5rem);
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--brown);
  padding: 8px 4px;
  transition: color .25s ease;
}

.main-nav a:hover { color: var(--rose); }
.main-nav a[aria-current="page"] { color: var(--rose); }


/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer { background: var(--footer-bg); }

.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  min-height: 200px;
  padding: 36px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 24px;
}

.footer-brand { padding-left: 24px; }

.footer-name {
  font-family: var(--script);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--brown);
}

.footer-label {
  font-family: "Myriad Pro", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: .9rem;
  color: var(--brown);
  margin: 14px 0 6px 6px;
}

.footer-project {
  font-family: var(--hand);
  font-size: 1.9rem;
  line-height: 1.2;
  color: var(--brown-dark);
}

.footer-links { display: grid; gap: 15px; justify-items: start; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 275px;
  min-height: 40px;
  padding: 6px 16px 6px 12px;
  background: var(--pill-bg);
  border-radius: 40px;
  font-size: 1.04rem;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--brown);
  transition: background-color .25s ease;
}

.pill:hover { background: #cdbb9f; }

.pill img { flex: 0 0 auto; width: 26px; height: auto; max-height: 26px; }

.footer-contacts { font-style: normal; display: grid; gap: 20px; justify-self: end; }

.footer-contacts p {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.04rem;
  line-height: 1.12;
  color: var(--brown);
}

.footer-contacts img { flex: 0 0 auto; width: 24px; height: auto; max-height: 26px; }

.footer-contacts a:hover { color: var(--rose); }

@media (max-width: 1100px) {
  .footer-inner { padding: 32px 24px; gap: 16px; }
  .footer-brand { padding-left: 0; }
}

@media (max-width: 860px) {
  .br-desktop { display: none; }
  /* Menu a comparsa (solo CSS) */
  .site-header { height: 88px; justify-content: space-between; padding: 0 20px; }
  .logo { position: static; transform: none; width: 64px; }
  .menu-button {
    display: grid;
    gap: 6px;
    width: 44px; height: 44px;
    place-content: center;
    cursor: pointer;
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }
  .menu-button span {
    display: block;
    width: 26px; height: 2px;
    background: var(--brown);
    transition: transform .25s ease, opacity .25s ease;
  }
  .menu-toggle:checked ~ .menu-button span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle:checked ~ .menu-button span:nth-child(2) { opacity: 0; }
  .menu-toggle:checked ~ .menu-button span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .menu-toggle { display: block; position: absolute; opacity: 0; pointer-events: none; }
  .menu-toggle:focus-visible ~ .menu-button { outline: 2px solid var(--rose); border-radius: 6px; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    z-index: 5;
    padding: 8px 20px 20px;
    background: var(--nav-bg);
    box-shadow: 0 12px 20px rgba(71, 44, 33, .12);
  }
  .menu-toggle:checked ~ .main-nav { display: block; }
  .main-nav ul { display: block; }
  .main-nav .nav-gap { display: none; }
  .main-nav li + li { border-top: 1px solid rgba(118, 83, 57, .15); }
  .main-nav a { display: block; padding: 14px 4px; font-size: 1.2rem; }
  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 36px 20px 44px;
    gap: 28px;
  }
  .footer-label { margin-left: 0; }
  .footer-links { justify-items: center; width: 100%; }
  .pill { max-width: 280px; }
  .footer-contacts { justify-self: center; justify-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .js .vline:not(.is-in) { transform: none; }
}
/* Testo solo per screen reader */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
