/* ==========================================================================
   Idraulico H24 Milano — stylesheet
   Palette and metrics transcribed from the design source.
   ========================================================================== */

:root {
  --navy: #0b2545;
  --navy-hover: #123468;
  --blue: #1668e3;
  --blue-300: #5c9bf0;
  --blue-200: #9fc2ee;
  --blue-150: #afc6e4;
  --blue-100: #c6d6ec;
  --blue-muted: #8faad0;
  --red: #e31e24;
  --red-hover: #c4161c;
  --wa: #25d366;
  --wa-hover: #1fbe5b;
  --wa-ink: #08351a;
  --green-dot: #3ddc84;
  --surface: #f4f7fc;
  --line: #e3e9f2;
  --line-strong: #dce5f1;
  --ink-muted: #4a5f7d;
  --ink-soft: #5b7196;
  --ink-nav: #3d5375;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Sans 3", system-ui, -apple-system, Segoe UI, sans-serif;

  --wrap: 1180px;
  --gutter: 20px;
  --actionbar-h: 76px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--navy);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  /* room for the fixed mobile action bar */
  padding-bottom: var(--actionbar-h);
  overflow-x: hidden;
}

/* Colour roles — one job per colour, so nothing competes with the CTAs:
     red   → the emergency call action, nowhere else
     green → WhatsApp, nowhere else
     navy  → headings and the neutral filled button
     blue  → links and label accents
   Inline links carry an underline as well as the blue, so colour alone never
   has to signal "clickable" against the blue eyebrow labels. */
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }

main a:not([class]), .site-footer a:not([class]) {
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}

img { max-width: 100%; }

h1, h2 { text-wrap: balance; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* Shared -------------------------------------------------------------- */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding-top: clamp(56px, 7vw, 92px); padding-bottom: clamp(56px, 7vw, 92px); }

/* keep anchor targets clear of the sticky header */
section[id] { scroll-margin-top: 96px; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.eyebrow--onDark { color: var(--blue-300); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 38px;
}

.section-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 4.4vw, 42px);
  letter-spacing: -.02em;
  line-height: 1.08;
  margin: 0;
}

.section-head p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}

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

/* Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border-radius: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  padding: 16px 24px;
  transition: background-color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { flex: none; }

.btn--wa { background: var(--wa); color: var(--wa-ink); box-shadow: 0 10px 26px rgba(37, 211, 102, .28); }
.btn--wa:hover { background: var(--wa-hover); color: var(--wa-ink); }

.btn--call { background: var(--red); color: #fff; }
.btn--call:hover { background: var(--red-hover); color: #fff; }

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-hover); color: #fff; }

.btn--block { display: flex; justify-content: center; width: 100%; }

/* Top bar ------------------------------------------------------------- */

.topbar {
  background: var(--navy);
  color: var(--blue-150);
  font-size: 13.5px;
  padding: 9px 0;
}
.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  align-items: center;
  justify-content: space-between;
}
.topbar-live { display: flex; align-items: center; gap: 9px; }
.topbar-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-dot);
  box-shadow: 0 0 0 4px rgba(61, 220, 132, .18);
}

/* Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  padding-top: 10px;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; }
.logo img { height: 60px; width: auto; display: block; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
}
/* Nav links sit one step below the navy CTA so the button owns the header. */
.site-nav a { color: var(--ink-nav); }
.site-nav a:hover { color: var(--blue); }

/* Scoped to .site-nav so it outranks `.site-nav a` — otherwise the label
   inherits navy and disappears into the navy button. */
.site-nav .nav-call {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--navy);
  color: #fff;
  padding: 11px 18px;
  border-radius: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .01em;
  transition: background-color .18s ease;
}
.site-nav .nav-call:hover { background: var(--navy-hover); color: #fff; }

/* Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  opacity: .30;
  background: #16325c center / cover no-repeat;
  /* Drop the hero photo in here:
     background-image: url("assets/hero.jpg"); */
}
.hero-photo .photo { height: 100%; }
.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #0b2545 8%, rgba(11, 37, 69, .92) 46%, rgba(11, 37, 69, .55) 100%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(56px, 7vw, 104px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy { max-width: 640px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue-200);
  margin-bottom: 22px;
}
.hero-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  /* capped at 58px so "Idraulico a Milano," holds its own line before the <br> */
  font-size: clamp(36px, 6.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0 0 20px;
}
.hero-lede {
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  color: var(--blue-100);
  margin: 0 0 30px;
  max-width: 52ch;
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }

.hero-assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--blue-200);
}
.hero-assurances li::before { content: "✓ "; }

/* Hero card */
.quote-card {
  justify-self: end;
  width: 100%;
  max-width: 420px;
  background: #fff;
  color: var(--navy);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 30px 70px rgba(3, 15, 33, .45);
}
.quote-card h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -.01em;
  margin: 0 0 6px;
}
.quote-card p { margin: 0 0 18px; font-size: 15.5px; line-height: 1.5; color: var(--ink-muted); }

