/* ==========================================
   DOMUS MINATO - MASTER STYLESHEET
   ========================================== */

/* --- 1. DESIGN TOKENS (Colori Ufficiali) --- */
:root {
  /* Palette Ufficiale */
  --poseidone: #051f38;   /* Blu scuro principale */
  --vesta: #ffb238;       /* Giallo/Arancio focolare */
  --calce: #f5f2e5;       /* Panna di sfondo */
  --chia: #4cccb3;        /* Verde acqua Sardegna */
  --grano: #c79f6c;       /* Bronzo/Terra cotta */
  --giada: #8cded0;       /* Verde acqua chiaro */
  --notte: #020f1c;       /* Blu scurissimo profondo */
  --gaia: #8c4227;        /* Marrone terra Alpi */
  --hanami: #f38e87;      /* Rosa fioritura (Giappone) */

  /* Tipografia */
  --font-display: "amandine", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-japanese: "ab-gamma", serif;

  /* Spaziature Fluide */
  --space-xs: clamp(.5rem, 1vw, .75rem);
  --space-sm: clamp(1rem, 2vw, 1.5rem);
  --space-md: clamp(2rem, 4vw, 3.5rem);
  --space-lg: clamp(4rem, 8vw, 7rem);
  --space-xl: clamp(6rem, 12vw, 10rem);
  
  --max-width: 1400px;
}

/* --- 2. RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font-body); font-weight: 300; color: var(--poseidone); background: var(--calce); line-height: 1.7; letter-spacing: .01em; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .3s ease; }

/* Tipografia Globale */
h1, h2 { font-family: var(--font-display); font-weight: 300; line-height: .95; letter-spacing: -.01em; }
h3 { font-family: var(--font-display); font-weight: 300; line-height: 1.2; }
h4 { font-family: var(--font-body); font-weight: 500; line-height: 1.3; }
h1 { font-size: clamp(3.2rem, 7vw, 6.5rem); }
h2 { font-size: clamp(3.5rem, 8vw, 8rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 2.2rem); }
h4 { font-size: clamp(1.1rem, 1.6vw, 1.4rem); }
p { font-size: clamp(1.125rem, 1.25vw, 1.4rem); max-width: 72ch; line-height: 1.75; font-weight: 400; }

.subtitle { font-family: var(--font-body); font-size: clamp(1.25rem, 1.6vw, 1.55rem); font-weight: 400; font-style: normal; line-height: 1.55; max-width: 65ch; color: inherit; letter-spacing: -.005em; }
.kanji { font-family: var(--font-japanese) !important; font-size: clamp(1.6rem, 2.6vw, 2.6rem); font-weight: 400; line-height: 1; color: var(--vesta); letter-spacing: .05em; }
.font-metodo { font-family: var(--font-japanese) !important; font-style: normal !important; font-weight: 400 !important; }
.label { font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }

/* Layout Base */
.site-content { position: relative; z-index: 20; background: transparent; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.flex-row { display: flex; gap: var(--space-md); align-items: center; }
.flex-row--reverse { flex-direction: row-reverse; }
.flex-row > * { flex: 1; }
@media(max-width:768px){ .flex-row, .flex-row--reverse { flex-direction: column; } }

/* --- 3. UTILITY CLASSES (Il tuo catalogo) --- */
.bg-poseidone { background-color: var(--poseidone) !important; color: var(--calce) !important; }
.bg-calce { background-color: var(--calce) !important; color: var(--poseidone) !important; }
.bg-chia { background-color: var(--chia) !important; color: var(--poseidone) !important; }
.bg-notte { background-color: var(--notte) !important; color: var(--calce) !important; }

.text-vesta { color: var(--vesta); }
.text-hanami { color: var(--hanami); }

/* Maschere Organiche Base */
.maschera-base {
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}

/* Sottolineatura animata dinamica e indipendente */
.hover-linea {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.hover-linea::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  /* IL TRUCCO: Usa il colore specificato. Se non c'è, copia il colore del testo */
  background: var(--colore-linea, currentColor); 
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .5s cubic-bezier(.23,1,.32,1);
}

.hover-linea:hover::after {
  transform: scaleX(1);
}

/* --- CLASSI UTILITY PER I COLORI DELLA LINEA --- */
.linea-grano { --colore-linea: var(--grano); }
.linea-vesta { --colore-linea: var(--vesta); }
.linea-chia { --colore-linea: var(--chia); }
.linea-hanami { --colore-linea: var(--hanami); }

/* Bottoni e CTA */
.cta-link { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-mono); font-size: .8rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--vesta); padding: .9rem 0; border-bottom: 1px solid transparent; transition: all .4s ease; }
.cta-link:hover { border-bottom-color: var(--vesta); gap: 1rem; }
.cta-link::after { content: '→'; transition: transform .4s ease; }
.cta-link:hover::after { transform: translateX(4px); }
.cta-link--dark { color: var(--poseidone); }
.cta-link--dark:hover { border-bottom-color: var(--poseidone); }

