/* ============================================
   Le Due Querce — Homepage Luxury Design System
   ============================================ */

:root {
  --hp-black: #0A0806;
  --hp-black-deep: #050403;
  --hp-cream-bg: #FAF6F0;
  --hp-cream: #E8DFD0;
  --hp-gold: #B8924A;
  --hp-gold-light: #D4B978;
  --hp-white: #F5F0E8;
  --hp-forest: #2C3A2E;
  --hp-font-display: 'Cormorant Garamond', Georgia, serif;
  --hp-font-body: 'Inter', system-ui, sans-serif;
}

/* === Loader ===  */
#hp-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--hp-black-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
body.is-loading { overflow: hidden; }
@media (max-width: 767px) {
  body.is-loading .hp-hero__eyebrow,
  body.is-loading .hp-live-bar,
  body.is-loading .hp-hero__title,
  body.is-loading .hp-hero__sub,
  body.is-loading .hp-btn--gold { opacity: 0; }
}
#hp-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.hp-loader__logo {
  width: 140px;
  opacity: 0;
  animation: loaderPulse 1.8s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1;   }
}
.hp-loader__bar {
  width: 160px;
  height: 1px;
  background: rgba(255,255,255,0.12);
  border-radius: 1px;
  overflow: hidden;
}
.hp-loader__fill {
  height: 100%;
  width: 0%;
  background: var(--hp-gold);
  transition: width 0.3s ease;
}

/* === Reset (minimal, additive) === */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--hp-black); color: var(--hp-cream); font-family: var(--hp-font-body); -webkit-font-smoothing: antialiased; }
html { scroll-behavior: auto; /* Lenis handles smooth scroll */ }

/* === Navbar luxury overrides === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  /* GSAP gestisce background, padding, backdrop-filter — nessuna CSS transition */
  /* layout */
  max-width: unset;
  margin: 0;
  padding: 28px 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}
/* Fallback no-JS: se GSAP non carica, la classe viene aggiunta via Lenis callback */
.nav--scrolled {
  background: rgba(5, 4, 3, 0.92) !important;
  box-shadow: 0 1px 0 rgba(184,146,74,0.15), 0 4px 24px rgba(0,0,0,0.6) !important;
  padding: 14px 6vw !important;
}
.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}
.brand {
  font-family: var(--hp-font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--hp-white);
  text-decoration: none;
  white-space: nowrap;
}
.nav__right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.nav__staff,
.nav__staff:visited {
  font-size: 0.8rem;
  color: rgba(232,223,208,0.55);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.nav__staff:hover { color: var(--hp-gold); }
.nav__cta {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid rgba(184,146,74,0.5);
  color: var(--hp-gold);
  border-radius: 2px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s;
}
.nav__cta:hover {
  background: var(--hp-gold);
  color: var(--hp-black-deep);
}
.lang-switch { position: relative; z-index: 120; }
.lang-switch__summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 2px;
  border: 1px solid rgba(184,146,74,0.3);
  background: rgba(10,8,6,0.4);
  color: rgba(232,223,208,0.8);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.05em;
}
.lang-switch__summary::-webkit-details-marker { display: none; }
.lang-switch__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 140px;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid rgba(184,146,74,0.2);
  background: rgba(5,4,3,0.95);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  display: none;
  z-index: 120;
}
.lang-switch[open] .lang-switch__menu { display: grid; gap: 4px; }
.lang-switch__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 2px;
  font-size: 0.8rem;
  color: rgba(232,223,208,0.8);
  text-decoration: none;
}
.lang-switch__menu a:hover { background: rgba(184,146,74,0.12); color: var(--hp-gold); }
.lang-switch__menu a[aria-current="true"] { background: rgba(184,146,74,0.15); color: var(--hp-gold); }
.nav a,
.nav .brand,
.nav .nav__right a {
  color: var(--hp-cream);
  text-decoration: none;
  transition: color 0.2s;
}
.nav a:hover { color: var(--hp-gold); }

@media (max-width: 520px) {
  .nav { padding: 16px 5vw; }
  .brand { font-size: 1rem; }
  .nav__staff { display: none; }
}

