/* Holoè — la stanza vuota: intonaco, luce radente, un ologramma al centro. */

@font-face {
  font-family: 'Jost';
  src: url('../assets/fonts/jost-latin.woff2') format('woff2');
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

@property --wash {
  syntax: '<color>';
  inherits: true;
  initial-value: #fcf9f3;
}

:root {
  --blobs:
    radial-gradient(ellipse 60% 50% at 18% 22%, rgba(255, 214, 200, 0.5), transparent 70%),
    radial-gradient(ellipse 55% 50% at 85% 25%, rgba(206, 224, 255, 0.5), transparent 70%),
    radial-gradient(ellipse 60% 55% at 70% 95%, rgba(214, 240, 214, 0.5), transparent 70%),
    radial-gradient(ellipse 50% 45% at 10% 90%, rgba(236, 214, 246, 0.45), transparent 70%);
  --ground: #f6f2ea;
  --ground-hi: #fdfbf8;
  --ground-lo: #eee8dc;
  --ink: #2a2219;
  --ink-2: #54483a;
  --bronze: #5f472d;
  --holo: #8fd0fb;
  --holo-ink: #2f7fb5;
  --line: rgba(42, 34, 25, 0.18);
  --wash: #fcf9f3;
  --deep: #5f472d;
  --paper: #f6f0e4;
  --font: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(18px, 4vw, 56px);
}

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

html { -webkit-text-size-adjust: 100%; scrollbar-color: #a8977c transparent; scrollbar-width: thin; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: --wash 0.9s ease;
}

/* La parete: luce che scende dall'alto, tinta dal pigmento della categoria. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(90% 70% at 50% 42%, var(--wash) 0%, transparent 62%),
    var(--blobs),
    linear-gradient(180deg, var(--ground-hi) 0%, var(--ground) 34%, var(--ground-lo) 100%);
}
/* Grana dell'intonaco. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.3;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .28 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}
body.is-cat::before {
  background:
    radial-gradient(85% 75% at 14% -6%, var(--wash) 0%, transparent 64%),
    var(--blobs),
    linear-gradient(180deg, var(--ground-hi) 0%, var(--ground) 40%, var(--ground-lo) 100%);
}
body.locked { overflow: hidden; }

::selection { background: var(--bronze); color: var(--ground-hi); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 1.5px solid var(--holo-ink);
  outline-offset: 4px;
  border-radius: 2px;
}

.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; left: 12px; top: 12px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; }

/* Il marchio: lettere in bronzo retroilluminate, come sulla parete dello showroom. */
.mark {
  display: block;
  aspect-ratio: 900 / 275;
  background: linear-gradient(180deg, #7a5d3c, #4a3520);
  -webkit-mask: url('../assets/holoe.webp') center / contain no-repeat;
  mask: url('../assets/holoe.webp') center / contain no-repeat;
}
/* il filtro sta sul contenitore: su un elemento con maschera verrebbe tagliato dalla maschera stessa */
.hub-glow { filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.95)) drop-shadow(0 2px 28px rgba(255, 255, 255, 0.85)); }

/* ---------- Testata ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--pad);
  min-height: 64px;
}
.top-mark { width: 92px; view-transition-name: holoe-mark; }
.top-mark[hidden] { display: none; }
.top-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2);
  padding: 8px 0;
  transition: color 0.3s;
}
.top-link svg { width: 18px; height: 18px; }
.top-link:hover { color: var(--ink); }
.top-link[hidden] { display: none; }

main { flex: 1; display: flex; flex-direction: column; }
main:focus { outline: none; }

/* ---------- Hub ---------- */
.hub {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 8px var(--pad) 24px;
  min-height: 0;
}
.orbit {
  position: relative;
  width: calc(var(--rx, 420px) * 2);
  height: calc(var(--ry, 260px) * 2);
  margin: 56px 0 64px;
}
.rings-wrap { position: absolute; inset: 0; perspective: 1400px; pointer-events: none; }
.rings {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  transform: rotateX(calc(var(--ty, 0) * 1deg)) rotateY(calc(var(--tx, 0) * 1deg));
  transition: transform 0.6s var(--ease);
  filter: drop-shadow(0 0 5px rgba(143, 208, 251, 0.7));
}
.rings ellipse, .rings line { fill: none; vector-effect: non-scaling-stroke; }
.rings .r1 { stroke: rgba(47, 127, 181, 0.5); stroke-width: 1; }
.rings .r2 { stroke: rgba(47, 127, 181, 0.26); stroke-width: 1; }
.rings .r3 { stroke: rgba(47, 127, 181, 0.16); stroke-width: 1; }
.rings line { stroke: rgba(47, 127, 181, 0.16); stroke-width: 1; transition: stroke 0.4s, stroke-width 0.4s; }
.rings line.on { stroke: rgba(47, 127, 181, 0.85); }

