/* --- 1. Reset & Global Defaults --- */
html,
body,
div,
span,
h1,
h2,
p,
a,
img,
q,
s,
small,
center,
ul,
li,
label,
footer,
main {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
footer,
main {
  display: block;
}
body {
  line-height: 1;
}
ul {
  list-style: none;
}
q {
  quotes: none;
}
q:before,
q:after {
  content: "";
  content: none;
}
*,
*:before,
*:after {
  box-sizing: border-box;
}
:root {
  --background-height: 100vh;
  --site-language-alignment: left;
  --site-language-direction: ltr;
  --site-language-flex-alignment: flex-start;
  --site-language-indent-left: 1;
  --site-language-indent-right: 0;
  --viewport-height: 100vh;
  --content-width: 54rem;
  --spacing: 1.5rem;
}
html {
  font-size: 18pt;
}
body {
  line-height: 1;
  min-height: var(--viewport-height);
  min-width: 320px;
  overflow-x: hidden;
  word-wrap: break-word;
  -webkit-text-size-adjust: none;
}
body:before {
  background-attachment: scroll;
  content: "";
  display: block;
  height: var(--background-height);
  left: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  transform: scale(1);
  width: 100vw;
  z-index: 0;
}
@media (prefers-contrast: more) {
  html {
    filter: brightness(0.9) saturate(0.75) contrast(1.5);
  }
}
@media (prefers-contrast: less) {
  html {
    filter: brightness(1.05) saturate(1.25) contrast(0.75);
  }
}
s {
  text-decoration: line-through;
}
a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.25s ease;
}
h1,
h2,
p {
  direction: var(--site-language-direction);
  position: relative;
}
h1 span,
h2 span,
p span {
  display: block;
  position: relative;
}
h1 span[style],
h2 span[style],
p span[style],
h1 a,
h2 a,
p a {
  -webkit-text-fill-color: currentcolor;
}

/* --- 2. Main Layout --- */
#wrapper {
  -webkit-overflow-scrolling: touch;
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--viewport-height);
  overflow: hidden;
  position: relative;
  z-index: 2;
}
main#main {
  --alignment: var(--site-language-alignment);
  --flex-alignment: var(--site-language-flex-alignment);
  align-items: center;
  display: flex;
  flex-grow: 0;
  flex-shrink: 0;
  justify-content: center;
  max-width: 100%;
  position: relative;
  text-align: var(--alignment);
  z-index: 1;
  transition: opacity 0.625s ease-in-out 0s;
}
main#main > .inner {
  --padding-horizontal: 6rem;
  --padding-vertical: 6rem;
  --width: 54rem;
  max-width: 100%;
  position: relative;
  width: var(--width);
  z-index: 1;
  padding: var(--padding-vertical) var(--padding-horizontal);
}

/* --- MARGINS (Refactored to remove !important) --- */
/* Base vertical spacing */
main#main > .inner > * + * {
  margin-top: var(--spacing);
}
/* Specific margins for components */
main#main > .inner > .content-block + .promo-card,
main#main > .inner > .promo-card + .promo-card {
  margin-top: 3rem;
}
main#main > .inner > .promo-card + .content-block {
  margin-top: 1rem;
}
main#main > .inner > .content-block {
  margin-bottom: 3rem;
}
main#main > .inner > .promo-card {
  margin-bottom: 3rem;
}
main#main > .inner > *:last-child {
  margin-bottom: 0;
}

/* --- 3. Component: Content Block (Intro & Footer) --- */
.content-block {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  background-color: transparent;
}
.content-block > .wrapper {
  max-width: var(--width);
  width: 100%;
  position: relative;
}
.content-block > .wrapper > .inner {
  --padding-horizontal: 0rem;
  --padding-vertical: 0rem;
  padding: var(--padding-vertical) var(--padding-horizontal);
  text-align: var(--alignment);
}
.content-block > .wrapper > .inner > * {
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}
.content-block > .wrapper > .inner > *:first-child {
  margin-top: 0;
}
.content-block > .wrapper > .inner > *:last-child {
  margin-bottom: 0;
}
footer .inner {
  justify-items: center;
}

