/* Intro editoriale: isolata dal resto del sito per poterla rifinire senza effetti collaterali. */
.site-intro {
  display: none;
}

.intro-enabled .site-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(28px, 7vw, 112px);
  color: #111;
  background: var(--editorial-paper, #f7f6f2);
  clip-path: circle(150% at 50% 50%);
  transition: clip-path 2.35s cubic-bezier(.76, 0, .24, 1), visibility 2.35s;
}

.intro-enabled body {
  overflow: hidden;
}

.site-intro.is-finished {
  visibility: hidden;
  clip-path: circle(0 at 50% 50%);
}

.site-intro-center,
.site-intro-brand,
.site-intro-skip {
  transition: opacity .78s ease, transform 1.05s cubic-bezier(.16, 1, .3, 1);
}

.site-intro.is-entering .site-intro-center {
  opacity: 0;
  transform: translateY(-24px) scale(.98);
}

.site-intro.is-entering .site-intro-brand {
  opacity: 0;
  transform: translateY(-14px);
}

.site-intro.is-entering .site-intro-skip {
  opacity: 0;
  transform: translateY(14px);
}

/* The index enters using the same measured, ink-like language as the intro. */
.index-title-word {
  display: inline-block;
}

.intro-enabled .site-header,
.intro-enabled .hero-brand-label,
.intro-enabled .hero-bottom-row {
  opacity: 0;
  animation: none !important;
}

.intro-enabled .index-title-word {
  clip-path: inset(-.15em 100% -.2em -.04em);
  transform: translateY(.06em);
}

.index-revealing .site-header {
  animation: index-element-enter 1.15s cubic-bezier(.16, 1, .3, 1) .9s both !important;
}

.index-revealing .hero-brand-label {
  animation: index-element-enter 1.15s cubic-bezier(.16, 1, .3, 1) 1.05s both !important;
}

.index-revealing .index-title-word {
  animation-name: index-word-reveal;
  animation-duration: 1.2s;
  animation-timing-function: cubic-bezier(.77, 0, .18, 1);
  animation-fill-mode: both;
}

.index-revealing .hero-bottom-row {
  animation: index-element-enter 1.3s cubic-bezier(.16, 1, .3, 1) 1.55s both !important;
}

.index-revealed .site-header,
.index-revealed .hero-copy > * {
  opacity: 1;
  animation: none !important;
}

.index-revealed .index-title-word {
  clip-path: none;
  transform: none;
}

.site-intro-brand {
  position: absolute;
  top: clamp(22px, 3vw, 38px);
  left: clamp(20px, 3.5vw, 54px);
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: #111;
  font-family: "Instrument Sans", sans-serif;
  opacity: 0;
  animation: intro-brand-in .55s ease .12s forwards;
}

.site-intro-brand-name {
  font-size: clamp(18px, 1.45vw, 23px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -.045em;
  text-transform: lowercase;
}

.site-intro-brand-service {
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.site-intro-center {
  display: grid;
  justify-items: center;
  width: min(980px, 100%);
}

.site-intro-copy {
  width: 100%;
  margin: 0;
  font-family: "Instrument Sans", -apple-system, system-ui, sans-serif;
  font-size: clamp(32px, 4.15vw, 60px);
  font-weight: 430;
  line-height: 1.1;
  letter-spacing: -.045em;
  text-align: center;
  text-wrap: balance;
}

.site-intro-author {
  margin: clamp(24px, 3vw, 36px) 0 0;
  color: rgba(17, 17, 17, .58);
  font: 500 11px/1.2 "Instrument Sans", sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .55s ease, transform .7s cubic-bezier(.16, 1, .3, 1);
}

.site-intro.is-complete .site-intro-author {
  opacity: 1;
  transform: translateY(0);
}

.site-intro-enter {
  min-width: 158px;
  min-height: 50px;
  margin-top: clamp(32px, 4vw, 52px);
  padding: 0 26px;
  color: #111;
  border: 1px solid #111;
  background: #fff;
  font: 500 10px/1 "Instrument Sans", sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition: color .3s ease, background .3s ease, opacity .5s ease, transform .6s cubic-bezier(.16, 1, .3, 1), visibility .5s;
}

.site-intro.is-complete .site-intro-enter {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.site-intro-enter:hover,
.site-intro-enter:focus-visible {
  color: #fff;
  background: #111;
}

.site-intro.is-complete .site-intro-caret {
  opacity: 0;
  animation: none;
}

.site-intro-word {
  display: inline-block;
  clip-path: inset(-.16em 100% -.24em -.04em);
  transform: translateY(.06em);
  transition: clip-path .52s cubic-bezier(.77, 0, .18, 1), transform .52s cubic-bezier(.16, 1, .3, 1);
  will-change: clip-path, transform;
}

.site-intro-word.is-visible {
  clip-path: inset(-.16em -.04em -.24em -.04em);
  transform: translateY(0);
}

.site-intro-caret {
  display: inline-block;
  width: 2px;
  height: .78em;
  margin-left: .1em;
  vertical-align: -.04em;
  background: currentColor;
  animation: intro-caret-blink .72s steps(1, end) infinite;
}

.site-intro-skip {
  position: absolute;
  right: clamp(20px, 3vw, 48px);
  bottom: clamp(20px, 3vw, 42px);
  padding: 10px 0;
  color: rgba(17, 17, 17, .52);
  border: 0;
  background: transparent;
  font: 500 10px/1 "Instrument Sans", sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  animation: intro-skip-in .35s ease .65s forwards;
}

.site-intro-skip::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s ease;
}

.site-intro-skip:hover::after,
.site-intro-skip:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

@keyframes intro-caret-blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@keyframes intro-skip-in {
  to { opacity: 1; }
}

@keyframes intro-brand-in {
  to { opacity: 1; }
}

@keyframes index-word-reveal {
  from {
    clip-path: inset(-.15em 100% -.2em -.04em);
    transform: translateY(.06em);
  }
  to {
    clip-path: inset(-.15em -.04em -.2em -.04em);
    transform: translateY(0);
  }
}

@keyframes index-element-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .intro-enabled .site-intro {
    padding: 28px 22px;
  }

  .site-intro-copy {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.12;
    letter-spacing: -.04em;
  }

  .site-intro-brand {
    top: 24px;
    left: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-enabled .site-intro {
    transition: opacity .35s ease, visibility .35s;
  }

  .site-intro.is-finished {
    opacity: 0;
    clip-path: none;
    transform: none;
  }

  .site-intro-word {
    clip-path: none;
    transform: none;
    transition: none;
  }

  .site-intro-enter {
    transition: none;
  }

  .site-intro-caret,
  .site-intro-skip,
  .site-intro-brand {
    animation: none;
    opacity: 1;
  }

  .intro-enabled .site-header,
  .intro-enabled .hero-brand-label,
  .intro-enabled .hero-bottom-row,
  .intro-enabled .index-title-word {
    opacity: 1;
    clip-path: none;
    transform: none;
    animation: none !important;
  }
}