.ticks {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--rx, 420px) * 2 + 34px);
  height: calc(var(--rx, 420px) * 2 + 34px);
  margin: calc(var(--rx, 420px) * -1 - 17px) 0 0 calc(var(--rx, 420px) * -1 - 17px);
  transform: scaleY(var(--sq, 0.6));
  pointer-events: none;
}
.ticks i {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px dashed rgba(47, 127, 181, 0.32);
  animation: spin 240s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hub-center {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(26vw, 330px);
  text-align: center;
}
.hub-center::before {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 190%; aspect-ratio: 1.9;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}
.hub-mark { position: relative; width: 100%; view-transition-name: holoe-mark; }
.hub-status {
  position: relative;
  margin: 18px 0 0;
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-2);
  min-height: 1.5em;
}

.node {
  position: absolute;
  transform: translate(-50%, -34px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 140px;
  text-align: center;
  color: var(--ink);
  --deep: var(--bronze);
}
.node-ic {
  position: relative;
  width: 68px; height: 68px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--node-wash);
  color: var(--deep);
  box-shadow: 0 6px 18px rgba(74, 53, 32, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background 0.4s, color 0.4s;
}
.node-ic svg { width: 40px; height: 40px; }
.node-name {
  font-size: 11.5px; line-height: 1.3; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 500;
}
.node-n {
  font-size: 12px; letter-spacing: 0.04em; color: var(--ink-2);
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.35s, transform 0.5s var(--ease);
}
.node:hover .node-ic, .node:focus-visible .node-ic {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 22px rgba(74, 53, 32, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}
.node:hover .node-n, .node:focus-visible .node-n { opacity: 1; transform: none; }

/* Ingresso dell'hub: gli anelli si aprono, i nodi arrivano uno dopo l'altro. */
@media (prefers-reduced-motion: no-preference) {
  .hub.enter .rings-wrap, .hub.enter .ticks { animation: ringsIn 1.4s var(--ease) both; }
  .hub.enter .hub-center { animation: fadeUp 1.1s var(--ease) 0.1s both; }
  .hub.enter .node { animation: nodeIn 0.9s var(--ease) both; animation-delay: calc(0.25s + var(--i) * 0.045s); }
}
@keyframes ringsIn { from { opacity: 0; scale: 0.86; } }
@keyframes fadeUp { from { opacity: 0; translate: 0 10px; } }
@keyframes nodeIn { from { opacity: 0; translate: 0 12px; } }

/* ---------- Categoria ---------- */
.cat { --k: 1; padding: 0 var(--pad) 72px; width: 100%; max-width: 1480px; margin: 0 auto; }

.strip {
  display: flex; gap: clamp(16px, 2vw, 30px);
  overflow-x: auto; scrollbar-width: none;
  padding: 6px 0 16px;
  margin: 0 calc(var(--pad) * -1); padding-inline: var(--pad);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--pad), #000 calc(100% - var(--pad)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--pad), #000 calc(100% - var(--pad)), transparent);
}
.strip::-webkit-scrollbar { display: none; }
.strip a {
  flex: none;
  font-size: 14px; letter-spacing: 0.03em;
  color: var(--ink-2);
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.strip a:hover { color: var(--ink); }
.strip a[aria-current] { color: var(--ink); border-color: var(--deep); }

.cat-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  column-gap: clamp(14px, 2vw, 28px);
  padding: clamp(28px, 6vw, 84px) 0 clamp(56px, 9vw, 132px);
}
.cat-ic { color: var(--deep); width: clamp(40px, 5vw, 64px); margin-bottom: clamp(6px, 1.2vw, 16px); }
.cat-ic svg { width: 100%; height: auto; display: block; }
.cat-ic svg * { stroke-width: 0.9; }
.cat-head h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8.2vw, 6rem);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
  view-transition-name: cat-title;
  width: fit-content;
}
.cat-count {
  grid-column: 2;
  margin: 14px 0 0;
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--deep);
}

