/*
 * La vetrina del distretto.
 *
 * Foglio SOLO per la homepage: condizioni-buoni e rimborso continuano a usare
 * sito.css e non vanno toccati — sono indirizzi stampati sugli scontrini.
 *
 * Direzione: notte da riflettori. Fondo blu-notte, sezioni chiare color
 * cemento, un unico accento ambra "da cantiere" — il sito dice che il
 * distretto è in allestimento, e il nastro a strisce oblique del badge è
 * la firma visiva di quel messaggio. Font Barlow (nato per la segnaletica
 * stradale), auto-ospitato: niente CDN di terzi su un sito pubblico.
 */

@font-face {
  font-family: 'Barlow';
  src: url('fonts/Barlow-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('fonts/Barlow-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('fonts/Barlow-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('fonts/BarlowCondensed-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('fonts/BarlowCondensed-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('fonts/BarlowCondensed-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --notte: #0d1320;
  --notte-alta: #131b2c;
  --cemento: #f0f1ee;
  --carta: #ffffff;
  --inchiostro: #16181d;
  --inchiostro-tenue: #565c69;
  --nebbia: #aeb6c4;      /* testo secondario su fondo notte */
  --ambra: #f0a63c;
  --ambra-viva: #ffc061;
  --bordo-notte: #26304a;
  --bordo: #dcdfd9;
  --condensed: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --testo: 'Barlow', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--notte);
  color: var(--inchiostro);
  font: 400 18px/1.65 var(--testo);
}

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

a { color: inherit; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- testata ---------- */

.testata {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 24px;
}

.marchio {
  font: 700 24px/1 var(--condensed);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}
.marchio b { color: var(--ambra-viva); font-weight: 700; }

/* ---------- bottoni ---------- */

.btn {
  display: inline-block;
  font: 600 17px/1 var(--testo);
  text-decoration: none;
  padding: 15px 26px;
  border-radius: 8px;
  border: 2px solid transparent;
}
.btn-ambra {
  background: var(--ambra);
  color: #241703;
}
.btn-ambra:hover { background: var(--ambra-viva); }
.btn-notte {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.btn-notte:hover { border-color: #fff; }
.btn-scuro {
  border-color: var(--inchiostro);
  color: var(--inchiostro);
}
.btn-scuro:hover { background: var(--inchiostro); color: #fff; }

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

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
}
.hero-foto {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-foto::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 19, 32, 0.55) 0%, rgba(13, 19, 32, 0.1) 35%, rgba(13, 19, 32, 0.82) 82%, var(--notte) 100%);
}

.hero-testo {
  position: relative;
  width: 100%;
  padding: 140px 0 90px;
}

/* Il badge di cantiere: la firma della pagina. Strisce oblique vere,
   non un'icona — lo stesso nastro che oggi delimita il piazzale. */
.badge-cantiere {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(13, 19, 32, 0.72);
  border: 1px solid rgba(240, 166, 60, 0.5);
  border-radius: 999px;
  padding: 9px 20px 9px 10px;
  backdrop-filter: blur(4px);
}
.badge-cantiere .nastro {
  width: 44px;
  height: 16px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    -45deg,
    var(--ambra) 0 8px,
    #1a2233 8px 16px
  );
}
.badge-cantiere span {
  font: 600 16px/1 var(--condensed);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ambra-viva);
}

.hero h1 {
  font: 700 clamp(52px, 9vw, 108px)/0.95 var(--condensed);
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: #fff;
  margin: 22px 0 14px;
}
.hero h1 em {
  font-style: normal;
  color: var(--ambra-viva);
}

.hero-sotto {
  max-width: 34em;
  font-size: 20px;
  color: #e6e9ef;
  margin: 0 0 30px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- sezioni ---------- */

.sezione { padding: 84px 0; }
.sezione.chiara { background: var(--cemento); color: var(--inchiostro); }
.sezione.notte { background: var(--notte); color: #e6e9ef; }

.occhiello {
  display: block;
  font: 600 16px/1 var(--condensed);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ambra);
  margin-bottom: 10px;
}
.sezione h2 {
  font: 700 clamp(34px, 5vw, 52px)/1.05 var(--condensed);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 16px;
}
.sezione .intro {
  max-width: 38em;
  font-size: 19px;
  margin: 0;
  color: var(--inchiostro-tenue);
}
.sezione.notte .intro { color: var(--nebbia); }

/* ---------- carte servizi ---------- */

.griglia {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 44px;
}

.carta {
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.carta figure {
  margin: 0;
  aspect-ratio: 9 / 5.6;
  overflow: hidden;
}
.carta figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.carta:hover figure img { transform: scale(1.04); }

.carta-corpo { padding: 24px 26px 28px; }

.tag-arrivo {
  display: inline-block;
  font: 600 14px/1 var(--condensed);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a5410;
  background: rgba(240, 166, 60, 0.18);
  border: 1px solid rgba(240, 166, 60, 0.55);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 14px;
}
.carta h3 {
  font: 600 28px/1.1 var(--condensed);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}
.carta p {
  margin: 0;
  color: var(--inchiostro-tenue);
  font-size: 17px;
}

/* ---------- striscia buoni ---------- */

.buoni {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px 56px;
  align-items: center;
}
.cambio {
  font: 700 clamp(56px, 8vw, 96px)/1 var(--condensed);
  color: #fff;
  white-space: nowrap;
}
.cambio small {
  display: block;
  font: 600 17px/1.3 var(--condensed);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ambra);
  margin-top: 10px;
}
.buoni-testo p {
  max-width: 36em;
  color: var(--nebbia);
  margin: 0 0 22px;
}
.buoni-link {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- piede ---------- */

.piede {
  background: var(--notte);
  border-top: 1px solid var(--bordo-notte);
  padding: 40px 0 48px;
  color: var(--nebbia);
  font-size: 16px;
}
.piede .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.piede nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.piede a { color: #e6e9ef; text-decoration: none; }
.piede a:hover { text-decoration: underline; }

/* ---------- comparsa allo scorrimento ---------- */

/* Solo se il JS c'è davvero: senza, niente elementi nascosti. */
html.js .appare {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .appare.visto {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .appare { opacity: 1; transform: none; transition: none; }
  .carta figure img { transition: none; }
}

/* ---------- telefono ---------- */

@media (max-width: 760px) {
  body { font-size: 17px; }
  .hero { min-height: 86vh; }
  .hero-testo { padding: 120px 0 64px; }
  .sezione { padding: 60px 0; }
  .griglia { grid-template-columns: 1fr; gap: 22px; }
  .buoni { grid-template-columns: 1fr; }
  .cambio { white-space: normal; }
  .testata { padding: 18px 20px; }
  .btn { padding: 14px 22px; }
}
