body.page-home {
  --home-gutter: clamp(1.25rem, 4vw, 4rem);
}

body.page-home main > section {
  padding-block: clamp(3.5rem, 7vw, 7rem);
}

body.page-home main > * > .container {
  width: min(1280px, calc(100% - var(--home-gutter) * 2));
}

body.page-home .hero {
  min-height: auto;
  padding-top: clamp(2.5rem, 5vw, 5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

body.page-home .hero-bg {
  opacity: 0.28;
  object-position: center;
  filter: grayscale(1);
}

body.page-home .hero::before {
  background: linear-gradient(90deg, rgba(13, 15, 18, 0.9), rgba(13, 15, 18, 0.32)),
    linear-gradient(0deg, var(--color-bg), transparent 85%);
}

body.page-home .hero::after {
  content: none;
}

body.page-home .hero-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.page-home .hero-copy {
  max-width: none;
}

body.page-home .hero-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

body.page-home .hero-topline p {
  margin: 0;
}

body.page-home .hero-topline .kicker {
  color: #b3f5ed;
}

body.page-home .hero-location {
  font-size: 0.8rem;
}

body.page-home .hero-copy h1 {
  max-width: 23ch;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  font-size: clamp(2.3rem, 5.2vw, 4.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-wrap: initial;
}

body.page-home .hero-emphasis {
  color: #83ece2;
}

body.page-home .hero-bottomline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem 4rem;
  align-items: center;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-border);
}

body.page-home .hero-copy .hero-description {
  max-width: 68ch;
  margin: 0;
  color: #f4f1e8;
  font-weight: 500;
  font-size: clamp(1rem, 1.15vw, 1.075rem);
  line-height: 1.75;
}

body.page-home .hero-actions {
  flex-direction: column;
  align-items: center;
  margin: 0;
  gap: 0.85rem;
}

body.page-home .hero-actions > .text-link {
  padding-block: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text);
}

body.page-home .expertise-strip {
  border-block: 1px solid var(--color-border);
  background: rgba(244, 241, 232, 0.025);
}

body.page-home .expertise-strip > .container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.page-home .expertise-strip a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.75rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: background-color 180ms ease;
}

body.page-home .expertise-strip a + a {
  border-left: 1px solid var(--color-border);
}

body.page-home .expertise-strip a:hover,
body.page-home .expertise-strip a:focus-visible {
  background: rgba(57, 214, 200, 0.075);
}

body.page-home .expertise-strip span {
  color: var(--color-brand);
  font-size: 0.7rem;
}

body.page-home #progetti {
  scroll-margin-top: var(--header-height);
}

/* Keep the featured-project layout self-contained when the page is served by Laravel. */
body.page-home .editorial-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2.5rem;
}

body.page-home .editorial-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

body.page-home .editorial-heading > p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.94rem;
}

body.page-home .project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

body.page-home .project-card {
  min-width: 0;
}

body.page-home .project-card:nth-child(even) {
  margin-top: 4rem;
}

