/* =========================================================
   LostBoy Tattoo — stile condiviso da tutte le pagine
   ========================================================= */

/* Nome "LostBoy": Ballet (licenza OFL, vedi fonts/OFL-Ballet.txt) */
@font-face {
  font-family: 'Ballet';
  src: url('fonts/Ballet.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
/* Voci del menu: UnifrakturMaguntia (licenza OFL, vedi fonts/OFL-UnifrakturMaguntia.txt) */
@font-face {
  font-family: 'UnifrakturMaguntia';
  src: url('fonts/UnifrakturMaguntia.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

:root {
  --bg: #0d0d0d;
  --ink: #f2f0eb;
  --ink-dim: #b8b4ab;
  --ink-faint: #8a867e;
  --line: rgba(242, 240, 235, 0.18);
  --line-soft: rgba(242, 240, 235, 0.08);
  --nav-h: 76px;
  --brand: 'Ballet', 'Snell Roundhand', cursive;
  --menu: 'UnifrakturMaguntia', 'Old English Text MT', serif;
  --sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Sfondo: texture nera su tutta la pagina */
body {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg) url('images/texture-dark.jpg') repeat;
  background-size: 608px auto;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }

a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; }
.skip-link:focus { top: 12px; }

/* ================= NAVBAR ================= */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: rgba(13, 13, 13, 0.86);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand {
  display: inline-block;
  font-family: var(--brand);
  font-size: 1.75rem;
  line-height: 1.2;
  padding: 18px 14px 4px 10px;   /* spazio per gli svolazzi di Ballet */
  white-space: nowrap;
}
.page-home .nav .brand { visibility: hidden; } /* in home il nome è già grande al centro */

.nav-links { display: none; align-items: center; gap: 30px; }
.nav-links a {
  font-family: var(--menu);
  font-size: 1.28rem;
  line-height: 1;
  color: var(--ink-dim);
  padding: 8px 0 6px;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
@media (min-width: 900px) { .nav-links { display: flex; } .nav-toggle { display: none; } }

.nav-toggle { width: 44px; height: 44px; position: relative; border: 1px solid var(--line); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 1px; background: var(--ink);
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -6px; left: 0; right: 0; }
.nav-toggle span::after { top: 6px; left: 0; right: 0; }

/* ================= MENU LATERALE (telefono) ================= */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 79;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0; visibility: hidden;
  transition: opacity 300ms ease, visibility 0s linear 300ms;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80;
  width: min(82vw, 340px);
  background: var(--bg) url('images/texture-dark.jpg') repeat;
  background-size: 608px auto;
  border-left: 1px solid var(--line);
  padding: 14px 28px 40px;
  display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
  transition: transform 340ms cubic-bezier(.2,.7,.2,1), visibility 0s linear 340ms;
  overflow-y: auto;
}
body.drawer-open .drawer { transform: none; visibility: visible; transition: transform 340ms cubic-bezier(.2,.7,.2,1); }
body.drawer-open .drawer-overlay { opacity: 1; visibility: visible; transition: opacity 300ms ease; }
body.drawer-open { overflow: hidden; }
.drawer-top { display: flex; justify-content: flex-end; }
.drawer-close { width: 44px; height: 44px; position: relative; }
.drawer-close::before, .drawer-close::after {
  content: ""; position: absolute; top: 50%; left: 9px; right: 9px; height: 1px; background: var(--ink);
}
.drawer-close::before { transform: rotate(45deg); }
.drawer-close::after { transform: rotate(-45deg); }
.drawer .brand { font-size: 2.4rem; padding: 10px 10px 0 0; margin-bottom: 26px; }
.drawer ul { display: flex; flex-direction: column; gap: 6px; }
.drawer li a {
  display: block;
  font-family: var(--menu);
  font-size: 2rem;
  line-height: 1.2;
  padding: 8px 0;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--line-soft);
}
.drawer li a[aria-current="page"] { color: var(--ink); }
.drawer li { opacity: 0; transform: translateX(18px); transition: opacity 300ms ease, transform 300ms ease; }
body.drawer-open .drawer li { opacity: 1; transform: none; }
body.drawer-open .drawer li:nth-child(2) { transition-delay: 40ms; }
body.drawer-open .drawer li:nth-child(3) { transition-delay: 80ms; }
body.drawer-open .drawer li:nth-child(4) { transition-delay: 120ms; }
body.drawer-open .drawer li:nth-child(5) { transition-delay: 160ms; }
body.drawer-open .drawer li:nth-child(6) { transition-delay: 200ms; }

/* ================= TITOLI PAGINA ================= */
.page-head { text-align: center; padding: 44px 0 26px; }
@media (min-width: 768px) { .page-head { padding: 64px 0 40px; } }
.page-title {
  font-family: var(--brand);
  font-weight: 400;
  font-size: clamp(3.2rem, 11vw, 5.8rem);
  line-height: 1.5;               /* spazio per gli svolazzi di Ballet */
  padding: 0 0.35em;
}

/* ================= BOTTONI ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 150px; padding: 12px 28px 13px;
  font-family: var(--menu);
  font-size: 1.3rem; font-weight: 400; line-height: 1.1; letter-spacing: 0.01em;
  border: 1px solid var(--ink);
  transition: background 180ms ease, color 180ms ease;
}
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: transparent; color: var(--ink); }
.btn-line { color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--bg); }

/* ================= HOME: disegno + nome + bottoni sempre visibili insieme ================= */
.home {
  height: calc(100vh - var(--nav-h));
  height: calc(100svh - var(--nav-h));
  min-height: 440px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2vh 20px 4vh;
  text-align: center;
  overflow: hidden;
}
.home-art {
  flex: 0 1 auto;
  min-height: 0;
  height: 44vh; height: 44svh;
  max-height: 440px;
  display: flex; justify-content: center;
}
.home-art img { height: 100%; width: auto; max-width: 84vw; object-fit: contain; }
.home-title {
  flex: none;
  font-family: var(--brand);
  font-weight: 400;
  font-size: clamp(3rem, min(20vw, 11svh), 7rem);
  line-height: 1.45;
  padding: 0 0.35em;
  margin-top: -0.15em;
}
.home-actions { flex: none; margin-top: 1.2vh; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.home-art, .home-title, .home-actions { animation: rise 900ms ease both; }
.home-title { animation-delay: 160ms; }
.home-actions { animation-delay: 320ms; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ================= GALLERIA ================= */
.gallery {
  max-width: 1400px; margin: 0 auto; padding: 0 6px 60px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
}
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); padding: 0 12px 80px; } }
@media (min-width: 1100px) { .gallery { grid-template-columns: repeat(4, 1fr); } }

.gallery-item {
  position: relative; display: block; width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #141414;
}
/* comparsa: ogni foto si apre dal centro e si espande, una riga alla volta (ritardo impostato da main.js).
   L'effetto è sull'immagine interna, così il riquadro resta "visibile" al controllo di scorrimento. */
.js .gallery-item { background: transparent; }
.js .gallery-item img {
  clip-path: inset(50% 50% 50% 50%);
  opacity: 0;
  transform: scale(1.25);
}
.js .gallery-item.is-in img {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transform: scale(1);
  transition: clip-path 1000ms cubic-bezier(.65,0,.35,1) var(--d, 0ms),
              opacity 350ms ease var(--d, 0ms),
              transform 1400ms cubic-bezier(.2,.7,.2,1) var(--d, 0ms),
              filter 500ms ease;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: filter 500ms ease, transform 700ms ease;
}

/* Riflesso metallico al passaggio del cursore */
.gallery-item::after {
  content: ""; position: absolute; inset: -20%;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.10) 38%,
    rgba(225, 232, 244, 0.55) 46%,
    rgba(255, 255, 255, 0.90) 50%,
    rgba(190, 200, 216, 0.45) 55%,
    rgba(255, 255, 255, 0.10) 62%,
    transparent 70%);
  mix-blend-mode: screen;
  transform: translateX(-75%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
}
@media (hover: hover) {
  .gallery-item:hover img, .gallery-item:focus-visible img,
  .js .gallery-item.is-in:hover img, .js .gallery-item.is-in:focus-visible img {
    filter: grayscale(0.55) contrast(1.12) brightness(1.06);
    transform: scale(1.03);
    transition: transform 700ms ease, filter 500ms ease;
  }
  .gallery-item:hover::after, .gallery-item:focus-visible::after {
    opacity: 1;
    transform: translateX(75%);
    transition: transform 1200ms ease-in-out;
  }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 5, 5, 0.96);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; }