/* Placeholder Immagini */
.img-placeholder { background: linear-gradient(135deg, var(--poseidone) 0%, var(--notte) 50%, var(--chia) 100%); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.2); font-family: var(--font-display); font-size: 1rem; font-style: italic; min-height: 400px; position: relative; overflow: hidden; }
.img-placeholder--warm { background: linear-gradient(135deg, var(--gaia) 0%, var(--vesta) 100%); }
.img-placeholder--light { background: linear-gradient(135deg, var(--giada) 0%, var(--chia) 50%, var(--poseidone) 100%); }

/* --- 4. NAV & MENU (Header Overlay) --- */
.nav-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 1100; display: flex; align-items: center; justify-content: flex-end; padding: var(--space-sm) var(--space-md); pointer-events: none; }
.nav-bar > * { pointer-events: auto; }
.hamburger-wrap { width: 66px; height: 66px; position: relative; cursor: pointer; z-index: 1001; background: none; border: none; }
.ham-lines { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 9px; padding: 15px 6px; }
.ham-lines span { display: block; height: 2px; background: var(--chia); transition: all 1.1s cubic-bezier(.5,0,.3,1); transform-origin: center; }
.ham-lines span:nth-child(1) { width: 38px; }
.ham-lines span:nth-child(2) { width: 28px; }

/* Wing (Ala di Mercurio) */
.ham-wing { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transform: rotate(-90deg) scale(.6); transition: opacity .9s ease, transform 1.1s cubic-bezier(.5,0,.3,1); }
.ham-wing img { width: 66px; height: 66px; }

/* Winged state: lines hide, wing appears */
.hamburger-wrap.winged:not(.active) .ham-lines span { opacity: 0; transform: scaleX(0) rotate(-180deg); }
.hamburger-wrap.winged:not(.active) .ham-wing { opacity: 1; transform: rotate(0) scale(1); }
.hamburger-wrap.winged .ham-lines span { background: var(--calce); }
.hamburger-wrap.near.winged .ham-wing img { animation: wingUndulate 1.2s ease-in-out infinite; }
@keyframes wingUndulate { 0%,100%{transform:rotate(-2deg) translateY(0)} 25%{transform:rotate(1deg) translateY(-2px)} 50%{transform:rotate(3deg) translateY(0)} 75%{transform:rotate(0deg) translateY(-1px)} }

/* Active (menu open): X close from 2 lines */
.hamburger-wrap.active .ham-lines { align-items: center; }
.hamburger-wrap.active .ham-lines span { background: var(--chia); width: 46px; }
.hamburger-wrap.active .ham-lines span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hamburger-wrap.active .ham-lines span:nth-child(2) { transform: translateY(-5.5px) rotate(-45deg); }
.hamburger-wrap.active .ham-wing { opacity: 0 !important; transform: rotate(360deg) scale(.4) !important; }

