/* SiliconDev — static site stylesheet
   Ricostruzione del tema WordPress "silicondev" senza Bootstrap/WP. */

:root {
  --red: #e32f33;
  --red-dark: #a63f3f;
  --grey: #707070;
  --text: #333;
  --light: #f5f5f7;
  --lighter: #fafafa;
  --white: #fff;
  --max: 1200px;
  --gutter: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--red); }
a:hover { text-decoration: none; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; }
h2 { font-size: 1.9rem; font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--red); color: var(--white); padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; }

/* HEADER / NAV
--------------------------------------------------------------------------------*/
.site-header { background: var(--white); position: relative; z-index: 20; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--gutter);
  gap: 50px;
}

.logo img { width: 200px; height: auto; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span { margin: 0 auto; }
.nav-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block; width: 26px; height: 3px; border-radius: 2px; background: var(--text);
  position: relative; transition: transform .25s ease, background-color .15s;
}
.nav-toggle:hover span,
.nav-toggle:hover span::before,
.nav-toggle:hover span::after { background: var(--red); }
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }

.menu {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 5px;
}
.menu > li { position: relative; padding: 5px 15px; }
.menu > li > a {
  display: block;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.menu > li > a:hover,
.menu > li > a[aria-current="page"],
.menu > li.is-active > a { color: var(--red); }

/* Sottomenu desktop: pannello unico bianco, staccato dalla banda rossa */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 5px;
  min-width: 240px;
  list-style: none;
  margin: 10px 0 0;
  padding: 8px 0;
  background: var(--white);
  border-top: 3px solid var(--red);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .28), 0 0 0 1px rgba(0, 0, 0, .05);
  z-index: 30;
}
/* Ponte invisibile sullo spazio tra voce e pannello, così l'hover non si interrompe */
.sub-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -13px; height: 13px; }
.menu > li:hover > .sub-menu,
.menu > li:focus-within > .sub-menu { display: block; animation: subIn .15s ease-out; }
@keyframes subIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.sub-menu a {
  display: block;
  padding: 10px 22px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.sub-menu a:hover { background: var(--light); color: var(--red); border-left-color: var(--red); }
.sub-menu a[aria-current="page"] { color: var(--red); border-left-color: var(--red); }

.lang-switch { display: flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; }
.lang-switch a { color: var(--grey); text-decoration: none; padding: 4px 2px; }
.lang-switch a:hover { color: var(--red); }
.lang-switch [aria-current] { color: var(--red); }
.lang-switch .sep { color: #ccc; font-weight: 400; }

/* PAGE TITLE BAND
--------------------------------------------------------------------------------*/
.page-title {
  background: var(--red);
  color: var(--white);
  padding: 40px 40px 100px;
}
.page-title .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}
.page-title h1 { font-size: 4rem; font-weight: 700; margin: 0; }
.page-title .excerpt, .page-title .excerpt p { color: var(--white); font-size: 1.5rem; line-height: 1.4; }
.page-title .excerpt p:last-child { margin-bottom: 0; }

/* CONTENT
--------------------------------------------------------------------------------*/
.content { padding: 60px 0; }
.content p { color: var(--text); }

.section { margin-bottom: 60px; }
.section:last-child { margin-bottom: 0; }

.lead { font-size: 1.25rem; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.split.reverse > :first-child { order: 2; }
.split img, .split video { width: 100%; object-fit: cover; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}
.card {
  background: var(--light);
  padding: 30px;
  border-top: 4px solid var(--red);
}
.card h2, .card h3 { font-size: 1.4rem; }
.card p:last-child { margin-bottom: 0; }

.figure-wide { margin: 0 0 50px; }
.figure-wide img { width: 100%; max-height: 460px; object-fit: cover; }

.figure-hero { margin: 0 0 60px; }
.figure-hero img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 30px 60px -20px rgba(7, 11, 20, .55), 0 0 0 1px rgba(255, 255, 255, .04);
}

.prose { max-width: 820px; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }

/* Clienti */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
}
.logo-grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 2;
  padding: 15px;
  background: var(--white);
  border: 1px solid var(--light);
}
.logo-grid img { max-height: 80px; width: auto; object-fit: contain; }

/* Gruppo */
.company {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid #e5e5e5;
}
.company:first-child { padding-top: 0; }
.company:last-child { border-bottom: 0; }
.company-logo img { max-width: 260px; max-height: 120px; width: auto; }
.company h2 { font-size: 1.5rem; margin-bottom: .4em; }

/* Soluzioni / prodotti */
.product { padding: 40px 0; border-bottom: 1px solid #e5e5e5; }
.product:last-child { border-bottom: 0; }
.product h2 { color: var(--red); }

/* Processo a fasi (SOC) */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  padding: 0;
  margin: 0;
}
.steps li { counter-increment: step; position: relative; padding-top: 58px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
}
.steps strong { display: block; font-size: 1.15rem; margin-bottom: 4px; }

.cta { background: var(--light); padding: 40px; text-align: center; }
.cta p { max-width: 640px; margin: 0 auto 24px; }

