/* ============================================================
   DORMITALIANO — Tappezzeria Page Styles
   Dipende da: css/style.css (nav, gallery, tapp-services, modal, ecc.)
   ============================================================ */


/* ============================================================
   1. HERO
   ============================================================ */
.tp-hero {
  position:            relative;
  width:               100%;
  height:              100vh;
  min-height:          600px;
  background-color:    #8f8577;   /* fallback finché il video non parte */
  display:             flex;
  align-items:         center;
  justify-content:     center;
  overflow:            hidden;
}

/* Video di sfondo della hero */
.tp-hero__video {
  position:   absolute;
  inset:      0;
  width:      100%;
  height:     100%;
  object-fit: cover;
  z-index:    0;
  pointer-events: none;
}

.tp-hero__overlay {
  position:   absolute;
  inset:      0;
  background: rgba(40, 34, 28, 0.35);
  z-index:    1;
}

.tp-hero__content {
  position:   relative;
  z-index:    2;
  text-align: center;
  padding:    0 1.5rem;
  max-width:  800px;
}

.tp-hero__eyebrow {
  font-family:    var(--font-body);
  font-size:      0.6875rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color:          var(--color-white);
  opacity:        0.8;
  margin-bottom:  1.75rem;
}

.tp-hero__title {
  font-family:    var(--font-heading);
  font-weight:    300;
  font-size:      clamp(2.5rem, 5.5vw, 5.5rem);
  letter-spacing: 0.03em;
  color:          var(--color-white);
  line-height:    1.1;
  margin-bottom:  1.25rem;
}

.tp-hero__subtitle {
  font-family:   var(--font-body);
  font-weight:   300;
  font-size:     clamp(0.875rem, 1.5vw, 1.0625rem);
  color:         var(--color-white);
  opacity:       0.85;
  line-height:   1.7;
  margin-bottom: 2.5rem;
}

.tp-hero__cta {
  opacity:   0;
  animation: tpFadeUp 0.9s ease 0.5s forwards;
}

@keyframes tpFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}


/* ============================================================
   2. HOOK EMOZIONALE
   ============================================================ */
.tp-hook {
  background-color: var(--color-beige);
}

.tp-hook__inner {
  max-width:  680px;
  margin:     0 auto;
  text-align: center;
}

.tp-hook__title {
  font-family:   var(--font-heading);
  font-weight:   300;
  font-size:     clamp(1.875rem, 3.5vw, 2.75rem);
  color:         var(--color-dark);
  line-height:   1.2;
  margin-bottom: 1.75rem;
}

.tp-hook__text {
  font-family:   var(--font-body);
  font-weight:   300;
  font-size:     1rem;
  line-height:   1.9;
  color:         var(--color-dark);
  opacity:       0.72;
  margin-bottom: 2rem;
}

.tp-hook__footnote {
  font-family:    var(--font-body);
  font-weight:    300;
  font-size:      0.9375rem;
  color:          var(--color-dark);
  opacity:        0.5;
  font-style:     italic;
  letter-spacing: 0.01em;
}


/* ============================================================
   3. SERVIZI — riusa .tapp-services / .tapp-service da style.css
   ============================================================ */
.tp-services-section {
  background-color: var(--color-white);
}

.tp-services-section .gallery__header {
  margin-bottom: 3rem;
}


/* ============================================================
   5. CTA FINALE
   ============================================================ */
.tp-cta {
  background-color: var(--color-beige);
  text-align:       center;
}

.tp-cta__inner {
  max-width: 860px;
  margin:    0 auto;
}

/* Testo stretto e centrato anche se il contenitore è largo per i 3 pulsanti */
.tp-cta__title,
.tp-cta__text {
  max-width: 600px;
  margin-left:  auto;
  margin-right: auto;
}

.tp-cta__title {
  font-family:   var(--font-heading);
  font-weight:   300;
  font-size:     clamp(1.875rem, 3.5vw, 2.75rem);
  color:         var(--color-dark);
  margin-bottom: 1.25rem;
}

.tp-cta__text {
  font-family:   var(--font-body);
  font-weight:   300;
  font-size:     1rem;
  line-height:   1.8;
  color:         var(--color-dark);
  opacity:       0.72;
  margin-bottom: 2.25rem;
}

.tp-cta__actions {
  display:         flex;
  justify-content: center;
  align-items:     center;
  flex-wrap:       wrap;
  gap:             1rem;
}

.tp-cta__btn {
  display:     inline-flex;
  align-items: center;
  gap:         0.6rem;
}

.tp-cta__btn svg { flex-shrink: 0; }


