/*
 * Home — approved design (baseline 0.8.2-rc2) ported to Gutenberg sections.
 * Loaded on frontend and in the editor canvas (enqueue_block_assets): one source for both.
 * Class-based only: no body.home, no forced overrides. Values mirror the legacy home.css.
 */

/* Continuous full-bleed composition: no block gap between Home sections. */
.nlc-home-content > .nlc-home-section,
.nlc-home-content > .nlc-home-section + .nlc-home-section,
.is-root-container > .nlc-home-section,
.is-root-container > .nlc-home-section + .nlc-home-section {
  max-width: none;
  margin-block: 0;
}

.nlc-home-section[id] {
  scroll-margin-top: 68px;
}

.nlc-home-shell {
  width: min(1440px, calc(100% - 68px));
  margin-inline: auto;
}

.nlc-home-section .nlc-eyebrow {
  margin: 0 0 1.7rem;
  font-size: .72rem;
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------
 * Shared cover frame (Hero and Area bands)
 * ------------------------------------------------------------- */
.wp-block-cover.nlc-home-section {
  position: relative;
  isolation: isolate;
  padding: 0;
  overflow: hidden;
}

.wp-block-cover.nlc-home-section > .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
  width: min(1440px, calc(100% - 68px));
  margin-inline: auto;
}

/* ---------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------- */
.wp-block-cover.nlc-home-hero {
  min-height: calc(100svh - 68px);
  align-items: stretch;
  background-color: #17222a;
}

.wp-block-cover.nlc-home-section.nlc-home-hero > .wp-block-cover__inner-container {
  min-height: calc(100svh - 68px);
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 2.2rem 0 3rem;
  color: #fff;
}

.nlc-home-hero .nlc-home-hero__meta {
  margin: 0;
  gap: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.48);
  font-size: .68rem;
  line-height: 1.35;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.nlc-home-hero .nlc-home-hero__meta > p {
  margin: 0;
  color: #fff;
}

.nlc-home-hero .nlc-home-hero__body {
  align-self: end;
  margin: 0;
  padding-bottom: 1rem;
}

.nlc-home-hero .nlc-home-hero__body > * {
  margin-block: 0;
}

.nlc-home-hero h1.nlc-home-hero__title {
  max-width: 850px;
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(4.3rem, 8.3vw, 8.6rem);
  line-height: .78;
  letter-spacing: -.075em;
}

.nlc-home-hero p.nlc-home-hero__intro {
  max-width: 520px;
  margin: 0;
  color: #fff;
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  line-height: 1.35;
}

.nlc-home-hero .wp-block-buttons.nlc-home-hero__chips {
  gap: .8rem;
  margin-top: 1.8rem;
}

.nlc-home-hero .nlc-home-hero__chips .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .65rem 1.1rem;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}