.lb-btn {
  position: absolute; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: 1.3rem; line-height: 1;
  background: rgba(13, 13, 13, 0.6);
}
.lb-btn:hover { border-color: var(--ink); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 0.85rem; color: var(--ink-faint); }

/* ================= PRENOTA: cornice ornamentale attorno al form Tally ================= */
.booking { max-width: 760px; margin: 0 auto; padding-bottom: 90px; text-align: center; }
.booking-lead { color: var(--ink-dim); font-size: 1.05rem; margin-bottom: 42px; }
.booking-frame {
  position: relative;
  margin: 0 8px;
  padding: 70px 26px 56px;
  border: 1px solid var(--line);
  background: rgba(8, 8, 8, 0.55);
  border-radius: 76px;
  text-align: left;
}
@media (min-width: 640px) { .booking-frame { padding: 84px 64px 70px; margin: 0; border-radius: 100px; } }
.booking-frame::before { /* seconda linea interna, sottile */
  content: ""; position: absolute; inset: 7px;
  border: 1px solid var(--line-soft);
  border-radius: inherit;
  pointer-events: none;
}
.frame-corner { position: absolute; width: 96px; height: 96px; pointer-events: none; }
@media (min-width: 640px) { .frame-corner { width: 126px; height: 126px; } }
.frame-corner svg { width: 100%; height: 100%; display: block; overflow: visible; }
.frame-corner.tl { top: -14px; left: -14px; }
.frame-corner.tr { top: -14px; right: -14px; transform: scaleX(-1); }
.frame-corner.bl { bottom: -14px; left: -14px; transform: scaleY(-1); }
.frame-corner.br { bottom: -14px; right: -14px; transform: scale(-1, -1); }
.booking-frame iframe { position: relative; display: block; width: 100%; min-height: 560px; border: 0; background: transparent; }
.booking-alt { margin-top: 26px; font-size: 0.92rem; color: var(--ink-faint); }
.booking-minori { margin-top: 10px; }
.booking-alt a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ================= AFTERCARE ================= */
.aftercare { max-width: 680px; margin: 0 auto; padding-bottom: 80px; }
.aftercare-intro { text-align: center; color: var(--ink-dim); font-size: 1.05rem; }
.aftercare-art { width: 150px; margin: 36px auto 8px; }
.aftercare-art img { width: 100%; height: auto; object-fit: contain; }
.care-block { padding: 26px 0; border-bottom: 1px solid var(--line-soft); }
.care-block:last-of-type { border-bottom: 0; }
.care-block h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.01em; margin-bottom: 12px; }
.care-block ul { display: flex; flex-direction: column; gap: 8px; }
.care-block li { position: relative; padding-left: 20px; color: var(--ink-dim); }
.care-block li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-faint); }
.care-block li strong { color: var(--ink); font-weight: 600; }
.care-download { text-align: center; margin-top: 36px; }

