:root{
  --ink:#061739;
  --muted:#536070;
  --line:#e6ebef;
  --soft:#f4f8fb;
  --teal:#1fbca3;
  --blue:#063d91;
  --white:#fff;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:'Poppins',Arial,sans-serif;
  color:var(--ink);
  background:var(--white);
}
a{color:inherit}
.site-header{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  min-height:78px;
  padding:14px 6%;
  background:rgba(255,255,255,0.94);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(14px);
}
.brand{
  display:flex;
  align-items:center;
  padding:8px 14px;
  border-radius:6px;
  background:var(--ink);
}
.brand img{width:150px;display:block}
.main-nav{display:flex;align-items:center;gap:22px}
.main-nav a{
  text-decoration:none;
  color:#344052;
  font-weight:700;
  font-size:0.94rem;
}
.main-nav a.active,.main-nav a:hover{color:var(--teal)}
.nav-toggle{display:none}
.hero{
  min-height:720px;
  position:relative;
  display:grid;
  align-items:center;
  padding:110px 8%;
  overflow:hidden;
}
.hero-video,.hero-overlay{position:absolute;inset:0;width:100%;height:100%}
.hero-video{object-fit:cover;z-index:-2}
.hero-overlay{background:linear-gradient(90deg,rgba(6,23,57,0.78),rgba(6,23,57,0.44),rgba(6,23,57,0.12));z-index:-1}
.hero-content{max-width:820px;color:#fff}
.eyebrow{
  margin:0 0 14px;
  color:var(--teal);
  font-weight:800;
  letter-spacing:0.08em;
  text-transform:uppercase;
  font-size:0.78rem;
}
h1,h2,h3,p{margin-top:0}
h1{font-size:clamp(2.4rem,6vw,5.7rem);line-height:1.02;margin-bottom:24px}
h2{font-size:clamp(2rem,4vw,3.25rem);line-height:1.1;margin-bottom:18px}
h3{font-size:1.2rem;margin-bottom:10px}
.hero-copy,.page-hero p,.section-heading p,.split p{font-size:1.08rem;line-height:1.75;color:var(--muted)}
.hero-copy{color:#eef6f7;max-width:680px}
.hero-actions{display:flex;flex-wrap:wrap;gap:14px;margin-top:34px}
.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:48px;
  padding:0 20px;
  border:1px solid var(--line);
  border-radius:6px;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
}
.button.primary{background:var(--teal);border-color:var(--teal);color:#fff}
.button.ghost{background:rgba(255,255,255,0.14);border-color:rgba(255,255,255,0.42);color:#fff}
.button.full{width:100%}
.section,.page{padding:82px 8%}
.section.compact{padding-top:70px}
.section-heading{text-align:center;max-width:820px;margin:0 auto 42px}
.workflow,.automation-flow,.dashboard-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}
.workflow article,.automation-flow article,.stat-card,.panel,.interface-card,.filters,.profile-output,.contact-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  box-shadow:0 18px 42px rgba(6,23,57,0.08);
}
.workflow article,.automation-flow article{padding:26px}
.workflow span{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  margin-bottom:18px;
  border-radius:50%;
  background:var(--teal);
  color:#fff;
  font-weight:800;
}
.workflow p,.automation-flow p,.panel small{color:var(--muted);line-height:1.65}
.split{
  display:grid;
  grid-template-columns:1.05fr 0.95fr;
  gap:54px;
  align-items:center;
}
.split.slim{padding-top:40px}
.metric-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:28px}
.metric-row div{padding:18px;border:1px solid var(--line);border-radius:8px;background:var(--soft)}
.metric-row strong{display:block;font-size:1.7rem;color:var(--teal)}
.metric-row span{color:var(--muted);font-size:0.86rem}
.interface-card{padding:0;overflow:hidden}
.card-header{height:58px;display:flex;align-items:center;gap:8px;padding:0 18px;background:#f4f6f8;border-bottom:1px solid var(--line)}
.card-header span{width:10px;height:10px;border-radius:50%;background:#cfd8df}
.card-header strong{margin-left:auto}
.match-list{display:grid;gap:14px;padding:24px}
.match-list div{display:flex;justify-content:space-between;gap:18px;padding:16px;border-radius:6px;background:#f4fbfa}
.match-list span{color:var(--teal);font-weight:800}
.page-hero{max-width:900px;margin-bottom:40px}
.page-hero h1{color:var(--ink)}
.search-layout,.form-layout,.contact-layout,.dashboard-columns{
  display:grid;
  grid-template-columns:330px 1fr;
  gap:28px;
  align-items:start;
}
.filters,.profile-output,.contact-card,.panel{padding:24px}
label{display:grid;gap:8px;color:#1d2b3b;font-weight:800;margin-bottom:16px}
input,select,textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:6px;
  padding:13px 14px;
  font:inherit;
  color:var(--ink);
  background:#fff;
}
.update-box{display:grid;gap:5px;margin-top:20px;padding:16px;border-radius:8px;background:var(--soft);color:var(--muted)}
.update-box strong{color:var(--ink)}
.results-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.results-head span{color:var(--muted);font-weight:700}
.grant-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.grant-card{padding:22px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:0 14px 30px rgba(6,23,57,0.06)}
.grant-card header{display:flex;justify-content:space-between;gap:14px;margin-bottom:14px}
.grant-card .score{
  flex:0 0 auto;
  align-self:flex-start;
  color:#fff;
  background:var(--teal);
  border-radius:6px;
  padding:6px 10px;
  font-weight:800;
  font-size:0.78rem;
  white-space:nowrap;
}
.grant-card p{color:var(--muted);line-height:1.65}
.grant-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.grant-meta span{padding:6px 9px;border-radius:999px;background:var(--soft);color:#405064;font-size:0.78rem;font-weight:700}
.profile-form{padding:24px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:0 18px 42px rgba(6,23,57,0.08)}
.recommendation-list{display:grid;gap:12px;margin-top:20px}
.recommendation-list div{padding:14px;border-left:4px solid var(--teal);background:#f4fbfa;border-radius:6px;font-weight:700}
.stat-card{padding:24px}
.stat-card strong{display:block;font-size:2.6rem;color:var(--teal)}
.stat-card span{color:var(--muted);font-weight:700}
.dashboard-columns{grid-template-columns:1fr 1fr;margin-top:28px}
.timeline{display:grid;gap:18px}
.timeline div{display:grid;grid-template-columns:18px 1fr;column-gap:12px}
.timeline span{width:14px;height:14px;border-radius:50%;background:var(--teal);margin-top:5px}
.timeline small{grid-column:2}
.document-list{display:grid;gap:12px}
.document-list button{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px;
  border:1px dashed #b9c8d4;
  border-radius:6px;
  background:#fff;
  color:var(--ink);
  font-weight:800;
  cursor:pointer;
}
.automation-flow article i{font-size:2rem;color:var(--teal);margin-bottom:18px}
.source-list{display:flex;flex-wrap:wrap;gap:12px}
.source-list span{padding:12px 16px;border-radius:999px;background:var(--soft);font-weight:800;color:#314155}
.contact-card{display:grid;gap:14px}
.contact-card a{display:flex;align-items:center;gap:12px;text-decoration:none;font-weight:800;padding:14px;border-radius:6px;background:var(--soft)}
.site-footer{
  display:flex;
  justify-content:space-between;
  gap:18px;
  padding:34px 8%;
  background:#0d1117;
  color:#fff;
}
.site-footer span{color:#b9c2cc}

@media(max-width:980px){
  .nav-toggle{display:grid;place-items:center;width:42px;height:42px;border:0;border-radius:6px;background:var(--soft);color:var(--ink)}
  .main-nav{display:none;position:absolute;left:6%;right:6%;top:72px;flex-direction:column;align-items:flex-start;padding:18px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 18px 42px rgba(6,23,57,0.12)}
  .main-nav.is-open{display:flex}
  .workflow,.automation-flow,.dashboard-grid,.grant-grid,.split,.search-layout,.form-layout,.contact-layout,.dashboard-columns{grid-template-columns:1fr}
  .hero{min-height:640px}
  .section,.page{padding:62px 5%}
}

@media(max-width:620px){
  .site-header{padding:12px 5%}
  .brand img{width:126px}
  .hero{padding:90px 5%;min-height:620px}
  .hero-actions,.results-head,.site-footer{flex-direction:column;align-items:flex-start}
  .metric-row{grid-template-columns:1fr}
}

/* Interfaccia semplificata */
body{
  background:#f7fafc;
}

.site-header{
  min-height:68px;
  padding:10px 6%;
  background:#fff;
  box-shadow:none;
}

.brand{
  padding:6px 10px;
  border-radius:4px;
}

.brand img{
  width:124px;
}

.main-nav{
  gap:18px;
}

.main-nav a{
  font-size:0.88rem;
  font-weight:700;
}

.hero{
  min-height:auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,0.78fr);
  gap:44px;
  align-items:center;
  padding:72px 8%;
  background:#f7fafc;
}

.hero-video{
  position:relative;
  grid-column:2;
  grid-row:1;
  width:100%;
  height:360px;
  border-radius:8px;
  object-fit:cover;
  z-index:0;
}

.hero-overlay{
  display:none;
}

.hero-content{
  grid-column:1;
  grid-row:1;
  max-width:660px;
  color:var(--ink);
}

h1{
  font-size:clamp(2.35rem,4.6vw,4.4rem);
  line-height:1.05;
  letter-spacing:0;
}

h2{
  font-size:clamp(1.8rem,3vw,2.7rem);
}

.hero-copy{
  color:var(--muted);
  max-width:600px;
}

.button{
  min-height:44px;
  border-radius:4px;
  padding:0 16px;
}

.button.ghost{
  background:#fff;
  border-color:#cfd8df;
  color:var(--ink);
}

.section,
.page{
  padding:58px 8%;
}

.workflow,
.automation-flow,
.dashboard-grid{
  gap:14px;
}

.workflow article,
.automation-flow article,
.stat-card,
.panel,
.interface-card,
.filters,
.profile-output,
.contact-card,
.profile-form,
.grant-card{
  border-radius:6px;
  box-shadow:none;
}

.workflow article,
.automation-flow article{
  padding:20px;
}

.workflow span{
  width:30px;
  height:30px;
  margin-bottom:14px;
  border-radius:4px;
}

.split{
  gap:34px;
}

.metric-row{
  margin-top:18px;
}

.metric-row div{
  border-radius:6px;
  background:#fff;
}

.interface-card,
.filters,
.profile-output,
.contact-card,
.panel,
.profile-form,
.grant-card,
.stat-card{
  background:#fff;
}

.page-hero{
  margin-bottom:30px;
}

.page-hero h1{
  font-size:clamp(2.3rem,4.4vw,4rem);
}

.search-layout,
.form-layout,
.contact-layout{
  grid-template-columns:300px 1fr;
  gap:22px;
}

.filters,
.profile-output,
.contact-card,
.panel,
.profile-form{
  padding:20px;
}

.grant-grid{
  gap:14px;
}

.grant-card{
  padding:18px;
}

.grant-card header{
  align-items:flex-start;
}

.site-footer{
  padding:26px 8%;
}

@media(max-width:980px){
  .hero{
    grid-template-columns:1fr;
    padding:56px 5%;
  }

  .hero-video,
  .hero-content{
    grid-column:1;
  }

  .hero-video{
    grid-row:2;
    height:260px;
  }

  .hero-content{
    grid-row:1;
  }

  .search-layout,
  .form-layout,
  .contact-layout{
    grid-template-columns:1fr;
  }
}

@media(max-width:620px){
  .hero{
    min-height:auto;
    padding:44px 5%;
  }

  .hero-video{
    height:220px;
  }
}

/* Home com video em ecran inteiro */
.brand{
  padding:8px 14px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,0.2);
  background:#061739;
  box-shadow:0 8px 22px rgba(6,23,57,0.18);
}

.brand img{
  width:170px;
}

body[data-page="home"] .site-header{
  position:absolute;
  left:0;
  right:0;
  background:linear-gradient(180deg,rgba(6,23,57,0.42),rgba(6,23,57,0));
  border-bottom:0;
  backdrop-filter:none;
}

body[data-page="home"] .main-nav a{
  color:#fff;
  text-shadow:0 1px 8px rgba(6,23,57,0.45);
}

body[data-page="home"] .main-nav a.active,
body[data-page="home"] .main-nav a:hover{
  color:var(--teal);
}

body[data-page="home"] .hero{
  min-height:100vh;
  display:grid;
  grid-template-columns:1fr;
  align-items:center;
  padding:132px 8% 90px;
  background:transparent;
  overflow:hidden;
}

body[data-page="home"] .hero-video{
  position:absolute;
  inset:0;
  grid-column:auto;
  grid-row:auto;
  width:100%;
  height:100%;
  border-radius:0;
  object-fit:cover;
  z-index:-2;
}

body[data-page="home"] .hero-overlay{
  display:block;
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(6,23,57,0.86),rgba(6,23,57,0.58),rgba(6,23,57,0.18));
  z-index:-1;
}

body[data-page="home"] .hero-content{
  grid-column:1;
  grid-row:1;
  max-width:780px;
  color:#fff;
}

body[data-page="home"] .hero-copy{
  color:#eef6f7;
}

body[data-page="home"] .hero .button.ghost{
  background:rgba(255,255,255,0.12);
  border-color:rgba(255,255,255,0.48);
  color:#fff;
}

@media(max-width:980px){
  body[data-page="home"] .hero{
    min-height:100vh;
    padding:120px 5% 70px;
  }

  body[data-page="home"] .hero-video{
    grid-row:auto;
    height:100%;
  }
}

@media(max-width:620px){
  .brand img{
    width:138px;
  }
}