.wall {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 21vw, 250px), 1fr));
}
.wall[data-few] { --k: 1.35; grid-template-columns: repeat(auto-fit, minmax(240px, 380px)); }
.logo-btn {
  position: relative;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: clamp(128px, 15vw, 196px);
  padding: 18px 18px 30px;
  background: none; border: 0; cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.logo-btn img {
  width: calc(var(--lw) * var(--k, 1) * 1px);
  max-width: 100%;
  height: auto;
  filter: brightness(0);
  opacity: 0.84;
  transition: filter 0.5s, opacity 0.5s, transform 0.7s var(--ease);
}
.logo-cta {
  position: absolute; left: 0; right: 0; bottom: 14px;
  text-align: center;
  font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--deep);
  opacity: 0; translate: 0 6px;
  transition: opacity 0.4s, translate 0.6s var(--ease);
  pointer-events: none;
}
@media (hover: hover) {
  .logo-btn:hover img, .logo-btn:focus-visible img { filter: none; opacity: 1; transform: translateY(-6px); }
  .logo-btn:hover .logo-cta, .logo-btn:focus-visible .logo-cta { opacity: 1; translate: 0 0; }
}
.logo-btn:active img { transform: scale(0.97); }
.logo-sub { text-align: center; font-size: 12px; letter-spacing: 0.06em; color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .cat.enter .wall li { animation: fadeUp 0.8s var(--ease) both; animation-delay: calc(0.12s + var(--i) * 0.035s); }
  .cat.enter .cat-count, .cat.enter .cat-ic { animation: fadeUp 0.9s var(--ease) 0.1s both; }
}

.pager {
  display: flex; justify-content: space-between; gap: 24px;
  margin-top: clamp(40px, 7vw, 96px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.pager a { display: flex; flex-direction: column; gap: 2px; max-width: 48%; }
.pager a:last-child { text-align: right; align-items: flex-end; }
.pager small { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.pager span { font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 300; letter-spacing: -0.01em; transition: color 0.3s; }
.pager a:hover span { color: var(--holo-ink); }

/* ---------- Piede ---------- */
.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px;
  padding: 16px var(--pad) calc(16px + env(safe-area-inset-bottom));
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2);
  /* luce radente alla base della parete */
  background: linear-gradient(0deg, rgba(255, 240, 210, 0.75), rgba(255, 240, 210, 0));
}

/* ---------- Catalogo ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 50;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  color: #efe6d6;
  background: radial-gradient(70% 62% at 50% 46%, #54422e 0%, #261d14 58%, #130e09 100%);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.viewer[hidden] { display: none; }
.viewer.open { opacity: 1; }
.v-top, .v-bot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--pad);
}
.v-top { padding-top: calc(14px + env(safe-area-inset-top)); }
.v-bot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.v-logo { height: 26px; width: auto; max-width: 46vw; object-fit: contain; object-position: left center; filter: brightness(0) invert(0.93) sepia(0.2); }
.v-actions { display: flex; align-items: center; gap: clamp(10px, 2vw, 26px); }
.v-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer;
  font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #d8ccb8;
  padding: 12px 4px; min-height: 44px;
  transition: color 0.3s;
}
.v-btn svg { width: 20px; height: 20px; flex: none; }
.v-btn:hover { color: #fff8ea; }
.v-btn:disabled { opacity: 0.28; cursor: default; }
.v-btn:focus-visible, .viewer :focus-visible { outline-color: var(--holo); }
.v-site span { border-bottom: 1px solid rgba(216, 204, 184, 0.4); padding-bottom: 2px; }

.v-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 4px clamp(8px, 3vw, 40px); overflow: hidden; }
.v-meter { display: flex; align-items: center; gap: 16px; flex: 1; max-width: 420px; margin: 0 auto; }
.v-count { font-size: 12.5px; letter-spacing: 0.14em; font-variant-numeric: tabular-nums; color: #d8ccb8; white-space: nowrap; }
.v-bar { flex: 1; height: 1px; background: rgba(239, 230, 214, 0.22); position: relative; }
.v-bar i { position: absolute; left: 0; top: -0.5px; height: 2px; width: 100%; background: #efe6d6; transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 0.7s var(--ease); }

.book {
  position: relative;
  perspective: 2600px;
  transition: translate 0.9s var(--ease), opacity 0.6s, scale 0.9s var(--ease);
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  cursor: grab;
  opacity: 0; scale: 0.965;
}
.viewer.open .book { opacity: 1; scale: 1; }
.book.dragging { cursor: grabbing; }
.book.double.at-start { translate: -25% 0; }
.book.double.at-end { translate: 25% 0; }
/* ombra del libro sul piano */
.book::before {
  content: ''; position: absolute; left: 4%; right: 4%; bottom: -3.5%; height: 9%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent);
  filter: blur(6px); z-index: 0;
  transition: left 0.9s var(--ease), right 0.9s var(--ease);
}
.book.double.at-start::before { left: 52%; }
.book.double.at-end::before { right: 52%; }

