/* Glorei Verniciatura — foglio di stile condiviso */

:root {
  --white: #FFFFFF;
  --mist: #F3F3F3;        /* fondo delle sezioni alternate */
  --ink: #232122;         /* testo: nero del logo */
  --ink-soft: #5F5B5C;    /* testo secondario */
  --line: #E3E0E0;
  --brand: #ED2525;       /* rosso del logo */
  --red: #C81E1E;         /* rosso per testo e bottoni: contrasto 5.7:1 sul bianco */
  --red-deep: #A51818;
  --red-tint: #FDECEC;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;

  --f-body: 1.0625rem;
  --f-small: 0.9rem;
  --f-h1: clamp(2.5rem, 5.4vw, 4.4rem);
  --f-h2: clamp(1.85rem, 3.4vw, 2.75rem);
  --f-h3: 1.3rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: var(--f-body);
  line-height: 1.6;
}
main { flex: 1; }

img { display: block; max-width: 100%; height: auto; }

a { color: var(--red); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-deep); }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 20;
}
.skip:focus { left: 1rem; top: 1rem; }

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: var(--f-h1); }
h2 { font-size: var(--f-h2); }
h3 { font-size: var(--f-h3); letter-spacing: -0.01em; line-height: 1.25; }

p { margin: 0 0 1em; max-width: 62ch; }

/* ---------- Testata ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 80px;
}
.brand {
  display: block;
  margin-right: auto;
  line-height: 0;
}
.brand img { height: 54px; width: auto; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.nav a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover { background: var(--mist); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--red); }

.head-call { white-space: nowrap; }

/* ---------- Bottoni ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: #BDB9BA; }
.btn-ghost:hover { background: var(--mist); border-color: var(--ink-soft); color: var(--ink); }
.btn-small { padding: 0.55rem 1rem; font-size: 0.95rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero .lead {
  margin-top: 1.5rem;
  font-size: clamp(1.15rem, 1.5vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 34ch;
}
.hero-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--mist);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  margin: 2.75rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.facts div { min-width: 10rem; }
.facts dt { font-size: var(--f-small); color: var(--ink-soft); }
.facts dd { margin: 0.15rem 0 0; font-weight: 600; line-height: 1.4; }

/* ---------- Sezioni ---------- */

.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-mist { background: var(--mist); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--ink-soft); margin-top: 1rem; font-size: 1.1rem; }

/* metalli: foto grandi con didascalia, senza riquadri */
.metals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.metals img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--mist);
}
.metals h3 { margin-top: 1rem; }
.metals p { margin: 0.35rem 0 0; color: var(--ink-soft); font-size: 0.98rem; }

/* processo: foto larga + fasi in sequenza */
.process-photo {
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 9;
}
.process-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2rem;
}
.steps li {
  counter-increment: step;
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
}
.steps li::before {
  content: counter(step);
  display: block;
  font-size: var(--f-small);
  font-weight: 600;
  color: var(--red);
  margin-bottom: 0.4rem;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* polveri in breve (home) */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.split-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.split-photo img { width: 100%; height: 100%; object-fit: cover; }

.powder-list { list-style: none; margin: 1.75rem 0 2rem; padding: 0; border-top: 1px solid var(--line); }
.powder-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  background: var(--mist);
  color: var(--ink-soft);
}
.section-mist .tag { background: var(--white); }
.tag-out { background: var(--red-tint); color: var(--red-deep); }
.section-mist .tag-out { background: var(--red-tint); }

/* richiesta preventivo */
.quote {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.split h2, .quote h2 { margin-bottom: 1.1rem; }
.quote h3 + .checklist { margin-top: 1rem; }
.checklist { margin: 0; padding-left: 1.2rem; }
.checklist li { margin-bottom: 0.55rem; padding-left: 0.25rem; }
.checklist li::marker { color: var(--red); }

/* ---------- Pagine interne ---------- */

.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.page-head .lead { margin-top: 1.25rem; color: var(--ink-soft); font-size: 1.2rem; max-width: 50ch; }

.page-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 8;
}
.page-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