/* Sottotitolo generico sotto i titoli di sezione */
.tp-ba__sub {
  font-family:   var(--font-body);
  font-weight:   300;
  font-size:     0.95rem;
  color:         var(--color-dark);
  opacity:       0.6;
  max-width:     560px;
  margin:        0.75rem auto 0;
}


/* ============================================================
   PRIMA / DOPO
   ============================================================ */
.tp-ba { background-color: var(--color-white); }

.ba {
  position:      relative;
  width:         100%;
  max-width:     920px;
  margin:        3rem auto 0;
  aspect-ratio:  16 / 10;
  border-radius: 8px;
  overflow:      hidden;
  user-select:   none;
  touch-action:  pan-y;   /* consente lo scroll verticale, l'orizzontale muove lo slider */
  cursor:        ew-resize;
  background:    var(--color-beige);
}

.ba__img {
  position:   absolute;
  inset:      0;
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
  pointer-events: none;
}

.ba__clip {
  position:   absolute;
  inset:      0;
  clip-path:  inset(0 50% 0 0);
}

.ba__tag {
  position:       absolute;
  bottom:         1rem;
  font-family:    var(--font-body);
  font-size:      0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color:          var(--color-white);
  background:     rgba(30, 26, 22, 0.55);
  padding:        0.35rem 0.85rem;
  border-radius:  100px;
  pointer-events: none;
}
.ba__tag--before { left:  1rem; }
.ba__tag--after  { right: 1rem; }

.ba__divider {
  position:       absolute;
  top:            0;
  bottom:         0;
  left:           50%;
  width:          2px;
  background:     var(--color-white);
  transform:      translateX(-50%);
  pointer-events: none;
}

.ba__handle {
  position:      absolute;
  top:           50%;
  left:          50%;
  width:         42px;
  height:        42px;
  transform:     translate(-50%, -50%);
  border-radius: 50%;
  background:    var(--color-white);
  box-shadow:    0 2px 10px rgba(0, 0, 0, 0.25);
}
.ba__handle::before,
.ba__handle::after {
  content:       '';
  position:      absolute;
  top:           50%;
  width:         0;
  height:        0;
  border-top:    5px solid transparent;
  border-bottom: 5px solid transparent;
}
.ba__handle::before { left:  9px;  transform: translateY(-50%); border-right: 7px solid var(--color-dark); }
.ba__handle::after  { right: 9px;  transform: translateY(-50%); border-left:  7px solid var(--color-dark); }

.ba__range {
  position:   absolute;
  inset:      0;
  width:      100%;
  height:     100%;
  margin:     0;
  opacity:    0;
  pointer-events: none;   /* il drag è gestito dal contenitore (Pointer Events) */
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.ba__range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 100%; cursor: ew-resize; }
.ba__range::-moz-range-thumb     { width: 44px; height: 100%; border: 0; background: transparent; cursor: ew-resize; }


/* ============================================================
   COME LAVORIAMO — timeline
   ============================================================ */
.tp-process { background-color: var(--color-beige); }

.tp-process__steps {
  list-style:            none;
  display:               grid;
  grid-template-columns: repeat(4, 1fr);
  gap:                   2.5rem;
  max-width:             1100px;
  margin:                3rem auto 0;
  counter-reset:         none;
}

.tp-step {
  position:    relative;
  padding-top: 2.75rem;
}
.tp-step::before {
  content:      '';
  position:     absolute;
  top:          0.9rem;
  left:         0;
  right:        0;
  height:       1px;
  background:   var(--color-beige-dark);
}
.tp-step:last-child::before { right: 50%; }

.tp-step__num {
  position:      absolute;
  top:           0;
  left:          0;
  width:         1.9rem;
  height:        1.9rem;
  border-radius: 50%;
  background:    var(--color-dark);
  color:         var(--color-white);
  font-family:   var(--font-body);
  font-size:     0.75rem;
  display:       flex;
  align-items:   center;
  justify-content: center;
}

.tp-step__title {
  font-family:   var(--font-heading);
  font-weight:   400;
  font-size:     1.15rem;
  color:         var(--color-dark);
  margin-bottom: 0.5rem;
  line-height:   1.25;
}

.tp-step__text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size:   0.875rem;
  line-height: 1.7;
  color:       var(--color-dark);
  opacity:     0.68;
}


/* ============================================================
   CASA / HOTEL
   ============================================================ */
.tp-audience { background-color: var(--color-white); }

.tp-audience__grid {
  display:               grid;
  grid-template-columns: repeat(2, 1fr);
  gap:                   2.5rem;
  max-width:             1100px;
  margin:                3rem auto 0;
}

.tp-aud {
  background:     var(--color-beige);
  border-radius: 10px;
  overflow:      hidden;
  display:       flex;
  flex-direction: column;
}

