/* =============================================
   DESIGN SYSTEM — ARGIVA
   ============================================= */

:root {
  /* PALETTE
     Blu #1a2e67 e oro #e9b920 sono i due colori di marca.
     L'oro esiste in tre gradazioni perche' #e9b920 e' brillante: su fondo
     scuro rende (7:1 sul blu), ma come testo su bianco fa 1.84:1 ed e'
     illeggibile. Quindi: --color-oro per sfondi e testo su scuro,
     --color-oro-dark per testo su chiaro, --color-oro-light per fondi scuri.
     Non usare --color-oro come colore di testo su bianco. */
  --color-ebano:       #1a2e67;  /* blu di marca */
  --color-moka:        #24408c;  /* blu hover, 9.6:1 su bianco */
  --color-tabacco:     #5a6493;  /* testo secondario, 5.7:1 su bianco */
  --color-oro:         #e9b920;  /* oro di marca: sfondi, testo su scuro */
  --color-oro-dark:    #876b12;  /* oro per testo su chiaro, 5.1:1 su bianco */
  --color-oro-light:   #eeca57;  /* oro per fondi scuri, 8.1:1 sul blu */
  --color-avorio:      #FFFFFF;
  --color-greige:      #f1f2f8;
  --color-greige-dark: #c3c6dd;
  --color-white:       #FFFFFF;

  /* SEMANTICI */
  --bg-primary:     var(--color-avorio);
  --bg-secondary:   var(--color-greige);
  --bg-dark:        var(--color-ebano);
  --text-primary:   var(--color-ebano);
  --text-secondary: var(--color-tabacco);
  --text-muted:     var(--color-greige-dark);
  --accent:         var(--color-oro-dark);   /* --accent e' sempre testo su chiaro */
  --accent-light:   var(--color-oro-light);
  --border:         rgba(26, 46, 103, 0.12);
  --border-dark:    rgba(255, 255, 255, 0.15);

  /* TIPOGRAFIA */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-label:   'DM Sans', system-ui, sans-serif;

  /* SCALE TIPOGRAFICA */
  --text-xs:   0.6875rem;
  --text-sm:   0.8125rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.5rem;
  --text-4xl:  3.5rem;
  --text-5xl:  5rem;

  /* SPAZIATURA */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 7rem;

  /* LAYOUT */
  --max-width:     1440px;
  --content-width: 1200px;
  --gutter:        clamp(1.5rem, 5vw, 4rem);
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     16px;

  /* TRANSIZIONI */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --duration-fast: 200ms;
  --duration-base: 350ms;
  --duration-slow: 600ms;

  /* Z-INDEX */
  --z-base:    1;
  --z-overlay: 10;
  --z-nav:     100;
  --z-modal:   1000;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; }
address { font-style: normal; }
.overflow-hidden { overflow: hidden; }

/* =============================================
   LAYOUT HELPERS
   ============================================= */
.container       { width: 100%; max-width: var(--content-width); margin: 0 auto; padding: 0 var(--gutter); }
.container--wide { max-width: var(--max-width); }
.container--narrow { max-width: 760px; }

.section       { padding: var(--space-2xl) 0; }
.section--sm   { padding: var(--space-xl) 0; }
.section--dark { background: var(--color-ebano); color: var(--color-avorio); }
.section--greige { background: var(--color-greige); }

/* =============================================
   TIPOGRAFIA
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.15;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 400; }
h3 { font-size: var(--text-xl); font-weight: 400; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.section-label {
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  font-family: var(--font-label);
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.js-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.js-reveal.is-visible { opacity: 1; transform: translateY(0); }
.js-reveal[data-delay="1"] { transition-delay: 100ms; }
.js-reveal[data-delay="2"] { transition-delay: 200ms; }
.js-reveal[data-delay="3"] { transition-delay: 300ms; }
.js-reveal[data-delay="4"] { transition-delay: 400ms; }
.js-reveal[data-delay="5"] { transition-delay: 500ms; }

/* =============================================
   HEADER / NAV
   ============================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  transition: background var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.site-header--scrolled {
  background: var(--color-ebano);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo — always white on dark bg (transparent + scrolled both dark) */
.site-header__logo { display: flex; align-items: center; }
.logo-dark  { display: none; }

