/* =========================================================
   Mirko Prezzi – Consulenza e Formazione in Saldatura
   Nessun font, script o servizio esterno: zero cookie.
   ========================================================= */

:root {
  --navy: #003c64;
  --navy-900: #00243d;
  --steel: #6d94ac;
  --steel-700: #3f6f8f;
  --ink: #131515;
  --muted: #4b5661;
  --line: #dde3e8;
  --bg: #f4f5f6;
  --dark: #1d2126;
  --amber: #f2a33a;
  --wa: #137a3a;

  --radius: 10px;
  --shadow: 0 12px 32px rgba(0, 36, 61, .12);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1140px;
  --header-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: var(--steel-700); }
img { display: block; max-width: 100%; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }

.icon { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: middle; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: #fff; color: var(--navy); padding: 10px 16px; border-radius: 6px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--dark); color: #c3ccd4; font-size: 14px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.topbar p { margin: 0; }
@media (max-width: 760px) { .topbar { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: #fff;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}
.site-header .container { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }

/* Nome in alto a sinistra: carattere sottile come nel logo */
.brand { color: #fff; text-decoration: none; font-size: 28px; font-weight: 300; letter-spacing: .01em; line-height: 1; white-space: nowrap; }
.brand:hover { color: #fff; }
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .brand { font-size: 24px; }
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: #e3ecf2; text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:not(.btn):hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--amber); }

/* Menu a tendina per smartphone */
.menu-mobile { display: none; }
.menu-mobile summary {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; cursor: pointer;
  list-style: none; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 8px;
  color: #fff; font-weight: 700; font-size: 15px; user-select: none;
}
.menu-mobile summary::-webkit-details-marker { display: none; }
.menu-mobile .icon { width: 22px; height: 22px; }
.menu-mobile .icon-close { display: none; }
.menu-mobile[open] .icon-open { display: none; }
.menu-mobile[open] .icon-close { display: inline-block; }
.menu-mobile nav {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; overflow: hidden;
  background: #fff; border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
}
.menu-mobile nav a {
  display: block; padding: 15px 22px; color: var(--navy); text-decoration: none;
  font-weight: 700; font-size: 17px; border-bottom: 1px solid var(--line);
}
.menu-mobile nav a:last-child { border-bottom: 0; }
.menu-mobile nav a:active { background: var(--bg); }

@media (max-width: 860px) {
  .nav a:not(.btn) { display: none; }
  .menu-mobile { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 8px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, .2); filter: brightness(1.06); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-mail { background: var(--steel-700); color: #fff; }
.btn-call { background: #fff; color: var(--navy); }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 14.5px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  background: radial-gradient(120% 95% at 78% 82%, #0b5288 0%, var(--navy) 38%, var(--navy-900) 78%);
}
.hero .container { display: flex; align-items: center; min-height: min(60vh, 500px); padding-block: 72px; }

.hero-panel {
  max-width: 860px; padding: 40px 44px 38px;
  background: rgba(0, 28, 48, .55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 800; margin-bottom: 18px; }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); color: #d6e2eb; max-width: 60ch; margin-bottom: 0; }

@media (max-width: 760px) {
  .hero .container { min-height: 0; padding-block: 44px 48px; }
  .hero-panel { padding: 26px 22px 26px; border-radius: 0 var(--radius) var(--radius) 0; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 104px); }
.section-alt { background: var(--bg); }
.section-head { max-width: 740px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }
.section h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--steel-700);
}
.kicker::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--amber); }

/* Servizi */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #c7d4de; }
.card-icon {
  width: 50px; height: 50px; margin-bottom: 18px; border-radius: 10px;
  display: grid; place-items: center; background: var(--navy); color: #fff;
}
.card-icon .icon { width: 25px; height: 25px; }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

.callout {
  display: flex; gap: 20px; align-items: flex-start; margin-top: 40px; padding: 32px;
  background: var(--navy); color: #fff; border-radius: var(--radius);
}
.callout > .icon { width: 30px; height: 30px; margin-top: 2px; color: var(--amber); }
.callout h3 { font-size: 22px; margin-bottom: 6px; }
.callout p { margin: 0; color: #d6e2eb; }
@media (max-width: 560px) { .callout { flex-direction: column; gap: 12px; padding: 26px 22px; } }

/* Chi sono */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.about-photo {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius);
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--steel) 0%, var(--navy) 70%, var(--navy-900) 100%);
  color: rgba(255, 255, 255, .92); font-size: clamp(72px, 11vw, 120px); font-weight: 800; letter-spacing: -.04em;
  box-shadow: var(--shadow);
}
.about-photo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--amber);
}
.about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-text p { color: var(--muted); }
.about-text .intro { font-size: 19px; color: var(--ink); }
.facts { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; gap: 12px; }
.facts li { display: flex; align-items: flex-start; gap: 12px; }
.facts .icon { color: var(--steel-700); margin-top: 3px; }
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 340px; aspect-ratio: 1 / 1; }
}

/* Come lavoro */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.step { background: #fff; border-radius: var(--radius); padding: 28px; border-top: 4px solid var(--steel); }
.step-num { font-size: 14px; font-weight: 800; letter-spacing: .12em; color: var(--steel-700); }
.step h3 { font-size: 20px; margin: 6px 0 8px; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #aab5bf; font-size: 14.5px; padding-block: 44px 32px; }
.site-footer a { color: #fff; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer-logo { display: block; height: 56px; width: auto; }
.footer-data p { margin: 0 0 4px; }
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1);
}
.footer-legal nav { display: flex; gap: 20px; }
@media (min-width: 761px) { .site-footer .container { padding-right: 84px; } } /* spazio per i pulsanti fissi */

/* ---------- Pulsanti fissi ---------- */
/* Computer: tre pulsanti tondi impilati in basso a destra */
.float-contacts {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; flex-direction: column; gap: 12px;
}
.float-contacts a {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .26); transition: transform .15s ease;
}
.float-contacts a:hover { transform: scale(1.07); }
.float-contacts .icon { width: 27px; height: 27px; }
.float-contacts .is-wa { background: var(--wa); }
.float-contacts .is-mail { background: var(--steel-700); }
.float-contacts .is-call { background: var(--navy); }

.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; grid-template-columns: repeat(3, 1fr);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .18);
  background: var(--navy);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-bar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 9px;
  color: #fff; text-decoration: none; font-size: 13px; font-weight: 700;
}
.mobile-bar .icon { width: 22px; height: 22px; }
.mobile-bar .is-wa { background: var(--wa); }
.mobile-bar .is-mail { background: var(--steel-700); }
.mobile-bar .is-call { background: var(--navy); }

@media (max-width: 760px) {
  .mobile-bar { display: grid; }
  .float-contacts { display: none; }
  body { padding-bottom: 66px; }
}

/* ---------- Pagine legali ---------- */
.legal-page { padding-block: 56px 88px; }
.legal-page .container { max-width: 820px; }
.legal-page h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.legal-page h2 { font-size: 22px; margin-top: 2em; }
.legal-page p, .legal-page li { color: #2b333b; }
.legal-page ul { padding-left: 1.2em; }
.legal-page li { margin-bottom: .4em; }
.legal-page .updated { color: var(--muted); font-size: 15px; }
.legal-box { background: var(--bg); border-left: 4px solid var(--steel); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 20px 0; }
.legal-box p:last-child { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
