/* ==========================================================
   TECNO METAL SRLS — foglio di stile
   Colori principali modificabili qui sotto (sezione :root)
   ========================================================== */
:root {
  --nero: #0e0f11;
  --antracite: #1a1c1f;
  --antracite-2: #24272b;
  --linea: rgba(255, 255, 255, .1);
  --bianco: #ffffff;
  --chiaro: #f4f3f1;
  --testo: #c9cbcf;
  --testo-scuro: #3b3e44;
  --arancio: #e8762b;
  --arancio-chiaro: #ffb070;
  --arancio-scuro: #9c4712;
  --metallo: linear-gradient(120deg, #ffb070 0%, #e8762b 45%, #9c4712 100%);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --larghezza: 1200px;
  --header: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--testo);
  background: var(--nero);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3 { color: var(--bianco); line-height: 1.08; letter-spacing: -.02em; font-weight: 800; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }

:focus-visible { outline: 2px solid var(--arancio-chiaro); outline-offset: 3px; }

.container { width: min(100% - 2.5rem, var(--larghezza)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--arancio); color: #000; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--arancio-chiaro); margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 2.25rem; height: 2px; background: var(--metallo); }
.eyebrow--dark { color: var(--arancio-scuro); }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .85rem 1.75rem;
  font: inherit; font-size: .9rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: 2px; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}
.btn--primary { background: var(--metallo); color: #14100c; box-shadow: 0 10px 30px -12px rgba(232, 118, 43, .7); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(232, 118, 43, .85); }
.btn--ghost { border-color: rgba(255, 255, 255, .35); color: var(--bianco); }
.btn--ghost:hover { border-color: var(--arancio-chiaro); color: var(--arancio-chiaro); }
.btn--small { min-height: 2.6rem; padding: .5rem 1.15rem; font-size: .8rem; }
.btn--full { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header);
  transition: border-color .3s ease;
  border-bottom: 1px solid transparent;
}
/* lo sfondo sfocato sta su un livello separato, così il menu mobile resta a tutto schermo */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: rgba(14, 15, 17, .88); backdrop-filter: blur(12px); transition: opacity .3s ease;
}
.header.is-scrolled { border-color: var(--linea); }
.header.is-scrolled::before { opacity: 1; }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.logo { display: inline-flex; align-items: center; gap: .7rem; color: var(--bianco); }
.logo__mark { width: 1.9rem; height: 1.9rem; color: var(--arancio); }
.logo__text { font-size: 1.15rem; letter-spacing: .16em; font-weight: 300; color: var(--bianco); white-space: nowrap; }
.logo__text strong { font-weight: 800; color: var(--arancio); }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) {
  position: relative; font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: #e6e7e9; padding: .5rem 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--metallo); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav a:not(.btn):hover::after, .nav a.is-active::after { transform: scaleX(1); }

.nav-toggle { display: none; width: 2.75rem; height: 2.75rem; background: none; border: 0; padding: .6rem; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--bianco); margin: 6px 0; transition: transform .3s ease, opacity .3s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header) + 3rem) 0 0; overflow: hidden; isolation: isolate;
  /* Se esiste images/hero.jpg viene usata come sfondo, altrimenti resta la grafica */
  background:
    linear-gradient(90deg, rgba(14, 15, 17, .96) 0%, rgba(14, 15, 17, .82) 45%, rgba(14, 15, 17, .45) 100%),
    url("../images/hero.jpg") center / cover no-repeat,
    radial-gradient(90% 70% at 85% 30%, #33373d 0%, #1a1c1f 45%, #0e0f11 100%);
}
.hero::before { /* trama metallica sottile */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, .025) 46px 47px);
}
.hero__art { position: absolute; right: -4%; top: 50%; width: min(58vw, 760px); height: auto; transform: translateY(-50%); z-index: -1; opacity: .9; }
.draw { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: disegna 2.8s cubic-bezier(.6, .1, .2, 1) .2s forwards; }
@keyframes disegna { to { stroke-dashoffset: 0; } }

.hero__content { padding-bottom: 4rem; }
.hero__content > * { opacity: 0; transform: translateY(18px); animation: sali .9s ease forwards; }
.hero__content > :nth-child(2) { animation-delay: .12s; }
.hero__content > :nth-child(3) { animation-delay: .24s; }
.hero__content > :nth-child(4) { animation-delay: .36s; }
@keyframes sali { to { opacity: 1; transform: none; } }