.leaf {
  position: absolute; top: 0; height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--dur, 0.95s) cubic-bezier(0.3, 0.05, 0.2, 1);
  will-change: transform;
}
.book.double .leaf { left: 50%; width: 50%; transform-origin: 0 50%; }
.book.single .leaf { left: 0; width: 100%; transform-origin: 0 50%; }
.leaf.flipped { transform: rotateY(-180deg); }
.book.single .leaf.flipped { transform: rotateY(-108deg); visibility: hidden; transition: transform var(--dur, 0.8s) cubic-bezier(0.3, 0.05, 0.2, 1), visibility 0s linear var(--dur, 0.8s); }
.leaf.no-anim { transition: none !important; }

.face {
  position: absolute; inset: 0;
  overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--paper);
  color: var(--ink);
}
.face.back { transform: rotateY(180deg); }
/* piega al dorso + luce che cambia mentre la pagina gira */
.face::before {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, rgba(40, 26, 10, 0.3), rgba(40, 26, 10, 0.07) 5%, rgba(40, 26, 10, 0) 14%, rgba(255, 255, 255, 0) 80%, rgba(255, 255, 255, 0.1) 100%);
}
.face.back::before { transform: scaleX(-1); }
.book.single .face::before { background: linear-gradient(90deg, rgba(40, 26, 10, 0.16), rgba(40, 26, 10, 0) 7%); }
.face::after {
  content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(90deg, rgba(20, 12, 4, 0.75), rgba(20, 12, 4, 0.35));
  opacity: var(--shade, 0);
}
.face.back::after { background: linear-gradient(270deg, rgba(20, 12, 4, 0.75), rgba(20, 12, 4, 0.35)); }
.leaf.turning .face::after { animation: shade var(--dur, 0.95s) cubic-bezier(0.3, 0.05, 0.2, 1); }
@keyframes shade { 0%, 100% { opacity: 0; } 50% { opacity: 0.42; } }
/* spessore della carta */
.book.double .leaf:not(.flipped) .face.front { box-shadow: 1px 0 0 #d9d0bf, 2px 0 0 #f1eadc, 3px 0 0 #cfc5b2; }
.book.double .leaf.flipped .face.back { box-shadow: -1px 0 0 #d9d0bf, -2px 0 0 #f1eadc, -3px 0 0 #cfc5b2; }

/* --- pagine: unità = 1% dell'altezza del libro (font-size impostato da JS) --- */
.pg { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; font-size: 1em; }
.pg-art { position: relative; overflow: hidden; background: #e9e1d2; min-height: 0; }
.pg-art img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0; transition: opacity 0.6s ease;
}
.pg-art img.ready { opacity: 1; }
.pg-art.half img { width: 200%; max-width: none; }
.pg-art.half.r img { left: -100%; }
.pg-foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: 2em;
  padding: 2.1em 3.4em 2.3em;
  font-size: 1.62em; line-height: 1.3;
  min-height: 4.2em;
}
.pg-cap { letter-spacing: 0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-cap b { font-weight: 500; }
.pg-cap i { font-style: normal; color: var(--ink-2); }
.pg-brand { letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.82em; color: var(--ink-2); white-space: nowrap; }
.pg-folio { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; color: var(--ink-2); margin-left: auto; }
.pg.is-l .pg-foot { flex-direction: row-reverse; }
.pg.is-l .pg-folio { margin-left: 0; margin-right: auto; }

.pg.framed { grid-template-rows: minmax(0, 1fr) auto; }
.pg.framed .pg-art { background: transparent; margin: 9em 0 0; }
.pg.framed .pg-art img { object-fit: contain; object-position: center 30%; }
.pg.framed.tall .pg-art { margin: 7em 7em 0; }

.pg.cover, .pg.back, .pg.note {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background:
    radial-gradient(90% 60% at 50% 38%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 70%),
    #e9dfcd;
}
.pg.cover::before { content: ''; position: absolute; inset: 4.2em; border: 1px solid rgba(42, 34, 25, 0.22); }
.pg-logo { width: 46%; max-height: 22%; object-fit: contain; filter: brightness(0); opacity: 0.88; }
.pg-sub { margin-top: 2.2em; font-size: 1.7em; letter-spacing: 0.06em; color: var(--ink-2); }
.pg-sel { position: absolute; left: 0; right: 0; bottom: 8.5em; font-size: 1.5em; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-2); }
.pg-sel .mark { width: 5.6em; margin: 0 auto 1.1em; background: var(--ink); opacity: 0.8; }
.pg.back .mark, .pg.note .mark { width: 34%; background: var(--ink); opacity: 0.85; }
.pg-more { margin-top: 3.6em; font-size: 1.75em; line-height: 1.55; color: var(--ink-2); max-width: 74%; }
.pg-more a { color: var(--ink); border-bottom: 1px solid var(--line); pointer-events: auto; }
.pg.note .pg-logo { width: 38%; }
.pg-soon { margin-top: 3.4em; font-size: 1.5em; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-2); }
.v-brand { display: flex; align-items: center; min-width: 0; }

