/* FlyCore Technologies GmbH — foglio di stile
   Palette: navy "quadro elettrico", carta grigio-freddo, giallo "puntale di misura" come unico accento. */

:root {
  --ink: #112A45;
  --ink-2: #1B3A5C;
  --steel: #2E5A85;
  --paper: #F4F6F8;
  --white: #FFFFFF;
  --line: #C9D3DC;
  --mid: #5B6B7A;
  --signal: #D97757;
  --signal-ink: #112A45;

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;

  --w: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: var(--steel); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--signal); outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 62ch; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--gutter);
  background: var(--white);
  border-bottom: 3px solid var(--ink);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; line-height: 1;
}
.brand img { height: 44px; width: auto; }
@media (max-width: 400px) { .brand img { height: 34px; } }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { text-decoration: underline; }
.nav-cta { background: var(--ink); color: var(--white) !important; padding: 9px 16px; border-radius: 3px; }
.nav-cta:hover { background: var(--steel); text-decoration: none !important; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 3px; background: var(--ink); margin: 6px 0; transition: transform .2s; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 3px solid var(--ink);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px var(--gutter); border-top: 1px solid var(--line); }
  .nav-cta { border-radius: 0; margin: 0; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
}

/* selettore lingua */
.langs { display: flex; gap: 2px; border: 1.5px solid var(--line); border-radius: 3px; padding: 2px; }
.langs a { padding: 4px 8px !important; border-radius: 2px; font-size: .82rem; font-weight: 600; letter-spacing: .03em; border: 0 !important; }
.langs a.active { background: var(--ink); color: var(--white); }
.langs a:hover { text-decoration: none !important; background: var(--paper); }
.langs a.active:hover { background: var(--ink); }
@media (max-width: 820px) { .langs { margin: 12px var(--gutter); align-self: flex-start; } }

/* ---------- hero ---------- */
.hero {
  max-width: var(--w); margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(32px, 5vw, 72px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 72px); align-items: center;
}
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.hero-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--mid); font-size: .95rem; }
.hero-facts li { padding-left: 14px; position: relative; }
.hero-facts li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; background: var(--signal); }
.hero-facts strong { color: var(--ink); font-weight: 600; }

.btn {
  display: inline-block; padding: 13px 22px; border-radius: 3px;
  font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 600;
}
.btn-primary { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
.btn-primary:hover { background: #E6896B; }
.btn-ghost { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--white); }

.hero-art { margin: 0; color: var(--ink); }
.schematic { width: 100%; height: auto; background: var(--white); border: 1px solid var(--line); border-radius: 4px; }
.schematic text { font-family: var(--font-display); font-weight: 500; font-size: 17px; fill: var(--ink); }
.schematic .blk rect { fill: var(--white); stroke: var(--ink); stroke-width: 2.5; }
.schematic .pins line, .schematic .wire path { stroke: var(--ink); stroke-width: 2; fill: none; }
.schematic .node circle { fill: var(--ink); }
.schematic .pulse { fill: var(--signal); stroke: var(--signal-ink); stroke-width: 1.5; }
.schematic .dim line { stroke: var(--mid); stroke-width: 1; }
.schematic .dim text { font-family: var(--font); font-size: 12px; fill: var(--mid); font-weight: 400; }

/* un solo momento di movimento: lo schema si disegna al caricamento */
.schematic .wire path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.4s ease-out forwards .4s; }
.schematic .blk { opacity: 0; animation: appear .5s ease-out forwards var(--d); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .schematic .wire path, .schematic .blk { animation: none; stroke-dashoffset: 0; opacity: 1; }
  .schematic .pulse { display: none; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
}

/* ---------- sezioni ---------- */
.section { max-width: var(--w); margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter); }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); border-top: 3px solid var(--ink); padding-top: 18px; }
.section-head p { color: var(--mid); font-size: 1.05rem; }

/* servizi: lista a due colonne con righe, non card identiche */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 5vw, 72px); }
.service { padding: 28px 0 32px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; gap: 6px 20px; }
.service img { grid-row: span 3; }
.service h3 { margin: 4px 0 6px; }
.service p { margin-bottom: 10px; max-width: 46ch; }
.service ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .95rem; }
.service li { margin: 2px 0; }
@media (max-width: 820px) {
  .services { grid-template-columns: 1fr; }
}