.nlc-home-hero .nlc-home-hero__chips .wp-block-button__link:hover,
.nlc-home-hero .nlc-home-hero__chips .wp-block-button__link:focus-visible {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* ---------------------------------------------------------------
 * Area bands
 * ------------------------------------------------------------- */
.wp-block-cover.nlc-home-area {
  min-height: 560px;
  align-items: center;
}

.wp-block-cover.nlc-home-section.nlc-home-area > .wp-block-cover__inner-container {
  padding-block: 4.5rem;
  color: #fff;
}

.wp-block-cover.nlc-home-section.nlc-home-area.is-style-nlc-light > .wp-block-cover__inner-container {
  color: var(--nlc-ink);
}

.nlc-home-area--mirror > .wp-block-cover__image-background {
  transform: scaleX(-1);
}

.nlc-home-area .wp-block-query.nlc-area-query {
  margin: 0;
}

.nlc-home-area .wp-block-columns.nlc-home-area__inner {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(500px, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  margin: 0;
}

.nlc-home-area .nlc-home-area__inner > .wp-block-column {
  min-width: 0;
  margin: 0;
}

.nlc-home-area .nlc-home-area__copy {
  max-width: 610px;
}

.nlc-home-area .nlc-home-area__copy > * {
  margin-block: 0;
}

.nlc-home-area .nlc-home-area__copy > .nlc-eyebrow {
  margin-bottom: 1.7rem;
  color: rgba(255,255,255,.84);
}

.nlc-home-area h2.nlc-home-area__title {
  max-width: 680px;
  margin: 0;
  color: #fff;
  font-size: clamp(3.1rem, 5vw, 5.6rem);
  line-height: .91;
  letter-spacing: -.055em;
}

.nlc-home-area p.nlc-home-area__text {
  max-width: 550px;
  margin: 1.2rem 0 2rem;
  color: rgba(255,255,255,.92);
  font-size: 1.02rem;
  line-height: 1.42;
}

.nlc-home-area .nlc-area-link {
  margin: 0;
}

.nlc-home-area .nlc-area-link a {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid currentColor;
  color: #fff;
  font-size: .83rem;
  font-weight: 700;
  text-decoration: none;
}

.nlc-home-area.is-style-nlc-light .nlc-home-area__copy > .nlc-eyebrow,
.nlc-home-area.is-style-nlc-light h2.nlc-home-area__title,
.nlc-home-area.is-style-nlc-light .nlc-area-link a {
  color: var(--nlc-ink);
}

.nlc-home-area.is-style-nlc-light p.nlc-home-area__text {
  color: var(--nlc-ink);
}

/* Project cards: only real, published projects. */
.nlc-home-area .wp-block-post-template.nlc-project-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nlc-home-area .nlc-project-cards > .wp-block-post {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  background: var(--nlc-surface);
  box-shadow: 0 12px 35px rgba(0,0,0,.18);
}

.nlc-home-area.is-style-nlc-light .nlc-project-cards > .wp-block-post {
  border-color: rgba(22,44,55,.22);
  box-shadow: 0 12px 35px rgba(9,19,22,.12);
}

.nlc-home-area .nlc-project-cards > .wp-block-post > * {
  margin-block: 0;
}

.nlc-home-area .nlc-project-cards .wp-block-post-featured-image {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0,125,226,.10), rgba(216,44,121,.08)),
    var(--nlc-bg);
}

.nlc-home-area .nlc-project-cards .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nlc-home-area .nlc-project-card__body {
  margin: 0;
  padding: .85rem 1rem 1rem;
}

.nlc-home-area .nlc-project-card__body > * {
  margin-block: 0;
}

.nlc-home-area .nlc-project-card__body .wp-block-post-title {
  margin: 0 0 .2rem;
  color: var(--nlc-ink);
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.nlc-home-area .nlc-project-card__body .wp-block-post-terms {
  margin: 0;
  color: var(--nlc-muted);
  font-size: .76rem;
}

.nlc-home-area .nlc-project-card__body a {
  color: inherit;
  text-decoration: none;
}

.nlc-home-area .nlc-project-card__body .wp-block-post-title a:hover,
.nlc-home-area .nlc-project-card__body .wp-block-post-title a:focus-visible {
  color: var(--nlc-primary);
}

/* ---------------------------------------------------------------
 * Method
 * ------------------------------------------------------------- */
.nlc-home-method {
  padding-block: 7rem;
  background: var(--nlc-ink);
  color: #fff;
}

.nlc-home-method > .nlc-home-shell {
  margin-block: 0;
}

.nlc-home-method .nlc-home-method__head {
  display: grid;
  grid-template-columns: .55fr 1.45fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.nlc-home-method .nlc-home-method__head > * {
  margin: 0;
}

.nlc-home-method .nlc-home-method__head > .nlc-eyebrow {
  color: #AAB4B8;
  letter-spacing: .14em;
}

.nlc-home-method h2.nlc-home-method__title {
  color: #fff;
  font-size: clamp(2.9rem, 6vw, 6rem);
  line-height: .92;
  letter-spacing: -.06em;
}

.nlc-home-method .wp-block-columns.nlc-home-method__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.18);
}

.nlc-home-method .nlc-home-method__steps > .nlc-home-method__step {
  min-width: 0;
  margin: 0 1.5rem 0 0;
  padding: 2rem 1.5rem 1rem 0;
  border-right: 1px solid rgba(255,255,255,.18);
}

