:root {
  --ink: #18202a;
  --muted: #5f6b7a;
  --line: #dfe5eb;
  --soft: #f4f8fb;
  --brand: #0b6bcb;
  --brand-dark: #084d91;
  --accent: #18a999;
  --warm: #ffb84d;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  padding-top: 72px;
}

a {
  text-decoration: none;
}

.navbar {
  min-height: 72px;
}

.navbar-brand {
  color: var(--ink);
  letter-spacing: 0;
}

.navbar-brand span {
  color: var(--brand);
}

.navbar-brand small {
  color: var(--accent);
  font-size: .8em;
}

.nav-link {
  color: var(--ink);
  font-weight: 600;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--brand);
}

.btn {
  border-radius: 6px;
  font-weight: 700;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-outline-dark {
  border-color: #2f3a47;
  color: #2f3a47;
}

.hero-section {
  background:
    linear-gradient(120deg, rgba(244, 248, 251, .98) 0%, rgba(244, 248, 251, .82) 48%, rgba(227, 241, 246, .95) 100%),
    url("../img/hero-pattern.svg") center/cover no-repeat;
  min-height: calc(100vh - 72px);
  padding: 88px 0 64px;
  display: flex;
  align-items: center;
}

.eyebrow {
  color: var(--brand);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: .75rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.12;
}

h1 {
  font-size: clamp(2.45rem, 6vw, 3.25rem);
  font-weight: 850;
  max-width: 860px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 820;
}

h3 {
  font-size: 1.2rem;
  font-weight: 760;
}

.hero-copy {
  color: var(--muted);
  font-size: 1.18rem;
  margin: 1.5rem 0 2rem;
  max-width: 730px;
}

.hero-metrics {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2.5rem;
  max-width: 680px;
}

.social-link {
  align-items: center;
  color: var(--brand);
  display: inline-flex;
  font-weight: 800;
  gap: .55rem;
  margin-top: 1.15rem;
}

.social-link i {
  font-size: 1.2rem;
}

.social-link:hover,
.social-link:focus {
  color: var(--brand-dark);
}

.hero-metrics div {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

.hero-metrics strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
}

.hero-metrics span {
  color: var(--muted);
  display: block;
  font-size: .95rem;
  margin-top: .35rem;
}

.hero-visual {
  min-height: 480px;
  position: relative;
}

.app-window {
  background: #fff;
  border: 1px solid rgba(24, 32, 42, .1);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(16, 33, 52, .16);
  overflow: hidden;
  transform: rotate(1.5deg);
}

.window-bar {
  align-items: center;
  background: #263241;
  display: flex;
  gap: .45rem;
  height: 42px;
  padding: 0 1rem;
}

.window-bar span {
  background: var(--warm);
  border-radius: 50%;
  display: block;
  height: 10px;
  width: 10px;
}

.window-bar span:nth-child(2) {
  background: var(--accent);
}

.window-bar span:nth-child(3) {
  background: #f06b6b;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 88px 1fr;
  min-height: 360px;
}

.side-panel {
  background: #eef5f8;
  display: grid;
  gap: 18px;
  padding: 32px 24px;
}

.side-panel i {
  background: #c9d8e2;
  border-radius: 6px;
  display: block;
  height: 36px;
}

.main-panel {
  padding: 34px;
}

.chart-line {
  background: linear-gradient(135deg, rgba(11, 107, 203, .12), rgba(24, 169, 153, .35));
  border: 1px solid rgba(11, 107, 203, .12);
  border-radius: 8px;
  height: 130px;
  margin-bottom: 28px;
  position: relative;
}

.chart-line::after {
  border-bottom: 4px solid var(--brand);
  border-left: 4px solid transparent;
  border-radius: 45%;
  bottom: 28px;
  content: "";
  left: 32px;
  position: absolute;
  right: 28px;
  top: 42px;
  transform: skewY(-8deg);
}

.data-row {
  background: #dfe8ef;
  border-radius: 999px;
  height: 14px;
  margin-bottom: 16px;
  width: 76%;
}

.data-row.long {
  width: 94%;
}

.data-row.short {
  width: 58%;
}

.tile-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
}

.tile-row b {
  background: #f3f7fa;
  border: 1px solid #e3ebf1;
  border-radius: 8px;
  height: 72px;
}

.integration-card {
  background: var(--ink);
  border-radius: 8px;
  bottom: 24px;
  box-shadow: 0 18px 50px rgba(16, 33, 52, .24);
  color: #fff;
  max-width: 270px;
  padding: 1.1rem 1.25rem;
  position: absolute;
  right: 0;
}

.integration-card span {
  color: var(--warm);
  font-weight: 800;
}

.integration-card strong {
  display: block;
  font-size: 1.05rem;
  margin-top: .35rem;
}

.section-pad {
  padding: 96px 0;
}

