:root{
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --line:#e2e8f0;
  --card:#f8fafc;

  --accent:#0f172a;
  --accent2:#0ea5e9;

  --radius:16px;
  --max:1100px;
  --shadow:0 8px 24px rgba(15,23,42,.06);
}
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

/* ===== RESET ===== */
*{ box-sizing:border-box; }

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

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

a{
  color:inherit;
  text-decoration:none;
}
a:hover{ text-decoration:underline; }

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

/* ===== HEADER ===== */
header{
  position:sticky;
  top:0;
  background:#fff;
  border-bottom:1px solid var(--line);
  z-index:10;
}

.nav{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:16px;
  min-height:80px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding-right:8px;
  padding-left:4px;
}

.brandlogo{
  height:97px;
  width:auto;
}

.brandtext{
  font-weight:800;
  letter-spacing:.2px;
  color:var(--text);
}

.navlinks{
  display:flex;
  gap:18px;
  font-weight:600;
  margin-top:0; /* allineamento ottico menu e CTA */
}
.navlinks a{
  display:inline-block;
  padding-bottom:4px;
  border-bottom:2px solid transparent;
}
.navlinks a:hover{
  border-bottom-color:rgba(14,165,233,.35);
  text-decoration:none;
}

/* ===== NAV ACTIVE ===== */
.navlinks a.active,
header nav a.active{
  color:var(--accent2);
  text-decoration:none;
  border-bottom:2px solid var(--accent2);
  padding-bottom:4px;
}
/* ===== BUTTONS ===== */
.btn{
  padding:12px 18px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:all .2s ease;
}

.btn.primary{
  background:linear-gradient(135deg,var(--accent2),#0284c7);
  color:#fff;
  border:none;
}

header .btn.primary{
  margin-top:2px; /* allineamento ottico */
  min-width:170px;
}

.btn.primary:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(14,165,233,.25);
  text-decoration:none;
}

.btn.secondary{
  background:transparent;
  border:1px solid var(--accent2);
  color:var(--accent2);
}

.btn.secondary:hover{
  background:var(--accent2);
  color:#fff;
  text-decoration:none;
}

/* ===== HERO ===== */
.hero{
  padding:56px 0;
}

.kicker{
  color:var(--muted);
  font-weight:700;
}

h1{
  font-size:clamp(32px,4vw,46px);
  margin:10px 0;
  line-height:1.1;
  letter-spacing:-0.5px;
}

.lead{
  font-size:18px;
  color:var(--muted);
  max-width:88ch;
}

.hero-actions{
  margin-top:24px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* ===== SECTIONS ===== */
.section{
  padding:32px 0;
  border-top:1px solid var(--line);
}

.section h2{
  margin:0 0 10px;
}

.section p{
  color:var(--muted);
  max-width:none;
}

/* ===== GRID & CARDS (12-col grid) ===== */
.grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:16px;
  margin-top:20px;
}

.card{
  grid-column:span 4;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:20px;
  box-shadow:var(--shadow);
}

.card h3{ margin-top:0; }

.card ul{
  padding-left:18px;
  color:var(--muted);
}

.tag{
  margin-top:12px;
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  font-size:13px;
  font-weight:700;
}

/* ===== ALTERNATIVE GRID (auto-fit) ===== */
/* Lasciata perché presente nel progetto: utile in alcune pagine */
.card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:30px;
  margin-top:40px;
}

/* ===== CTA ===== */
.cta{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  padding:24px;
  border-radius:20px;
  background:#f1f5f9;
  border:1px solid var(--line);
}

/* ===== FOOTER ===== */
footer{
  padding:30px 0;
  color:var(--muted);
}

.footergrid{
  border-top:1px solid var(--line);
  padding-top:20px;
  display:flex;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}

/* ===== PRODUCTION PAGE ===== */
.production-page{
  background:#f3f5f7;
}

.production-page .section{
  border-top:none;
}

.solution-block{
  margin-top:60px;
  padding:40px;
  background:#ffffff;
  border-radius:12px;
  box-shadow:0 6px 20px rgba(0,0,0,0.05);
  border-left:4px solid var(--accent2);
  scroll-margin-top: 120px;
}


.solution-text h2{
  margin-bottom:15px;
}

.solution-text h3{
  margin-top:25px;
  margin-bottom:10px;
  font-size:18px;
}