.nlc-home-method .nlc-home-method__steps > .nlc-home-method__step:last-child {
  margin-right: 0;
  border-right: 0;
}

.nlc-home-method .nlc-home-method__step > * {
  margin-block: 0 .8rem;
}

.nlc-home-method p.nlc-home-method__num {
  color: var(--nlc-signal);
  font-size: .75rem;
  font-weight: 700;
}

.nlc-home-method .nlc-home-method__step h3 {
  color: #fff;
  font-size: 1.5rem;
  letter-spacing: -.03em;
}

.nlc-home-method .nlc-home-method__step p:not(.nlc-home-method__num) {
  color: #B5C0C5;
}

/* ---------------------------------------------------------------
 * Mini audit
 * ------------------------------------------------------------- */
.nlc-home-audit {
  background: var(--nlc-bg);
  border-top: 1px solid var(--nlc-border);
  border-bottom: 1px solid var(--nlc-border);
}

.nlc-home-audit .nlc-home-audit__inner {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 3rem;
  align-items: center;
  margin-block: 0;
  padding-block: 3.2rem;
}

.nlc-home-audit .nlc-home-audit__inner > *,
.nlc-home-audit .nlc-home-audit__title > * {
  margin-block: 0;
}

.nlc-home-audit .nlc-home-audit__title > .nlc-eyebrow {
  margin-bottom: .6rem;
  font-size: .68rem;
}

.nlc-home-audit .nlc-home-audit__title h2 {
  font-size: clamp(2rem, 3.4vw, 3.7rem);
  line-height: .92;
  letter-spacing: -.055em;
}

.nlc-home-audit p.nlc-home-audit__text {
  max-width: 520px;
  color: var(--nlc-muted);
}

/* ---------------------------------------------------------------
 * Contact
 * ------------------------------------------------------------- */
.nlc-home-contact {
  background: var(--nlc-ink);
  color: #fff;
}

.nlc-home-contact .nlc-home-contact__inner {
  display: grid;
  grid-template-columns: .85fr .75fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-block: 0;
  padding-block: 4.5rem;
}

.nlc-home-contact .nlc-home-contact__inner > *,
.nlc-home-contact .nlc-home-contact__title > * {
  margin-block: 0;
}

.nlc-home-contact .nlc-home-contact__title > .nlc-eyebrow {
  margin-bottom: .6rem;
  color: #b8c2c6;
  font-size: .68rem;
}

.nlc-home-contact .nlc-home-contact__title h2 {
  color: #fff;
  font-size: clamp(2.8rem, 4.5vw, 5.3rem);
  line-height: .92;
  letter-spacing: -.055em;
}

.nlc-home-contact .nlc-home-contact__intro p {
  color: #fff;
}

.nlc-home-contact .nlc-home-contact__intro p.nlc-home-contact__meta {
  color: #b8c2c6;
  font-size: .86rem;
}

/* ---------------------------------------------------------------
 * Responsive (breakpoints of the approved Home)
 * ------------------------------------------------------------- */