.steps { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 15px;
  line-height: 1.45;
  counter-increment: step;
}
.steps li::before {
  content: "0" counter(step);
  font-family: var(--display);
  font-weight: 800;
  color: var(--blue);
  font-size: 15px;
  flex: none;
}

/* Stats --------------------------------------------------------------- */

.stats { background: var(--surface); border-bottom: 1px solid var(--line); }
.stats .wrap {
  padding-top: 26px;
  padding-bottom: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 22px;
}
.stat dt {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 32px);
  color: var(--navy);
}
.stat dd { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* Services ------------------------------------------------------------ */

.card-grid {
  display: grid;
  /* 300px floor keeps the six cards on a 3x2 grid at desktop rather than a
     cramped 4 + 2 that leaves a hole in the last row */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card:hover {
  border-color: var(--blue);
  box-shadow: 0 12px 30px rgba(11, 37, 69, .08);
  transform: translateY(-2px);
}
.card h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  margin: 0 0 10px;
}
.card p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-muted); }

/* Work gallery -------------------------------------------------------- */

.work { background: var(--navy); color: #fff; }
.work .section-head { margin-bottom: 34px; }
.work .section-head p { color: var(--blue-150); max-width: 34ch; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
/* Portrait cells: the job photos are phone shots, and a 4:3 crop cut the
   subject out of nearly every one. */
.work-grid .photo { aspect-ratio: 3 / 4; border-radius: 12px; }

/* Photo slots.
   An <img class="photo"> that fails to load is swapped for a labelled
   placeholder div carrying the same classes (see the script in index.html),
   so the layout is identical with or without the real file in assets/. */
.photo {
  display: block;
  width: 100%;
  object-fit: cover;
  background: rgba(255, 255, 255, .06);
  border: 1px dashed rgba(255, 255, 255, .22);
  border-radius: 12px;
  position: relative;
}
.photo::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .62);
}
img.photo { border: 0; }
img.photo::after { content: none; }

.photo--onLight {
  background: var(--surface);
  border-color: var(--line-strong);
}
.photo--onLight::after { color: var(--ink-soft); }

/* No placeholder chrome — used for the hero backdrop, which should simply
   fall back to the flat navy when no photo is present. */
.photo--bare { border: 0; background: transparent; }
.photo--bare::after { content: none; }

/* Why us -------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.split h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 4.4vw, 42px);
  letter-spacing: -.02em;
  line-height: 1.08;
  margin: 0 0 20px;
  max-width: 16ch;
}
.split > div > p {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 46ch;
  text-wrap: pretty;
}
.dash-list {
  display: grid;
  gap: 14px;
  max-width: 46ch;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dash-list li { display: flex; gap: 13px; font-size: 16px; line-height: 1.5; }
.dash-list li::before { content: "—"; color: var(--blue); font-weight: 700; flex: none; }

.split-media { aspect-ratio: 5 / 4; min-height: 280px; }
.split-media .photo { height: 100%; border-radius: 16px; }

/* Zones --------------------------------------------------------------- */

.zones {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.zones .wrap { padding-top: clamp(48px, 6vw, 76px); padding-bottom: clamp(48px, 6vw, 76px); }
.zones h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 0 0 24px;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 15px;
  font-weight: 600;
}

/* Contact CTA --------------------------------------------------------- */

.cta {
  background: var(--navy);
  border-radius: 18px;
  padding: clamp(30px, 5vw, 56px);
  color: #fff;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}
.cta h2 {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(28px, 4.4vw, 44px);
  letter-spacing: -.02em;
  line-height: 1.05;
  margin: 0 0 16px;
}
.cta p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--blue-150); max-width: 42ch; }
.cta-actions { display: grid; gap: 12px; }
.cta-actions .btn { padding: 18px; font-size: 18px; }
.cta-note { text-align: center; font-size: 14.5px; color: var(--blue-muted); margin-top: 4px; }

/* Footer -------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer .wrap {
  padding-top: 30px;
  padding-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.site-footer img { height: 46px; width: auto; }

/* Fixed mobile action bar --------------------------------------------- */

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  box-shadow: 0 -6px 24px rgba(11, 37, 69, .10);
}
.action-bar .btn {
  flex: 1;
  justify-content: center;
  gap: 9px;
  padding: 14px;
  font-size: 16px;
  box-shadow: none;
}

/* Responsive tweaks ---------------------------------------------------- */

@media (min-width: 1000px) {
  /* give the headline column the extra room it needs; auto-fit split the row
     evenly and forced "Idraulico a" onto its own line */
  .hero .wrap { grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .quote-card { justify-self: stretch; max-width: none; }
}

@media (max-width: 700px) {
  /* the sticky bottom bar already carries call + WhatsApp on small screens */
  .site-nav .nav-call { display: none; }
  .site-nav { gap: 8px 18px; font-size: 14.5px; }
  .logo img { height: 48px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  /* 2x2 rather than a single column of tall portraits */
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .topbar .wrap { justify-content: center; text-align: center; }
}

@media print {
  .action-bar, .site-header { position: static; }
  .hero-photo, .photo { display: none; }
}