.solution-text ul{
  margin-left:20px;
  line-height:1.6;
}

.button-group{
  margin-top:25px;
  display:flex;
  gap:15px;
  flex-wrap:wrap;
}

.production-note{
  margin-top:20px;
  padding:15px 20px;
  background:#e9eef3;
  border-left:4px solid var(--accent2);
  font-size:15px;
  color:#334155;
}

.time-note{
  margin-top:15px;
  font-size:15px;
  color:var(--muted);
  font-style:italic;
}

.microcopy{
  margin-top:10px;
  font-size:14px;
  color:var(--muted);
}

/* ===== PRODUCTION CONTACT SECTION ===== */

#production{
  padding-top: 60px; /* spazio sotto header */
}

.production-box{
  background:#ffffff;
  padding:32px;
  border-radius:16px;
  box-shadow:var(--shadow);
  border:1px solid var(--line);
}

#production button{
  margin-top:12px;
}

/* ===== FORM ===== */

.qualification-form{
  margin-top:40px;
  padding:30px;
  background:#ffffff;
  border-radius:var(--radius);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:15px;
  margin-bottom:15px;
}

.qualification-form input,
.qualification-form textarea,
.production-box input,
.production-box textarea,
.production-box select{
  width:100%;
  padding:12px 14px;
  border-radius:10px;
  border:1px solid var(--line);
  font-size:15px;
  font-family:inherit;
}

.qualification-form input:focus,
.qualification-form textarea:focus,
.production-box input:focus,
.production-box textarea:focus,
.production-box select:focus{
  outline:none;
  border-color:var(--accent2);
  box-shadow:0 0 0 2px rgba(14,165,233,.15);
}

.qualification-form button{
  margin-top:10px;
}
.production-contact {
  margin-top: 40px;
  padding: 35px;
  background: #ffffff;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
}

.production-contact h2 {
  margin-bottom: 15px;
}

.production-contact ul {
  margin-left: 20px;
  line-height: 1.6;
}
/* Offset per anchor con header sticky */
.anchor{
  scroll-margin-top: 110px; /* regola 90-140 se vuoi */
}

/* ===== FEATURED CARD (Production) ===== */
.card.featured{
  border-color: rgba(0,0,0,.10);
  box-shadow: 0 20px 50px rgba(0,0,0,.15);
  transform: translateY(-6px);
}

.card.featured h3{
  color: var(--accent2);
}
.ideal-for{
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  padding-left: 14px;
  border-left: 2px solid var(--accent2);
  margin: 10px 0 14px;
}
.final-note{
  padding-top: 40px;
  padding-bottom: 10px;
}

.final-statement{
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  max-width: 800px;
  margin-top: 60px;
}
.office-examples{
  margin-top: 50px;
}

.office-examples h3{
  margin-bottom: 20px;
}