/* ---------- Schermi stretti ---------- */
@media (max-width: 820px), (max-height: 520px) {
  .hub { place-items: start center; padding-top: 4px; }
  .orbit { width: 100%; height: auto; margin: 0; max-width: 560px; }
  .rings-wrap { display: none; }
  .ticks { display: none; }
  .hub-center { position: relative; left: auto; top: auto; transform: none; width: min(62vw, 250px); margin: clamp(22px, 7vh, 60px) auto clamp(26px, 6vh, 48px); }
  .hub-center::before { width: 230%; }
  .hub-status { font-size: 12px; margin-top: 14px; }
  .nodes { display: block; border-top: 1px solid var(--line); }
  .node {
    position: relative; left: auto !important; top: auto !important; transform: none;
    flex-direction: row; align-items: center; gap: 16px;
    width: auto; text-align: left;
    padding: 11px 2px;
    border-bottom: 1px solid var(--line);
    min-height: 60px;
  }
  .node-ic { width: 54px; height: 54px; flex: none; box-shadow: none; background: var(--node-wash); color: var(--deep); }
  .node-ic::before { display: none; }
  .node-ic svg { width: 32px; height: 32px; }
  .node-name { font-size: 15px; letter-spacing: 0.08em; flex: 1; font-weight: 400; }
  .node-n { opacity: 1; transform: none; font-size: 13px; }
  .node:active { background: rgba(255, 250, 240, 0.5); }
  .node:hover .node-ic, .node:focus-visible .node-ic { transform: none; box-shadow: none; background: var(--node-wash); }

  .cat { --k: 0.74; padding-bottom: 48px; }
  .cat-head { grid-template-columns: 1fr; row-gap: 10px; }
  .cat-count { grid-column: 1; margin-top: 8px; }
  .wall { grid-template-columns: repeat(2, 1fr); }
  .wall[data-few] { --k: 1; grid-template-columns: 1fr; }
  .logo-btn { min-height: 116px; padding: 12px; }
  .top-link span { display: none; }
  .v-btn span.lbl { display: none; }
  .v-site { display: none; }
  .v-logo { height: 20px; }
  .foot { font-size: 11px; }
}
@media (max-width: 380px) { .cat { --k: 0.64; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .ticks i { animation: none; }
}

/* ---------- Passaggi tra le viste ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.45s; animation-timing-function: ease; }
::view-transition-group(holoe-mark), ::view-transition-group(cat-title) { animation-duration: 0.8s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
::view-transition-old(cat-title), ::view-transition-new(cat-title) { height: 100%; width: auto; }

/* ---------- Schede prodotto, pagina brand, richiesta ---------- */
.top-quote { background: none; border: 0; cursor: pointer; margin-left: auto; margin-right: 22px; }
.top-quote b { font-weight: 400; font-size: 11px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--deep); color: var(--ground-hi); letter-spacing: 0; }
.top-quote[hidden] { display: none; }
.top-nav ~ span { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 17px 30px; border: 1px solid var(--deep); border-radius: 2px;
  background: transparent; color: var(--deep); cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { background: color-mix(in oklch, var(--deep) 8%, transparent); }
.btn.primary { background: var(--deep); color: var(--ground-hi); }
.btn.primary:hover { background: color-mix(in oklch, var(--deep) 84%, black); }
.btn:disabled { opacity: 0.5; cursor: default; }

.pp, .bp { width: 100%; max-width: 1380px; margin: 0 auto; padding: 0 var(--pad) 96px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); padding: 8px 0 clamp(20px, 3.5vw, 44px); }
.crumbs a:hover { color: var(--ink); }
.crumbs span { opacity: 0.5; }
.crumbs [aria-current] { color: var(--ink); opacity: 1; }