.toc { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 2rem 0 0; padding: 0; }
.toc a {
  display: block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.toc a:hover { border-color: var(--red); color: var(--red); }

.powders { width: 100%; border-collapse: collapse; }
.powders th, .powders td {
  text-align: left;
  vertical-align: top;
  padding: 1.25rem 1.5rem 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.powders thead th {
  padding-block: 0.6rem;
  font-size: var(--f-small);
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom-color: var(--ink);
}
.powders tbody th { font-size: 1.15rem; font-weight: 600; width: 24%; }
.powders td:nth-child(2) { width: 14%; }
.powders td { color: var(--ink-soft); }

.treatments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}
.treatments figure { margin: 0 0 1.5rem; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; }
.treatments figure img { width: 100%; height: 100%; object-fit: cover; }
.treatments h3 { margin-bottom: 0.75rem; }

/* contatti */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.contact-list { margin: 0; }
.contact-list div { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.contact-list div:first-child { border-top: 1px solid var(--line); }
.contact-list dt { font-size: var(--f-small); color: var(--ink-soft); }
.contact-list dd { margin: 0.2rem 0 0; font-size: 1.2rem; font-weight: 600; line-height: 1.4; }
.contact-list dd a { color: var(--ink); }
.contact-list dd a:hover { color: var(--red); }

.hours { border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: 0.1rem 1.5rem 0.1rem 0; }
.hours th { font-weight: 600; }
.hours td { font-weight: 500; color: var(--ink-soft); }

.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--mist); }
.map iframe { display: block; width: 100%; height: 440px; border: 0; }
.map p { margin: 0; padding: 0.75rem 1rem; font-size: var(--f-small); max-width: none; background: var(--white); border-top: 1px solid var(--line); }

/* ---------- Piede ---------- */

.site-foot { background: var(--ink); color: #B9B4B5; font-size: var(--f-small); padding-block: 3rem 2rem; }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-foot .foot-logo { height: 46px; width: auto; margin-bottom: 1rem; }
.site-foot p { margin: 0; max-width: none; }
.site-foot a { color: #fff; }
.site-foot .legal { grid-column: 1 / -1; padding-top: 1.5rem; margin-top: 0.5rem; border-top: 1px solid #3A3738; }

/* ---------- Schermi medi e piccoli ---------- */

@media (max-width: 1000px) {
  .metals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .hero .wrap, .split, .quote, .contact-grid, .treatments { grid-template-columns: 1fr; }
  .hero-photo { aspect-ratio: 4 / 3; order: -1; }
  .split-photo { aspect-ratio: 3 / 2; }
  .process-photo, .page-photo { aspect-ratio: 3 / 2; }
  .head-call { display: none; }
  .site-foot .wrap { grid-template-columns: 1fr; }
  .powders thead { display: none; }
  .powders, .powders tbody, .powders tr, .powders th, .powders td { display: block; width: auto; }
  .powders tr { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
  .powders th, .powders td { border: 0; padding: 0.15rem 0; }
  .powders td:nth-child(2) { width: auto; padding-block: 0.4rem; }
}

@media (max-width: 560px) {
  .site-head .wrap { gap: 0.5rem; }
  .brand img { height: 42px; }
  .nav a { padding: 0.45rem 0.55rem; }
  .metals { grid-template-columns: 1fr; }
  .metals img { aspect-ratio: 3 / 2; }
  .steps { grid-template-columns: 1fr; }
  .actions .btn { width: 100%; }
  .map iframe { height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Ritiro e consegna ---------- */

.pickup {
  background: var(--red);
  color: #fff;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.pickup .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.pickup h2 { color: #fff; margin-bottom: 1rem; }
.pickup p { color: #FBE3E3; }
.pickup .btn { background: #fff; border-color: #fff; color: var(--red); margin-top: 0.5rem; }
.pickup .btn:hover { background: #FBE3E3; border-color: #FBE3E3; color: var(--red-deep); }

.pickup-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.pickup-steps li { border-top: 2px solid rgba(255, 255, 255, 0.55); padding-top: 1.1rem; }
.pickup-steps svg { width: 40px; height: 40px; margin-bottom: 0.75rem; }
.pickup-steps h3 { color: #fff; font-size: 1.15rem; margin-bottom: 0.35rem; }
.pickup-steps p { margin: 0; font-size: 0.98rem; }

@media (max-width: 820px) {
  .pickup .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pickup-steps { grid-template-columns: 1fr; }
}