.solution-card{
  background: var(--card);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 25px;
}
.section-intro{
  font-size: 1.1rem;
  font-weight: 500;
  margin: 30px 0 15px;
  color: var(--text);
}
.section-title{
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .icon{
  font-size: 0.9rem;
  color: var(--accent2);
  opacity: 0.7;
}
.office-visual{ margin:28px 0 36px; }

.office-image{
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  box-shadow: var(--shadow);
}

.plotter-image{
  width:100%;
  max-height:380px;
  object-fit:cover;
  border-radius:12px;
  display:block;
  box-shadow:0 6px 18px rgba(15,23,42,.08);
}


/* ===== OFFICE BLOCK (immagine + testo affiancati) ===== */
.office-block{
  display:grid;
  grid-template-columns: 1.35fr .65fr;
  gap:48px;
  align-items:center;
  margin-top:16px;
}

.office-copy{
  display:flex;
  flex-direction:column;
  gap:24px;
  max-width:420px;
  border-left:3px solid var(--accent);
  padding-left:24px;
}


.office-text{
  margin:0;
  color:var(--muted);
  font-size:1.08rem;
  line-height:1.7;
}


@media(max-width:900px){
  /* Cards */
  .card{ grid-column:span 12; }

  /* Top navigation: keep visible and scrollable */
  

  /* Office block */
  .office-block{ grid-template-columns:1fr; gap:24px; }
  .office-copy{
    max-width:none;
    border-left:none;
    padding-left:0;
  }
}
/* Callout "Prima delle marche" */
.brand-note{
  margin-top:18px;
  border-left:3px solid var(--accent2);
}
/* Box "Prima delle marche": testo a tutta larghezza del box */
.card.brand-note p{
  max-width: none;
}

/* Wide-section: lascia che segua il container */
.wide-section{
  margin: 0;
}

/* Intro wide-section: più ampia, per evitare a capo “strani” */
.wide-section > p{
  max-width: 1100px;
}
.doc-link{
  color: var(--accent2);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.doc-link::before{
  content: "↗";
  font-size: 12px;
  opacity: .9;
}

.doc-link:hover{
  opacity: .85;
}

.badge-new{
  display: inline-block;
  background: var(--accent2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 8px;
  text-transform: uppercase;
}
/* ===== PRODUCTION HERO IMAGE ===== */
.production-visual{
  margin: 22px 0 26px;
}

.production-image{
  width:100%;
  max-height:460px;
  object-fit:cover;
  border-radius:16px;
  display:block;
  box-shadow:0 8px 24px rgba(15,23,42,.08);
}
/* ===== FINITURA / NOBILITAZIONE (PRODUCTION) ===== */
#finitura{
  margin-top: 44px;
  background: linear-gradient(180deg, rgba(15,23,42,.04), rgba(15,23,42,.02));
  border-left: 4px solid var(--accent2);
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 12px 30px rgba(15,23,42,.06);
}

#finitura .section-title{
  margin-top: 0;
}

.finitura-grid .card{
  border-color: rgba(15,23,42,.08);
  background: #fff;
}
img{
  max-width:100%;
  height:auto;
  display:block;
}
@media(max-width:768px){

  .nav{
    flex-direction:column;
    align-items:flex-start;
    gap:14px;
    min-height:auto;
    padding-top:10px;
    padding-bottom:10px;
  }

  .brandlogo{
    height:98px;
  }

  .navlinks{
    flex-wrap:wrap;
    overflow:visible;
    white-space:normal;
  }

  header .btn.primary{
    align-self:flex-start;
  }

}

/* ===== HERO CON IMMAGINE ===== */
.hero-image{
  position:relative;
  min-height:520px;
  padding:100px 0 120px;
  color:#fff;
  background:url('img/hero-mask.jpg') center/cover no-repeat;
  overflow:hidden;
}


.hero-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(
    to bottom,
    rgba(15,23,42,0.52) 0%,
    rgba(15,23,42,0.42) 45%,
    rgba(15,23,42,0.18) 70%,
    rgba(15,23,42,0) 100%
  );
}

.hero-content{
  position:relative;
  z-index:2;
  max-width:800px;
}

/* testo sopra immagine */
.hero-image .kicker{
  color:rgba(255,255,255,0.7);
}

.hero-image .lead{
  color:rgba(255,255,255,0.85);
}


.hero-image .hero-actions .btn:not(.primary){
  background:#fff;
  color:var(--text);
  border:1px solid rgba(15,23,42,.12);
}

/* ===== FIX HEADER MOBILE: logo Alfa Sistemi non compresso ===== */
@media(max-width:768px){

  .nav{
    display:flex;              /* importante: prima restava grid */
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
    min-height:auto;
    padding-top:8px;
    padding-bottom:10px;
  }

  .brand{
    display:flex;
    align-items:center;
    width:auto;
    max-width:100%;
    padding-left:0;
  }

  .brandlogo{
    display:block;
    width:auto;
    height:74px;
    max-width:230px;
    object-fit:contain;
    flex-shrink:0;
  }

  .navlinks{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    gap:10px 14px;
    overflow:visible;
    white-space:normal;
    font-size:14px;
  }

  header .btn.primary{
    align-self:flex-start;
    min-width:0;
  }
}


.form-privacy-note{margin:14px 0 0;max-width:680px;color:var(--muted);font-size:13px;line-height:1.5;}
.form-privacy-note a{text-decoration:underline;}
footer .footergrid a{white-space:nowrap;}


.footer-legal{margin-top:8px;font-size:12px;line-height:1.45;color:var(--muted);}
.footer-legal a{color:inherit;text-decoration:none;}
.footer-legal a:hover{text-decoration:underline;}
footer .footergrid > div:last-child{text-align:right;}
@media (max-width:760px){footer .footergrid > div:last-child{text-align:left;}}