.bg-soft {
  background: var(--soft);
}

.section-heading {
  margin: 0 auto 3rem;
  max-width: 780px;
  text-align: center;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 0;
}

.feature-card,
.value-card,
.portfolio-card,
.profile-panel {
  border-radius: 8px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.6rem;
}

.feature-card p,
.value-card p,
.portfolio-card p,
.timeline-item p,
.profile-panel p {
  color: var(--muted);
}

.icon-box {
  align-items: center;
  background: #e8f2fb;
  border-radius: 6px;
  color: var(--brand);
  display: inline-flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  margin-bottom: 1.1rem;
  width: 48px;
}

.profile-panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 2rem;
}

.profile-photo-wrap {
  margin-bottom: 1.6rem;
  position: relative;
}

.profile-photo {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.profile-photo-wrap span {
  background: var(--ink);
  border-radius: 6px;
  bottom: 14px;
  color: #fff;
  font-size: .88rem;
  font-weight: 800;
  left: 14px;
  padding: .55rem .75rem;
  position: absolute;
}

.link-arrow {
  color: var(--brand);
  font-weight: 800;
}

.link-arrow::after {
  content: " ->";
}

.profile-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.linkedin-inline {
  align-items: center;
  color: #0a66c2;
  display: inline-flex;
  font-weight: 800;
  gap: .45rem;
}

.linkedin-inline:hover,
.linkedin-inline:focus {
  color: #084d91;
}

.value-card {
  background: #fff;
  border: 1px solid rgba(24, 32, 42, .08);
  height: 100%;
  padding: 1.45rem;
}

.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  justify-content: center;
}

.skills-wrap span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #2f3a47;
  font-weight: 700;
  padding: .7rem 1rem;
}

.skills-wrap .skill-highlight {
  background: #f3fbfa;
  border-color: rgba(24, 169, 153, .65);
  box-shadow: 0 10px 28px rgba(24, 169, 153, .16);
  color: #0f837b;
}

.bg-dark {
  background: #18202a !important;
}

.section-heading.light p:not(.eyebrow) {
  color: #bac6d3;
}

.section-heading.light .eyebrow {
  color: var(--warm);
}

.portfolio-card {
  background: #222d3a;
  border: 1px solid rgba(255, 255, 255, .1);
  padding: 1.6rem;
}