.pp-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 84px); align-items: start; }
.pp-gallery { position: sticky; top: 24px; }
.pp-main { margin: 0; background: color-mix(in oklch, var(--wash) 70%, white); border-radius: 2px; display: grid; place-items: center; min-height: 320px; }
.pp-main img { width: 100%; height: auto; max-height: 78vh; object-fit: contain; }
.pp-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pp-thumb { width: 72px; height: 72px; padding: 0; border: 1px solid var(--line); background: var(--wash); cursor: pointer; opacity: 0.7; transition: opacity 0.3s, border-color 0.3s; }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pp-thumb:hover, .pp-thumb[aria-current] { opacity: 1; }
.pp-thumb[aria-current] { border-color: var(--deep); }

.pp-brand { display: inline-block; margin-bottom: clamp(18px, 3vw, 34px); }
.pp-brand img { width: calc(var(--lw) * 1px); height: auto; max-width: 160px; }
.pp-type { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--deep); margin-bottom: 8px; }
.pp-info h1 { font-weight: 300; font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: 1.02; letter-spacing: -0.02em; }
.pp-by { margin-top: 12px; font-size: 15px; letter-spacing: 0.04em; color: var(--ink-2); }
.pp-descr { margin-top: clamp(18px, 2.4vw, 30px); font-size: 17px; line-height: 1.65; font-weight: 300; max-width: 52ch; color: var(--ink); }
.pp-price { margin-top: clamp(24px, 3vw, 40px); padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.pp-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.sec-h { font-weight: 300; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; margin: clamp(48px, 7vw, 96px) 0 clamp(16px, 2.4vw, 28px); }
.sec-h.sm { font-size: 1.15rem; margin: 40px 0 12px; }
.pp-specs-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 28px clamp(28px, 5vw, 80px); align-items: start; }
.pp-specs h3 { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 400; color: var(--deep); margin: 0 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--deep); }
.pp-specs dl { margin: 0; }
.pp-specs dl > div { display: grid; grid-template-columns: minmax(150px, 0.6fr) 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pp-specs dt { font-size: 13px; letter-spacing: 0.04em; color: var(--ink-2); }
.pp-specs dd { margin: 0; font-size: 16px; line-height: 1.5; }
.pp-note { margin-top: 18px; font-size: 14px; color: var(--ink-2); font-style: italic; max-width: 70ch; }
.pp-docs ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.pp-docs a { border-bottom: 1px solid var(--line); padding-bottom: 2px; font-size: 15px; }
.pp-docs a:hover { border-color: var(--deep); }
.pp-small { margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.pp-small a { border-bottom: 1px solid var(--line); }

.bp-head { padding: clamp(10px, 2vw, 30px) 0 0; }
.bp-logo { margin: 0; }
.bp-logo img { width: calc(var(--lw) * 1.5px); max-width: 78vw; height: auto; }
.bp-sub { margin-top: 10px; font-size: 14px; letter-spacing: 0.1em; color: var(--ink-2); }

.pgrid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: clamp(22px, 3vw, 44px) clamp(16px, 2.4vw, 32px); }
.pcard { display: flex; flex-direction: column; gap: 4px; }
.pcard-img { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: color-mix(in oklch, var(--wash) 70%, white); margin-bottom: 10px; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.pcard-type { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--deep); }
.pcard-name { font-size: 1.35rem; font-weight: 300; letter-spacing: -0.01em; }
.pcard-by { font-size: 13px; color: var(--ink-2); }
@media (hover: hover) { .pcard:hover .pcard-img img { transform: scale(1.04); } }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.7s var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

/* Richiesta di preventivo */
.quote { position: fixed; inset: 0; z-index: 60; background: rgba(40, 30, 20, 0); display: flex; justify-content: flex-end; transition: background-color 0.4s; }
.quote[hidden] { display: none; }
.quote.open { background: rgba(40, 30, 20, 0.32); }
.q-panel { width: min(520px, 100%); height: 100%; overflow-y: auto; background: var(--ground-hi); padding: 26px clamp(20px, 4vw, 40px) 40px; transform: translateX(24px); opacity: 0; transition: transform 0.5s var(--ease), opacity 0.4s; }
.quote.open .q-panel { transform: none; opacity: 1; }
.q-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.q-head h2 { font-weight: 300; font-size: 1.7rem; letter-spacing: -0.01em; }
.q-x { background: none; border: 0; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink-2); }
.q-x svg { width: 22px; height: 22px; }
.q-items { list-style: none; padding: 0; margin: 0 0 22px; border-top: 1px solid var(--line); }
.q-items li { display: grid; grid-template-columns: 56px 1fr 32px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.q-items img { width: 56px; height: 56px; object-fit: cover; }
.q-items b { display: block; font-weight: 400; font-size: 16px; }
.q-items small { color: var(--ink-2); font-size: 13px; }
.q-rm { background: none; border: 0; cursor: pointer; font-size: 22px; line-height: 1; color: var(--ink-2); }
.q-rm:hover { color: var(--ink); }
#q-form { display: grid; gap: 14px; }
#q-form label { display: grid; gap: 6px; font-size: 13px; letter-spacing: 0.04em; color: var(--ink-2); }
#q-form small { opacity: 0.7; }
#q-form input:not([type=checkbox]), #q-form select, #q-form textarea { font: inherit; font-size: 16px; color: var(--ink); padding: 12px 14px; border: 1px solid var(--line); border-radius: 2px; background: #fff; width: 100%; }
#q-form input:focus, #q-form select:focus, #q-form textarea:focus { outline: 1.5px solid var(--holo-ink); outline-offset: 1px; }
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.q-hp { position: absolute; left: -9999px; }
.q-check { display: flex !important; align-items: flex-start; gap: 10px; }
.q-check input { margin-top: 3px; }
.q-status { min-height: 1.4em; font-size: 14px; color: var(--ink-2); }
.q-status a { text-decoration: underline; }
.q-empty, .q-done p { color: var(--ink-2); margin-bottom: 20px; }
.q-done h2 { font-weight: 300; font-size: 1.6rem; margin-bottom: 10px; }

@media (max-width: 900px) {
  .pp-grid { grid-template-columns: 1fr; }
  .pp-gallery { position: static; }
  .q-grid { grid-template-columns: 1fr; }
  .pp-cta { position: sticky; bottom: 0; z-index: 5; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--ground-hi) 70%, transparent); }
  .pp-cta .btn { flex: 1 1 150px; padding: 16px 14px; }
  .top-quote span:not(#top-quote-n) { display: none; }
}