/* === HERO === */
.hp-hero-pin {
  position: relative;
  /* GSAP pinSpacing gestisce l'altezza effettiva del wrapper */
}
.hp-hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hp-hero__video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hp-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* slowZoom rimossa — lo scroll controlla il video direttamente */
}
.hp-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5,4,3,0.25) 0%,
    rgba(5,4,3,0.55) 60%,
    rgba(5,4,3,0.85) 100%
  );
}
.hp-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  flex: 1;
  padding: 0 6vw 10vh;
  max-width: 900px;
}
.hp-hero__eyebrow {
  font-family: var(--hp-font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201,169,110,0.9);
  margin: 0 0 16px;
}
.hp-live-bar {
  font-family: var(--hp-font-body);
  font-weight: 400;
  font-size: 0.75rem;
  color: rgba(232,223,208,0.6);
  margin-bottom: 24px;
  display: flex;
  gap: 8px;
}
.hp-hero__title {
  font-family: var(--hp-font-display);
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.05;
  color: var(--hp-white);
  margin: 0 0 20px;
}
.hp-hero__title em {
  font-style: italic;
  color: var(--hp-gold);
}
.hp-hero__sub {
  font-family: var(--hp-font-body);
  font-weight: 400;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: rgba(232,223,208,0.75);
  margin: 0 0 40px;
  max-width: 560px;
  line-height: 1.6;
}
.hp-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}
.hp-btn--gold {
  padding: 14px 32px;
  background: transparent;
  border: 1px solid var(--hp-gold);
  color: var(--hp-gold);
  font-family: var(--hp-font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: all 0.3s;
}
.hp-btn--gold:hover {
  background: var(--hp-gold);
  color: var(--hp-black-deep);
}
.hp-hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(232,223,208,0.4);
  font-size: 1rem;
  animation: bounce 2s infinite;
  z-index: 1;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* === STATEMENT === */
.hp-statement {
  background: var(--hp-cream-bg);
  padding: 120px 6vw;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hp-statement__text {
  font-family: var(--hp-font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  color: var(--hp-black);
  text-align: center;
  line-height: 1.3;
  max-width: 900px;
  margin: 0;
}
.hp-word {
  display: inline-block;
  opacity: 0.12;
}

/* === PRODUCT SECTIONS === */
.hp-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
  background: var(--hp-black);
}
.hp-product--scrub {
  min-height: 100vh;
}
.hp-product__video-side {
  overflow: hidden;
  position: relative;
}
.hp-product__video-wrap {
  position: absolute;
  inset: 0;
}
.hp-product__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hp-product__copy-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 6vw 80px 5vw;
  background: var(--hp-black);
}
.hp-product__label {
  font-family: var(--hp-font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hp-gold);
  margin: 0 0 16px;
}
.hp-product__title {
  font-family: var(--hp-font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3.5vw, 3rem);
  color: var(--hp-white);
  line-height: 1.1;
  margin: 0 0 24px;
}
.hp-product__text {
  font-family: var(--hp-font-body);
  font-weight: 400;
  font-size: 1rem;
  color: var(--hp-cream);
  line-height: 1.7;
  margin: 0 0 32px;
  max-width: 420px;
}
.hp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.hp-chip {
  font-family: var(--hp-font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border: 1px solid rgba(184,146,74,0.35);
  color: rgba(232,223,208,0.7);
  border-radius: 2px;
}
.hp-product__link {
  font-family: var(--hp-font-body);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--hp-gold);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.hp-product__link:hover {
  color: var(--hp-gold-light);
}

/* Product reverse layout */
.hp-product--reverse .hp-product__video-side {
  order: 2;
}
.hp-product--reverse .hp-product__copy-side {
  order: 1;
}

/* === TERROIR === */
.hp-terroir-pin {
  position: relative;
}
.hp-terroir {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hp-terroir__video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hp-terroir__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hp-terroir__overlay {
  position: absolute;
  inset: 0;
  background: rgba(5,4,3,0.65);
}
.hp-terroir__content {
  position: relative;
  z-index: 1;
  padding: 80px 6vw;
  max-width: 700px;
}
.hp-terroir__eyebrow {
  font-family: var(--hp-font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201,169,110,0.9);
  margin: 0 0 16px;
}
.hp-terroir__title {
  font-family: var(--hp-font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--hp-white);
  margin: 0 0 24px;
  line-height: 1.1;
}
.hp-terroir__text {
  font-family: var(--hp-font-body);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--hp-cream);
  line-height: 1.7;
  margin: 0 0 32px;
}
.hp-terroir__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hp-terroir__bullets li {
  font-family: var(--hp-font-body);
  font-weight: 400;
  font-size: 0.9rem;
  color: rgba(232,223,208,0.7);
  padding: 8px 0;
  border-bottom: 1px solid rgba(184,146,74,0.2);
}

/* === QUOTE / FORM === */
.hp-quote {
  background: var(--hp-black);
  padding: 120px 6vw;
  border-top: 1px solid rgba(184,146,74,0.2);
}
.hp-quote__inner {
  max-width: 560px;
  margin: 0 auto;
}
.hp-quote__title {
  font-family: var(--hp-font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  color: var(--hp-white);
  text-align: center;
  margin: 0 0 16px;
}
.hp-quote__sub {
  font-family: var(--hp-font-body);
  font-weight: 400;
  font-size: 0.9rem;
  color: rgba(232,223,208,0.6);
  text-align: center;
  margin: 0 0 48px;
  line-height: 1.6;
}

/* Form luxury overrides */
.hp-quote .form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hp-quote .form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hp-quote .form__field span {
  font-family: var(--hp-font-body);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: rgba(232,223,208,0.6);
}
.hp-quote .form__field input,
.hp-quote .form__field textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(184,146,74,0.25);
  color: var(--hp-cream);
  border-radius: 2px;
  padding: 12px 16px;
  font-family: var(--hp-font-body);
  font-size: 0.9rem;
  transition: border-color 0.3s;
}
.hp-quote .form__field input:focus,
.hp-quote .form__field textarea:focus {
  border-color: var(--hp-gold);
  outline: none;
}
.hp-quote .form__field input::placeholder,
.hp-quote .form__field textarea::placeholder {
  color: rgba(232,223,208,0.3);
}
.hp-quote .form__more {
  /* keep existing show/hide behavior from lead-form.js */
}
.hp-quote .form__moregrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.hp-quote .btn--primary {
  background: var(--hp-gold);
  color: var(--hp-black-deep);
  border: none;
  font-family: var(--hp-font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  padding: 14px 32px;
  border-radius: 2px;
  width: 100%;
  cursor: pointer;
  transition: background 0.3s;
}
.hp-quote .btn--primary:hover {
  background: var(--hp-gold-light);
}
.hp-quote .form__status {
  text-align: center;
  font-size: 0.85rem;
  min-height: 1.2em;
}
/* Honeypot — visually hidden */
.hp-quote .hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}
/* Turnstile widget */
.hp-quote .turnstile {
  display: flex;
  justify-content: center;
}

/* === FOOTER === */
.footer--split {
  background: var(--hp-black-deep);
  border-top: 1px solid rgba(184,146,74,0.15);
  color: rgba(232,223,208,0.5);
  font-size: 0.8rem;
  font-family: var(--hp-font-body);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 6vw;
  flex-wrap: wrap;
  gap: 16px;
}
.footer--split a {
  color: rgba(184,146,74,0.7);
  text-decoration: none;
  transition: color 0.2s;
}
.footer--split a:hover {
  color: var(--hp-gold);
}
.footer__left,
.footer__right {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
  .hp-hero__content {
    padding: 0 5vw 8vh;
  }
  .hp-hero__title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }
  .hp-hero__sub {
    font-size: 0.9rem;
    margin-bottom: 28px;
  }
  .hp-statement {
    padding: 80px 6vw;
  }
  .hp-product {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hp-product__video-side {
    position: relative;
    height: 50vw;
  }
  .hp-product__video-wrap {
    position: absolute;
    inset: 0;
  }
  .hp-product--reverse .hp-product__video-side {
    order: 0;
  }
  .hp-product--reverse .hp-product__copy-side {
    order: 0;
  }
  .hp-product__copy-side {
    padding: 48px 6vw;
  }
  .hp-terroir__content {
    padding: 60px 6vw;
  }
  .hp-quote {
    padding: 80px 5vw;
  }
  .hp-quote .form__moregrid {
    grid-template-columns: 1fr;
  }
  .footer--split {
    flex-direction: column;
    text-align: center;
  }
  .footer__left,
  .footer__right {
    justify-content: center;
  }
}
