:root {
  --green: #64b77f;
  --green-dark: #1e866b;
  --green-pale: #eaf5ee;
  --ink: #29353b;
  --muted: #68757b;
  --paper: #ffffff;
  --soft: #f7f7f7;
  --line: #dce5e0;
  --blue: #2374a6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { height: auto; }

.site-header {
  width: min(1180px, calc(100% - 48px));
  min-height: 94px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand img { width: 142px; }
nav { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 650; }
.nav-cta, .primary-button, .demo-form button {
  background: var(--green-dark);
  color: white;
  border-radius: 10px;
  transition: transform .2s ease, background .2s ease;
}
.nav-cta { padding: 13px 19px; }
.nav-cta:hover, .primary-button:hover, .demo-form button:hover { background: #176f59; transform: translateY(-1px); }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  padding: 78px max(24px, calc((100vw - 1180px) / 2)) 92px;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  align-items: center;
  gap: 68px;
  background: linear-gradient(115deg, #f7faf8 0%, #f7faf8 54%, #e4f2e9 54%, #d7ebdf 100%);
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 400px;
  height: 400px;
  border: 55px solid rgba(100, 183, 127, .18);
  border-radius: 50%;
}
.eyebrow { margin: 0 0 18px; color: var(--green-dark); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 670px; margin-bottom: 28px; font-size: clamp(46px, 5vw, 72px); line-height: 1.02; letter-spacing: -.045em; }
h1 span { color: var(--green-dark); }
.hero-lead { max-width: 620px; margin-bottom: 34px; color: var(--muted); font-size: 20px; line-height: 1.55; }
.primary-button { display: inline-block; padding: 17px 22px; font-weight: 750; }
.hero-actions p { margin: 13px 0 0; color: var(--muted); font-size: 13px; }
.hero-visual { position: relative; z-index: 1; padding: 14px; background: white; border: 1px solid rgba(30,134,107,.18); border-radius: 18px; box-shadow: 0 28px 70px rgba(26, 63, 49, .18); transform: rotate(1deg); }
.hero-visual > img { width: 100%; display: block; border-radius: 10px; }
.screen-label { position: absolute; top: -17px; left: 24px; padding: 9px 13px; color: white; background: var(--blue); border-radius: 7px; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.floating-note { position: absolute; right: -28px; bottom: -35px; min-width: 238px; padding: 17px; display: flex; gap: 13px; align-items: center; background: white; border-radius: 13px; box-shadow: 0 16px 38px rgba(23, 74, 55, .2); }
.floating-note span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-weight: 900; }
.floating-note p { margin: 0; font-size: 13px; line-height: 1.45; }

.problem-band { padding: 62px max(24px, calc((100vw - 980px) / 2)); color: white; text-align: center; background: var(--green); }
.problem-band p { margin-bottom: 13px; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .14em; }
.problem-band h2 { margin: 0; font-size: clamp(28px, 3.5vw, 45px); line-height: 1.15; letter-spacing: -.025em; }

.section { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 110px 0; }
.section-heading { max-width: 760px; margin-bottom: 48px; }
.section-lead { color: var(--muted); font-size: 18px; line-height: 1.65; }
.section h2, .workflow h2, .demo h2 { font-size: clamp(34px, 4vw, 52px); line-height: 1.08; letter-spacing: -.035em; }
.situation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.situation-card { position: relative; min-height: 360px; margin: 0; overflow: hidden; border-radius: 18px; background: #dce5e0; }
.situation-wide { grid-column: 1 / -1; min-height: 520px; }
.situation-card > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.situation-wide > img { object-position: center 42%; }
.situation-card::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(15, 39, 32, .9)); pointer-events: none; }
.situation-card figcaption { position: absolute; z-index: 1; left: 28px; right: 28px; bottom: 25px; display: flex; gap: 17px; align-items: flex-start; color: white; }
.situation-card figcaption > span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; font-size: 12px; font-weight: 800; }
.situation-card figcaption strong { display: block; margin-bottom: 5px; font-size: 22px; }
.situation-card figcaption p { margin: 0; color: rgba(255,255,255,.82); line-height: 1.45; }
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.benefit-card { min-height: 250px; padding: 34px; border: 1px solid var(--line); border-radius: 17px; background: var(--soft); }
.benefit-card > span { display: inline-block; margin-bottom: 48px; color: var(--green-dark); font-size: 13px; font-weight: 800; }
.benefit-card h3 { margin-bottom: 12px; font-size: 23px; }
.benefit-card p { margin: 0; color: var(--muted); line-height: 1.6; }

.workflow { padding: 110px max(24px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 70px; background: #f2f6f4; }
.steps { margin-top: 40px; display: grid; gap: 24px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step > span { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; color: white; background: var(--green-dark); border-radius: 50%; font-size: 13px; font-weight: 800; }
.step h3 { margin: 1px 0 5px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); line-height: 1.55; }
.workflow-visual, .control-visual { padding: 12px; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 24px 50px rgba(35, 64, 49, .12); }
.workflow-visual img, .control-visual img { width: 100%; display: block; border-radius: 9px; }

.control { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; }
.control-copy > p:not(.eyebrow) { color: var(--muted); font-size: 17px; line-height: 1.65; }
.text-link { color: var(--green-dark); font-weight: 800; }

.portal-section { padding: 110px max(24px, calc((100vw - 1180px) / 2)); color: white; background: #193d4d; }
.portal-heading { margin-bottom: 52px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; align-items: end; }
.portal-heading h2 { margin: 0; font-size: clamp(34px, 4vw, 52px); line-height: 1.08; letter-spacing: -.035em; }
.portal-heading > p { margin: 0; color: #bdcdd4; line-height: 1.65; }
.portal-section .eyebrow { color: #9ed5b0; }
.portal-slider { position: relative; }
.slider-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.portal-slide { display: none; margin: 0; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: 42px; align-items: center; }
#portal-1:checked ~ .portal-slides .slide-1,
#portal-2:checked ~ .portal-slides .slide-2,
#portal-3:checked ~ .portal-slides .slide-3 { display: grid; }
.portal-screen { padding: 13px; background: white; border-radius: 17px; box-shadow: 0 30px 65px rgba(0,0,0,.28); }
.portal-screen img { width: 100%; display: block; border-radius: 9px; }
.portal-slide figcaption { display: flex; gap: 17px; align-items: flex-start; }
.portal-slide figcaption > span { color: #9ed5b0; font-size: 13px; font-weight: 800; }
.portal-slide figcaption strong { display: block; margin-bottom: 11px; font-size: 26px; }
.portal-slide figcaption p { margin: 0; color: #bdcdd4; line-height: 1.6; }
.slider-controls { width: fit-content; margin: 38px 0 0 auto; display: flex; gap: 8px; }
.slider-controls label { padding: 11px 17px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: #d8e4e8; cursor: pointer; font-size: 13px; font-weight: 750; transition: .2s ease; }
.slider-controls label:hover, .slider-controls label:focus { border-color: #9ed5b0; color: white; outline: none; }
#portal-1:checked ~ .slider-controls label[for="portal-1"],
#portal-2:checked ~ .slider-controls label[for="portal-2"],
#portal-3:checked ~ .slider-controls label[for="portal-3"] { color: #173e4e; background: #9ed5b0; border-color: #9ed5b0; }

.demo { padding: 105px max(24px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: .8fr 1.2fr; gap: 75px; color: white; background: #213d35; }
.light { color: #a9dbb9; }
.demo-intro > p:not(.eyebrow) { max-width: 480px; color: #ccdbd5; font-size: 17px; line-height: 1.65; }
.response-time { margin-top: 45px; display: flex; gap: 15px; align-items: center; }
.response-time span { font-size: 55px; font-weight: 800; color: #a9dbb9; }
.response-time p { margin: 0; line-height: 1.4; }
.demo-form { padding: 36px; color: var(--ink); background: white; border-radius: 18px; box-shadow: 0 25px 55px rgba(0,0,0,.16); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.demo-form label { display: grid; gap: 8px; margin-bottom: 17px; font-size: 13px; font-weight: 750; }
.demo-form input:not([type="checkbox"]), .demo-form select, .demo-form textarea { width: 100%; border: 1px solid #cbd6d1; border-radius: 8px; padding: 13px 14px; color: var(--ink); background: #fbfcfb; font: inherit; outline: none; }
.demo-form input:focus, .demo-form select:focus, .demo-form textarea:focus { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(30, 134, 107, .11); }
.privacy { grid-template-columns: 18px 1fr; align-items: start; font-weight: 450 !important; line-height: 1.45; }
.privacy input { margin-top: 3px; }
.demo-form button { width: 100%; padding: 16px; border: 0; cursor: pointer; font: inherit; font-weight: 800; }
.form-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.website-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.privacy a { color: var(--green-dark); text-decoration: underline; }
.form-feedback { display: none; margin-bottom: 20px; padding: 14px 16px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.form-feedback.success { display: block; color: #155f4d; background: #e5f4eb; border: 1px solid #9ed5b0; }
.form-feedback.error { display: block; color: #8b2e2e; background: #fff0f0; border: 1px solid #e6aaaa; }

footer { min-height: 130px; padding: 28px max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; gap: 28px; color: var(--muted); background: #f5f7f6; font-size: 13px; }
footer img { width: 120px; margin-right: auto; }
footer p { margin: 0; }
footer a { color: var(--green-dark); font-weight: 750; }

@media (max-width: 900px) {
  nav a:not(.nav-cta) { display: none; }
  .hero, .workflow, .control, .demo { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; gap: 60px; background: linear-gradient(180deg, #f7faf8 0%, #f7faf8 55%, #e4f2e9 55%, #d7ebdf 100%); }
  .benefit-grid { grid-template-columns: 1fr; }
  .benefit-card { min-height: auto; }
  .benefit-card > span { margin-bottom: 24px; }
  .control-visual { order: 2; }
  .control-copy { order: 1; }
  .portal-heading, .portal-slide { grid-template-columns: 1fr; }
  .portal-heading { gap: 18px; }
  .slider-controls { margin-left: 0; }
}

@media (max-width: 600px) {
  .site-header { width: min(100% - 30px, 1180px); min-height: 78px; }
  .brand img { width: 112px; }
  .nav-cta { padding: 11px 13px; font-size: 12px; }
  .hero { padding: 50px 20px 78px; }
  h1 { font-size: 43px; }
  .hero-lead { font-size: 17px; }
  .primary-button { width: 100%; text-align: center; }
  .floating-note { position: static; margin-top: 12px; }
  .section { width: min(100% - 36px, 1180px); padding: 78px 0; }
  .situation-grid { grid-template-columns: 1fr; }
  .situation-wide { grid-column: auto; min-height: 390px; }
  .situation-card { min-height: 330px; }
  .situation-card figcaption { left: 20px; right: 20px; bottom: 18px; }
  .situation-card figcaption strong { font-size: 19px; }
  .workflow, .demo { padding: 78px 18px; }
  .portal-section { padding: 78px 18px; }
  .portal-slide { gap: 26px; }
  .slider-controls { width: 100%; }
  .slider-controls label { flex: 1; text-align: center; padding-inline: 10px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .demo-form { padding: 24px 20px; }
  footer { flex-direction: column; align-items: flex-start; gap: 10px; }
  footer img { margin: 0 0 10px; }
}

/* Video del processo e capitoli sincronizzati */
.portal-video video { display:block; width:100%; aspect-ratio:16/9; background:#f2f2f3; border-radius:16px; }
.portal-chapters { display:flex; flex-wrap:wrap; gap:10px; margin:24px 0; }
.portal-chapters button { font:inherit; cursor:pointer; border:1px solid #b4c8c3; border-radius:8px; padding:12px 16px; color:#155f50; background:white; flex:1 1 160px; }
.portal-chapters button span { font-weight:700; }
.portal-chapters button small { display:block; margin-top:4px; }
.portal-chapters button[aria-pressed="true"], .portal-chapters button:hover { background:#155f50; color:white; }
.portal-chapters button:focus-visible { outline:3px solid #155f50; outline-offset:3px; }
.portal-caption { min-height:110px; }
.portal-caption h3 { margin:0 0 8px; font-size:24px; }
.portal-caption p { margin:0; line-height:1.6; }
