/* Self-hosted typography and restrained motion. Brand colors, logo and copy stay unchanged. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

body,
button,
input,
select,
textarea,
h1,
h2,
h3,
h4,
h5,
h6,
.wp-block-heading,
.wp-block-button__link,
.wp-element-button {
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

@keyframes lce-rise-in {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes lce-image-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-1.2%, 0.5%, 0); }
}

html.has-lce-motion .hero-content > * {
  opacity: 0;
  animation: lce-rise-in 780ms cubic-bezier(.22, 1, .36, 1) forwards;
}

html.has-lce-motion .hero-content > :nth-child(1) { animation-delay: 80ms; }
html.has-lce-motion .hero-content > :nth-child(2) { animation-delay: 190ms; }
html.has-lce-motion .hero-content > :nth-child(3) { animation-delay: 300ms; }
html.has-lce-motion .hero-visual img {
  transform-origin: center;
  animation: lce-image-drift 24s ease-in-out infinite alternate;
}

html.has-lce-motion .lce-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(.22, 1, .36, 1), transform 700ms cubic-bezier(.22, 1, .36, 1), background 200ms;
  transition-delay: var(--lce-delay, 0ms);
}

html.has-lce-motion .lce-reveal.lce-visible {
  opacity: 1;
  transform: translateY(0);
}

html.has-lce-motion .service:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(17, 47, 40, .10);
}

/* Atmospheric photography stays behind content; opacity comes from the color veil, not the text. */
#profilo,
#competenze,
.method-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

#competenze::before,
.method-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-repeat: no-repeat;
}

#profilo > .section-grid {
  position: relative;
  isolation: isolate;
}

#profilo > .section-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(243, 246, 244, .60), rgba(243, 246, 244, .70) 50%, rgba(243, 246, 244, .85)), url("images/profile-landscape.jpg");
  background-position: center 76%;
  background-size: cover;
  background-repeat: no-repeat;
}

#profilo > .section-grid > * {
  position: relative;
  z-index: 1;
}

#competenze::before {
  background-image: linear-gradient(100deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .50) 55%, rgba(255, 255, 255, .65)), url("images/competence-solar-texture.jpg");
  background-position: center 54%;
}

.method-section::before {
  background-image: linear-gradient(100deg, rgba(9, 47, 38, .68), rgba(9, 47, 38, .62) 55%, rgba(9, 47, 38, .74)), url("images/method-solar-dusk.jpg");
  background-position: center 63%;
}

.method article {
  padding: 24px 24px 28px;
  border-top-color: rgba(199, 240, 145, .72);
  background: rgba(5, 31, 25, .66);
}

.method h3 { color: #fff; }
.method p { color: #eef5f1; line-height: 1.7; }

#esperienze {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(145deg, #f1f6f3 0%, #fafcfb 34%, #f0f5f2 70%, #f8faf9 100%);
}

#esperienze::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("images/experience-vector.svg");
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: .34;
}

#esperienze > * {
  position: relative;
  z-index: 1;
}

#profilo > *,
#competenze > *,
.method-section > * {
  position: relative;
  z-index: 1;
}

/* Natural line endings avoid stretched gaps and automatic word breaks in long copy. */
.hero-bottom p,
.copy p,
.service p,
.method p,
.exp-head > p,
.case p:not(.region),
.technology-images figcaption p {
  text-align: left;
  text-justify: auto;
  hyphens: none;
  overflow-wrap: break-word;
}

@media (max-width: 700px) {
  #profilo > .section-grid::before {
    background-image: linear-gradient(rgba(243, 246, 244, .74), rgba(243, 246, 244, .80)), url("images/profile-landscape.jpg");
    background-position: center 78%;
    background-size: auto 155%;
  }

  #competenze::before {
    background-image: linear-gradient(rgba(255, 255, 255, .68), rgba(255, 255, 255, .60)), url("images/competence-solar-texture.jpg");
    background-position: center 55%;
  }

  .method-section::before {
    background-image: linear-gradient(rgba(9, 47, 38, .74), rgba(9, 47, 38, .68)), url("images/method-solar-dusk.jpg");
    background-position: center 60%;
  }

  #esperienze::before {
    background-size: auto 100%;
    background-position: 72% center;
    opacity: .24;
  }

  .method article {
    padding: 22px 20px 24px;
    background: rgba(5, 31, 25, .72);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.has-lce-motion .hero-content > *,
  html.has-lce-motion .hero-visual img,
  html.has-lce-motion .lce-reveal {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