/* Segnaposto per le schede di esempio */
.ph { display: grid; place-content: center; justify-items: center; gap: 14px; width: 100%; height: 100%; min-height: 160px; background: linear-gradient(160deg, color-mix(in oklch, var(--wash) 80%, white), color-mix(in oklch, var(--wash) 100%, var(--deep) 6%)); }
.ph img { width: min(55%, 160px); height: auto; opacity: 0.35; filter: brightness(0); }
.ph small { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); opacity: 0.8; }
.ph.big { min-height: clamp(320px, 52vw, 640px); }
.pcard-img { position: relative; }
.demo-tag { position: absolute; left: 10px; top: 10px; font-style: normal; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; padding: 5px 9px; background: rgba(255, 255, 255, 0.85); color: var(--ink-2); }
.pp-demo { display: inline-block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; padding: 7px 12px; margin-bottom: 14px; border: 1px dashed var(--deep); color: var(--deep); }
.q-ph { display: block; width: 56px; height: 56px; background: color-mix(in oklch, var(--wash) 80%, white); border: 1px solid var(--line); }

/* Pagina brand: «Vedi tutti» */
.bp-more { margin-top: clamp(24px, 3vw, 40px); }
.bp-rest { margin-top: clamp(24px, 3vw, 40px); }
.bp-rest[hidden] { display: none; }

