/* Impianti Bianchi — photo-led B2B site: clear services, real numbers, one number to call. */

@font-face { font-family: "Chivo"; src: url("../fonts/chivo.woff2") format("woff2-variations"), url("../fonts/chivo.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Chivo"; src: url("../fonts/chivo-ext.woff2") format("woff2-variations"), url("../fonts/chivo-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Chivo Mono"; src: url("../fonts/chivo-mono.woff2") format("woff2-variations"), url("../fonts/chivo-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Chivo Mono"; src: url("../fonts/chivo-mono-ext.woff2") format("woff2-variations"), url("../fonts/chivo-mono-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA,U+1E00-1E9F; }

:root {
  --bg: #f4f4f1;
  --white: #fff;
  --ink: #0f1215;
  --muted: #5b6067;
  --line: rgba(15, 18, 21, .14);
  --blue: #1739d6;
  --blue-d: #0f28a0;
  --sans: "Chivo", system-ui, sans-serif;
  --mono: "Chivo Mono", ui-monospace, monospace;
  --pad: clamp(16px, 4vw, 56px);
  --top: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--sans); }
h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1320px, 100% - 2 * var(--pad)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
h2 { font: 700 clamp(1.9rem, 3.6vw, 3.4rem)/1.05 var(--sans); letter-spacing: -.03em; }
.label { font: 500 .78rem/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.sec-head { display: grid; gap: 0; max-width: 980px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-text { margin-top: 16px; color: var(--muted); max-width: 60ch; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border: 1px solid var(--blue); background: var(--blue); color: #fff;
  font: 600 .95rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s; }
.btn:hover { background: var(--blue-d); border-color: var(--blue-d); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .88rem; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* header */
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); height: var(--top); padding: 0 var(--pad); background: rgba(244, 244, 241, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { font: 400 1.15rem/1 var(--sans); letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.logo b { font-weight: 800; color: var(--blue); }
.nav { display: flex; gap: clamp(14px, 2vw, 28px); margin-left: auto; font-size: .92rem; }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--blue); }
.nav-lang { display: none; }
.top-tel { font: 500 .88rem var(--mono); text-decoration: none; white-space: nowrap; }
.lang-switch { display: flex; gap: 8px; font: 500 .8rem var(--mono); }
.lang-switch a { text-decoration: none; color: var(--muted); }
.lang-switch a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.nav-toggle { display: none; min-height: 40px; padding: 0 16px; border: 1px solid var(--ink); background: transparent; font: 600 .88rem var(--sans); color: var(--ink); }

/* hero: copy + animated single-line diagram */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 5vw, 70px); border-bottom: 1px solid var(--line);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 40px 40px; background-position: -1px -1px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px clamp(30px, 5vw, 80px); align-items: center; }
.hero-copy { background: var(--bg); padding: 6px 0; }
.hero h1 { font: 700 clamp(2rem, 3.8vw, 3.6rem)/1.04 var(--sans); letter-spacing: -.035em; max-width: 14em; }
.hero-text { max-width: 50ch; margin-top: 20px; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.schema { margin: 0; padding: 20px 20px 16px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--blue); box-shadow: 0 30px 60px -40px rgba(15, 18, 21, .4); }
.schema-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font: 500 .76rem var(--mono); text-transform: uppercase; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #1fae5b; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 50% { opacity: .35; transform: scale(.7); } }
.schema svg { width: 100%; height: auto; display: block; }
.schema .grid line { stroke: rgba(15, 18, 21, .05); stroke-width: 1; }
.wire { fill: none; stroke: rgba(15, 18, 21, .55); stroke-width: 1.4; }
.wire.bus { stroke: var(--ink); stroke-width: 3; }
.wire.data { stroke-dasharray: 3 4 !important; stroke-dashoffset: 0 !important; animation: none !important; stroke: var(--blue); }
.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: drawin 1.4s ease .2s forwards; }
@keyframes drawin { to { stroke-dashoffset: 0; } }
.flow { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 14 210; animation: run 3s linear infinite; }
@keyframes run { to { stroke-dashoffset: -224; } }
.node rect { fill: var(--white); stroke: var(--ink); stroke-width: 1.2; }
.n-main rect { fill: var(--ink); }
.n-main text { fill: #fff !important; }
.n-main text.sub { fill: rgba(255, 255, 255, .7) !important; }
.n-data rect { stroke: var(--blue); stroke-dasharray: 4 3; }
.node text { font: 600 13px var(--sans); fill: var(--ink); }
.node text.sub { font: 400 10.5px var(--mono); fill: var(--muted); }
.tags text { font: 500 10px var(--mono); fill: var(--blue); }
.readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; border-top: 1px solid var(--line); }
.readout div { padding: 10px 0 0; }
.readout div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.readout dt { font: 500 .7rem var(--mono); text-transform: uppercase; color: var(--muted); }
.readout dd { font: 500 .9rem var(--mono); }
.readout b { font: 700 1.35rem var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.schema-note { margin-top: 10px; font: 400 .74rem var(--mono); color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .draw { stroke-dashoffset: 0; animation: none; } .flow { animation: none; opacity: 0; } .live i { animation: none; } }

.band { margin: 0; }
.band-img { width: 100%; height: clamp(260px, 42vw, 560px); object-fit: cover; object-position: 50% 35%; }

/* facts */
.facts { background: var(--white); border-bottom: 1px solid var(--line); }
.facts-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts-in div { padding: 22px 20px 22px 0; border-right: 1px solid var(--line); }
.facts-in div + div { padding-left: 20px; }
.facts-in div:last-child { border-right: 0; }
.facts dt { font: 700 clamp(1.8rem, 3vw, 2.6rem)/1 var(--sans); letter-spacing: -.03em; color: var(--blue); }
.facts dd { margin-top: 6px; font-size: .9rem; color: var(--muted); }

/* services */
.services { padding: clamp(80px, 10vw, 140px) 0; }
.srv { border-top: 1px solid var(--ink); }
.srv li { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, 360px); gap: 24px clamp(20px, 3vw, 48px); align-items: start; padding: 28px 0; border-bottom: 1px solid var(--line); }
.srv-n { font: 500 .9rem var(--mono); color: var(--blue); padding-top: 6px; }
.srv h3 { font: 700 clamp(1.4rem, 2.2vw, 2rem)/1.1 var(--sans); letter-spacing: -.02em; }
.srv-body p { margin-top: 10px; color: var(--muted); max-width: 56ch; }
.srv-body .srv-scope { margin-top: 14px; font: 500 .82rem/1.5 var(--mono); color: var(--ink); }
.srv-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.sectors { margin-top: 32px; max-width: 80ch; color: var(--muted); }
.sectors strong { color: var(--ink); }

/* emergency band */
.urgent { background: var(--blue); color: #fff; }
.urgent-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px 40px; align-items: center; padding: 30px 0; }
.urgent h2 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
.urgent p { color: rgba(255, 255, 255, .85); max-width: 56ch; }
.urgent-tel { display: grid; gap: 2px; text-decoration: none; font: 700 clamp(1.3rem, 2vw, 1.8rem)/1.1 var(--mono); white-space: nowrap; }
.urgent-tel span { font: 500 .76rem var(--mono); text-transform: uppercase; letter-spacing: .04em; color: rgba(255, 255, 255, .75); }

/* projects */
.projects { padding: clamp(80px, 10vw, 140px) 0; background: var(--white); }
.plist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 5vw, 64px) clamp(16px, 2.4vw, 32px); }
.pj-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pj-1 .pj-img { filter: grayscale(1); }
.pj-meta { display: flex; gap: 18px; margin-top: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font: 500 .8rem var(--mono); color: var(--muted); }
.pj-meta span:first-child { color: var(--blue); }
.pj h3 { margin-top: 12px; font: 700 1.5rem/1.15 var(--sans); letter-spacing: -.02em; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.pj-size { font: 500 1rem var(--mono); color: var(--ink); white-space: nowrap; }
.pj p { margin-top: 6px; color: var(--muted); max-width: 52ch; }

/* method */
.method { padding: clamp(80px, 10vw, 140px) 0; }
.gantt { border-top: 1px solid var(--ink); }
.g-scale, .gantt li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; }
.g-scale { padding: 10px 0; border-bottom: 1px solid var(--line); font: 500 .78rem var(--mono); color: var(--muted); }
.g-weeks { display: grid; grid-template-columns: repeat(var(--weeks), minmax(0, 1fr)); }
.gantt li { padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center; }
.g-label h3 { font: 700 1.2rem/1.2 var(--sans); }
.g-label p { margin-top: 4px; color: var(--muted); font-size: .92rem; max-width: 50ch; }
.g-track { position: relative; height: 14px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / var(--weeks))); }
.g-bar { position: absolute; top: 0; bottom: 0; left: calc((var(--from) - 1) / var(--weeks) * 100%); width: calc((var(--to) - var(--from) + 1) / var(--weeks) * 100%); background: var(--blue); }
.g-after { margin-top: 20px; color: var(--muted); }