/* Sedi */
.offices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.office h2 { font-size: 1.5rem; border-bottom: 1px solid #ddd; padding-bottom: 10px; }
.office ul { list-style: none; padding: 0; margin: 0 0 20px; }
.office li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.office li svg { flex: 0 0 18px; margin-top: 4px; fill: var(--red); }
.office a { color: var(--text); }

.map {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--light);
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* BUTTONS
--------------------------------------------------------------------------------*/
.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--red);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color .3s, padding .3s;
}
.btn:hover { background: var(--grey); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-outline { background: transparent; color: var(--red); border: 2px solid var(--red); }
.btn-outline:hover { background: var(--red); color: var(--white); }

/* HOME
--------------------------------------------------------------------------------*/
.home-covers { display: flex; flex-direction: column; gap: 30px; padding-bottom: 30px; }

.cover {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: #222 center / cover no-repeat;
}
.cover--hero { min-height: 726px; }
.cover--parallax { background-attachment: fixed; }
.cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .25);
  z-index: 1;
}
.cover > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) 40px calc(var(--gutter) + 100px);
}
.cover h2, .cover h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  margin-bottom: 20px;
}
.cover p { color: var(--white); font-size: 1.35rem; margin: 0; }
.cover .btn { margin-top: 30px; background: var(--red-dark); }
.cover .btn:hover { background: var(--red); }

@media (hover: none) { .cover--parallax { background-attachment: scroll; } }

/* FORMS
--------------------------------------------------------------------------------*/
.form-wrap {
  background: var(--light);
  padding: 40px;
}
.form fieldset { border: 0; padding: 0; margin: 0 0 25px; }
.form legend { font-size: 1.3rem; font-weight: 700; margin-bottom: 15px; padding: 0; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--red); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px;
  font: inherit;
  color: var(--text);
  background: var(--white);
  border: 1px solid #dcdce0;
  border-radius: 0;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: -1px;
  border-color: var(--red);
}
.field input[type="file"] { font: inherit; width: 100%; padding: 10px; background: var(--white); border: 1px dashed #bbb; }
.field .hint { font-size: .85rem; color: var(--grey); margin-top: 4px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.field .error-msg { color: var(--red); font-size: .85rem; margin-top: 4px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { margin-top: 5px; flex: 0 0 auto; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 20px; padding: 14px 18px; display: none; }
.form-status.ok { display: block; background: #e7f5ea; color: #1e6b33; border-left: 4px solid #2e9d4c; }
.form-status.err { display: block; background: #fdecec; color: #9b1c1f; border-left: 4px solid var(--red); }

/* FOOTER
--------------------------------------------------------------------------------*/
.site-footer {
  background: var(--light);
  border-top: 40px solid var(--lighter);
  padding: 30px 0 20px;
}
.footer-logo { display: flex; justify-content: center; margin-bottom: 10px; }
.footer-logo img { width: 200px; }
.footer-menu { justify-content: center; }
.footer-menu .sub-menu { display: none !important; }
.footer-menu > li > a:hover, .footer-menu > li > a[aria-current="page"] { color: var(--red); }
a[aria-current="page"] { cursor: default; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .9rem; margin: 20px 0; }
.footer-links a { color: var(--grey); font-weight: 700; text-decoration: none; }
.footer-links a:hover { color: var(--red); }
.footer-desc { font-size: .95rem; }
.copyright { text-align: center; font-size: .95rem; margin: 20px 0 0; }

/* 404 */
.notfound { text-align: center; padding: 80px 0; }

/* RESPONSIVE
--------------------------------------------------------------------------------*/
@media (max-width: 900px) {
  .page-title .container, .split, .company { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .page-title h1 { font-size: 3rem; }
  .company-logo img { max-width: 200px; }
}

@media (min-width: 961px) and (max-width: 1240px) {
  .header-inner { gap: 24px; }
  .logo img { width: 160px; }
  .main-nav .menu > li { padding: 5px 9px; }
  .main-nav .menu > li > a { font-size: .95rem; }
}

@media (max-width: 960px) {
  .header-inner { justify-content: space-between; padding: 15px var(--gutter); gap: 20px; }
  .logo img { width: 150px; }
  .lang-switch { order: 1; margin-left: auto; }
  .nav-toggle { display: block; order: 2; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 10px var(--gutter) 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .08);
  }
  .main-nav.open { display: block; }
  .main-nav .menu { flex-direction: column; padding: 0; }
  .main-nav .menu > li { padding: 0; margin-bottom: 8px; border: 1px solid var(--light); }
  .main-nav .menu > li > a { padding: 8px 12px; }
  .main-nav .sub-menu {
    display: block; position: static; min-width: 0; margin: 0; padding: 0 0 6px;
    background: none; border: 0; border-radius: 0; box-shadow: none; animation: none;
  }
  .main-nav .sub-menu::before { display: none; }
  .main-nav .sub-menu a { background: none; color: var(--text); border: 0; padding: 4px 24px; font-weight: 400; }
  .main-nav .sub-menu a[aria-current="page"] { color: var(--red); font-weight: 600; }
  .main-nav .sub-menu a:hover { background: none; color: var(--red); }
  .nav-open .nav-toggle span { background: transparent; }
  .nav-open .nav-toggle span::before { transform: translateY(8px) rotate(45deg); background: var(--red); }
  .nav-open .nav-toggle span::after { transform: translateY(-8px) rotate(-45deg); background: var(--red); }
}

@media (max-width: 740px) {
  .page-title { padding: 30px 0 60px; }
  .page-title h1 { font-size: 2.5rem; }
  .page-title .excerpt, .page-title .excerpt p { font-size: 1.1rem; }
  .content { padding: 40px 0; }

  .cover, .cover--hero { min-height: 420px; }
  .cover-inner { padding: 30px var(--gutter); }
  .cover p { font-size: 1.1rem; }

  .map { aspect-ratio: 16 / 10; }
  .figure-hero { margin: 0 0 40px; }
  .figure-hero img { border-radius: 8px; }
  .cta { padding: 30px 20px; }
  .steps li { padding: 0 0 0 60px; min-height: 44px; }
  .form-wrap { padding: 25px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  .site-footer .footer-menu, .footer-logo { display: none; }
  .footer-desc { font-size: .85rem; }
  .copyright { font-size: .8rem; font-weight: 600; }
}