/* ---------- Menu in alto a sinistra, piede, ombra e luce del logo ---------- */
.top-nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 28px); }
.top-nav a, .top-nav button, .foot-nav a, .foot-nav button {
  position: relative; background: none; border: 0; cursor: pointer; font: inherit; color: inherit;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; padding: 8px 0;
}
.top-nav { color: var(--ink-2); }
.top-nav a::after, .top-nav button::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--deep);
  transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease);
}
.top-nav a:hover, .top-nav button:hover, .top-nav [aria-current] { color: var(--ink); }
.top-nav a:hover::after, .top-nav button:hover::after, .top-nav [aria-current]::after { transform: scaleX(1); }
.top-quote { margin-left: auto; }
.foot { align-items: center; }
.foot-id { display: inline-flex; align-items: center; gap: 10px; }
.tri { width: 30px; height: 16px; display: inline-block; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot-nav a:hover, .foot-nav button:hover { color: var(--ink); }

.hub { flex-direction: column; display: flex; align-items: center; justify-content: center; position: relative; }
.orbit { margin: 32px 0 92px; }
.hub-ask { position: relative; text-align: center; padding: 0 0 6px; }
.hub-ask-h { margin: 0; font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 400; color: var(--ink); }
.hub-ask-p { margin: 6px 0 14px; color: var(--ink-2); font-size: 15px; }
.hub-ask .btn { border-radius: 99px; padding: 14px 28px; box-shadow: 0 10px 22px -10px rgba(74, 53, 32, 0.6); }

.hub-logo {
  --sx: 5px; --sy: 7px;
  filter: drop-shadow(var(--sx) var(--sy) 3px rgba(74, 53, 32, 0.34)) drop-shadow(calc(var(--sx) * 2.6) calc(var(--sy) * 2.6) 20px rgba(74, 53, 32, 0.2));
  transition: filter 0.25s linear;
}
.hub-light {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(260px circle at var(--lx, 50%) var(--ly, 50%), rgba(255, 249, 226, 0.7), rgba(255, 244, 214, 0) 70%);
}
.hub.lit .hub-light { opacity: 1; }

/* ---------- Richiesta fuori catalogo ---------- */
.ask { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(60, 45, 30, 0); backdrop-filter: blur(0); overflow-y: auto; transition: background-color 0.4s, backdrop-filter 0.4s; }
.ask[hidden] { display: none; }
.ask.open { background: rgba(60, 45, 30, 0.3); backdrop-filter: blur(6px); }
.ask-p { position: relative; width: min(720px, 100%); max-height: calc(100svh - 32px); overflow-y: auto; background: #fffaf3; border-radius: 22px; padding: 34px clamp(20px, 4vw, 40px) 28px; box-shadow: 0 30px 80px -20px rgba(74, 53, 32, 0.45); opacity: 0; transform: translateY(14px); transition: opacity 0.4s, transform 0.5s var(--ease); }
.ask.open .ask-p { opacity: 1; transform: none; }
.ask-x { position: absolute; right: 14px; top: 14px; }
.ask-p h2 { margin: 0 0 6px; font-weight: 400; font-size: 1.7rem; letter-spacing: -0.01em; }
.ask-lead { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; }
.ask-g { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-bottom: 16px; }
.ask-g .w { grid-column: 1 / -1; }
.ask-g label, .ask-g legend { display: flex; flex-direction: column; gap: 6px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.ask-g legend { padding: 0; margin-bottom: 8px; display: block; }
.ask-g fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ask-g small { letter-spacing: 0.04em; text-transform: none; font-size: 12px; color: #8a7a66; }
.ask-g input:not([type=checkbox]):not([type=radio]), .ask-g textarea, .ask-g select { font: inherit; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); background: #fff; border: 1px solid rgba(42, 34, 25, 0.2); border-radius: 10px; padding: 11px 13px; width: 100%; }
.ask-g textarea { resize: vertical; min-height: 84px; }
.ask-g input:focus-visible, .ask-g textarea:focus-visible, .ask-g select:focus-visible { outline: 1.5px solid var(--holo-ink); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex !important; flex-direction: row !important; letter-spacing: 0 !important; text-transform: none !important; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { font-size: 13px; padding: 9px 14px; border-radius: 99px; border: 1px solid rgba(42, 34, 25, 0.2); background: #fff; color: var(--ink-2); transition: background-color 0.25s, border-color 0.25s; }
.chip input:checked + span { background: #ffe3d6; border-color: #e9a889; color: #5a2e17; }
.chip input:focus-visible + span { outline: 1.5px solid var(--holo-ink); outline-offset: 3px; }
.ask-f { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; }
.ask-f small { font-size: 12.5px; color: #8a7a66; line-height: 1.4; }
.ask-f .btn { border-radius: 99px; flex: none; }
.ask .q-check { margin-top: 4px; font-size: 14px; color: var(--ink-2); }

/* ---------- Elenco brand ---------- */
.bi { width: min(1100px, 100%); margin: 0 auto; padding: 8px var(--pad) 56px; }
.bi-h { font-weight: 300; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.01em; margin: 18px 0 4px; }
.bi-n { margin: 0 0 24px; color: var(--ink-2); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; }
.bi-list { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 32px; }
.bi-list li { break-inside: avoid; }
.bi-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); transition: padding-left 0.35s var(--ease); }
.bi-item:hover { padding-left: 8px; }
.bi-name { font-size: 1.1rem; }
.bi-cats { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }

@media (max-width: 820px), (max-height: 520px) {
  .top-nav { display: none; }
  .hub { display: block; }
  .orbit { margin: 0 auto; }
  .hub-ask { padding: 28px 0 8px; }
  .hub-light { display: none; }
  .foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  .foot-nav { gap: 2px 18px; }
  .ask-g { grid-template-columns: 1fr; }
  .ask-f { flex-direction: column-reverse; align-items: stretch; }
  .ask-f .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .hub-logo { transition: none; } }
