/*
 * ============================================================
 *  css/style.css — Liuzzi Studio v8
 * ============================================================
 */

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

:root {
  --bg:     #ffffff;
  --ink:    #0a0a0a;
  --mid:    rgba(0,0,0,0.48);
  --faint:  rgba(0,0,0,0.28);
  --dim:    rgba(0,0,0,0.06);
  --accent: #0a0a0a;
  --blue:   #4a90d9;
  --sans:   'Helvetica Neue', Helvetica, Arial, sans-serif;
  --expo:   cubic-bezier(0.87, 0, 0.13, 1);
  --out:    cubic-bezier(0.16, 1, 0.3, 1);
}

html, body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-weight: 700; letter-spacing: -0.03em; height: 100%; }

.page { height: 100vh; max-height: 100vh; overflow: hidden; display: flex; flex-direction: column; position: relative; }

@keyframes fadeUp   { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes popIn    { from { opacity:0; transform:translateY(6px) scale(.97); } to { opacity:1; transform:none; } }
.anim-1 { animation: fadeUp .65s var(--out) .06s both; }
.anim-2 { animation: fadeUp .65s var(--out) .14s both; }
.anim-3 { animation: fadeUp .65s var(--out) .22s both; }
.anim-4 { animation: fadeUp .65s var(--out) .30s both; }
.anim-f { animation: fadeIn .6s  var(--out) .38s both; }

/* ── Globe fisso ── */
.lang-fixed { position: fixed; top: 14px; right: 18px; z-index: 800; }
.lang-wrap  { position: relative; }
.lang-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; background: transparent; border: none;
  cursor: pointer; color: var(--mid); transition: color .2s;
}
.lang-btn:hover, .lang-btn.open { color: var(--ink); }
.lang-dd {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: #fff; min-width: 150px;
  box-shadow: 0 12px 36px rgba(0,0,0,.10); border: 1px solid rgba(0,0,0,.08);
  opacity: 0; pointer-events: none; transform: translateY(6px);
  transition: opacity .22s var(--out), transform .22s var(--out); z-index: 900;
}
.lang-dd.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.lang-opt {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  font-size: 10px; font-weight: 400; letter-spacing: .18em; color: var(--mid);
  background: none; border: none; width: 100%; text-align: left; cursor: pointer;
  transition: background .15s, color .15s;
}
.lang-opt:hover { background: var(--dim); color: var(--ink); }
.lang-opt.on    { color: var(--ink); font-weight: 500; }

/* ── Home view (marquee + hero) — si nasconde quando si apre una sezione ── */
.home-view {
  transition: opacity .5s var(--out), max-height .6s var(--expo);
  overflow: hidden;
  max-height: 70vh;
  flex-shrink: 0;
}
.home-view.hidden {
  opacity: 0; max-height: 0; pointer-events: none;
}

/* ── Lingua sotto il titolo ── */
.lang-below-title {
  display: flex; justify-content: flex-end;
  padding: 8px 18px;
  border-bottom: 1px solid transparent;
  background: var(--bg);
}