/* company */
.company { padding: clamp(80px, 10vw, 140px) 0; background: var(--ink); color: #e8eaec; }
.company .label { color: rgba(232, 234, 236, .6); }
.company-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px clamp(30px, 6vw, 90px); }
.company h2 { color: #fff; margin-bottom: 24px; }
.company-copy p:not(.label) { max-width: 58ch; color: rgba(232, 234, 236, .8); }
.company-copy p + p { margin-top: 14px; }
.company-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%; }
.certs { width: 100%; margin-top: 24px; border-collapse: collapse; font-size: .92rem; }
.certs caption { text-align: left; font: 500 .78rem var(--mono); text-transform: uppercase; color: rgba(232, 234, 236, .6); padding-bottom: 8px; }
.certs th, .certs td { text-align: left; padding: 12px 0; border-top: 1px solid rgba(232, 234, 236, .18); }
.certs th { font: 600 .9rem var(--mono); color: #fff; width: 40%; }
.certs td { color: rgba(232, 234, 236, .75); }

/* contact */
.contact { padding: clamp(80px, 10vw, 140px) 0; }
.contact-in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px clamp(30px, 6vw, 90px); }
.contact-info { display: grid; gap: 18px; align-content: start; }
.contact-info > p { color: var(--muted); }
.office h3 { font: 500 .78rem var(--mono); text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.office a { text-decoration: none; }
.form-box { padding: clamp(22px, 3vw, 40px); background: var(--white); border-top: 3px solid var(--blue); }
.form-box form { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 6px; align-content: start; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: .85rem; font-weight: 600; padding: 0; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid rgba(15, 18, 21, .25); border-radius: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.4 var(--sans); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(23, 57, 214, .15); }
.field [aria-invalid] { border-color: #c2341b; }
.seg { display: grid; grid-template-columns: 1fr 1fr; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 12px; text-align: center; border: 1px solid rgba(15, 18, 21, .25); font-weight: 600; font-size: .92rem; }
.seg label + label span { border-left: 0; }
.seg input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--muted); }
.check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; padding: 0; accent-color: var(--blue); }
.field-error { color: #c2341b; font-size: .86rem; }
.form-alert { margin-bottom: 18px; padding: 12px 16px; background: #fdeeea; color: #9c2a15; font-weight: 600; }
.form-box .btn { justify-self: start; }
.sent { display: grid; gap: 12px; justify-items: start; }
.sent-led { display: none; }
.sent h3 { font: 700 1.8rem/1.1 var(--sans); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.foot { background: var(--white); border-top: 1px solid var(--line); padding: 40px 0 28px; overflow: hidden; font-size: .88rem; color: var(--muted); }

.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 20px 30px; }
.foot address { font-style: normal; }
.foot address strong { color: var(--ink); }
.foot a { color: var(--ink); text-decoration: none; }
.foot-links { display: grid; gap: 6px; align-content: start; }
.foot-note { margin-top: 24px; font-size: .8rem; }
.shinpo-credit { margin-top: 10px; }
.shinpo-credit a { text-decoration: underline; text-underline-offset: 3px; }
.mbar { display: none; }

/* responsive */
@media (max-width: 1100px) {
  .top-tel { display: none; }
  .srv li { grid-template-columns: 50px minmax(0, 1fr) minmax(0, 260px); }
  .urgent-in { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --top: 60px; }
  .top .btn-sm, .top-lang { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; margin-left: auto; }
  .nav { display: none; position: absolute; top: var(--top); left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 6px var(--pad) 18px; background: var(--bg); border-bottom: 1px solid var(--line); font: 700 1.5rem/1.2 var(--sans); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-lang { display: block; padding-top: 14px; }
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .schema-scroll { overflow-x: auto; margin-inline: -8px; padding-inline: 8px; }
  .schema-scroll svg { min-width: 480px; }
  .schema { padding: 14px 12px 12px; }
  .facts-in { grid-template-columns: 1fr 1fr; }
  .facts-in div { padding: 18px 12px 18px 0; }
  .facts-in div + div { padding-left: 0; }
  .facts-in div:nth-child(odd) { padding-right: 12px; }
  .facts-in div:nth-child(even) { padding-left: 14px; border-right: 0; }
  .facts-in div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .srv li { grid-template-columns: 1fr; gap: 12px; }
  .srv-img { order: -1; }
  .plist, .company-in, .contact-in, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .g-scale { display: none; }
  .gantt li { grid-template-columns: 1fr; gap: 12px; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot { padding-bottom: 90px; }
  .mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 2fr; background: var(--white); border-top: 1px solid var(--line); }
  .mbar a { display: flex; align-items: center; justify-content: center; min-height: 56px; font-weight: 600; text-decoration: none; font-size: .95rem; }
  .mbar-main { background: var(--blue); color: #fff; }
}