/* Nav desktop */
.site-nav__list { display: flex; gap: 2rem; }
.site-nav__link {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--duration-fast), border-color var(--duration-fast);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--color-avorio);
  border-bottom-color: var(--color-avorio);
}
.site-header--scrolled .site-nav__link { color: rgba(255,255,255,0.75); }
.site-header--scrolled .site-nav__link:hover,
.site-header--scrolled .site-nav__link.is-active {
  color: #fff;
  border-bottom-color: var(--color-oro);
}

/* Dropdown */
.site-nav__item--dropdown { position: relative; }
.site-nav__dropdown {
  position: absolute; top: calc(100% + 1rem); left: -1rem;
  background: var(--color-avorio);
  border: 1px solid var(--border);
  padding: 0.75rem 0;
  min-width: 180px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--duration-fast) var(--ease-out);
  box-shadow: 0 8px 32px rgba(26, 46, 103, 0.1);
}
.site-nav__item--dropdown:hover .site-nav__dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.site-nav__dropdown a {
  display: block;
  padding: 0.5rem 1.25rem;
  font-size: var(--text-sm);
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--duration-fast);
}
.site-nav__dropdown a:hover { background: var(--color-greige); }

/* Header actions */
.site-header__actions { display: flex; align-items: center; gap: 1rem; }
.site-header__wa {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--duration-fast);
}
.site-header__wa:hover { color: var(--color-avorio); }
.site-header--scrolled .site-header__wa { color: rgba(255,255,255,0.75); }
.site-header--scrolled .site-header__wa:hover { color: #fff; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  /* Il pannello del menu e' fixed a schermo intero con z-index 99 e sta dentro
     <header>: nello stacking interno un elemento posizionato copre comunque i
     fratelli statici, quindi da aperto finiva sopra l'hamburger e il tap per
     chiudere lo prendeva lui. Il menu restava aperto per sempre: su mobile, con
     il body bloccato, il sito diventava inutilizzabile.
     Posizionandolo sopra il pannello, il tasto resta l'interruttore che sembra. */
  position: relative;
  z-index: var(--z-nav);
}
.hamburger span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--color-avorio);
  transition: all var(--duration-fast);
  transform-origin: center;
}
.site-header--scrolled .hamburger span { background: var(--color-avorio); }
.hamburger.is-active span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0;
  z-index: calc(var(--z-nav) - 1);
  background: var(--color-ebano);
  color: var(--color-avorio);
  padding: 100px var(--gutter) var(--space-xl);
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-out);
  overflow-y: auto;
}
.mobile-menu--open { transform: translateX(0); }
.mobile-menu__list { margin: 0 0 2rem; }
.mobile-menu__list > li { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.mobile-menu__list > li > a {
  display: block;
  padding: 1rem 0;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--color-avorio);
  text-decoration: none;
}
.mobile-menu__list > li > ul { padding: 0 0 1rem 1rem; }
.mobile-menu__list > li > ul li a {
  display: block;
  padding: 0.4rem 0;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--duration-fast);
}
.mobile-menu__list > li > ul li a:hover { color: var(--color-avorio); }

@media (max-width: 1024px) {
  .site-nav, .site-header__wa span { display: none; }
  .hamburger { display: flex; }
}

/* =============================================
   HERO (Homepage)
   ============================================= */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; }
.hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: rgba(26, 46, 103, 0.48); }
.hero__content {
  position: relative;
  z-index: 2;
  color: var(--color-avorio);
  max-width: 700px;
}
.hero__label { color: var(--color-oro-light); }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 300;
  line-height: 1.0;
  margin: 1rem 0 1.5rem;
}
.hero__title em { font-style: italic; color: var(--color-oro-light); }
.hero__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2.5rem;
  max-width: 460px;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  transition: opacity 0.3s ease;
}
.hero__scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.5));
  animation: scrollDown 1.8s ease-in-out infinite;
}
@keyframes scrollDown {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* =============================================
   PAGE HERO (pagine interne)
   ============================================= */
.page-hero {
  position: relative;
  height: 60vh; min-height: 400px;
  display: flex; align-items: flex-end;
  padding-bottom: var(--space-xl);
  overflow: hidden;
}
.page-hero--sm { height: 40vh; min-height: 280px; }
/* Vale sia per <img> sia per <video>: l'hero delle pagine interne usa hero.mp4. */
.page-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26, 46, 103,0.78) 0%, rgba(26, 46, 103,0.45) 50%, rgba(26, 46, 103,0.7) 100%);
}
.page-hero__content { position: relative; z-index: 2; color: var(--color-avorio); max-width: 800px; }
.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
}
.page-hero__subtitle {
  color: rgba(255, 255, 255, 0.78);
  margin-top: 0.75rem;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  max-width: 600px;
}
@media (max-width: 768px) {
  .page-hero { height: auto; min-height: 360px; padding: calc(72px + var(--space-lg)) 0 var(--space-lg); }
  .page-hero--sm { height: auto; min-height: 240px; padding: calc(72px + var(--space-md)) 0 var(--space-md); }
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: var(--color-ebano); color: var(--color-avorio); }
.site-footer__top { padding: var(--space-2xl) 0 var(--space-xl); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-xl);
}
/* Senza la colonna newsletter le tre superstiti resterebbero schiacciate a
   sinistra con un vuoto a destra: le colonne della griglia non spariscono con
   il loro contenuto. Le proporzioni non sono quelle di prima meno una: il 2fr
   del logo era tarato su quattro colonne e da solo aprirebbe un vuoto verso
   "Esplora". */
.site-footer__grid--3col { grid-template-columns: 1.4fr 1fr 1.3fr; }
.site-footer__brand p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  margin: 1rem 0 1.5rem;
  line-height: 1.6;
}
.site-footer__social { display: flex; gap: 1rem; }
.site-footer__social a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all var(--duration-fast);
}
.site-footer__social a:hover {
  border-color: var(--color-avorio);
  color: var(--color-avorio);
}
.site-footer h4 {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-oro);
  margin-bottom: 1.5rem;
}
.site-footer__nav ul, .site-footer__contact address { display: flex; flex-direction: column; gap: 0.6rem; }
.site-footer__nav a,
.site-footer__contact a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--duration-fast);
}
.site-footer__nav a:hover,
.site-footer__contact a:hover { color: var(--color-avorio); }
.site-footer__hours { margin-top: 1.5rem; font-size: var(--text-sm); color: rgba(255, 255, 255, 0.6); line-height: 1.8; }
.site-footer__hours strong { color: var(--color-avorio); }

/* Newsletter form */
.newsletter-form__row {
  display: flex; margin-top: 1rem;
}
.newsletter-form__row input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-avorio);
  font-family: var(--font-body);
  font-size: var(--text-sm);
}
.newsletter-form__row input::placeholder { color: rgba(255, 255, 255, 0.4); }
.newsletter-form__row input:focus { outline: none; border-color: var(--color-oro); }
.newsletter-form__row button {
  padding: 0.75rem 1.25rem;
  background: var(--color-oro);
  color: var(--color-avorio);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background var(--duration-fast);
}
.newsletter-form__row button:hover { background: var(--color-oro-light); }
.newsletter-form__privacy { font-size: var(--text-xs); color: rgba(255, 255, 255, 0.4); margin-top: 0.75rem; }
.newsletter-form__privacy a { color: rgba(255, 255, 255, 0.6); text-decoration: underline; }

/* Footer bottom */
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
}
.site-footer__bottom-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.site-footer__bottom p,
.site-footer__bottom nav a {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
}
.site-footer__bottom nav { display: flex; gap: 1.5rem; }
.site-footer__bottom nav a:hover { color: var(--color-avorio); text-decoration: none; }

/* WhatsApp FAB */
.whatsapp-fab {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 56px; height: 56px;
  background: #25D366; color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: var(--z-overlay);
  transition: transform var(--duration-fast) var(--ease-out);
  text-decoration: none;
}
.whatsapp-fab:hover { transform: scale(1.08); }

/* =============================================
   DIVIDER ORNAMENTALE
   ============================================= */
.divider-ornament {
  display: flex; align-items: center; gap: 1rem;
  margin: var(--space-xl) 0;
}
.divider-ornament span:not(.divider-ornament__dot) { flex: 1; height: 1px; background: var(--border); }
.divider-ornament__dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }

/* =============================================
   RESPONSIVE FOOTER
   ============================================= */
@media (max-width: 1024px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
}
@media (max-width: 600px) {
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__bottom-inner { flex-direction: column; align-items: flex-start; }
}
