/* Openinnovation - foglio di stile unico del sito statico */
:root {
  --ink: #1d2433;
  --muted: #5b6475;
  --bg: #ffffff;
  --bg-alt: #f3f6fa;
  --dark: #0f1a2b;
  --accent: #1aa6c9;
  --accent-dark: #127f9b;
  --warm: #f08a24;
  --line: #e2e7ee;
  --radius: 10px;
  --wrap: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
a:hover { color: var(--warm); }
h1, h2, h3, h4, h5 { line-height: 1.25; margin: 1.6em 0 .6em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 780px; }

/* header */
.site-header { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 20px; }
.logo img { height: 40px; width: auto; display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; gap: 6px; }
.site-nav a { color: #dfe6ef; text-decoration: none; padding: 8px 12px; border-radius: 6px; display: block; }
.site-nav a:hover, .site-nav a[aria-current] { color: #fff; background: rgba(255,255,255,.08); }
.has-sub { position: relative; }
.has-sub > a::after { content: " \25BE"; font-size: .8em; }
.has-sub ul {
  display: none; position: absolute; left: 0; top: 100%; min-width: 260px;
  background: var(--dark); padding: 8px; border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.has-sub:hover ul, .has-sub:focus-within ul { display: block; }
.has-sub li.sub a { padding-left: 28px; font-size: .95em; }
.menu-btn { display: none; font-size: 28px; cursor: pointer; }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { display: none; width: 100%; padding-bottom: 12px; }
  #menu-toggle:checked ~ .site-nav { display: block; }
  .site-nav > ul { flex-direction: column; }
  .has-sub ul { display: block; position: static; box-shadow: none; padding: 0 0 0 12px; }
}

/* sezioni */
main section { padding: 56px 0; }
main section:nth-of-type(even) { background: var(--bg-alt); }
main section > .wrap > :first-child { margin-top: 0; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  padding: 12px 26px; border-radius: 999px; font-weight: 600; margin-top: 8px;
}
.btn:hover { background: var(--warm); color: #fff; }

/* banner delle pagine prodotto */
section.banner {
  background-color: var(--dark); background-size: cover; background-position: center;
  color: #fff; padding: 110px 0; position: relative;
}
section.banner::before { content: ""; position: absolute; inset: 0; background: rgba(10,18,32,.6); }
section.banner .wrap { position: relative; max-width: 900px; }
section.banner .lead, section.banner p { color: #e8eef5; }

/* slider della home */
section.slider { padding: 0; background: var(--dark); }
section.slider .wrap { max-width: none; padding: 0; position: relative; }
.slide { position: relative; display: none; }
.slide:first-child, .slide.active { display: block; }
.js .slide:first-child:not(.active) { display: none; }
.slide img { width: 100%; height: clamp(320px, 55vw, 620px); object-fit: cover; display: block; }
.caption {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 0 max(20px, calc((100% - var(--wrap)) / 2 + 20px)); color: #fff;
  font-size: clamp(1.6rem, 3.6vw, 2.8rem); font-weight: 700; line-height: 1.2;
  background: linear-gradient(90deg, rgba(10,18,32,.75), rgba(10,18,32,0) 70%);
}
.caption h1, .caption h2 { font-size: inherit; margin: 0; }
.caption p { font-size: 1.1rem; font-weight: 400; margin: .8em 0; max-width: 520px; }
.caption .btn { align-self: flex-start; font-size: 1rem; }
.dots { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; }
.dots button { width: 11px; height: 11px; border-radius: 50%; border: 0; margin: 0 5px; background: rgba(255,255,255,.45); cursor: pointer; padding: 0; }
.dots button.active { background: #fff; }

/* griglie di feature */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; margin: 24px 0; }
.cell { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
section:nth-of-type(even) .cell { background: #fff; }
.cell img { display: block; margin: 0 auto 14px; border-radius: 6px; }
.cell h2, .cell h3 { font-size: 1.15rem; margin-top: .4em; }
.features .cell img { max-height: 72px; width: auto; margin: 0 0 12px; }
.tab { margin-bottom: 40px; }
.bg { min-height: 220px; background-size: cover; background-position: center; border-radius: var(--radius); }

/* blog */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,26,43,.12); color: inherit; }
.card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card-body { padding: 18px 22px 24px; }
.card h2 { font-size: 1.2rem; margin: .3em 0 .5em; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }
.card time, .meta { color: var(--muted); font-size: .9rem; }
.post { padding: 48px 0 72px; }
.post h1 { margin-top: .3em; }
.post .cover { width: 100%; border-radius: var(--radius); margin: 16px 0 28px; }
.tag { display: inline-block; background: var(--bg-alt); border-radius: 999px; padding: 2px 12px; margin-left: 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

/* footer */
.site-footer { background: var(--dark); color: #b9c3d1; padding: 48px 0 32px; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 24px; }
.site-footer a { color: #fff; }
.footer-logo { height: 38px; width: auto; }
.site-footer address { font-style: normal; }
.site-footer .legal { width: 100%; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; margin: 8px 0 0; }