/* ================= FAQ ================= */
.faq { max-width: 760px; margin: 0 auto; padding-bottom: 80px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 4px; font-size: 1.05rem; font-weight: 600; }
.faq-q .plus { position: relative; width: 14px; height: 14px; flex: none; }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; background: var(--ink); }
.faq-q .plus::before { top: 6.5px; left: 0; width: 14px; height: 1px; }
.faq-q .plus::after { top: 0; left: 6.5px; width: 1px; height: 14px; transition: transform 220ms ease; }
.faq-item.open .plus::after { transform: rotate(90deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 260ms ease; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { color: var(--ink-dim); padding: 0 4px 22px; max-width: 62ch; }

/* ================= 404 ================= */
.notfound { text-align: center; padding: 20px 20px 100px; color: var(--ink-dim); }
.notfound .btn { margin-top: 28px; }

/* ================= FOOTER ================= */
.footer { border-top: 1px solid var(--line-soft); padding: 36px 0 26px; font-size: 0.9rem; color: var(--ink-dim); }
.footer .wrap { display: flex; flex-direction: column; gap: 16px; text-align: center; align-items: center; }
.footer-studio strong { color: var(--ink); font-weight: 600; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-links a:hover { color: var(--ink); }
.footer-small { font-size: 0.8rem; color: var(--ink-faint); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js .gallery-item img { opacity: 1; clip-path: none; transform: none; }
  .gallery-item::after { display: none; }
}
.faq-a a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ================= PRIVACY ================= */
.legal { max-width: 720px; margin: 0 auto; padding-bottom: 90px; color: var(--ink-dim); }
.legal p { margin-top: 12px; }
.legal section { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.legal section:last-child { border-bottom: 0; }
.legal h2 { color: var(--ink); font-size: 1.1rem; font-weight: 700; }
.legal ul { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.legal li { position: relative; padding-left: 20px; }
.legal li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-faint); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal-date { font-size: 0.85rem; color: var(--ink-faint); text-align: center; }
.legal mark.todo { background: #f2d24b; color: #111; padding: 0 4px; } /* segnaposto da sostituire */

/* ================= SELETTORE LINGUA IT / EN ================= */
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 6px; padding-left: 22px;
  border-left: 1px solid var(--line);
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.nav-links .lang-switch a {
  font-family: var(--sans); font-size: 0.8rem; line-height: 1;
  padding: 4px 0; border-bottom: 0; color: var(--ink-faint);
}
.nav-links .lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current] { color: var(--ink) !important; }
.lang-switch-drawer {
  margin: 34px 0 0; padding: 0; border: 0;
  font-size: 0.95rem; gap: 10px;
}
.lang-switch-drawer a { padding: 6px 2px; color: var(--ink-dim); }
