/* ==========================================================
   Dallilaria — Luxury Store
   Palette: Inkwell · Lunar Eclipse · Creme Brulee · Au Lait
   ========================================================== */

:root {
  --inkwell: #2C3639;
  --lunar: #3F4E4F;
  --creme: #A27B5B;
  --aulait: #DCD7C9;
  --ivory: #F3F0E8;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 64px);
  --header-h: clamp(64px, 9vh, 96px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  /* Scroll verticale "a step": ogni .panel aggancia lo schermo */
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--inkwell);
  color: var(--aulait);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- Logo (varianti: logo-dallilaria-chiaro.png / -scuro.png) ---------- */
.logo { display: block; width: 100%; height: auto; }
.logo--xl { width: clamp(240px, 38vw, 560px); }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--header-h);
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--aulait);
  pointer-events: none;
  transition: color .6s var(--ease);
}
.header > * { pointer-events: auto; }
.header__logo { position: relative; display: block; width: clamp(110px, 12vw, 150px); }
.header__logo .logo { transition: opacity .6s var(--ease); }
.logo--on-dark { opacity: .9; }
.logo--on-light { position: absolute; inset: 0; opacity: 0; }

/* Tema chiaro: attivo quando è visibile una sezione con data-theme="light" */
[data-active-theme="light"] .header,
[data-active-theme="light"] .dots { color: var(--inkwell); }
[data-active-theme="light"] .logo--on-dark { opacity: 0; }
[data-active-theme="light"] .logo--on-light { opacity: .9; }
.header__meta {
  margin: 0;
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  opacity: .8;
}

/* ---------- Pannelli a tutto schermo ---------- */
.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}

/* ---------- Navigazione a punti ---------- */
.dots {
  position: fixed;
  right: calc(var(--gutter) / 2);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--aulait);
  transition: color .6s var(--ease);
}
.dots:empty { display: none; }
.dots a {
  position: relative;
  display: block;
  width: 8px; height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: background .4s var(--ease), transform .4s var(--ease);
}
.dots a.is-active { background: currentColor; transform: scale(1.25); }
.dots a span {
  position: absolute;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .3s;
}
.dots a:hover span, .dots a:focus-visible span { opacity: 1; }

/* ==========================================================
   SEZIONE 1 · APERTURA
   ========================================================== */
.hero { display: flex; flex-direction: column; }

.bg { position: absolute; inset: 0; }
.bg__slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 1.8s var(--ease), transform 9s linear;
}
.bg__slide.is-active { opacity: 1; transform: scale(1); }
/* Desktop: la foto con il logo dipinto a sinistra viene ingrandita da destra,
   così il logo sul muro esce dall'inquadratura e non si sovrappone al titolo */
@media (min-width: 901px) {
  .bg__slide--crop { transform-origin: right center; transform: scale(1.45); }
  .bg__slide--crop.is-active { transform: scale(1.32); }
}

.bg__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(44,54,57,.97) 0%, rgba(44,54,57,.9) 38%, rgba(44,54,57,.55) 62%, rgba(44,54,57,.2) 100%),
    linear-gradient(0deg, rgba(44,54,57,.7) 0%, rgba(44,54,57,0) 35%);
}

.hero__inner {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 2vh) var(--gutter) 12vh;
}

.hero__content { width: 100%; max-width: 640px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 clamp(20px, 4vh, 40px);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--creme);
}
.eyebrow::before {
  content: "";
  width: 48px; height: 1px;
  background: currentColor;
}

.hero__brand { margin: 0; font-weight: 400; color: var(--ivory); }
.hero__sub {
  display: block;
  margin-top: 10px;
  padding-left: 18%;
  font-family: var(--sans);
  font-size: clamp(10px, 1vw, 13px);
  font-weight: 400;
  letter-spacing: .6em;
  text-transform: uppercase;
  color: var(--aulait);
}

.hero__claim {
  margin: clamp(24px, 5vh, 48px) 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(26px, 3.2vw, 46px);
  line-height: 1.12;
  color: var(--ivory);
}
.hero__claim em { color: var(--aulait); }