.hero__title { font-size: clamp(3.2rem, 12.5vw, 10rem); font-weight: 200; letter-spacing: -.035em; line-height: .92; }
.hero__title span {
  font-weight: 900; background: var(--metallo); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { max-width: 34rem; margin-top: 1.75rem; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #dcdde0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }

.hero__strip {
  margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--linea); background: rgba(14, 15, 17, .55); backdrop-filter: blur(6px);
}
.hero__strip li {
  padding: 1.35rem 1.25rem; text-align: center; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #e6e7e9;
}
.hero__strip li + li { border-left: 1px solid var(--linea); }

/* ---------- Sezioni ---------- */
.section { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.section--dark { background: var(--antracite); }
.section--darker { background: var(--nero); }
.section--light { background: var(--chiaro); color: var(--testo-scuro); }
.section--light h2, .section--light h3 { color: var(--nero); }
.section__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__intro { margin-top: 1rem; font-size: 1.1rem; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; margin-bottom: 1.1rem; }
.section--light .lead { color: var(--nero); }
.section--dark .lead { color: #e6e7e9; margin-top: 1.25rem; }

.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.25rem; padding-top: 1.75rem; border-top: 1px solid rgba(0, 0, 0, .14); }
.facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--arancio-scuro); margin-bottom: .35rem; }
.facts dd { font-weight: 700; color: var(--nero); line-height: 1.35; }

/* ---------- Servizi ---------- */
.grid { display: grid; gap: 1px; background: var(--linea); border: 1px solid var(--linea); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { position: relative; padding: 2.5rem 2rem; background: var(--antracite); transition: background-color .35s ease; }
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--metallo); transform: scaleX(0); transform-origin: left; transition: transform .45s ease; }
.card:hover { background: var(--antracite-2); }
.card:hover::before { transform: scaleX(1); }
.card__icon { width: 2.75rem; height: 2.75rem; margin-bottom: 1.5rem; fill: none; stroke: var(--arancio); stroke-width: 1.8; stroke-linecap: square; }
.card h3 { margin-bottom: .65rem; }
.card p { font-size: 1rem; }

/* ---------- Lavorazioni ---------- */
.works { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(220px, 26vw, 340px); gap: .75rem; }
.work { position: relative; overflow: hidden; background-color: var(--antracite); }
.work--wide { grid-column: span 2; }
.work::before { /* foto (se presente) oppure grafica */
  content: ""; position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.work:hover::before { transform: scale(1.06); }
.work::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 8, 9, .9) 0%, rgba(8, 8, 9, .15) 55%, transparent 100%); }
.work figcaption { position: absolute; left: 1.4rem; right: 1.4rem; bottom: 1.25rem; z-index: 1; color: var(--bianco); font-weight: 700; font-size: 1.1rem; letter-spacing: .01em; }
.work figcaption span { display: block; font-size: .75rem; letter-spacing: .2em; color: var(--arancio-chiaro); margin-bottom: .3rem; }

