/* Gianni Molaro · pagina di attesa · stile */

@font-face {
  font-family: "Copasetic NF";
  src: url("../fonts/CopaseticNF.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Jost;
  src: url("../fonts/Jost.woff2") format("woff2");
  font-weight: 300 400;
  font-display: swap;
}

:root {
  --ivory: #F2E9DC;
  --marble: #C9A58F;
  --gold: #B89B5E;
  --ink: #1A1714;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur: 800ms;
  --header: 72px;
  --gutter: clamp(24px, 4vw, 56px);
  --bottom: clamp(32px, 7vh, 72px);
}

* { box-sizing: border-box; }
html { background: var(--ink); color: #fff; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 300 16px/1.55 Jost, system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; }
a { color: inherit; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.display {
  font-family: "Copasetic NF", Jost, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.1;
}

/* Header: solo il logo, su gradiente alto */
.top {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.top::before {
  content: "";
  position: absolute;
  inset: 0 0 -96px;
  background: linear-gradient(rgb(26 23 20 / .5), rgb(26 23 20 / 0));
  pointer-events: none;
}
.brand { position: relative; width: 280px; color: #fff; }
.brand__logo { width: 100%; height: auto; }

/* Hero: il velo */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--marble);
}
.hero__media, .hero__media picture, .hero__media img, .hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
.hero__media img { transform-origin: 50% 45%; }
.hero__video {
  opacity: 0;
  transition: opacity 1000ms var(--ease);
}
.hero__video.is-ready { opacity: 1; }
.hero::after, .velo__sticky::after, .look::after, .close__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(rgb(26 23 20 / 0), rgb(26 23 20 / .62));
  pointer-events: none;
  z-index: 1;
}
.hero__text {
  position: absolute;
  right: var(--gutter);
  bottom: var(--bottom);
  z-index: 2;
  text-align: right;
}
.hero__line {
  font-size: clamp(21px, 2.1vw, 30px);
  letter-spacing: .08em;
  text-shadow: 0 1px 24px rgb(26 23 20 / .35);
}
.hero__handle {
  display: inline-block;
  margin-top: 6px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .02em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.hero__handle:hover, .hero__handle:focus-visible { text-decoration-color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }

/* Lungo il velo: la stessa foto, dal volto all'orlo */
.velo {
  position: relative;
  height: 240svh;
  background: var(--marble);
}
.velo__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
.velo__sticky picture, .velo__img, .velo__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% calc(var(--p, 30) * 1%);
  transform: scale(var(--z, 1));
  transform-origin: 50% calc(var(--p, 30) * 1%);
  will-change: transform, object-position;
}
.velo__video { opacity: 0; transition: opacity 1000ms var(--ease); }
.velo__video.is-ready { opacity: 1; }
.velo__record {
  position: absolute;
  left: var(--gutter);
  bottom: var(--bottom);
  z-index: 2;
}
.record__figure {
  font-size: clamp(44px, 6.4vw, 92px);
  color: var(--gold);
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 30px rgb(26 23 20 / .4);
}
.record__text {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Schermate piene della campagna */
.look {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--ivory);
}
.look picture, .look img, .close__media picture, .close__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.look--pizzo img { object-position: 50% 12%; }
.look--fiocco img { object-position: 50% 8%; }
.look--intera img { object-position: 50% 50%; }
.close__media img { object-position: 50% 26%; }
.look__caption {
  position: absolute;
  left: var(--gutter);
  bottom: var(--bottom);
  z-index: 2;
}
.look__model {
  display: block;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .85;
}
.look__name {
  display: block;
  margin-top: 6px;
  font-size: clamp(24px, 2.6vw, 38px);
}

/* Abito intero: su desktop la figura si vede tutta, centrata sul campo colorato */
@media (min-width: 1024px) {
  .look--intera { background: linear-gradient(100deg, var(--ivory) 0%, #E6D7C4 100%); }
  .look--chiffon { background: linear-gradient(100deg, #231D19 0%, var(--ink) 100%); }
  .look--intera::after { display: none; }
  .look--intera img { object-fit: contain; object-position: 50% 50%; }
}

/* Chiusura: Dolly, il monogramma, i contatti */
.close {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
  background: var(--ink);
}
.close__media { position: relative; min-height: 100svh; overflow: hidden; }
.close__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(64px, 10vh, 120px) clamp(24px, 5vw, 72px);
}
.monogram {
  position: relative;
  width: clamp(200px, 22vw, 300px);
  aspect-ratio: 76 / 80;
}
.monogram__svg { width: 100%; height: 100%; fill: var(--gold); }
.monogram canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.monogram.is-3d .monogram__svg { visibility: hidden; }
.close__line {
  margin: 40px 0 28px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.6;
}
.contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px clamp(40px, 5vw, 80px);
  margin-bottom: 28px;
}
.contact { min-width: 220px; }
.contact__title { font-size: 13px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.contact__row { font-size: 16px; line-height: 1.7; }
.contact__row a { text-decoration: none; border-bottom: 1px solid rgb(255 255 255 / .35); transition: border-color 200ms var(--ease), color 200ms var(--ease); }
.contact__row a:hover, .contact__row a:focus-visible, .contact__mail a:hover, .contact__mail a:focus-visible { color: var(--gold); border-color: var(--gold); }
.contact__note { font-size: 13px; opacity: .7; margin-top: 6px; }
.contact__mail { margin-bottom: 32px; font-size: 16px; }
.contact__mail a { text-decoration: none; border-bottom: 1px solid rgb(255 255 255 / .35); transition: border-color 200ms var(--ease), color 200ms var(--ease); }
.close__links { display: flex; gap: 40px; }
.close__links a, .foot__links a {
  display: inline-block;
  padding: 14px 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgb(255 255 255 / .55);
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.close__links a:hover, .foot__links a:hover, .close__links a:focus-visible, .foot__links a:focus-visible { color: var(--gold); border-color: var(--gold); }

/* Footer */
.foot {
  padding: 48px clamp(24px, 5vw, 72px) 40px;
  border-top: 1px solid rgb(255 255 255 / .1);
  background: var(--ink);
  color: rgb(255 255 255 / .78);
}
.foot__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
}
.foot__logo { width: 170px; height: auto; color: #fff; }
.foot__places { font-size: 14px; letter-spacing: .02em; }
.foot__links { display: flex; gap: 32px; }
.foot__links a { padding: 10px 0; color: #fff; }
.foot__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / .1);
}
.copy { font-size: 13px; }

/* Rivelazioni e movimento: solo con JavaScript e senza movimento ridotto */
@media (prefers-reduced-motion: no-preference) {
  html.js .hero__media img { animation: kenburns 22s var(--ease) forwards; }
  html.js .look img, html.js .close__media img { transform: scale(1.06); transition: transform 1400ms var(--ease), opacity 900ms var(--ease); }
  html.js .look:not(.is-in) img, html.js .close:not(.is-in) .close__media img { opacity: 0; }
  html.js .look.is-in img, html.js .close.is-in .close__media img { transform: none; opacity: 1; }
  html.js .look__caption, html.js .velo__record, html.js .gianni__text > *, html.js .close__panel > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  }
  html.js .is-in .look__caption, html.js .velo__record.is-in, html.js .gianni.is-in .gianni__text > *, html.js .close.is-in .close__panel > * {
    opacity: 1;
    transform: none;
  }
  html.js .is-in .look__caption { transition-delay: 350ms; }
  html.js .gianni.is-in .gianni__text > :nth-child(2) { transition-delay: 90ms; }
  html.js .gianni.is-in .gianni__text > :nth-child(3) { transition-delay: 180ms; }
  html.js .gianni.is-in .gianni__text > :nth-child(4) { transition-delay: 300ms; }
  html.js .gianni.is-in .gianni__text > :nth-child(5) { transition-delay: 380ms; }
  html.js .close.is-in .close__panel > :nth-child(2) { transition-delay: 120ms; }
  html.js .close.is-in .close__panel > :nth-child(3) { transition-delay: 220ms; }
  html.js .close.is-in .close__panel > :nth-child(4) { transition-delay: 320ms; }
  html.js .close.is-in .close__panel > :nth-child(5) { transition-delay: 400ms; }
}
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .velo__sticky { --p: 30 !important; --z: 1 !important; }
  .hero__video, .velo__video { display: none; }
}

/* Telefono e schermi stretti */
@media (max-aspect-ratio: 3/4) {
  .velo__sticky { --z: 1.5; }
}
@media (max-width: 900px) {
  :root { --header: 64px; }
  .brand { width: 190px; }
  .hero__text { left: var(--gutter); right: var(--gutter); text-align: center; }
  .hero__line { font-size: clamp(19px, 5.4vw, 24px); }
  .hero__media, .hero__media picture, .hero__media img, .hero__video { object-position: 50% 50%; }
  .look--pizzo img { object-position: 72% 18%; }
  .look--fiocco img { object-position: 45% 15%; }
  .look--intera img { object-position: 50% 50%; }
  .close__media img { object-position: 50% 28%; }
  .gianni { grid-template-columns: 1fr; gap: 40px; padding-top: 96px; }
  .gianni__frame { width: 70vw; }
  .close { grid-template-columns: 1fr; }
  .close__media { min-height: 100svh; }
  .close__links { gap: 28px; }
  .foot__top { flex-direction: column; align-items: flex-start; }
  .foot__places .foot__sep { display: none; }
  .foot__places span { display: block; margin-top: 4px; }
  .contacts { flex-direction: column; gap: 24px; }
}