/* ── Marquee ── */
.mq-wrap {
  overflow: visible; position: relative; background: var(--bg);
  border-bottom: 1px solid transparent; flex-shrink: 0;
}
.mq-wrap::before, .mq-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none;
}
.mq-wrap::before { left:  0; background: linear-gradient(90deg,  #fff, transparent); }
.mq-wrap::after  { right: 0; background: linear-gradient(-90deg, #fff, transparent); }
.mq-band { height: clamp(80px, 24vh, 280px); overflow: visible; display: flex; align-items: center; }
.mq-track  { display: flex; overflow: visible; width: 100%; }
.mq-inner  { display: flex; align-items: baseline; flex-shrink: 0; animation: mq 42s linear infinite; will-change: transform; }
.mq-wrap:hover .mq-inner { animation-play-state: paused; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.mq-word {
  font-size: min(18vw, 22vh);
  font-weight: 700; letter-spacing: -0.04em; color: var(--ink); white-space: nowrap; line-height: 1; padding: 0;
}

/* ── Hero block ── */
.hero-block {
  padding: 2vh 40px 2vh;
  border-bottom: 1px solid transparent;
  animation: fadeIn .5s var(--out) .04s both;
}
.hero-tagline {
  font-weight: 700; font-size: clamp(17px, 3.2vh, 36px);
  letter-spacing: -0.03em; color: var(--ink); margin-bottom: 0.4vh;
}
.hero-sub {
  font-weight: 300; font-size: clamp(13px, 2vh, 22px);
  letter-spacing: -0.01em; color: var(--mid); margin-bottom: 1.8vh; line-height: 1.5;
}
/* CTA: ovale con contorno azzurro */
.hero-cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: #1476f0; color: #fff;
  border: 2px solid #1476f0;
  border-radius: 999px;
  font-family: var(--sans); font-size: clamp(17px, 3.2vh, 36px);
  font-weight: 700; letter-spacing: -0.03em;
  padding: 12px 28px; cursor: pointer;
  transition: background .22s, transform .2s;
}
.hero-cta:hover { background: #0a5fd4; border-color: #0a5fd4; transform: translateY(-1px); }

/* ── Split layout ── */
.split-layout {
  display: flex; flex: 1; min-height: 0; overflow: hidden;
  transition: all .7s var(--expo);
}

/* Colonna nav sinistra */
.col-nav {
  flex: 1;                        /* a riposo: occupa tutto */
  transition: flex .7s var(--expo);
  overflow: hidden;
  border-right: 0px solid transparent;
}
.col-nav--open {
  flex: 0 0 auto;                 /* aperto: si rimpicciolisce */
  width: fit-content;
  border-right-width: 0px;
}

.nav-list { list-style: none; display: flex; flex-direction: column; align-items: flex-start; }
.nav-row  {
  display: inline-flex; align-items: center; position: relative; overflow: hidden;
  border-bottom: 1px solid transparent; pointer-events: all;
}
.nav-fill {
  position: absolute; inset: 0; background: rgba(0,0,0,.025);
  transform: scaleX(0); transform-origin: left;
  transition: transform .8s var(--expo); pointer-events: none;
}
.nav-row.on .nav-fill { transform: scaleX(1); }
.nav-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); transform: scaleY(0); transform-origin: bottom;
  transition: transform .55s var(--out) .04s; pointer-events: none;
}
.nav-row.on .nav-bar { transform: scaleY(1); }
.nav-btn {
  position: relative; z-index: 2; background: none; border: none;
  font-family: var(--sans);
  font-size: clamp(18px, 2.8vw, 48px);
  font-weight: 700; letter-spacing: -0.04em; color: rgba(0,0,0,.16);
  cursor: pointer; text-align: left;
  padding: 4px 0 4px 40px;
  line-height: 1.05; width: auto;
  transition: font-size .7s var(--expo), color .42s var(--expo), padding .7s var(--expo);
}
.nav-row.on .nav-btn { color: var(--ink); }

/* Nav rimpicciolita */

.col-nav--open .nav-row {
  display: flex;
  width: 100%;
}
.col-nav--open .nav-btn {
  font-size: clamp(42px, 5.5vw, 80px);
  padding: 11px 24px 11px 16px;
  white-space: nowrap;
  width: 100%;
}

/* Colonna panel destra */
.col-panel {
  flex: 0 0 0%;
  overflow: hidden;
  transition: flex .7s var(--expo);
}
.col-panel--open {
  flex: 1;          /* prende tutto lo spazio rimanente */
  overflow-y: auto;
}
.col-panel::-webkit-scrollbar { width: 2px; }
.col-panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); }

/* ── Pannello contenuto ── */
.panel {
  padding: 28px 36px 40px;
  background: #fff; color: var(--ink);
  position: relative;
  opacity: 0; transform: translateX(20px);
  transition: opacity .5s var(--out), transform .5s var(--out);
  min-height: 100%;
}
.panel.vis { opacity: 1; transform: none; }
.p-close {
  position: absolute; top: 72px; right: 18px;
  width: 30px; height: 30px;
  background: var(--dim); border: none; color: var(--mid);
  cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.p-close:hover { background: rgba(0,0,0,.12); color: var(--ink); }
.p-title {
  font-size: clamp(32px, 4.8vw, 64px);
  font-weight: 700; letter-spacing: -0.04em; color: var(--ink);
  line-height: 1.0; margin-bottom: 30px;
}
.p-body { font-size: 15px; line-height: 1.88; color: var(--mid); font-weight: 300; max-width: 580px; }
.p-body p + p { margin-top: 14px; }

/* Prenota: sfondo scuro */

/* ── Servizi ── */
.svc-list { list-style: none; max-width: 560px; }
.svc-item { padding: 18px 0; border-bottom: 1px solid transparent; }
.svc-name { font-size: 15px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin-bottom: 5px; }
.svc-desc { font-size: 13px; line-height: 1.75; color: var(--mid); font-weight: 300; }

/* ── Prenota ── */
.book-desc  { font-size: 15px; line-height: 1.85; color: var(--mid); max-width: 520px; margin-bottom: 30px; }
.cta-wrap   { }
.cta-prenota {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 13px; font-weight: 700; letter-spacing: -0.01em;
  background: var(--ink); color: #fff;
  padding: 20px 36px; border: none; cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.cta-prenota:hover { opacity: .76; transform: translateY(-1px); }

/* ── Contatti ── */
.ct-list { list-style: none; max-width: 520px; }
.ct-row  { display: flex; align-items: baseline; gap: 24px; padding: 14px 0; border-bottom: 1px solid transparent; }
.ct-k    { font-size: 8px; font-weight: 500; letter-spacing: .18em; color: rgba(0,0,0,.40); min-width: 80px; flex-shrink: 0; text-transform: uppercase; }
.ct-v    { font-size: 18px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; transition: color .2s; }
a.ct-v:hover { color: var(--mid); }

/* ── Footer ── */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px; border-top: 1px solid transparent; flex-shrink: 0;
}
.foot-links { display: flex; gap: 12px; }
.foot-circle {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1.5px solid rgba(0,0,0,.22); border-radius: 50%;
  color: var(--ink); text-decoration: none;
  transition: border-color .2s, background .2s;
}
.foot-circle svg { stroke: var(--ink) !important; }
.foot-circle:hover { border-color: var(--ink); background: var(--ink); }
.foot-circle:hover svg { stroke: #fff !important; }
.foot-copy {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  color: rgba(0,0,0,.32); cursor: pointer;
  transition: color .2s; user-select: none; text-transform: uppercase;
}
.foot-copy:hover { color: var(--ink); }

/* ── Dashboard ── */
.dash-ov {
  position: fixed; inset: 0; z-index: 900; background: #f5f5f5;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .4s var(--out), transform .4s var(--out);
}
.dash-ov.open { opacity: 1; pointer-events: all; transform: none; }
.dash-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 48px; border-bottom: 1px solid rgba(0,0,0,.08);
  flex-shrink: 0; background: #fff;
}
.dash-t  { font-size: 26px; font-weight: 700; letter-spacing: -0.04em; color: var(--ink); }
.dash-s  { font-size: 9px; letter-spacing: .28em; color: var(--faint); margin-top: 4px; }
.dash-x  {
  background: var(--dim); border: none; color: var(--mid);
  width: 36px; height: 36px; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.dash-x:hover { background: rgba(0,0,0,.12); color: var(--ink); }
.dash-bd { flex: 1; overflow-y: auto; padding: 40px 48px; }
.dash-bd::-webkit-scrollbar { width: 2px; }
.dash-bd::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); }
.dash-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 44px; }
.dash-card { background: #fff; padding: 28px 28px 22px; border-left: 2px solid var(--accent); box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.dash-val  { font-size: 48px; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -0.04em; }
.dash-lbl  { font-size: 8px; letter-spacing: .26em; color: var(--faint); margin-top: 8px; }
.dash-sec  { font-size: 8px; letter-spacing: .3em; color: var(--faint); margin-bottom: 20px; }
.dash-bars { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.dash-br   { display: flex; align-items: center; gap: 16px; }
.dash-br-l { font-size: 11px; color: var(--mid); min-width: 110px; }
.dash-br-t { flex: 1; height: 4px; background: rgba(0,0,0,.08); border-radius: 2px; overflow: hidden; }
.dash-br-f { height: 100%; background: var(--accent); border-radius: 2px; transition: width 1.2s var(--out); }
.dash-br-n { font-size: 14px; font-style: italic; color: var(--mid); min-width: 28px; text-align: right; }
.dash-rec  { margin-top: 40px; }
.dash-rl   { list-style: none; display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.dash-ri   { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--mid); padding: 10px 16px; background: #fff; border: 1px solid rgba(0,0,0,.06); }
.dash-rt   { color: var(--faint); font-size: 10px; }
.dash-rst  { font-size: 9px; letter-spacing: .2em; background: var(--dim); color: var(--faint); border: none; padding: 10px 20px; cursor: pointer; margin-top: 28px; transition: background .2s, color .2s; }
.dash-rst:hover { background: rgba(180,50,50,.10); color: #9a2a2a; }
.dash-note { margin-top: 28px; padding: 16px 20px; background: rgba(0,0,0,.03); font-size: 11px; color: var(--faint); line-height: 1.7; }
.dash-login { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: #f5f5f5; }
.dl-t   { font-size: 22px; font-weight: 700; letter-spacing: -0.04em; color: var(--ink); }
.dl-in  { background: #fff; border: none; border-bottom: 1px solid rgba(0,0,0,.20); color: var(--ink); font-family: var(--sans); font-size: 14px; padding: 14px 20px; width: 260px; outline: none; text-align: center; letter-spacing: .15em; transition: border-color .2s; }
.dl-in:focus { border-bottom-color: var(--ink); }
.dl-btn  { font-size: 9px; letter-spacing: .22em; background: var(--ink); color: #fff; padding: 14px 32px; border: none; cursor: pointer; transition: background .2s; }
.dl-btn:hover { background: #333; }
.dl-err  { font-size: 11px; color: #9a2a2a; }
.dl-back { background: none; border: none; color: rgba(0,0,0,.30); font-size: 11px; cursor: pointer; margin-top: 8px; letter-spacing: .1em; transition: color .2s; }
.dl-back:hover { color: var(--mid); }

/* ── Responsive ── */

/* Desktop: tutto deve stare in 100vh — le unità vh nei valori base ci pensano già.
   Qui aggiustiamo solo proporzioni colonne e nav per ogni fascia. */

/* Tablet landscape / small desktop (961–1280) */
@media (min-width: 961px) and (max-width: 1280px) {
  .col-nav--open  { flex: 0 0 36%; }
  .col-panel--open { flex: 0 0 64%; }
  .col-nav--open .nav-btn { font-size: clamp(28px, 3.8vh, 48px); }
}

/* Desktop medio (1281–1600) */
@media (min-width: 1281px) and (max-width: 1600px) {
  .col-nav--open  { flex: 0 0 30%; }
  .col-panel--open { flex: 0 0 70%; }
  .col-nav--open .nav-btn { font-size: clamp(32px, 4.2vh, 58px); }
}

/* Widescreen (>1600px) */
@media (min-width: 1601px) {
  .col-nav--open  { flex: 0 0 26%; }
  .col-panel--open { flex: 0 0 74%; }
  .col-nav--open .nav-btn { font-size: clamp(40px, 5vh, 72px); }
  .nav-btn { font-size: clamp(20px, 2.6vh, 44px); }
  .hero-block   { padding: 3vh 60px 3vh; }
  .panel { padding: 3vh 56px 4vh; }
  .about-title { font-size: clamp(28px, 3.5vh, 52px); }
  .svc-name { font-size: clamp(14px, 1.8vh, 20px); }
  .ct-v { font-size: clamp(16px, 2.2vh, 26px); }
}

/* Tablet portrait (641–960) — può scrollare un po' */
@media (max-width: 960px) and (min-width: 641px) {
  .page { height: auto; max-height: none; overflow: visible; }
  .mq-word { font-size: clamp(80px, 12vw, 130px); }
  .mq-band { height: clamp(100px, 15vw, 170px); }
  .col-nav--open  { flex: 0 0 34%; }
  .col-panel--open { flex: 0 0 66%; }
  .col-nav--open .nav-btn { font-size: clamp(26px, 3.6vw, 44px); padding: 10px 18px 10px 14px; }
  .hero-block { padding: 24px 28px 22px; }
  .hero-tagline { font-size: clamp(14px, 1.8vw, 20px); }
  .hero-sub     { font-size: clamp(11px, 1.3vw, 15px); }
  .panel { padding: 22px 28px 36px; }
  .dash-grid { grid-template-columns: repeat(2,1fr); }
}

/* Mobile (≤640) — scroll libero */
@media (max-width: 640px) {
  .page { height: auto; max-height: none; overflow: visible; min-height: 100vh; }
  .home-view { max-height: none; }
  .accordion-nav { flex: 1; }
  .mq-band { height: clamp(110px, 28vw, 180px); overflow: visible; }
  .mq-word { font-size: clamp(90px, 26vw, 170px); }
  .hero-block { padding: 20px 20px 18px; }
  .hero-tagline { font-size: clamp(16px, 4.5vw, 22px); }
  .hero-sub     { font-size: clamp(13px, 3.5vw, 16px); }
  .hero-block { display: flex; flex-direction: column; align-items: flex-start; }
  .hero-cta   { align-self: center; font-size: clamp(14px, 3.8vw, 18px); padding: 10px 22px; }
  .split-layout { flex-direction: column; overflow: visible; }
  .col-nav--open  { flex: 0 0 auto; border-right: none; border-bottom: 1px solid transparent; }
  .col-panel--open { flex: 1; overflow: visible; }
  .col-nav--open .nav-row { display: flex; width: 100%; }
  .col-nav--open .nav-btn { font-size: clamp(13px, 4vw, 18px) !important; padding: 10px 0 10px 16px; }
  .panel { padding: 16px 16px 28px; min-height: auto; }
  .p-title { font-size: clamp(24px, 7.5vw, 40px); }
  .p-close { display: none; }
  .ct-row  { flex-direction: column; gap: 4px; padding: 12px 0; }
  .cta-prenota { width: 100%; justify-content: center; }
  .footer  { padding: 16px 20px; }
  .foot-links { gap: 10px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-bd   { padding: 24px 16px; }
  .dash-hd   { padding: 18px 16px; }
}

/* ── Accordion mobile ── */
.accordion-nav { width: 100%; }
.accordion-item { width: 100%; }
.accordion-btn {
  display: flex; align-items: center; position: relative;
  width: 100%; background: none; border: none;
  font-family: var(--sans);
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 700; letter-spacing: -0.04em;
  color: rgba(0,0,0,.18); cursor: pointer;
  text-align: left; padding: 10px 0 10px 20px;
  line-height: 1.05; overflow: hidden;
  transition: color .35s var(--expo);
}
.accordion-btn .nav-fill {
  position: absolute; inset: 0; background: rgba(0,0,0,.025);
  transform: scaleX(0); transform-origin: left;
  transition: transform .8s var(--expo); pointer-events: none;
}
.accordion-btn.on .nav-fill { transform: scaleX(1); }
.accordion-btn .nav-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); transform: scaleY(0); transform-origin: bottom;
  transition: transform .55s var(--out) .04s; pointer-events: none;
}
.accordion-btn.on .nav-bar  { transform: scaleY(1); }
.accordion-btn.on  { color: var(--ink); }
.accordion-btn span { position: relative; z-index: 2; }
.accordion-panel {
  width: 100%;
  opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity .4s var(--out), max-height .5s var(--out);
}
.accordion-panel.vis {
  opacity: 1; max-height: 2000px;
}
.accordion-panel .panel {
  transform: none !important; opacity: 1 !important;
  padding: 16px 20px 32px;
}
.accordion-panel .p-close-desktop { display: none; }

@media (max-width: 640px) {
  .p-close { display: none; }
}

.about-title {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.05;
}
.about-role {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .20em;
  color: rgba(0,0,0,.45);
  text-transform: uppercase;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.about-body { font-size: 15px; line-height: 1.88; color: var(--mid); font-weight: 300; max-width: 580px; }
.about-body p + p { margin-top: 14px; }
.about-text p { font-size: 15px; line-height: 1.88; color: var(--mid); font-weight: 300; }
.about-text p + p { margin-top: 14px; }

/* ── Tasto torna alla home ── */
.home-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(0,0,0,.35); padding: 10px 40px;
  transition: color .2s;
}
.home-back:hover { color: var(--ink); }

/* ── Flag button ── */
.lang-flag { display: flex; align-items: center; line-height: 1; }
.lang-flag svg { display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.lang-btn { width: auto; padding: 6px 8px; border-radius: 4px; }