.work--1::before { background-image: url("../images/lavoro-1.jpg"), repeating-linear-gradient(90deg, #2c3035 0 2px, transparent 2px 25%), linear-gradient(160deg, #30343a, #17191c); }
.work--2::before { background-image: url("../images/lavoro-2.jpg"), linear-gradient(#3a3f46 0 0), linear-gradient(200deg, #2b2f34, #131416); background-size: cover, 2px 100%, cover; background-repeat: no-repeat; background-position: center; }
.work--3::before { background-image: url("../images/lavoro-3.jpg"), repeating-linear-gradient(0deg, #2a2d32 0 2px, transparent 2px 33.4%), linear-gradient(140deg, #26292e, #121315); }
.work--4::before { background-image: url("../images/lavoro-4.jpg"), repeating-linear-gradient(45deg, #33373d 0 2px, transparent 2px 38px), repeating-linear-gradient(-45deg, #33373d 0 2px, transparent 2px 38px), linear-gradient(#1c1e21, #121315); }
.work--5::before { background-image: url("../images/lavoro-5.jpg"), repeating-linear-gradient(0deg, #2e3237 0 1px, transparent 1px 44px), repeating-linear-gradient(90deg, #2e3237 0 1px, transparent 1px 44px), linear-gradient(180deg, #2a2d32, #141517); }
.work--6::before { background-image: url("../images/lavoro-6.jpg"), repeating-linear-gradient(90deg, #353a40 0 3px, transparent 3px 16.66%), linear-gradient(120deg, #2e3237, #151618); }

/* ---------- Perché ---------- */
.reasons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.25rem; }
.reasons li { padding-top: 1.5rem; border-top: 2px solid var(--nero); }
.reasons__num { display: block; font-size: 2.6rem; font-weight: 200; line-height: 1; margin-bottom: 1.25rem; background: var(--metallo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reasons h3 { margin-bottom: .6rem; }
.reasons p { font-size: 1rem; }

/* ---------- Contatti ---------- */
.contact-list { margin-top: 2.25rem; border-top: 1px solid var(--linea); }
.contact-list li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--linea); color: var(--bianco); }
.contact-list__label { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--arancio-chiaro); padding-top: .3rem; }
.contact-list a { overflow-wrap: anywhere; border-bottom: 1px solid rgba(255, 255, 255, .3); transition: color .2s, border-color .2s; }
.contact-list a:hover { color: var(--arancio-chiaro); border-color: var(--arancio-chiaro); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.form { background: var(--nero); border: 1px solid var(--linea); padding: clamp(1.5rem, 3.5vw, 2.75rem); display: grid; gap: 1.2rem; }
.form h3 { font-size: 1.4rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form label { display: grid; gap: .45rem; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #dcdde0; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; letter-spacing: normal; text-transform: none; font-weight: 400;
  color: var(--bianco); background: var(--antracite); border: 1px solid rgba(255, 255, 255, .16); border-radius: 2px; padding: .85rem 1rem;
  transition: border-color .2s ease;
}
.form textarea { resize: vertical; min-height: 8rem; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--arancio); }
.form .is-invalid { border-color: #ff7a6b; }
.form__note { font-size: .88rem; color: #a3a6ab; }
.form__note.is-error { color: #ff9a8d; }

/* ---------- Footer ---------- */
.footer { background: #08090a; border-top: 1px solid var(--linea); padding: 3.5rem 0 5.5rem; font-size: .93rem; color: #a3a6ab; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer__inner p + p { margin-top: .35rem; }
.footer__logo { margin-bottom: 1rem; }
.footer a { color: #dcdde0; border-bottom: 1px solid rgba(255, 255, 255, .25); overflow-wrap: anywhere; }
.footer a:hover { color: var(--arancio-chiaro); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--linea); font-size: .82rem; }

/* ---------- Pulsante mobile fisso ---------- */
.fab {
  display: none; position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 40;
  min-height: 3.25rem; align-items: center; justify-content: center;
  background: var(--metallo); color: #14100c; font-weight: 800; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase;
  border-radius: 2px; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .7);
  transition: transform .35s ease, opacity .35s ease;
}
.fab.is-hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }

/* ---------- Animazioni allo scorrimento ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .reasons { grid-template-columns: repeat(2, 1fr); }
  .works { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .hero__art { width: 80vw; right: -20%; opacity: .45; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header) 0 0 0; flex-direction: column; justify-content: center; gap: 2rem;
    background: rgba(14, 15, 17, .98); transform: translateX(100%); visibility: hidden;
    transition: transform .35s ease, visibility .35s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav a:not(.btn) { font-size: 1.05rem; }
  .fab { display: flex; }
  .hero__strip { grid-template-columns: repeat(2, 1fr); }
  .hero__strip li:nth-child(3) { border-left: 0; }
  .hero__strip li:nth-child(n+3) { border-top: 1px solid var(--linea); }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .grid--3, .reasons, .form__row, .facts { grid-template-columns: 1fr; }
  .works { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .work--wide { grid-column: auto; }
  .hero__actions .btn, .contact-actions .btn { width: 100%; }
  .hero__strip li { padding: 1rem .5rem; font-size: .68rem; letter-spacing: .1em; }
  .contact-list li { grid-template-columns: 1fr; gap: .2rem; }
  .card { padding: 2rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