/* L'Overlay con l'Onda S a fondo pagina (Maschera Vettoriale Inline) */
.nav-overlay { 
  position: fixed; inset: 0; background: var(--poseidone); z-index: 999; 
  display: flex; align-items: flex-start; justify-content: center; 
  pointer-events: none; 
  transform: translateY(-100%); 
  transition: transform .8s cubic-bezier(.7,0,.2,1); 
  padding-bottom: 8vh;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 1080' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0 L1440,0 L1440,1000 C1200,1000 1200,940 960,940 C720,940 720,1050 480,1050 C240,1050 240,990 0,990 Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 1080' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0 L1440,0 L1440,1000 C1200,1000 1200,940 960,940 C720,940 720,1050 480,1050 C240,1050 240,990 0,990 Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.nav-overlay.active { transform: translateY(0); pointer-events: all; }

/* Griglia: col Marketing più larga con minmax */
.nav-grid { width: 100%; height: 100%; display: grid; grid-template-columns: 22% 78%; padding: clamp(4rem, 8vh, 6rem) clamp(2rem, 5vw, 4rem) 0; max-width: 1600px; margin: 0 auto; gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }

/* Lato Sinistro (Logo + Città) */
.nav-logo-area { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; }
.nav-logo-area img { width: 100%; max-width: clamp(200px, 25vw, 360px); height: auto; }
.nav-cities { font-family: var(--font-mono); font-size: clamp(0.7rem, 0.9vw, 0.85rem); letter-spacing: .25em; color: var(--calce); text-align: center; }

/* Lato Destro (Le 4 Colonne) — seconda colonna (Marketing) più larga */
.nav-right-wrap { display: flex; flex-direction: column; justify-content: center; gap: clamp(1.5rem, 4vh, 3rem); height: 100%; }
.nav-cols { display: flex; justify-content: center; gap: clamp(2rem, 3vw, 3rem); }
.nav-col { display: flex; flex-direction: column; gap: clamp(1rem, 2vh, 1.5rem); flex-shrink: 0; }
.nav-section { overflow: hidden; }
.nav-foot-inline { padding-top: var(--space-sm); border-top: 1px solid rgba(245,242,229,.08); display: flex; justify-content: space-between; align-items: center; opacity: 0; transition: opacity .6s ease .5s; width: 100%; }
.nav-section-title { display: inline-block; font-family: var(--font-display); font-size: clamp(1.15rem, 1.6vw, 1.7rem); font-weight: 300; letter-spacing: -.01em; color: var(--calce); line-height: 1.2; margin-bottom: .3rem; white-space: nowrap; transform: translateY(-100%); opacity: 0; transition: transform 1.5s cubic-bezier(.23,1,.32,1), color .3s ease, opacity 1.5s ease; }
.nav-section-title:hover { color: var(--vesta); }
.nav-sub { list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: .1rem; }
.nav-sub li { overflow: hidden; }
.nav-sub a { display: inline-block; font-family: var(--font-body); font-size: clamp(.8rem, 0.95vw, 0.95rem); font-weight: 300; color: rgba(245,242,229,.55); padding: .1rem 0; transform: translateY(-100%); opacity: 0; transition: transform 1.5s cubic-bezier(.23,1,.32,1), color .3s ease, opacity 1.5s ease; }
.nav-sub a:hover { color: var(--vesta); }

/* Animazioni a cascata Menu */
.nav-overlay.active .nav-section-title, .nav-overlay.active .nav-sub a { transform: translateY(0); opacity: 1; }
.nav-overlay.active .nav-section:nth-child(1) .nav-section-title { transition-delay: .1s; }
.nav-overlay.active .nav-section:nth-child(2) .nav-section-title { transition-delay: .15s; }
.nav-overlay.active .nav-section:nth-child(3) .nav-section-title { transition-delay: .2s; }
.nav-overlay.active .nav-sub a { transition-delay: .25s; }

.nav-overlay.active .nav-foot-inline { opacity: 1; }
.nav-header-social a { color: var(--calce); border-color: rgba(245,242,229,.25); opacity: .7; }
.nav-header-social a:hover { border-color: var(--vesta); color: var(--vesta); opacity: 1; }
.nav-lang, .nav-legal { list-style: none; display: flex; gap: 1rem; flex-wrap: wrap; }
.nav-lang a, .nav-legal a { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: rgba(245,242,229,.5); transition: color .3s ease; }
.nav-lang a:hover, .nav-legal a:hover { color: var(--vesta); }
.nav-lang a.active { color: var(--calce); font-weight: 600; }

@media(max-width:900px){
  .nav-overlay { -webkit-mask-image: none; mask-image: none; padding-bottom: 0; }
  .nav-grid { grid-template-columns: 1fr; padding: clamp(5rem,10vh,6rem) var(--space-md) 1.5rem; align-items: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; gap: 1.5rem; }
  .nav-logo-area { min-height: auto; }
  .nav-logo-area img { max-width: 180px; }
  .nav-cities { font-size: .65rem; }
  .nav-cols { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
  .nav-section-title { font-size: clamp(1.1rem,3.5vw,1.4rem); }
  .nav-sub a { font-size: clamp(.8rem,2.5vw,.9rem); }
  .nav-foot-inline { flex-direction: row; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding-top: 1rem; padding-bottom: 2rem; }
}
@media(max-width:480px){
  .nav-grid { padding: clamp(4.5rem,9vh,5.5rem) 1.25rem 1rem; gap: 1rem; }
  .nav-logo-area img { max-width: 140px; }
  .nav-cols { grid-template-columns: 1fr; gap: 1.25rem; }
  .nav-section-title { font-size: 1.15rem; margin-bottom: .15rem; }
  .nav-sub { gap: 0; }
  .nav-sub a { font-size: .85rem; padding: .15rem 0; }
  .nav-foot-inline { flex-direction: row; gap: .75rem; padding-bottom: 1.5rem; }
}

/* --- 5. FOOTER --- */
.footer-divider { display: block; width: 100%; height: clamp(80px,10vw,160px); line-height: 0; margin: 0; padding: 0; }
.footer-divider svg { width: 100%; height: 100%; display: block; }
.footer { background: var(--chia); color: rgba(5,31,56,.82); padding: var(--space-lg) var(--space-md) var(--space-sm); position: relative; margin-top: 0; }
.footer-brand-header { max-width: var(--max-width); margin: 0 auto clamp(3rem, 5vw, 4.5rem) auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
.footer-brand-logo { width: clamp(220px, 22vw, 320px); height: auto; aspect-ratio: 1000/134; background-color: var(--poseidone); -webkit-mask-image: url(https://www.domusminato.com/assets/domus-minato_Name_Vesta_20260410.svg); mask-image: url(https://www.domusminato.com/assets/domus-minato_Name_Vesta_20260410.svg); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; display: block; }
.footer-cities { font-family: var(--font-mono); font-size: clamp(0.7rem, 0.9vw, 0.85rem); letter-spacing: .25em; color: var(--poseidone); margin-top: -0.5rem; }
.footer-tagline { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(1.1rem, 1.4vw, 1.35rem); line-height: 1.35; color: var(--poseidone); margin: 0; }
.footer-tagline em { font-style: italic; }
.footer-social { display: flex; gap: 1rem; justify-content: center; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--poseidone); opacity: .6; transition: opacity .4s ease, transform .4s ease, border-color .4s ease; border: 1px solid rgba(5,31,56,.22); }
.footer-social a:hover { opacity: 1; transform: translateY(-2px); border-color: rgba(5,31,56,.55); }
.footer-social svg { width: 16px; height: 16px; display: block; fill: currentColor; }
.footer-social .social-icon { width: 16px; height: 16px; display: block; background-color: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.footer-social .social-icon--ig { -webkit-mask-image: url(https://www.domusminato.com/assets/Instagram_Glyph_White.svg); mask-image: url(https://www.domusminato.com/assets/Instagram_Glyph_White.svg); }
.footer-social .social-icon--li { -webkit-mask-image: url(https://www.domusminato.com/assets/InBug-White.png); mask-image: url(https://www.domusminato.com/assets/InBug-White.png); }
/* Pinterest inline SVG icon */
.social-svg-pin{width:16px;height:16px;display:block;fill:currentColor}


.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: center; gap: clamp(2rem, 3vw, 3rem); }
@media(max-width:900px){ .footer-inner { flex-wrap: wrap; justify-content: flex-start; } .footer-inner > div { min-width: 42%; } }
@media(max-width:440px){ .footer-inner { flex-direction: column; } }
.footer h4 { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: rgba(5,31,56,.65); margin: 0 0 1.1rem 0; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { font-family: var(--font-body); font-size: .9rem; font-weight: 400; color: rgba(5,31,56,.85); transition: color .3s ease, padding-left .3s ease; display: inline-block; }
.footer-links a:hover { color: var(--poseidone); padding-left: 3px; }
.footer-col-stack { display: flex; flex-direction: column; gap: 2rem; }
.footer-bottom { max-width: var(--max-width); margin: clamp(3rem, 5vw, 4.5rem) auto 0; padding-top: clamp(1.25rem, 2vw, 1.75rem); border-top: 1px solid rgba(5,31,56,.15); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; color: rgba(5,31,56,.6); }
.footer-bottom-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-bottom-links a { color: rgba(5,31,56,.6); transition: color .3s ease; }
.footer-bottom-links a:hover { color: var(--poseidone); }

/* --- 6. ANIMAZIONI GLOBALI --- */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Colore Testo Armonia */
.wave-word { color: var(--hanami); -webkit-text-fill-color: var(--hanami); display: inline-block; }