/* Pronto Idraulico Roma — public website.
   One family (Archivo, variable weight + width): condensed and heavy for the phone number and headings, like the
   lettering on a service van; normal width for reading. The phone number is the one loud element. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/archivo-e3a28eade2.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --navy: #0E1F3A;
  --navy-2: #1C385C;
  --blue: #1769E8;
  --blue-ink: #0F4FB8;
  --red: #C62828;
  --red-dark: #A31F1F;
  --paper: #F4F7FB;
  --ink: #13233D;
  --muted: #55627A;
  --line: #DCE3EE;
  --ok: #0F7A55;
  --warn: #9A5B12;
  --radius: 14px;
  --measure: 68ch;
  --dock-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  padding-bottom: var(--dock-h);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-ink); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 .9em; max-width: var(--measure); }
h1, h2, h3 {
  font-stretch: 75%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.005em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 4.6vw, 2.4rem); }
h3 { font-size: 1.3rem; font-stretch: 87.5%; font-weight: 700; margin-bottom: .3em; }
.muted { color: var(--muted); }
.strong { font-weight: 700; white-space: nowrap; }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ------------------------------------------------------------------ header */
.top {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-stretch: 87.5%; font-weight: 600; font-size: 1.05rem; }
.brand b { font-weight: 800; }
.brand-mark { width: 26px; height: 26px; fill: var(--blue); }
.top-call { color: #fff; font-weight: 800; font-stretch: 75%; font-size: 1.25rem; text-decoration: none; white-space: nowrap; }
.top-call:hover { text-decoration: underline; }
.top :focus-visible { outline-color: #fff; }

/* ------------------------------------------------------------------ hero: the number */
.hero { background: var(--navy); color: #fff; padding: clamp(20px, 5vw, 56px) clamp(16px, 4vw, 40px) clamp(36px, 7vw, 72px); }
.hero-in { max-width: 1100px; margin: 0 auto; }
.hero-art { display: none; }
@media (min-width: 1100px) {
  .hero-in { display: grid; grid-template-columns: 1fr 400px; align-items: center; gap: 40px; }
  .hero-art { display: block; width: 100%; height: auto; }
  .hero-in .hero-number { font-size: clamp(4.5rem, 7vw, 8.5rem); white-space: nowrap; }
}
.hero-lead { font-size: clamp(1.15rem, 3.2vw, 1.5rem); color: #C9D6EA; margin-bottom: .4em; font-stretch: 87.5%; }
.hero-number {
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: 850;
  font-stretch: 62%;
  font-size: clamp(3.6rem, 19vw, 10rem);
  line-height: .88;
  letter-spacing: -.01em;
  margin: .1em 0 .3em;
  font-variant-numeric: tabular-nums;
}
.hero-number span { white-space: nowrap; }
.hero-number:hover { color: #E3ECFA; }
.hero-number:focus-visible { outline-color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero-note { color: #C9D6EA; margin: 0; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  cursor: pointer;
}
.btn-call { background: var(--red); color: #fff; }
.btn-call:hover { background: var(--red-dark); }
.btn-ghost { border-color: #4C6A93; color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-send { background: var(--blue); color: #fff; width: 100%; margin: 8px 0 14px; }
.btn-send:hover { background: var(--blue-ink); }
.btn-send[disabled] { opacity: .7; cursor: progress; }
.btn-small { min-height: 44px; padding: 8px 14px; font-size: 1rem; background: var(--navy); color: #fff; }

/* ------------------------------------------------------------------ blocks */
.block, .page-head { padding: clamp(32px, 6vw, 64px) clamp(16px, 4vw, 40px); }
.block + .block { border-top: 1px solid var(--line); }
.block-in { max-width: 1100px; margin: 0 auto; }
.block-lead { color: var(--muted); }
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding-bottom: clamp(24px, 4vw, 40px); }
.page-head p { font-size: 1.1rem; }
.block-end { background: #fff; }
.split { display: grid; gap: 40px; }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; } }

/* problems: a plain index of what we fix, each opens the form pre-filled */
.problems { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 2px solid var(--navy); }
@media (min-width: 560px) { .problems { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
@media (min-width: 900px) { .problems { grid-template-columns: repeat(4, 1fr); } }
.problems a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-stretch: 87.5%;
  font-size: 1.2rem;
}
.problems a:hover { color: var(--blue-ink); border-bottom-color: var(--blue); }
.problems img { width: 64px; height: 48px; flex: none; border-radius: 8px; }

/* steps: a real sequence, so numbered */
.steps { list-style: none; counter-reset: step; margin: 18px 0 0; padding: 0; display: grid; gap: 28px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-weight: 850;
  font-stretch: 62%;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--blue);
  margin-bottom: 6px;
}
.steps p { color: var(--muted); }

.prices { margin: 16px 0; display: grid; gap: 0; max-width: 420px; }
.prices div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.prices dt { color: var(--muted); }
.prices dd { margin: 0; font-weight: 800; font-stretch: 75%; font-size: 1.35rem; }

/* ------------------------------------------------------------------ form */
.block-form .block-in { max-width: 680px; }
.req fieldset { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
.req legend { font-weight: 800; font-stretch: 75%; font-size: 1.6rem; margin-bottom: 12px; padding: 0; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; min-height: 56px; padding: 10px 14px;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  font-weight: 600; line-height: 1.2;
}
.choice input:checked + span { border-color: var(--blue); background: #EAF1FE; color: var(--blue-ink); }
.choice input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.field { display: block; margin: 14px 0 4px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 10px;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px #CFE0FC; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red); }
.row { display: flex; gap: 12px; }
.row .grow { flex: 1; min-width: 0; }
.row .num { width: 96px; flex: none; }
.row .cap { width: 110px; flex: none; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 4px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.err { color: var(--red); font-size: .95rem; margin: 2px 0 0; min-height: 0; }
.err:empty { display: none; }
.hint { color: var(--muted); font-size: .95rem; }
.alert { background: #FFF0EF; color: #8E1C1C; border-radius: 10px; padding: 14px 16px; }

/* ------------------------------------------------------------------ tracking */
.track-code { color: var(--muted); margin-bottom: 4px; }
.track-status { font-weight: 850; font-stretch: 62%; font-size: clamp(2.6rem, 11vw, 4.2rem); line-height: .95; margin-bottom: 10px; }
.track-status[data-tone="ok"] { color: var(--ok); }
.track-status[data-tone="warn"] { color: var(--warn); }
.track-status[data-tone="muted"] { color: var(--muted); }
.timeline { list-style: none; margin: 18px 0; padding: 0 0 0 18px; border-left: 3px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 14px; }
.timeline li::before { content: ""; position: absolute; left: -27px; top: .45em; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); border: 3px solid var(--blue); }
.timeline li:last-child::before { background: var(--blue); }
.timeline time { display: block; color: var(--muted); font-size: .95rem; }
.track-save { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 18px 0; }
.linkbox { display: flex; gap: 8px; max-width: none; margin: 0; }
.linkbox input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 10px; font: inherit; font-size: .9rem; border: 2px solid var(--line); border-radius: 10px; }

/* ------------------------------------------------------------------ service and zone pages */
.crumbs { background: #fff; padding: 12px clamp(16px, 4vw, 40px) 0; font-size: .95rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.head-split { display: grid; gap: 20px; }
.head-art { width: 100%; max-width: 320px; height: auto; border-radius: var(--radius); }
@media (min-width: 800px) {
  .head-split { grid-template-columns: 1fr 340px; align-items: center; gap: 40px; }
  .head-art { max-width: none; }
}
.head-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.btn-line { border-color: var(--blue); color: var(--blue-ink); background: #fff; }
.btn-line:hover { background: #EAF1FE; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { padding: 10px 0 10px 30px; border-bottom: 1px solid var(--line); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 1.05em; width: 12px; height: 7px; border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg); }
.todo { margin: 0; padding-left: 1.4em; }
.todo li { padding: 6px 0; }
.todo li::marker { font-weight: 800; color: var(--red); }
.others-title { margin-top: 1.6em; }
.others { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.zones { margin: 0; display: grid; gap: 0; }
@media (min-width: 800px) { .zones { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
.zones div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.zones dt { font-weight: 800; font-stretch: 75%; font-size: 1.25rem; }
.zones dd { margin: 2px 0 0; color: var(--muted); }

/* ------------------------------------------------------------------ FAQ */
.faq { max-width: 820px; border-top: 2px solid var(--navy); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 36px 16px 0; font-weight: 700; font-size: 1.1rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-weight: 400; font-size: 1.6rem; color: var(--blue); line-height: 1; }
.faq details[open] summary::after { content: "2"; }
.faq details p { padding-bottom: 8px; }

/* ------------------------------------------------------------------ privacy */
.prose .block-in { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }

/* ------------------------------------------------------------------ footer + mobile dock */
.foot { background: var(--navy); color: #C9D6EA; padding: 40px clamp(16px, 4vw, 40px); }
.foot-in { max-width: 1100px; margin: 0 auto; }
.foot a { color: #fff; }
.foot-name { color: #fff; font-weight: 800; font-stretch: 75%; font-size: 1.4rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0; }
.foot nav + nav { margin-top: -6px; }
.foot-legal { font-size: .9rem; margin: 0 0 4px; }
.foot :focus-visible { outline-color: #fff; }

.dock { display: none; }
@media (max-width: 759px) {
  :root { --dock-h: 76px; }
  .top-call { display: none; }
  .hero-actions { display: none; } /* the dock carries the same two actions on phones */
  .dock {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(14, 31, 58, .97);
  }
  .dock a {
    display: flex; align-items: center; justify-content: center; min-height: 54px;
    border-radius: 12px; color: #fff; font-weight: 700; text-decoration: none;
  }
  .dock-call { background: var(--red); }
  .dock-form { background: var(--blue); }
  .dock :focus-visible { outline-color: #fff; }
  body[data-page="richiedi"] .dock-form { display: none; }
  body[data-page="richiedi"] .dock { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .problems a, .choice span { transition: background-color .15s, border-color .15s, color .15s; }
}