body.page-home .project-card > a {
  display: block;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

body.page-home .project-image {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

body.page-home .project-image img {
  width: 100%;
  height: auto;
}

body.page-home .project-open {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 50%;
  background: var(--color-text);
  color: #102824;
  font-size: 1.5rem;
  transition: background-color 180ms ease, transform 180ms ease;
}

body.page-home .project-card > a:hover .project-open,
body.page-home .project-card > a:focus-visible .project-open {
  background: var(--color-brand);
  transform: translate(2px, -2px);
}

body.page-home .project-caption {
  padding-top: 1.5rem;
}

body.page-home .project-caption .kicker {
  color: var(--color-muted);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.6;
}

body.page-home .project-caption h3 {
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

body.page-home .project-caption p:last-child {
  max-width: 54ch;
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 0.94rem;
}

body.page-home .section-actions {
  margin-top: 2rem;
}

body.page-home .capabilities-section {
  border-top: 1px solid var(--color-border);
}

body.page-home .capabilities-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(2.5rem, 7vw, 7rem);
}

body.page-home .capabilities-intro {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

body.page-home .capabilities-intro h2,
body.page-home .ai-feature h2,
body.page-home .insights-section .section-head h2 {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

body.page-home .capabilities-intro h2 span {
  color: var(--color-brand);
}

body.page-home .capabilities-intro > p:not(.kicker) {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

body.page-home .capability-row {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--color-border);
}

body.page-home .capability-row:first-child {
  border-top: 1px solid var(--color-border);
}

body.page-home .capability-number {
  color: var(--color-brand);
  font-size: 0.8rem;
  padding-top: 0.3rem;
}

body.page-home .capability-row h3 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: initial;
}

body.page-home .capability-row p {
  color: var(--color-muted);
}

body.page-home .capability-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

body.page-home .capability-links a {
  display: inline-block;
  padding-block: 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(244, 241, 232, 0.35);
  text-underline-offset: 0.35rem;
}

body.page-home .capability-links a:hover {
  color: var(--color-brand);
  text-decoration-color: currentColor;
}

body.page-home .ai-feature {
  background: radial-gradient(ellipse at 90% 15%, rgba(57, 214, 200, 0.12), transparent 60%), #101719;
  border-block: 1px solid rgba(57, 214, 200, 0.17);
}

body.page-home .ai-feature-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  margin-bottom: 3rem;
}

body.page-home .ai-feature-intro img {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

body.page-home .ai-feature-intro .section-head {
  margin-bottom: 1.5rem;
}

body.page-home .ai-card {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(57, 214, 200, 0.4);
  padding: 1.5rem 0 0;
  border-radius: 0;
  box-shadow: none;
}

body.page-home .ai-card .badge {
  display: none;
}

body.page-home .ai-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

body.page-home .ai-card p {
  font-size: 0.92rem;
  margin: 0;
}

body.page-home .cms-spotlight {
  background: #e0e9e4;
  color: #162b28;
}

body.page-home .cms-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 8vw, 8rem);
  align-items: center;
}

body.page-home .cms-spotlight h2 {
  color: #102824;
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

body.page-home .cms-spotlight .kicker {
  color: #285c52;
}

body.page-home .cms-layout > div > p:not(.kicker) {
  max-width: 54ch;
}

body.page-home .cms-spotlight .btn {
  margin-top: 0.75rem;
  background: #102824;
  color: #fff;
  box-shadow: none;
}

body.page-home .cms-spotlight .btn:hover {
  background: #245148;
}

body.page-home .cms-system-label {
  font-size: 0.8rem;
  font-weight: 600;
}

body.page-home .cms-flow {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  border-top: 1px solid rgba(16, 40, 36, 0.25);
}

body.page-home .cms-flow li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  border-bottom: 1px solid rgba(16, 40, 36, 0.25);
  padding-block: 1.5rem;
}

body.page-home .cms-flow-index {
  color: #285c52;
  font-size: 0.8rem;
}

body.page-home .cms-flow h3 {
  color: #102824;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

body.page-home .cms-flow p {
  font-size: 0.9rem;
  margin: 0;
}

body.page-home .cms-spotlight .text-link {
  color: #162b28;
  font-size: 0.9rem;
}

body.page-home .cms-spotlight :focus-visible {
  outline-color: #102824;
}

body.page-home .webpronto-home-callout {
  padding-block: clamp(2.75rem, 5vw, 4.75rem);
  background:
    radial-gradient(ellipse at 88% 0%, rgba(57, 214, 200, 0.14), transparent 36rem),
    #111719;
  border-block: 1px solid rgba(57, 214, 200, 0.16);
}

body.page-home .webpronto-home-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

body.page-home .webpronto-home-panel h2 {
  max-width: 22ch;
  margin-bottom: 0.8rem;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

body.page-home .webpronto-home-panel p:not(.kicker) {
  max-width: 68ch;
  margin-bottom: 0;
  color: var(--color-muted);
}

body.page-home .insights-section .section-head {
  max-width: 48rem;
}

body.page-home .insights-section .blog-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.page-home .insights-section .card-media {
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

body.page-home .insights-section .blog-card-body {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

body.page-home .insights-section .badge {
  padding: 0;
  background: transparent;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

body.page-home .insights-section .blog-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 0.8rem;
}

body.page-home .insights-section .blog-card p {
  font-size: 0.9rem;
}

body.page-home .home-contact {
  padding-top: 0;
}

@media (prefers-reduced-motion: no-preference) {
  body.page-home .hero-copy h1,
  body.page-home .hero-bottomline {
    animation: home-intro 500ms ease-out both;
  }

  body.page-home .hero-bottomline {
    animation-delay: 100ms;
  }
}

@keyframes home-intro {
  from {
    opacity: 0.65;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1040px) {
  body.page-home .hero-bottomline {
    gap: 2rem;
  }

  body.page-home .expertise-strip a {
    padding-inline: 1rem;
  }

  body.page-home .capabilities-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body.page-home .capabilities-intro {
    position: static;
    max-width: 42rem;
  }

  body.page-home .ai-feature .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.page-home .editorial-heading,
  body.page-home .project-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.page-home .editorial-heading {
    gap: 1rem;
    margin-bottom: 1.75rem;
  }

  body.page-home .project-card:nth-child(even) {
    margin-top: 0;
  }

  body.page-home .hero-copy h1 {
    font-size: clamp(2.15rem, 5.2vw, 3.4rem);
    letter-spacing: -0.035em;
    line-height: 1.14;
  }

  body.page-home .hero-bottomline,
  body.page-home .ai-feature-intro,
  body.page-home .ai-feature .grid-3,
  body.page-home .cms-layout,
  body.page-home .webpronto-home-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  body.page-home .webpronto-home-panel .btn {
    justify-self: start;
  }

  body.page-home .hero-actions {
    align-items: flex-start;
    gap: 0.5rem;
  }

  body.page-home .hero-actions > .text-link {
    width: auto;
  }

  body.page-home .expertise-strip > .container {
    grid-template-columns: minmax(0, 1fr);
  }

  body.page-home .expertise-strip a {
    padding: 0.9rem 0;
  }

  body.page-home .expertise-strip a + a {
    border-left: 0;
    border-top: 1px solid var(--color-border);
  }

  body.page-home .capability-row {
    gap: 0.75rem;
  }

  body.page-home .capability-links {
    gap: 0.35rem 1rem;
  }

  body.page-home .capability-links a {
    padding-block: 0.6rem;
    font-size: 0.82rem;
  }

  body.page-home .ai-feature-intro {
    margin-bottom: 2rem;
  }

  body.page-home .cms-flow li {
    grid-template-columns: 1.5rem minmax(0, 1fr);
  }
}

@media (max-height: 760px) {
  body.page-home .capabilities-intro {
    position: static;
  }
}