.hero__info {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  margin: clamp(24px, 5vh, 48px) 0;
}
.hero__info > div { display: flex; flex-direction: column; gap: 6px; }
.hero__label {
  font-size: 10px;
  letter-spacing: .36em;
  text-transform: uppercase;
  color: var(--creme);
}
.hero__value {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--ivory);
}
.hero__link {
  text-decoration: none;
  background: linear-gradient(var(--creme), var(--creme)) left bottom / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.hero__link:hover, .hero__link:focus-visible { background-size: 100% 1px; }
.hero__sep { align-self: stretch; width: 1px; background: rgba(220,215,201,.3); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 30px;
  border: 1px solid var(--creme);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory);
  background: linear-gradient(var(--creme), var(--creme)) left / 0 100% no-repeat;
  transition: background-size .6s var(--ease), color .3s;
}
.btn::after { content: "→"; letter-spacing: 0; transition: transform .4s var(--ease); }
.btn:hover, .btn:focus-visible { background-size: 100% 100%; }
.btn:hover::after { transform: translateX(6px); }

.hero__footer {
  position: absolute;
  left: var(--gutter); right: var(--gutter);
  bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--aulait);
}
.counter b { font-weight: 500; color: var(--ivory); }
.scroll-hint {
  display: inline-flex; align-items: center; gap: 14px;
  text-transform: uppercase;
  text-decoration: none;
}
.scroll-hint i {
  position: relative;
  width: 1px; height: 40px;
  background: rgba(220,215,201,.3);
  overflow: hidden;
}
.scroll-hint i::after {
  content: "";
  position: absolute; left: 0; top: -40%;
  width: 1px; height: 40%;
  background: var(--aulait);
  animation: drip 2.2s var(--ease) infinite;
}
@keyframes drip { to { top: 100%; } }
.is-single .scroll-hint { display: none; }

/* ==========================================================
   SEZIONE 2 · LA CURA DEL CAPO (tema chiaro)
   ========================================================== */
.services {
  display: flex;
  color: var(--inkwell);
  background:
    radial-gradient(90% 70% at 10% 20%, var(--ivory) 0%, rgba(243,240,232,0) 70%),
    var(--aulait);
}
/* Grande monogramma decorativo sullo sfondo */
.services::before {
  content: "";
  position: absolute;
  right: -6vw; bottom: -14vh;
  width: min(70vw, 900px);
  aspect-ratio: 1600 / 473;
  background: url("../assets/logo-dallilaria-scuro.png") center / contain no-repeat;
  opacity: .04;
  pointer-events: none;
}

.services__inner {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 120px);
  padding: calc(var(--header-h) + 2vh) calc(var(--gutter) * 1.5) 8vh var(--gutter);
}

.services .eyebrow { color: var(--creme); }

.services__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 7vw, 112px);
  line-height: .95;
  letter-spacing: -.01em;
}
.services__title em { display: block; color: var(--creme); }

.services__text {
  max-width: 380px;
  margin: clamp(20px, 4vh, 40px) 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--lunar);
}

.services__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(44,54,57,.18);
}
.service {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  padding: clamp(18px, 3.4vh, 32px) 0;
  border-bottom: 1px solid rgba(44,54,57,.18);
}
/* Linea Creme Brulee che si riempie al passaggio */
.service::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--creme);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease);
}
.service:hover::after { transform: scaleX(1); }

.service__num {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--creme);
}
.service__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 1.1;
  transition: transform .6s var(--ease), color .4s;
}
.service:hover .service__name { transform: translateX(10px); color: var(--creme); }
.service__desc {
  max-width: 460px;
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--lunar);
}

/* ==========================================================
   SEZIONE 3 · PRODOTTI (tema scuro, foto dei capi a destra)
   ========================================================== */
.products { display: flex; }

/* Su desktop le foto occupano la metà destra e sfumano nel velo */
@media (min-width: 901px) {
  .bg--right {
    left: 38%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
  }
  .bg--right .bg__slide { object-position: center 18%; }
  .contacts .bg--right .bg__slide { object-position: 60% center; }
}

.products__inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: calc(var(--header-h) + 2vh) var(--gutter) 10vh;
}

.products__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(64px, 10vw, 160px);
  line-height: .9;
  color: var(--ivory);
}

.products__list {
  list-style: none;
  width: min(100%, 760px);
  margin: clamp(28px, 6vh, 64px) 0 clamp(28px, 5vh, 48px);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(24px, 4vw, 56px);
}
.product {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: baseline;
  padding: clamp(14px, 2.4vh, 22px) 0;
  border-bottom: 1px solid rgba(220,215,201,.2);
}
.product::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--creme);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease);
}
.product:hover::after { transform: scaleX(1); }
.product__num {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--creme);
}
.product__name {
  font-family: var(--serif);
  font-size: clamp(20px, 1.9vw, 28px);
  line-height: 1.2;
  color: var(--ivory);
  transition: transform .6s var(--ease), color .4s;
}
.product:hover .product__name { transform: translateX(8px); color: var(--aulait); }