.portfolio-card.featured {
  background: linear-gradient(180deg, #26394a 0%, #202b38 100%);
  border-color: rgba(255, 184, 77, .38);
}

.portfolio-logo-mark {
  background: rgba(255, 255, 255, .94);
  border-radius: 8px;
  display: block;
  height: 54px;
  margin-bottom: 1.1rem;
  object-fit: contain;
  padding: .55rem;
  width: 54px;
}

.portfolio-logo-wide {
  background: rgba(255, 255, 255, .94);
  border-radius: 8px;
  display: block;
  height: 54px;
  margin-bottom: 1.1rem;
  max-width: 190px;
  object-fit: contain;
  padding: .55rem .75rem;
  width: 100%;
}

.portfolio-card .tag {
  color: var(--warm);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.portfolio-card h3 {
  color: #fff;
}

.portfolio-card p {
  color: #c7d0da;
}

.portfolio-card ul {
  color: #e7edf3;
  margin: 1.2rem 0 0;
  padding-left: 1.1rem;
}

.portfolio-card li + li {
  margin-top: .3rem;
}

.portfolio-link {
  color: #fff;
  display: inline-block;
  font-weight: 800;
  margin-top: 1.2rem;
}

.portfolio-link::after {
  content: " ->";
  color: var(--warm);
}

.portfolio-link:hover,
.portfolio-link:focus {
  color: var(--warm);
}

.lead {
  color: var(--muted);
}

.timeline {
  border-left: 2px solid var(--line);
  padding-left: 1.5rem;
}

.timeline-item {
  display: grid;
  gap: 1rem;
  grid-template-columns: 46px 1fr;
  margin-bottom: 2rem;
  position: relative;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item span {
  align-items: center;
  background: var(--brand);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-weight: 800;
  height: 46px;
  justify-content: center;
  margin-left: -49px;
  width: 46px;
}

.cta-section {
  background: linear-gradient(120deg, var(--brand), #0f837b);
  color: #fff;
  padding: 80px 0;
}

.cta-section .eyebrow {
  color: #dff7f2;
}

.cta-section p {
  color: #edf8fb;
  font-size: 1.08rem;
  margin-bottom: 0;
}

.cta-social-link {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  gap: .5rem;
  margin-top: 1rem;
}

.cta-social-link:hover,
.cta-social-link:focus {
  color: #dff7f2;
}

.footer {
  background: #111821;
  color: #c8d0d9;
  font-size: .95rem;
  padding: 28px 0;
}

.footer a {
  color: #fff;
  font-weight: 700;
}

.footer-social-link {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  gap: .45rem;
  margin-left: .85rem;
}

.footer-social-link:hover,
.footer-social-link:focus {
  color: #dff7f2;
}

.project-hero {
  background:
    linear-gradient(120deg, rgba(244, 248, 251, .98) 0%, rgba(244, 248, 251, .86) 55%, rgba(227, 241, 246, .94) 100%),
    url("../img/hero-pattern.svg") center/cover no-repeat;
  padding: 88px 0 72px;
}

.contact-hero {
  background:
    linear-gradient(120deg, rgba(244, 248, 251, .98) 0%, rgba(244, 248, 251, .84) 52%, rgba(227, 241, 246, .94) 100%),
    url("../img/hero-pattern.svg") center/cover no-repeat;
  padding: 88px 0 72px;
}

.contact-form-frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(16, 33, 52, .08);
  overflow: hidden;
}

.contact-note {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
}

.contact-note strong {
  display: block;
  margin-bottom: .35rem;
}

.contact-note p {
  color: var(--muted);
  margin-bottom: 0;
}

.contact-form-frame iframe {
  display: block;
}

.back-link {
  color: var(--brand);
  display: inline-block;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.back-link::before {
  content: "<- ";
}

.project-logo-wide {
  display: block;
  height: auto;
  margin-bottom: 1.25rem;
  max-width: 220px;
  width: 60%;
}

.smartest-logo {
  max-width: 280px;
  width: 72%;
}

.smartest-hero {
  background:
    linear-gradient(120deg, rgba(244, 248, 251, .98) 0%, rgba(235, 250, 251, .9) 55%, rgba(244, 248, 251, .96) 100%),
    url("../img/hero-pattern.svg") center/cover no-repeat;
}

.wine-hero {
  background:
    linear-gradient(120deg, rgba(255, 248, 246, .98) 0%, rgba(255, 241, 235, .9) 52%, rgba(244, 248, 251, .96) 100%),
    url("../img/hero-pattern.svg") center/cover no-repeat;
}

.project-logo-badge {
  background: #fff;
  border: 1px solid rgba(24, 32, 42, .08);
  border-radius: 50%;
  box-shadow: 0 14px 45px rgba(16, 33, 52, .1);
  display: block;
  height: 112px;
  margin-bottom: 1.25rem;
  object-fit: contain;
  padding: .6rem;
  width: 112px;
}

.project-image-frame {
  background: #fff;
  border: 1px solid rgba(24, 32, 42, .1);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(16, 33, 52, .16);
  overflow: hidden;
  padding: .75rem;
}

.project-image-frame img {
  aspect-ratio: 16 / 12;
  border-radius: 6px;
  display: block;
  height: auto;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

.wine-frame img {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}

.project-dashboard {
  background: #fff;
  border: 1px solid rgba(24, 32, 42, .1);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(16, 33, 52, .16);
  padding: 1.5rem;
}

.project-dashboard-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
}

.project-dashboard-head strong {
  color: var(--brand);
  font-size: 1.35rem;
}

.dashboard-brand {
  align-items: center;
  display: inline-flex;
  gap: .65rem;
}

.dashboard-brand img {
  height: 34px;
  object-fit: contain;
  width: 34px;
}

.project-dashboard-head span {
  color: var(--muted);
  font-weight: 700;
}

.kpi-grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(3, 1fr);
}

.kpi-grid div {
  background: var(--soft);
  border: 1px solid #e3ebf1;
  border-radius: 8px;
  padding: .9rem;
}

.kpi-grid span {
  color: var(--muted);
  display: block;
  font-size: .82rem;
  font-weight: 700;
}

.kpi-grid strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.1;
  margin-top: .35rem;
}

.bars {
  display: grid;
  gap: .8rem;
  margin: 1.5rem 0;
}

.bars i {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 999px;
  display: block;
  height: 14px;
}

.mini-table {
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr 96px;
}

.mini-table span {
  color: var(--muted);
  font-weight: 700;
}

.mini-table b {
  background: #dfe8ef;
  border-radius: 999px;
  height: 14px;
  margin-top: .35rem;
}

.detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.6rem;
}

.detail-card .tag {
  color: var(--brand);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-card h2 {
  font-size: 1.35rem;
}

.detail-card p {
  color: var(--muted);
}

.ai-insight-box {
  align-items: flex-start;
  background: #f3fbfa;
  border: 1px solid rgba(24, 169, 153, .35);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(24, 169, 153, .12);
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
}

.ai-insight-box i {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.35rem;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.ai-insight-box h3 {
  color: var(--ink);
  font-size: 1.15rem;
  margin-bottom: .45rem;
}

.ai-insight-box p {
  color: var(--muted);
  margin-bottom: 0;
}

.audience-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.audience-grid span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 1.2rem;
  text-align: center;
}

.result-list {
  display: grid;
  gap: 1rem;
}

.result-list div {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 1.2rem;
}

.result-list strong {
  color: var(--warm);
  display: block;
  font-size: 1.1rem;
  margin-bottom: .35rem;
}

.result-list span {
  color: #d5dee7;
}

@media (max-width: 991.98px) {
  body {
    padding-top: 68px;
  }

  .hero-section {
    min-height: auto;
    padding: 64px 0;
  }

  .hero-visual {
    min-height: 390px;
  }
}

@media (max-width: 767.98px) {
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .section-pad {
    padding: 72px 0;
  }

  .dashboard-grid {
    grid-template-columns: 64px 1fr;
    min-height: 300px;
  }

  .main-panel {
    padding: 24px;
  }

  .hero-visual {
    min-height: 350px;
  }

  .integration-card {
    left: 16px;
    right: 16px;
  }

  .audience-grid {
    grid-template-columns: 1fr;
  }
}

/* Articoli tecnici */
.article-block {
  margin-bottom: 3rem;
  margin-top: 3rem;
}

.article-block > :last-child {
  margin-bottom: 0;
}

.article-list {
  display: grid;
  gap: 1.25rem;
}

.article-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.65rem;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.article-preview:nth-child(even) {
  background: var(--soft);
}

.article-preview:hover {
  border-color: rgba(11, 107, 203, .35);
  box-shadow: 0 18px 50px rgba(16, 33, 52, .1);
  transform: translateY(-2px);
}

.article-preview h2,
.article-preview h3 {
  margin-bottom: .75rem;
}

.article-preview p {
  color: var(--muted);
}

.article-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .9rem;
  font-weight: 700;
  gap: .5rem .85rem;
  margin-bottom: .7rem;
}

.article-meta span {
  align-items: center;
  display: inline-flex;
  gap: .35rem;
}

.article-topic {
  color: var(--brand);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-content {
  font-size: 1.04rem;
}

.article-content h2 {
  margin-top: 2.6rem;
}

.article-content h3 {
  margin-top: 2rem;
}

.article-content p,
.article-content li {
  color: #3d4957;
}

.article-content p {
  margin-bottom: 1.05rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.25rem;
}

.article-content .service-card p,
.article-content .service-card li {
  color: var(--muted);
}

.article-index-note {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 1.5rem;
}

.article-guide-badge {
  align-items: center;
  background: rgba(11, 107, 203, .09);
  border: 1px solid rgba(11, 107, 203, .18);
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  font-size: .78rem;
  font-weight: 800;
  gap: .35rem;
  letter-spacing: .06em;
  margin-bottom: 1rem;
  padding: .45rem .8rem;
  text-transform: uppercase;
}

.article-callout {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  margin: 2rem 0;
  padding: 1.35rem 1.45rem;
}

.article-callout.warning {
  border-left-color: var(--accent);
}

.article-callout h3 {
  margin-top: 0;
}

.article-cta {
  background: linear-gradient(135deg, #0b6bcb 0%, #102134 100%);
  border-radius: 16px;
  color: #fff;
  margin-top: 3rem;
  padding: 2rem;
}

.article-cta p,
.article-cta li {
  color: rgba(255, 255, 255, .84);
}

.article-cta .btn {
  box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
}

.article-preview .article-guide-badge {
  margin-bottom: .75rem;
}

@media (max-width: 767.98px) {
  .article-preview {
    padding: 1.25rem;
  }
}

/* Componenti per guide tecniche estese */
.article-content .table {
  font-size: .96rem;
}

.article-content .table th {
  color: var(--ink);
}

.decision-table th {
  background: #f4f8fb;
  white-space: nowrap;
}

.diagram-box {
  background: #fff;
  border: 1px dashed #b8c8d8;
  border-radius: 12px;
  overflow-x: auto;
  padding: 1.25rem;
}

.diagram-box pre {
  color: #2f3a47;
  font-size: .95rem;
  line-height: 1.55;
  margin: 0;
}

.checklist-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
}

.checklist-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
}

.checklist-card h3 {
  font-size: 1.05rem;
  margin-top: 0;
}

.code-block {
  background: #18202a;
  border-radius: 12px;
  color: #eef3f7;
  overflow-x: auto;
  padding: 1rem;
}

.code-block pre {
  color: inherit;
  font-size: .93rem;
  line-height: 1.55;
  margin: 0;
}

.code-block code {
  color: inherit;
}

.article-side-card {
  top: 96px;
}


/* Article cover images */
.article-preview-image-link {
    display: block;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 1rem;
}

.article-preview-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.article-preview-image-link:hover .article-preview-image {
    transform: scale(1.02);
}

.article-hero-image {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 1rem;
}