/* --- 4. Component: Promo Card --- */
.promo-card {
  --card-radius: 3rem;
  --card-border-width: 6px;
  --card-inner-radius: calc(var(--card-radius) - var(--card-border-width)); /* Rimozione Magic Number */
  display: flex;
  width: 100%;
  min-height: 35rem;
  align-items: flex-end;
  justify-content: flex-start;
  background-attachment: fixed;
  border-radius: var(--card-radius);
  background-repeat: repeat, no-repeat;
  background-size: cover, cover;
  border: var(--card-border-width) solid #ffffff23;
  /* Lazy Loading sfondi: non caricati di default */
  background-image: none;
}
.promo-card.is-visible {
  transition: background-image 1s ease-in;
} /* Transizione per lo sfondo */
.promo-card > .wrapper {
  max-width: var(--width);
  width: 100%;
}
.promo-card > .wrapper > .inner {
  --padding-horizontal: 3rem;
  --padding-vertical: 3rem;
  padding: var(--padding-vertical) var(--padding-horizontal);
  border-radius: var(--card-inner-radius);
  text-align: var(--alignment);
}
.promo-card > .wrapper > .inner > * {
  margin-bottom: var(--spacing);
  margin-top: var(--spacing);
}
.promo-card > .wrapper > .inner > *:first-child {
  margin-top: 0;
}
.promo-card > .wrapper > .inner > *:last-child {
  margin-bottom: 0;
}

/* Promo Card Modifiers for background images (loaded via JS) */
.promo-card--volcanic {
  background-image: linear-gradient(45deg, rgba(84, 84, 84, 0.471) 0%, rgba(84, 84, 84, 0.251) 100%),
    url("images/container01.webp");
}
.promo-card--impact.is-visible {
  background-image: linear-gradient(45deg, rgba(84, 84, 84, 0.471) 0%, rgba(84, 84, 84, 0.251) 100%),
    url("images/container07.webp");
}
.promo-card--charm.is-visible {
  background-image: linear-gradient(45deg, rgba(84, 84, 84, 0.471) 0%, rgba(84, 84, 84, 0.251) 100%),
    url("images/container02.webp");
}

/* --- 5. Component: Profile Image (CORRETTO E ALLINEATO) --- */
.image {
  /* Questa classe non ha bisogno di modifiche */
  display: block;
  line-height: 0;
  max-width: 100%;
  position: relative;
}

.profile-image {
  /* Rimuoviamo il flexbox per ereditare l'allineamento del testo dal genitore */
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

.profile-image .frame {
  display: inline-block; /* CHIAVE: In questo modo rispetta il text-align del genitore */
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4.5px solid #ffffff23;
  position: relative;
  vertical-align: middle; /* Buona pratica per gli elementi inline-block */
}

.profile-image .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- 6. Typography Styles & Animation --- */
/* Base state for animated elements (gestiti da JS con classe .is-visible) */
.intro-section > .wrapper > .inner > *,
.promo-card > .wrapper > .inner > * {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.625s ease, transform 0.625s ease;
}
.intro-section > .wrapper > .inner > *.is-visible,
.promo-card > .wrapper > .inner > *.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Specific animation styles for charm card */
.promo-card--charm .promo-eyebrow.is-visible {
  transform: translateX(-0.375rem);
}
.promo-card--charm h2.is-visible {
  transform: translateY(0.6375rem);
}
.promo-card--charm p.is-visible {
  transform: translateY(0.9rem);
}
.promo-card--charm .action-buttons.is-visible {
  transform: translateX(0.6375rem);
}

section h1 {
  font-size: 3em;
}

/* Typography */
.intro-section h1 {
  color: #fafafa;
  font-family: "Plus Jakarta Sans", sans-serif;
  margin-block: 0.67em;
  line-height: 1.125;
  font-weight: 400;
  letter-spacing: -0.23rem;
}
.intro-section h1 > * {
  display: inline-block;
  line-height: 1.2;
}
.intro-section h1 span {
  color: #fff;
  font-weight: 600;
}

.promo-card h2 {
  color: #fafafa;
  font-family: "Plus Jakarta Sans", serif;
  width: calc(100% + 0.025rem);
  font-size: 2.75em;
  line-height: 1.125;
  font-weight: 500;
  letter-spacing: -0.11rem;
}
.promo-card .promo-eyebrow {
  text-transform: uppercase;
  color: #ffffff;
  font-family: "Roboto", serif;
  width: calc(100% + 0.35rem);
  font-size: 0.85em;
  line-height: 1.5;
  font-weight: 300;
  letter-spacing: 0.15rem;
}

.content-block p,
.promo-card p {
  color: #ffffff;
  font-family: "Roboto", serif;
  font-size: 1em;
  line-height: 1.75;
  font-weight: 300;
  letter-spacing: -0.02rem;
  padding-bottom: 0.5em;
}
.content-block p a,
.promo-card p a {
  color: #7a82ff;
  text-decoration: none;
}
.content-block p a:hover,
.promo-card p a:focus-visible,
.promo-card p a:hover,
.promo-card p a:focus-visible {
  color: #747989;
}

/* --- 7. Component: Action Buttons --- */
.action-buttons {
  cursor: default;
  display: flex;
  justify-content: var(--flex-alignment);
  letter-spacing: 0;
  padding: 0;
  gap: 0.75rem;
  flex-direction: row;
  flex-wrap: wrap;
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.action-buttons li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  text-decoration: none;
  white-space: nowrap;
  height: 3.75rem;
  line-height: 3.75rem;
  padding: 0 1.875rem;
  font-family: "Roboto", serif;
  font-size: 1em;
  font-weight: 400;
  border-radius: 0.875rem;
  flex-direction: row-reverse;
  transition: transform 0.375s ease, color 0.375s ease, background-color 0.375s ease, border-color 0.375s ease;
  background-color: #fafafa;
  color: #404547;
}
.action-buttons li a:hover,
.action-buttons li a:focus-visible {
  transform: scale(1.0425);
}
.action-buttons li a svg {
  display: block;
  fill: #404547;
  height: 100%;
  min-width: 16px;
  width: 1.125em;
  margin-left: 0.35rem;
  margin-right: calc(-0.125em + 0.025rem);
  transition: fill 0.375s ease;
}
.action-buttons li a .label {
  direction: var(--site-language-direction);
  overflow: hidden;
  margin-top: -0.11rem;
  letter-spacing: -0.03rem;
  font-weight: 900;
}

/* --- 8. Component: Social Icons --- */
.social-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: var(--flex-alignment);
  padding: 0;
  font-size: 1.5em;
  gap: 0.25rem;
  margin-top: 0rem;
  margin-bottom: 0rem;
}
.social-icons li {
  position: relative;
  z-index: 1;
}
.social-icons li a {
  align-items: center;
  display: flex;
  justify-content: center;
  border-radius: 30%;
  height: 2em;
  width: 2em;
  transition: transform 0.375s ease, color 0.375s ease;
  color: #fafafa;
}
.social-icons li a:hover,
.social-icons li a:focus-visible {
  transform: scale(1.06);
}
.social-icons li a svg {
  display: block;
  position: relative;
  height: 70%;
  width: 70%;
  transition: fill 0.375s ease;
  fill: #fafafa;
}
.social-icons li a .label {
  display: none;
}

