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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: #ffffff;
  color: #000000;
  font-family: "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

img {
  max-width: 100%;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.hero {
  position: relative;
  height: clamp(420px, 72vh, 760px);
  background: #ffffff;
}
.hero #stage {
  position: absolute;
  inset: 0;
}
.hero #stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}
.hero .tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.product {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 28px;
  padding-block: 56px 24px;
  border-top: 1px solid #000000;
}
.product h1 {
  grid-column: 1/-1;
  margin: 0;
  font-size: clamp(48px, 11vw, 148px);
  line-height: 0.82;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.product .sub, .product .years {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.product .sub {
  grid-column: 1/7;
}
.product .years {
  grid-column: 7/-1;
  text-align: right;
}
@media (max-width: 760px) {
  .product {
    grid-template-columns: 1fr;
    padding-block: 36px 16px;
  }
  .product .sub, .product .years {
    grid-column: 1/-1;
  }
  .product .years {
    text-align: left;
  }
}

.desc {
  grid-column: 5/12;
  min-width: 0;
  max-width: 62ch;
}
.desc p {
  margin: 0 0 1em;
}
.desc .lead {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 500;
}
@media (max-width: 760px) {
  .desc {
    grid-column: 1/-1;
  }
}

.specs {
  grid-column: 1/5;
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  row-gap: 6px;
  align-content: start;
  font-size: 13px;
}
.specs dt {
  color: #5c5f5b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  padding-top: 2px;
}
.specs dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .specs {
    grid-column: 1/-1;
  }
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-block: 40px;
}
.gallery figure {
  margin: 0;
  min-width: 0;
}
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 296/410;
  object-fit: cover;
  background: #f2f3f1;
  outline: 1px solid #e3e5e1;
  outline-offset: -1px;
}
.gallery figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: #5c5f5b;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .gallery {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  border: 0;
  border-radius: 0;
  background: #000000;
  color: #ffffff;
  text-decoration: none;
  font: 700 18px "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.btn:hover {
  background: #262826;
}
.btn:focus-visible {
  outline: 3px solid #c9e2c3;
  outline-offset: 3px;
}
.btn .p {
  font-weight: 500;
  opacity: 0.75;
}

.buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 40px 72px;
  border-top: 1px solid #000000;
}
.buy .price {
  font-size: clamp(56px, 9vw, 112px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.buy .meta {
  margin-top: 8px;
  font-size: 13px;
  color: #5c5f5b;
}
.buy #msg {
  flex-basis: 100%;
  margin: 0;
  font-size: 13px;
  color: #5c5f5b;
}

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  border-top: 1px solid #000000;
  transform: translateY(110%);
  transition: transform 0.35s ease;
}
.bar.show {
  transform: none;
}
.bar .t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.bar .t span {
  font-weight: 400;
  color: #5c5f5b;
}
.bar .btn {
  flex: none;
  padding: 12px 22px;
  font-size: 15px;
}
@media (prefers-reduced-motion: reduce) {
  .bar {
    transition: none;
  }
}
@media (max-width: 760px) {
  .bar .t span {
    display: none;
  }
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 20px 90px;
  border-top: 1px solid #e3e5e1;
  font-size: 12px;
  color: #5c5f5b;
}

/* WYSIWYG ACF: il lead arriva come <div class="lead"><p>…</p></div> */
.desc .lead p {
  margin: 0 0 1em;
}

/* ==========================================================================
   HEADER del sito (stesso stile/animazione di css/main.css del tema)
   ========================================================================== */
.header {
  position: relative;
  z-index: 30;
  mix-blend-mode: difference;
  font-weight: 300;
}
.header a {
  color: #fff;
  text-decoration: none;
}
body.page .header a {
  color: #777;
}
.header h1 {
  margin: 0;
}
.header ul {
  margin: 0;
  padding: 0;
}
.header li {
  list-style: none;
}
.header .logo {
  position: fixed;
  left: 40px;
  top: 40px;
  z-index: 9;
  display: block;
}
.header .logo h1 {
  font-weight: 500;
  font-size: 26px;
  line-height: 32px;
  letter-spacing: 1px;
}

/* Animazione logo: "rancesco ortese" si chiude quando scrolli in giù */
.logo {
  display: inline-block;
  width: auto;
}
.logo span {
  display: inline-block;
  margin-bottom: -7px;
}
.logo span:nth-child(3) {
  margin-left: -3px;
}
.logo .words {
  width: 125px;
  display: inline-block;
  overflow: hidden;
  opacity: 1;
  transition: 700ms cubic-bezier(0.52, 0.005, 0, 0.995);
}
body.scroll-down .logo .words {
  width: 0;
}

.navigation {
  position: fixed;
  right: 40px;
  top: 40px;
  display: flex;
  font-size: 22px;
  line-height: 26px;
}
.navigation li {
  margin-left: 50px;
  text-transform: uppercase;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 1px;
}

@media only screen and (max-width: 667px) {
  .header .logo {
    top: 15px;
    left: 20px;
  }
  .header .logo h1 {
    width: 250px;
    font-size: 22px;
  }
  .logo span {
    margin-bottom: -8px;
  }
  .logo .words {
    width: 105px;
  }
  .navigation {
    top: 20px;
    right: 16px;
    flex-direction: column;
  }
  .navigation li {
    text-align: right;
    margin-left: 0;
    font-size: 16px;
    line-height: 28px;
  }
}

/* ==========================================================================
   ZOOM-GALLERY — zoom allo scroll (solo mobile, attivato da js/main.js con .is-zoom)
   In standby: queste regole agiscono solo se ZOOM_GALLERY = true in js/main.js
   ========================================================================== */
.gallery_stage {
  display: contents; /* desktop: le figure restano nella griglia */
}
@media (max-width: 760px) {
  .gallery.is-zoom {
    display: block;
    position: relative;
    padding-block: 0;
    height: calc((var(--n, 1) + 1) * 100svh); /* una "pagina" di scroll per ogni foto + lo schermo bloccato */
  }
  .gallery.is-zoom .gallery_stage {
    display: block;
    position: sticky;
    top: 0;
    height: 100svh;
    width: 100vw;
    margin-left: calc(50% - 50vw); /* a tutta larghezza, oltre il padding di .wrap */
    overflow: hidden;
  }
  .gallery.is-zoom figure {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform-origin: 50% 50%;
    will-change: transform, opacity;
  }
  .gallery.is-zoom img {
    outline: 0;
  }
  .gallery.is-zoom figcaption {
    padding-inline: 16px;
  }
}