.tp-aud__media {
  aspect-ratio: 16 / 10;
  overflow:     hidden;
  background:   var(--color-beige-dark);
}
.tp-aud__media img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.tp-aud:hover .tp-aud__media img { transform: scale(1.04); }
.tp-aud__media.is-placeholder img { display: none; }

.tp-aud__body { padding: 2.25rem 2.25rem 2.5rem; }

.tp-aud__label {
  font-family:    var(--font-body);
  font-size:      0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color:          var(--color-dark);
  opacity:        0.5;
  margin-bottom:  0.75rem;
}

.tp-aud__title {
  font-family:   var(--font-heading);
  font-weight:   300;
  font-size:     1.4rem;
  line-height:   1.3;
  color:         var(--color-dark);
  margin-bottom: 0.9rem;
}

.tp-aud__text {
  font-family:   var(--font-body);
  font-weight:   300;
  font-size:     0.9rem;
  line-height:   1.75;
  color:         var(--color-dark);
  opacity:       0.7;
  margin-bottom: 1.5rem;
}

.tp-aud__list {
  list-style: none;
  display:    flex;
  flex-direction: column;
  gap:        0.65rem;
}
.tp-aud__list li {
  position:    relative;
  padding-left: 1.4rem;
  font-family: var(--font-body);
  font-weight: 300;
  font-size:   0.9rem;
  color:       var(--color-dark);
  opacity:     0.85;
}
.tp-aud__list li::before {
  content:  '';
  position: absolute;
  left:     0;
  top:      0.55em;
  width:    6px;
  height:   6px;
  border-radius: 50%;
  background: var(--color-dark);
  opacity:  0.5;
}


/* ============================================================
   TESSUTI
   ============================================================ */
.tp-fabrics { background-color: var(--color-beige); }

.tp-fabrics__grid {
  display:               grid;
  grid-template-columns: repeat(6, 1fr);
  gap:                   1.5rem;
  max-width:             1000px;
  margin:                3rem auto 0;
}

.tp-fabric { text-align: center; }

.tp-fabric__swatch {
  display:       block;
  width:         100%;
  aspect-ratio:  1 / 1;
  border-radius: 8px;
  margin-bottom: 0.85rem;
  box-shadow:    inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  background-color:    var(--color-beige-dark);   /* fallback */
  background-size:     cover;
  background-position: center;
  background-repeat:   no-repeat;
}

.tp-fabric__name {
  font-family:   var(--font-heading);
  font-size:     1rem;
  color:         var(--color-dark);
  margin-bottom: 0.15rem;
}

.tp-fabric__note {
  font-family: var(--font-body);
  font-weight: 300;
  font-size:   0.78rem;
  line-height: 1.4;
  color:       var(--color-dark);
  opacity:     0.6;
}


/* ============================================================
   FAQ
   ============================================================ */
.tp-faq { background-color: var(--color-white); }

.tp-faq__list {
  max-width: 760px;
  margin:    3rem auto 0;
}

.tp-faq__item { border-bottom: 1px solid var(--color-beige-dark); }
.tp-faq__item:first-child { border-top: 1px solid var(--color-beige-dark); }

.tp-faq__q {
  width:           100%;
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             1.5rem;
  background:      none;
  border:          none;
  cursor:          pointer;
  text-align:      left;
  padding:         1.4rem 0.25rem;
  font-family:     var(--font-body);
  font-weight:     400;
  font-size:       1rem;
  color:           var(--color-dark);
}

.tp-faq__chev {
  flex-shrink:   0;
  width:         9px;
  height:        9px;
  border-right:  1.5px solid var(--color-dark);
  border-bottom: 1.5px solid var(--color-dark);
  transform:     rotate(45deg);
  transition:    transform var(--transition-base);
  opacity:       0.55;
  margin-top:    -4px;
}
.tp-faq__q[aria-expanded="true"] .tp-faq__chev {
  transform:  rotate(-135deg);
  margin-top: 3px;
}

.tp-faq__a {
  padding: 0 0.25rem 1.5rem;
}
.tp-faq__a p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size:   0.92rem;
  line-height: 1.8;
  color:       var(--color-dark);
  opacity:     0.72;
  max-width:   680px;
}


/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .tp-process__steps    { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 2rem; }
  .tp-step::before,
  .tp-step:last-child::before { right: 0; }
  .tp-fabrics__grid     { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .tp-audience__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .tp-hero__title    { font-size: clamp(2rem, 9vw, 3rem); }
  .tp-process__steps { grid-template-columns: 1fr; }
  .tp-step           { padding-top: 0; padding-left: 3rem; min-height: 2.2rem; }
  .tp-step::before   { display: none; }
  .tp-fabrics__grid  { grid-template-columns: repeat(2, 1fr); }
  .ba                { aspect-ratio: 3 / 4; }
}