/* ==========================================================
   SEZIONE 4 · CONTATTI (tema chiaro, foto shopping bag a destra)
   ========================================================== */
.contacts {
  display: flex;
  flex-direction: column;
  color: var(--inkwell);
  background: var(--aulait);
}
.bg__veil--light {
  background: linear-gradient(90deg, rgba(220,215,201,1) 0%, rgba(220,215,201,.9) 38%, rgba(220,215,201,.3) 70%, rgba(220,215,201,0) 100%);
}

.contacts__inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: calc(var(--header-h) + 2vh) var(--gutter) 12vh;
}
.contacts .eyebrow { color: var(--creme); }

.contacts__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(52px, 7.5vw, 120px);
  line-height: .95;
}
.contacts__title em { display: block; color: var(--creme); }

.contacts__list {
  width: min(100%, 560px);
  margin: clamp(32px, 6vh, 64px) 0 0;
  border-top: 1px solid rgba(44,54,57,.18);
}
.contact {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: baseline;
  padding: clamp(16px, 3vh, 26px) 0;
  border-bottom: 1px solid rgba(44,54,57,.18);
}
.contact dt {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--creme);
}
.contact dd {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.2;
}

.contacts__footer {
  position: relative;
  display: flex;
  gap: 16px 40px;
  padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom));
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--lunar);
}

/* ---------- Animazioni di ingresso ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s var(--ease) var(--d, 0s), transform 1.2s var(--ease) var(--d, 0s);
}
.is-visible .reveal { opacity: 1; transform: none; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 900px) {
  .hero__inner { align-items: flex-end; padding-bottom: 88px; }
  .bg__veil {
    background:
      linear-gradient(180deg, rgba(44,54,57,.6) 0%, rgba(44,54,57,0) 18%),
      linear-gradient(0deg, rgba(44,54,57,.96) 0%, rgba(44,54,57,.8) 50%, rgba(44,54,57,.45) 100%);
  }
  .logo--xl { width: min(78vw, 420px); }
}

@media (max-width: 900px) {
  .services__inner {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding: calc(var(--header-h) + 8px) var(--gutter) 40px;
  }
  .services::before { width: 120vw; right: -30vw; bottom: -4vh; }
}

@media (max-width: 900px) {
  .products__inner { justify-content: flex-end; padding-bottom: 48px; }
  .products .eyebrow { color: var(--aulait); }
  .contacts__inner { justify-content: flex-end; padding-bottom: 40px; }
  .contacts .bg__veil--light {
    background: linear-gradient(0deg, rgba(220,215,201,1) 0%, rgba(220,215,201,.95) 55%, rgba(220,215,201,.35) 100%);
  }
}

@media (max-width: 560px) {
  .products__title { font-size: 72px; }
  .contacts__title { font-size: 52px; }
  .contact { grid-template-columns: 1fr; gap: 6px; padding: 14px 0; }
  .contact dd { font-size: 22px; }
  .contacts__footer { flex-direction: column; gap: 6px; letter-spacing: .2em; }
  .products__list { grid-template-columns: 1fr; margin: 20px 0 28px; }
  .product { grid-template-columns: 36px 1fr; padding: 12px 0; }
  .product__name { font-size: 21px; }
  .services__title { font-size: 46px; }
  .services__title em { display: inline; }
  .services__text { margin-top: 14px; font-size: 14px; }
  .service { grid-template-columns: 40px 1fr; padding: 16px 0; }
  .service__name { font-size: 24px; }
  .service__desc { margin-top: 4px; font-size: 13px; line-height: 1.5; }
  .header__meta { display: none; }
  .hero__inner { padding-bottom: 72px; }
  .hero__info { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero__sep { display: none; }
  .btn { width: 100%; justify-content: space-between; padding: 18px 20px; letter-spacing: .12em; gap: 10px; }
  .dots { display: none; }
}

@media (max-height: 700px) {
  .services__text { display: none; }
}

@media (max-height: 640px) and (min-width: 561px) {
  .hero__claim { font-size: 26px; }
  .hero__info { margin: 18px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bg__slide, .reveal { transition: opacity .4s; transform: none !important; }
  .scroll-hint i::after { animation: none; }
}
