﻿/* DIAB-AV S.R.L. — foglio di stile del sito
   Nessuna risorsa esterna: niente font remoti, niente script, niente cookie. */

:root {
  --ink: #17202b;
  --muted: #4f5b6a;
  --line: #d6dde5;
  --bg: #ffffff;
  --bg-alt: #f2f5f8;
  --brand: #0b3b5c;
  --accent: #0b6670;
  --eu: #003399;           /* Reflex Blue, All. IX Reg. (UE) 2021/1060 */
  --focus: #ffbf47;
  --dc-bg: #fff1a8;
  --dc-ink: #5c4300;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
}

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }

a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--brand); }
/* Focus: contrasto >= 3:1 su fondo chiaro (WCAG 2.1, 1.4.11); giallo solo sul piede scuro */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
footer.piede :focus-visible { outline-color: var(--focus); }
main:focus { outline: none; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: #000; color: #fff; padding: .5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

/* Blocco istituzionale: in apertura di pagina (BrandBook Coesione Italia, UE-27) */
.istituzionale { background: #fff; border-bottom: 1px solid var(--line); }
.istituzionale .wrap { padding-top: .75rem; padding-bottom: .75rem; }
.blocco-loghi {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 4.75rem;
}

.testata { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.testata-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1.5rem; padding-top: .85rem; padding-bottom: .85rem;
}
.marchio {
  font-weight: 700; font-size: 1.2rem; letter-spacing: .05em;
  color: var(--brand); text-decoration: none;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: .975rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }

main { display: block; }

section { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
section:last-child { border-bottom: 0; }

.hero { padding: 3rem 0 2.5rem; }
.occhiello {
  text-transform: uppercase; letter-spacing: .09em; font-size: .8rem;
  color: var(--muted); margin: 0 0 .5rem;
}

h1 { font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.15; margin: 0 0 1rem; color: var(--brand); }
h2 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 1rem; color: var(--brand); }
h3 { font-size: 1.1rem; line-height: 1.3; margin: 1.75rem 0 .5rem; }

p, ul, ol { margin: 0 0 1rem; max-width: 46rem; }
.lead { font-size: 1.2rem; }
.piccolo { font-size: .925rem; color: var(--muted); }

/* Dicitura sul finanziamento: carattere ammesso (All. IX, punto 1.3), niente corsivo né effetti */
.dicitura {
  font-family: Arial, Verdana, Tahoma, sans-serif;
  color: var(--eu);
  border-left: 4px solid var(--eu);
  background: #f4f7fd;
  padding: .9rem 1rem;
  max-width: 46rem;
  margin: 0 0 1.5rem;
}

/* Scheda dell'operazione */
.scheda { margin: 0 0 1.5rem; max-width: 46rem; }
.scheda div { padding: .6rem 0; border-top: 1px solid var(--line); }
.scheda div:last-child { border-bottom: 1px solid var(--line); }
.scheda dt { font-weight: 600; color: var(--muted); font-size: .925rem; }
.scheda dd { margin: .15rem 0 0; }
@media (min-width: 44rem) {
  .scheda div { display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; }
  .scheda dd { margin: 0; }
}

.bottone {
  display: inline-block; padding: .65rem 1.1rem; border-radius: 4px;
  background: var(--brand); color: #fff; text-decoration: none; font-weight: 600;
}
.bottone:hover { background: var(--accent); color: #fff; }

.contatti { list-style: none; padding: 0; }
.contatti li { padding: .2rem 0; }

/* Tabella art. 25, c. 12 D.L. 179/2012 */
.tabella-startup { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: 1rem; }
.tabella-startup caption { text-align: left; font-weight: 600; padding: 0 0 .75rem; color: var(--muted); }
.tabella-startup th, .tabella-startup td { text-align: left; vertical-align: top; padding: .75rem .6rem; border-top: 1px solid var(--line); }
.tabella-startup thead th { background: var(--bg-alt); border-top: 0; font-size: .925rem; color: var(--muted); }
.tabella-startup tbody th { width: 2.5rem; color: var(--brand); }
.tabella-startup .voce { width: 32%; font-weight: 600; }
/* La tabella resta una tabella anche su mobile (semantica intatta per i lettori di schermo) */
.tabella-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
.tabella-wrap .tabella-startup { margin: 0; }
@media (max-width: 40rem) {
  .tabella-startup { font-size: .925rem; }
  .tabella-startup th, .tabella-startup td { padding: .6rem .35rem; }
  .tabella-startup tbody th { width: 2rem; }
  .tabella-startup .voce { width: 38%; }
}

/* Campi da completare: ben visibili finché non vengono compilati */
.dc {
  background: var(--dc-bg); color: var(--dc-ink);
  outline: 1px dashed #b38f00; padding: 0 .25em; border-radius: 3px;
}

.testo-legale h2 { font-size: 1.25rem; margin-top: 2rem; }
.testo-legale h2:first-of-type { margin-top: 0; }

footer.piede { background: var(--brand); color: #e7edf3; font-size: .9rem; padding: 2rem 0 2.5rem; }
footer.piede a { color: #fff; }
.dati-societari { margin: 0 0 1rem; max-width: none; }
.link-legali { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; max-width: none; }

@media print {
  .testata .nav, .skip { display: none; }
  footer.piede { background: none; color: #000; }
  footer.piede a { color: #000; }
}

/* v1.2: obiettivi di ricerca, stato del progetto, persona, nota nel piede */
.obiettivi {
  list-style: none; padding: 0; margin: 0 0 1.5rem; max-width: none;
  display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 44rem) { .obiettivi { grid-template-columns: 1fr 1fr; } }
.scheda-obiettivo {
  border: 1px solid var(--line); border-top: 4px solid var(--accent);
  border-radius: 4px; padding: 1rem 1.1rem; background: #fff;
}
.scheda-obiettivo h4 { margin: 0 0 .35rem; font-size: 1.05rem; color: var(--brand); }
.scheda-obiettivo p { margin: 0; }
.stato-progetto {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 4px;
  padding: .9rem 1rem; max-width: 46rem;
}
.persona { max-width: 46rem; }
.persona-nome { font-size: 1.2rem; font-weight: 700; margin: 0; color: var(--brand); }
.persona-ruolo { margin: 0 0 .5rem; color: var(--muted); font-weight: 600; }
.nota-piede { margin: 1rem 0 0; font-size: .85rem; color: #c9d6e2; max-width: none; }

/* v1.3: logo DIAB-AV. Altezza 2,1rem (~34 px) < emblema UE nella banda (~36-38 px da 48rem in su):
   rispetta All. IX punto 1.7 e BrandBook UE-22. Sotto i 48rem la banda si riduce e resta la scritta. */
.marchio { display: inline-flex; align-items: center; }
.logo-diab { display: none; height: 2.1rem; width: auto; }
@media (min-width: 48rem) {
  .logo-diab { display: block; }
  .marchio-testo { display: none; }
}

/* v1.4: paragrafi dell'oggetto sociale nella tabella art. 25 */
.tabella-startup td p { margin: 0 0 .6rem; max-width: none; }
.tabella-startup td p:last-child { margin-bottom: 0; }