/* --- 9. Media Queries (unchanged as they control layout) --- */
@media (max-width: 1680px) {
  html {
    font-size: 13pt;
  }
}
@media (max-width: 1280px) {
  html {
    font-size: 13pt;
  }
}
@media (max-width: 980px) {
  html {
    font-size: 11pt;
  }
}
@media (max-width: 736px) {
  html {
    font-size: 12pt;
  }
  main#main {
    --alignment: center;
    --flex-alignment: center;
  }
  main#main > .inner {
    --padding-horizontal: 1.5rem;
    --padding-vertical: 4rem;
    --spacing: 1.5rem;
  }
  main#main > .inner > .promo-card,
  main#main > .inner > .content-block {
    margin-bottom: 2rem;
  }
  main#main > .inner > .content-block + .promo-card,
  main#main > .inner > .promo-card + .promo-card {
    margin-top: 2rem;
  }
  main#main > .inner > .promo-card + .content-block {
    margin-top: 4rem;
  }

  .promo-card {
    min-height: 34rem;
    border-radius: 2.5rem;
    background-attachment: scroll;
  }
  .promo-card > .wrapper > .inner {
    --padding-horizontal: 2rem;
    --padding-vertical: 2rem;
  }
  .profile-image {
    margin-top: 1.875rem;
    margin-bottom: 0.375rem;
  }
  .profile-image .frame {
    /* Manteniamo la stessa dimensione relativa definita prima (8rem) */
    /* Non è necessario ridimensionarlo qui a meno che non si desideri specificamente
       un'altra dimensione per i dispositivi mobili. La dimensione in 'rem'
       scala già con la font-size della root. */
  }
  .content-block p,
  .promo-card p {
    line-height: 2;
  }
  .promo-card .promo-eyebrow {
    letter-spacing: 0.30625rem;
    width: calc(100% + 0.30625rem);
    font-size: 0.75em;
  }
  .promo-card h2 {
    letter-spacing: 0.021875rem;
    width: calc(100% + 0.021875rem);
    font-size: 2em;
  }
  .action-buttons {
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .social-icons {
    gap: 1rem;
  }
}
@media (max-width: 480px) {
  main#main > .inner {
    --padding-horizontal: 1.25rem;
    --padding-vertical: 4rem;
    --spacing: 1.5rem;
  }
  .action-buttons {
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .action-buttons li a {
    max-width: 32rem;
    width: 100%;
  }
}
@media (max-width: 360px) {
  main#main > .inner {
    --padding-horizontal: 1rem;
    --padding-vertical: 3rem;
    --spacing: 1.125rem;
  }
  .promo-card > .wrapper > .inner {
    --padding-horizontal: 1.5rem;
    --padding-vertical: 1.5rem;
  }
  .promo-card {
    min-height: 25.5rem;
  }
  .action-buttons {
    gap: 0.5625rem;
  }
  .social-icons {
    gap: 0.75rem;
  }
}
