/* sedottidallapuglia — sistema di stile condiviso
   Palette ripresa dai colori reali del brand (anello sfumato tramonto del logo IG)
   + un blu notte per richiamare i contenuti "cieli stellati" del profilo. */

:root {
  --bg: #FDF8F2;
  --bg-alt: #FBEEDD;
  --ink: #2A2320;
  --ink-soft: #6B5D4F;
  --pink: #E8447A;
  --orange: #F5822B;
  --yellow: #FFC94A;
  --night: #16324F;
  --night-dark: #0E2438;
  --trust: #4E7C59;
  --border: #ECD9BF;
  --radius: 14px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--night);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
  border-radius: 0 0 8px 0;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--night);
  outline-offset: 2px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  box-shadow: 0 0 0 3px rgba(22, 50, 79, .2);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--night); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 248, 242, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header .bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  height: 49px;
  width: auto;
  display: block;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

nav.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 600;
}

nav.main-nav a[aria-current="page"] {
  color: var(--night);
  border-bottom: 2px solid var(--orange);
  padding-bottom: 2px;
}

/* nav.main-nav a ha piu' specificita' di .btn-primary da sola: qui si riafferma
   esplicitamente il bianco per i bottoni dentro la nav (bug: testo invisibile) */
nav.main-nav a.btn-primary,
nav.main-nav a.btn-primary[aria-current="page"] {
  color: #fff;
  border-bottom: none;
  padding-bottom: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  padding: 13px 24px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn-primary {
  background: var(--night);
  color: #fff;
  box-shadow: 0 6px 16px rgba(22, 50, 79, .25);
}
.btn-primary:hover { background: var(--night-dark); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 11.5px 22px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
}

/* Hero */
.hero {
  padding: 64px 0 56px;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-alt) 100%);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--night);
  background: #fff;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-visual {
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  background: linear-gradient(200deg, var(--pink) 0%, var(--orange) 45%, var(--yellow) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(42, 35, 32, .18);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,20,35,.75) 0%, transparent 45%);
}

.hero-visual .caption {
  position: absolute;
  left: 22px;
  bottom: 20px;
  right: 22px;
  color: #fff;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.hero-visual .caption strong {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 2px;
}
.hero-visual .caption a {
  color: #fff;
  text-decoration: underline;
  font-size: .75rem;
  opacity: .85;
}

.trust-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--ink-soft);
  margin-top: 18px;
}
.trust-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--trust); flex: none; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-night { background: var(--night); color: #fff; }
.section-night h2, .section-night h3 { color: #fff; }
.section-night p { color: #C9D6E4; }

.section-head { max-width: 640px; margin: 0 0 40px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--night);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  margin-bottom: 16px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
}

.card .tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--night);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 12px;
}

.cta-final {
  text-align: center;
  padding: 72px 0;
}
.cta-final h2 { margin-bottom: 10px; }
.cta-final p { max-width: 560px; margin: 0 auto 28px; }

/* Footer */
footer.site-footer {
  background: var(--night-dark);
  color: #C9D6E4;
  padding: 40px 0 26px;
  font-size: .9rem;
}
footer.site-footer a { color: #fff; }
footer.site-footer .cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
footer.site-footer h4 {
  color: #fff;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0 0 12px;
}
footer.site-footer ul { list-style: none; margin: 0; padding: 0; }
footer.site-footer li { margin-bottom: 8px; }
footer.site-footer .bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Forms */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 20px 40px rgba(42,35,32,.08);
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--night);
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .85rem;
  color: var(--ink-soft);
  margin: 18px 0;
}
.consent input { margin-top: 3px; flex: none; }

.form-msg { font-size: .9rem; font-weight: 600; margin-bottom: 14px; }
.form-msg.error { color: #B3261E; }
.form-msg.ok { color: var(--trust); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-channel {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.contact-channel:last-child { border-bottom: none; }
.contact-channel .icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  flex: none;
  font-weight: 700;
  color: var(--night);
}

@media (max-width: 860px) {
  nav.main-nav { display: none; }
  .nav-toggle { display: block; }
  .site-header.open nav.main-nav {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px 20px 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; aspect-ratio: 16/10; }
  .steps, .cards, .contact-grid { grid-template-columns: 1fr; }
  footer.site-footer .cols { grid-template-columns: 1fr; }
}

/* ── Video Hero ─────────────────────────────────────────────────────── */
.hero-video {
  position: relative;
  height: 100vh;
  min-height: 560px;
  max-height: 940px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--night-dark);
}

.hero-video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Copertura full-bleed: il lato corto copre sempre il container */
  width: 177.78vh;   /* 16/9 × 100vh */
  height: 100vh;
  min-width: 100vw;
  min-height: 56.25vw; /* 9/16 × 100vw */
  transform: translate(-50%, -50%);
  border: 0;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    170deg,
    rgba(14, 36, 56, 0.62) 0%,
    rgba(14, 36, 56, 0.38) 45%,
    rgba(14, 36, 56, 0.72) 100%
  );
}

.hero-video-content {
  position: relative;
  z-index: 2;
  padding-top: 80px;
  padding-bottom: 64px;
  max-width: 820px;
}

.hero-video-content h1 {
  color: #fff;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  margin-bottom: 18px;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}

.hero-video-content p {
  color: rgba(255,255,255,.88);
  font-size: 1.15rem;
  max-width: 600px;
  margin-bottom: 28px;
}

.eyebrow-light {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.28);
  backdrop-filter: blur(4px);
}

.hero-video-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.7);
  padding: 11.5px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background .15s ease;
}
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }

.trust-line-light {
  color: rgba(255,255,255,.72);
}

@media (max-width: 860px) {
  .hero-video { max-height: 680px; min-height: 480px; }
  .hero-video-content h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
}

/* ── Maps Hero extras ───────────────────────────────────────────────── */
#hero-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--night-dark);
}

.hero-location-badge {
  position: absolute;
  bottom: 32px;
  right: 32px;
  z-index: 3;
  background: rgba(14, 36, 56, .60);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 10px 18px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: opacity .3s ease;
}

.hero-location-badge.fading { opacity: 0; }

#hero-location-name {
  font-weight: 700;
  font-size: 1rem;
  font-family: Georgia, serif;
}

.hero-location-region {
  font-size: .75rem;
  opacity: .68;
}

@media (max-width: 860px) {
  .hero-location-badge { bottom: 16px; right: 16px; }
}

/* ── Street View overlay ────────────────────────────────────────────── */
#hero-streetview {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

#hero-streetview.sv-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Nascondi testo quando SV e visibile, badge rimane */
.hero-video.sv-active .hero-video-content {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero-video.sv-active .hero-video-overlay {
  opacity: 0.15;
  transition: opacity 0.4s ease;
}

.hero-video .hero-video-content {
  transition: opacity 0.4s ease;
}

.hero-video .hero-video-overlay {
  transition: opacity 0.4s ease;
}

/* Badge sopra tutto, sempre */
.hero-location-badge { z-index: 6; }
