/* ===== Variabili: cambia qui colori e font ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f2f2f2;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #ed6b40;        /* colore principale */
  --accent-dark: #8a3f27;
  --radius: 15px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  overflow-x: hidden;           /* evita lo scorrimento orizzontale su telefono */
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== Header ===== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 5vw;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(2px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.brand { display: flex; align-items: center; gap: 15px; }
.brand-logo { height: 40px; width: auto; }
.brand-name { font-weight: 200; letter-spacing: 0.02em; }

.menu { display: flex; gap: 26px; font-size: 0.95rem; }
.menu a { color: var(--muted); transition: color .2s; }
.menu a:hover { color: var(--accent); }

/* Pulsante hamburger: nascosto su schermi grandi */
.nav-toggle { display: none; }
.burger { display: none; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;   /* titolo in alto, descrizione in basso */
  gap: 20px;
  padding: 120px 5vw 20px;
  color: #fff;
  /* Foto di sfondo */
  background:
    linear-gradient(120deg, rgba(10,10,10,.80), rgba(10,10,10,.65)),
    url("images/mercato.jpeg") center / cover no-repeat,
    #1c1c1c;
}

/* Testi del hero centrati (anche su schermi molto grandi) */
.hero-top,
.hero-bottom {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 0 auto 28px;
}

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ===== Bottoni ===== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all .2s;
  border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--text); }
.btn-outline { border-color: var(--text); color: var(--text); }
.btn-outline:hover { background: var(--text); color: #fff; }

/* ===== Sezioni ===== */
.section { padding: 100px 5vw; }
.section-alt { background: var(--bg-alt); }

.container { max-width: 1100px; margin: 0 auto; }
.narrow { max-width: 680px; }
.center { text-align: center; }

/* Le sezioni non finiscono sotto la barra fissa quando si clicca il menu */
section[id] { scroll-margin-top: 40px; }

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  position: relative;
}
h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 14px;
}
.center h2::after { margin-left: auto; margin-right: auto; }

p + p { margin-top: 14px; }
.muted { color: var(--muted); margin-bottom: 24px; }
.address { font-size: 1.2rem; margin-bottom: 8px; }

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  margin-top: 40px;
}

.card {
  background: #fff;
  padding: 30px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}
.card-icon {
  font-weight: 800;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* ===== Contatti ===== */
.contact-list {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-direction: row;          /* su computer: uno accanto all'altro */
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 32px;
  font-size: 1.15rem;
}
.contact-list a { transition: color .2s; }
.contact-list a:hover { color: var(--accent); }
.insta { display: inline-flex; align-items: center; gap: 10px; }

/* ===== Banner immagine (formato panoramico) ===== */
.banner {
  width: 100%;
  aspect-ratio: 5 / 1;          /* proporzione 1:3 – prova 4 / 1 per una fascia più sottile */
  background: #1c1c1c;
  overflow: hidden;
}
.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;            /* riempie la fascia ritagliando il superfluo */
  object-position: center;      /* se il macchinario è tagliato, prova "center top" o "center bottom" */
}

/* ===== Galleria a riquadri apribili ===== */
.gallery-list {
  max-width: 900px;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gallery {
  background: var(--bg-alt);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery summary {
  list-style: none;                 /* toglie la freccetta di default */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: color .2s;
}
.gallery summary::-webkit-details-marker { display: none; }
.gallery summary:hover { color: var(--accent); }

/* il simbolo + diventa × quando il riquadro è aperto */
.gallery summary::after {
  content: "+";
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
  transition: transform .25s;
}
.gallery[open] summary::after { transform: rotate(45deg); }

.photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 0 20px 22px;
}
.photos figure {
  aspect-ratio: 4 / 3;              /* tutte le foto con la stessa proporzione */
  border-radius: 10px;
  overflow: hidden;
  background: #e6e6e3;
}
.photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 30px 5vw;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.footer p + p { margin-top: 6px; }

/* ===== Mobile: menu a tendina ===== */
@media (max-width: 680px) {
  .section { padding: 70px 6vw; }
  .brand-name { font-size: 0.95rem; }

  /* contatti uno sotto l'altro su telefono */
  .contact-list { flex-direction: column; }

  /* su telefono la fascia è più alta, altrimenti sarebbe troppo sottile */
  .banner { aspect-ratio: 3.5 / 1; }

  .burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    cursor: pointer;
  }
  .burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
  }

  .menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  }
  .menu a {
    padding: 16px 5vw;
    font-size: 1.05rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }

  .nav-toggle:checked ~ .menu { display: flex; }
}