/* banda immagini */
.band {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 6px;
  max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter);
}
.photo { margin: 0; position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: 4px; background: var(--ink); }
.photo-a { aspect-ratio: auto; grid-row: span 1; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption {
  position: absolute; left: 0; bottom: 0; padding: 8px 12px;
  background: var(--ink); color: var(--white); font-size: .85rem; font-weight: 500;
  border-top: 3px solid var(--signal);
}
@media (max-width: 820px) {
  .band { grid-template-columns: 1fr 1fr; }
  .photo-a { grid-column: span 2; aspect-ratio: 16/9; }
}

/* settori */
.sectors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
.sectors li { padding: 18px 0; border-top: 1px solid var(--line); }
.sectors strong { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 4px; }
.sectors span { color: var(--mid); font-size: .95rem; }
@media (max-width: 820px) { .sectors { grid-template-columns: 1fr; } }

/* metodo (scuro) */
.section-dark { max-width: none; background: var(--ink); color: var(--white); }
.section-dark > * { max-width: var(--w); margin-left: auto; margin-right: auto; }
.section-dark .section-head { border-top-color: var(--signal); }
.section-dark .section-head p { color: #B9C7D6; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.steps li { counter-increment: step; border-left: 2px solid var(--steel); padding-left: 16px; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--signal); line-height: 1; margin-bottom: 10px; }
.steps h3 { color: var(--white); font-size: 1.15rem; }
.steps p { color: #D6DFE8; font-size: .95rem; margin: 0; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* azienda */
.about-photo { margin: 0 0 32px; aspect-ratio: 21/9; overflow: hidden; border-radius: 4px; background: var(--ink); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(24px, 5vw, 72px); border-top: 3px solid var(--ink); padding-top: 24px; }
.about-facts { margin: 0; }
.about-facts div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.about-facts dt { font-size: .85rem; color: var(--mid); margin-bottom: 2px; }
.about-facts dd { margin: 0; font-weight: 500; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* contatti */
.section-contact {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 72px);
  background: var(--white); max-width: none; padding-left: 0; padding-right: 0;
}
.section-contact > * { padding: 0 var(--gutter); }
.contact-info { padding-left: max(var(--gutter), calc((100vw - var(--w)) / 2 + var(--gutter))); }
.contact-form { padding-right: max(var(--gutter), calc((100vw - var(--w)) / 2 + var(--gutter))); display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; align-content: start; }
address { font-style: normal; line-height: 1.7; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: span 2; }
.field label { font-size: .92rem; font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 3px; background: var(--paper); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); background: var(--white); }
.field-check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field-check input { margin-top: 5px; width: 18px; height: 18px; }
.field-check label { font-weight: 400; font-size: .9rem; color: var(--mid); }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 10px 0 0; font-size: .95rem; min-height: 1.4em; }
.form-status.ok { color: #1E6B3A; }
.form-status.err { color: #B3261E; }
@media (max-width: 820px) {
  .section-contact { grid-template-columns: 1fr; }
  .contact-info, .contact-form { padding: 0 var(--gutter); }
  .contact-form { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
}

/* footer */
.foot {
  background: var(--ink); color: #D6DFE8; padding: 32px var(--gutter);
  display: grid; grid-template-columns: 1fr auto; gap: 16px 48px; font-size: .9rem; border-top: 4px solid var(--signal);
}
.foot strong { color: var(--white); }
.foot a { color: var(--white); }
.foot-logo { display: inline-block; margin-bottom: 12px; }
.foot-links { display: flex; gap: 20px; }
.foot-links a { color: var(--white); }
.foot small { grid-column: 1 / -1; color: #9FB0C2; }
@media (max-width: 600px) { .foot { grid-template-columns: 1fr; } }

/* pagine legali */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter); }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); border-top: 3px solid var(--ink); padding-top: 18px; }
.legal h2 { font-size: 1.35rem; margin-top: 1.6em; }
