/* 
   Maestro Paolo Corpetti - Studio Vetrarte
   Design System Comune (Design Tokens & Utility Classes)
   Veste grafica moderna e di lusso (B2C & B2B)
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --gold: #B68E48;          /* Antique warm gold */
  --gold-dark: #8F6E30;     /* Deep readable gold */
  --gold-lt: #DFD0B8;       /* Soft gold border/accent */
  --cream: #FAF8F5;         /* Premium ivory/alabaster background */
  --white: #ffffff;
  --dark: #2C2621;          /* Warm charcoal slate */
  --mid: #685E55;           /* Readable warm grey */
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cormorant: 'Playfair Display', Georgia, serif;
  
  --transition-lux: all .4s cubic-bezier(.16, 1, .3, 1);
  --shadow-lux: 0 16px 40px rgba(44, 38, 33, 0.06);
  --border-lux: 1px solid rgba(182, 142, 72, 0.18);
}

/* Base resets & scrollbehavior */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: auto;
}

body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--cream);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-lt);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* Shared Typography Elements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--dark);
  letter-spacing: normal;
}

/* Cursore nativo del sistema per massima fluidità */
.cursor {
  display: none !important;
  pointer-events: none !important;
}

/* Reveal transition on scroll */
.fu {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s cubic-bezier(.25,1,.5,1), transform .8s cubic-bezier(.25,1,.5,1);
}

.fu.vis {
  opacity: 1;
  transform: translateY(0);
}

.d1 { transition-delay: .1s; }
.d2 { transition-delay: .22s; }
.d3 { transition-delay: .34s; }
.d4 { transition-delay: .46s; }

/* Buttons & Links */
.btn-gold {
  display: inline-block;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--white);
  text-decoration: none;
  padding: 14px 36px;
  transition: var(--transition-lux);
  font-family: var(--sans);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(197, 168, 128, 0.15);
}

.btn-gold:hover {
  background: var(--dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(18, 18, 17, 0.2);
}

.btn-line-white {
  display: inline-block;
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.35);
  padding-bottom: 2px;
  transition: all .3s;
  font-family: var(--sans);
}

.btn-line-white:hover {
  color: var(--white);
  border-color: var(--white);
}

.s-tag {
  font-size: .62rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--sans);
  margin-bottom: 14px;
  display: block;
}

.s-h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--dark);
}

.s-lead {
  font-size: 1.02rem;
  color: var(--mid);
  line-height: 1.75;
  max-width: 600px;
  margin-top: 16px;
  font-family: var(--sans);
}

.stmt-line {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 1.2rem 0;
  border-radius: 1px;
}

/* Subpage Hero Luminoso con piena visibilità delle vetrate */
.subpage-hero-b2c {
  position: relative;
  min-height: 380px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 120px 6% 60px;
  overflow: hidden;
  background-color: var(--cream);
}

.subpage-hero-overlay-b2c {
  display: none !important;
  background: none !important;
  opacity: 0 !important;
}

.subpage-hero-content-b2c {
  position: relative;
  z-index: 2;
  max-width: 900px;
}


/* =========================================================
   MOTORE DI RICERCA INTERNO ISTANTANEO (HEADER & MODAL)
   ========================================================= */
.nav-search-btn {
  background: rgba(144, 117, 51, 0.14);
  border: 1px solid rgba(144, 117, 51, 0.55);
  color: var(--dark, #1c1a17);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  white-space: nowrap;
}
header.scrolled .nav-search-btn {
  color: var(--dark, #1c1a17);
  background: rgba(144, 117, 51, 0.14);
  border-color: rgba(144, 117, 51, 0.5);
}
.nav-search-btn:hover {
  background: var(--gold);
  color: #fff !important;
  border-color: var(--gold);
}

.site-search-modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 16, 14, 0.82);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 7vh 16px 24px;
}
.site-search-modal.open {
  display: flex;
}
.site-search-dialog {
  width: 100%;
  max-width: 720px;
  background: #1b1916;
  border: 1px solid rgba(182, 142, 72, 0.45);
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  color: #FAF8F5;
  font-family: var(--sans);
}
.site-search-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #141311;
}
.site-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--sans);
  font-size: 1.02rem;
}
.site-search-input::placeholder {
  color: rgba(250, 248, 245, 0.48);
}
.site-search-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #d8d0c2;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}
.site-search-quick {
  padding: 10px 20px;
  background: #181613;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 0.73rem;
  color: #b5ac9c;
}
.site-search-chip {
  background: rgba(182, 142, 72, 0.16);
  border: 1px solid rgba(182, 142, 72, 0.35);
  color: #ebd094;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: none;
}
.site-search-chip:hover {
  background: #b68e48;
  color: #141311;
}
.site-search-results {
  max-height: 62vh;
  overflow-y: auto;
  padding: 10px 14px 14px;
}
.site-search-item {
  display: block;
  padding: 11px 14px;
  border-radius: 9px;
  text-decoration: none;
  color: #FAF8F5;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.03);
}
.site-search-item:hover {
  background: rgba(182, 142, 72, 0.15);
  border-color: rgba(182, 142, 72, 0.45);
}
.site-search-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 3px;
}
.site-search-item-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
}
.site-search-item-cat {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e5c172;
  background: rgba(182, 142, 72, 0.18);
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
}
.site-search-item-desc {
  font-size: 0.78rem;
  color: rgba(250, 248, 245, 0.7);
  line-height: 1.4;
}
.site-search-footer {
  padding: 10px 20px;
  background: #141311;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: #b5ac9c;
}
.site-search-footer a {
  color: #e5c172;
  font-weight: 600;
  text-decoration: none;
}