@media (max-width: 1000px) {
  .nlc-home-area .wp-block-columns.nlc-home-area__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .nlc-home-area .nlc-home-area__projects {
    max-width: 760px;
  }

  .nlc-home-audit .nlc-home-audit__inner,
  .nlc-home-contact .nlc-home-contact__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .nlc-home-shell,
  .wp-block-cover.nlc-home-section > .wp-block-cover__inner-container {
    width: calc(100% - 32px);
  }

  .wp-block-cover.nlc-home-hero,
  .wp-block-cover.nlc-home-section.nlc-home-hero > .wp-block-cover__inner-container {
    min-height: calc(100svh - 62px);
  }

  .nlc-home-hero h1.nlc-home-hero__title {
    font-size: clamp(3.8rem, 16vw, 7rem);
  }

  .wp-block-cover.nlc-home-area {
    min-height: auto;
  }

  .wp-block-cover.nlc-home-section.nlc-home-area > .wp-block-cover__inner-container {
    padding-block: 4rem;
  }

  .nlc-home-hero .wp-block-buttons.nlc-home-hero__chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    width: 100%;
    margin-top: 1.35rem;
  }

  .nlc-home-hero .nlc-home-hero__chips .wp-block-button,
  .nlc-home-hero .nlc-home-hero__chips .wp-block-button__link {
    width: 100%;
    min-width: 0;
  }

  .nlc-home-hero .nlc-home-hero__chips .wp-block-button__link {
    justify-content: center;
    min-height: 38px;
    padding: .44rem .18rem;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.01em;
    text-align: center;
    white-space: nowrap;
  }

  .nlc-home-area .wp-block-post-template.nlc-project-cards {
    gap: .65rem;
  }

  .nlc-home-area .nlc-project-card__body {
    padding: .7rem .75rem .8rem;
  }

  .nlc-home-area .nlc-project-card__body .wp-block-post-title {
    font-size: .82rem;
  }

  .nlc-home-area .nlc-project-card__body .wp-block-post-terms {
    font-size: .68rem;
  }

  .nlc-home-method {
    padding-block: 4.5rem;
  }

  .nlc-home-method .nlc-home-method__head,
  .nlc-home-method .wp-block-columns.nlc-home-method__steps {
    grid-template-columns: 1fr;
  }

  .nlc-home-method .nlc-home-method__steps > .nlc-home-method__step {
    margin-right: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.18);
  }
}

@media (max-width: 640px) {
  .nlc-home-shell,
  .wp-block-cover.nlc-home-section > .wp-block-cover__inner-container {
    width: calc(100% - 28px);
  }

  .wp-block-cover.nlc-home-section.nlc-home-hero > .wp-block-cover__inner-container {
    padding-top: 1.5rem;
  }

  .nlc-home-hero .nlc-home-hero__meta {
    display: grid;
    gap: .45rem;
  }

  .nlc-home-hero .nlc-home-hero__body {
    padding-top: 7rem;
  }

  .nlc-home-area h2.nlc-home-area__title {
    font-size: clamp(2.6rem, 13vw, 4.8rem);
  }
}

@media (max-width: 420px) {
  .nlc-home-shell,
  .wp-block-cover.nlc-home-section > .wp-block-cover__inner-container {
    width: calc(100% - 24px);
  }

  .nlc-home-hero .wp-block-buttons.nlc-home-hero__chips {
    gap: .42rem;
  }

  .nlc-home-hero .nlc-home-hero__chips .wp-block-button__link {
    min-height: 36px;
    padding: .42rem .12rem;
    font-size: .70rem;
  }
}

/* 0.9.0-rc11 — Freccia ">" accanto alle card: porta alla pagina dell'Area */
.nlc-home-area .nlc-home-area__projects {
  position: relative;
  display: flex;
  align-items: center;
  gap: .9rem;
}
.nlc-home-area .nlc-home-area__projects > .wp-block-post-template.nlc-project-cards {
  flex: 1 1 auto;
  min-width: 0;
}
.nlc-home-area .nlc-area-next {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 4.5rem;
  color: #fff;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.35));
  transition: transform .2s ease;
}
.nlc-home-area .nlc-area-next svg {
  display: block;
  width: 100%;
  height: 100%;
}
.nlc-home-area .nlc-area-next:hover {
  transform: translateX(5px);
}
.nlc-home-area .nlc-area-next:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 6px;
}
/* Very wide screens (side margin > 80px): the arrow sits in the right margin, the cards keep their full width. */
@media (min-width: 1600px) {
  .nlc-home-area .nlc-area-next {
    position: absolute;
    top: 50%;
    left: 100%;
    width: 2.6rem;
    height: 5.2rem;
    margin-left: 1.5rem;
    transform: translateY(-50%);
  }
  .nlc-home-area .nlc-area-next:hover {
    transform: translate(5px, -50%);
  }
}
@media (max-width: 900px) {
  .nlc-home-area .nlc-home-area__projects { gap: .5rem; }
  .nlc-home-area .nlc-area-next { width: 1.6rem; height: 3.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .nlc-home-area .nlc-area-next { transition: none; }
}
