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

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url("fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: block;
  src: url("fonts/fraunces-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: block;
  src: url("fonts/fraunces-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}

:root {
  --carta: #f1f0ea;
  --tela: #1f352a;
  --alloro: #2a7a55;
  --alloro-light: #4fa97b;
  --fumo: #c4c7c1;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  display: grid;
  place-items: center;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background: var(--tela);
  color: var(--carta);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
p {
  margin: 0;
}

::selection {
  background: var(--alloro);
  color: var(--carta);
}

.palco {
  position: relative;
  width: min(100vw, 100svh * 16 / 9);
  aspect-ratio: 16 / 9;
  container-type: inline-size;
}

.logo {
  position: absolute;
  left: 6.2cqw;
  top: 6.2cqw;
  width: 11.71cqw;
  height: auto;
  overflow: visible;
  fill: var(--carta);
}

.logo .punto {
  fill: var(--alloro-light);
}

.titolo {
  position: absolute;
  left: 6.2cqw;
  top: 20.5cqw;
  font-family: var(--serif);
  font-size: 5.556cqw;
  font-weight: 700;
  font-variant-ligatures: none;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.titolo .parola {
  white-space: nowrap;
}

.motto {
  position: absolute;
  left: 6.2cqw;
  top: 29.3cqw;
  color: var(--alloro-light);
  font-family: var(--serif);
  font-size: 2.778cqw;
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "opsz" 48;
  line-height: 1.2;
}

.piede {
  position: absolute;
  left: 6.2cqw;
  top: 43.5cqw;
  display: flex;
  flex-direction: column;
  gap: 0.17em;
  color: var(--fumo);
  font-size: max(1.667cqw, 14px);
  font-weight: 700;
  line-height: 1.2;
}

.sfondo {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.palco {
  z-index: 1;
}

body {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.titolo .parola {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  vertical-align: top;
}

.titolo .dentro {
  display: inline-block;
}

@media (prefers-reduced-motion: no-preference) {
  .js .logo .punto {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0);
  }

  .js .fatto .logo .punto {
    transform: none;
    transition: transform 520ms var(--ease-out) 150ms;
  }

  .js .titolo .dentro {
    transform: translateY(110%);
  }

  .js .fatto .titolo .dentro {
    transform: none;
    transition: transform 1000ms var(--ease-out);
    transition-delay: calc(450ms + var(--i) * 80ms);
  }

  .js .motto,
  .js .piede span {
    opacity: 0;
    transform: translateY(0.4em);
  }

  .js .fatto .motto,
  .js .fatto .piede span {
    opacity: 1;
    transform: none;
    transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out);
  }

  .js .fatto .motto { transition-delay: 1000ms; }
  .js .fatto .piede span { transition-delay: 1300ms; }
}

@media (max-aspect-ratio: 1 / 1) {
  body {
    place-items: stretch;
  }

  .palco {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100svh;
    aspect-ratio: auto;
    padding: max(8vw, 24px) max(7vw, 22px);
  }

  .logo,
  .titolo,
  .motto,
  .piede {
    position: static;
  }

  .logo {
    width: clamp(88px, 26vw, 180px);
  }

  .titolo {
    margin-top: auto;
    font-size: clamp(2.2rem, 10.2vw, 6rem);
    line-height: 1.08;
    white-space: normal;
  }

  .titolo,
  .motto {
    text-wrap: balance;
  }

  .motto {
    margin-top: 0.9em;
    font-size: clamp(1.25rem, 5.6vw, 2.2rem);
    line-height: 1.25;
  }

  .piede {
    margin-top: auto;
    padding-top: 12svh;
    font-size: clamp(0.95rem, 3.6vw, 1.25rem);
  }
}
