@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
}

:root {
  --notte: #14244a;      /* cielo alto */
  --notte-bassa: #2b2f66; /* cielo verso l'orizzonte */
  --alba: #f2a3b3;       /* bagliore dell'alba */
  --luna: #f7e3a1;
  --carta: #f4efe3;      /* testo */
  --nebbia: #a9b4d6;     /* testo secondario */
  --collina: #0f1b38;
  --collina-vicina: #0a1430;
}

* { box-sizing: border-box; margin: 0; }

html { height: 100%; background: var(--notte); }

body {
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  color: var(--carta);
  font-family: "Figtree", system-ui, sans-serif;
  background:
    radial-gradient(120% 55% at 50% 108%, color-mix(in srgb, var(--alba) 55%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, var(--notte) 0%, var(--notte) 35%, var(--notte-bassa) 100%);
  overflow-x: hidden;
  position: relative;
}

/* Stelle: due strati di punti, ripetuti */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 30% 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 42%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 41% 11%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 33%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 73% 15%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 38%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 93% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 55%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 58%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 34% 64%, #fff 50%, transparent 51%);
  background-size: 520px 420px;
  opacity: .55;
}

.scena {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12vh 16px 26vh;
}

.marchio {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 560;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  font-size: clamp(4.5rem, 22vw, 13.5rem);
  line-height: .9;
  letter-spacing: -.035em;
  display: flex;
  align-items: baseline;
  color: var(--carta);
}

.l { display: inline-block; }

/* La «o» è la luna: stessa altezza della x, leggermente sollevata */
.luna {
  width: .56em;
  height: .56em;
  margin: 0 0 0 .03em;
  color: var(--luna);
  align-self: center;
  transform: translateY(.07em);
  filter: drop-shadow(0 0 .12em color-mix(in srgb, var(--luna) 70%, transparent));
}
.luna svg { width: 100%; height: 100%; display: block; }

.incipit {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  font-family: "Fraunces", Georgia, serif;
  font-style: normal;
  font-weight: 340;
  font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 36;
  font-size: clamp(1.25rem, 3.2vw, 1.75rem);
  line-height: 1.4;
  max-width: 30ch;
  text-wrap: balance;
}

.seguito {
  margin-top: .9rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--nebbia);
}

.colline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 24vh;
  min-height: 140px;
  z-index: 1;
  display: block;
}
.c1 { fill: var(--collina); }
.c2 { fill: var(--collina-vicina); }

.piede {
  position: relative;
  z-index: 2;
  padding: 0 16px 20px;
  text-align: center;
  font-size: .8125rem;
  color: color-mix(in srgb, var(--nebbia) 80%, transparent);
}

/* Unico momento animato: le lettere sorgono una dopo l'altra, poi la luna si accende */
@media (prefers-reduced-motion: no-preference) {
  .l {
    opacity: 0;
    animation: sorge 1.1s cubic-bezier(.2, .7, .2, 1) forwards;
  }
  .l:nth-child(1) { animation-delay: .10s; }
  .l:nth-child(2) { animation-delay: .22s; }
  .l:nth-child(3) { animation-delay: .34s; }
  .l:nth-child(5) { animation-delay: .46s; }
  .l:nth-child(6) { animation-delay: .58s; }
  .l.luna {
    animation: accende 1.8s ease-out .9s forwards;
  }
  .incipit, .seguito {
    opacity: 0;
    animation: appare 1.2s ease-out 1.5s forwards;
  }
  .seguito { animation-delay: 1.8s; }
}

@keyframes sorge {
  from { opacity: 0; transform: translateY(.18em); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes accende {
  from { opacity: 0; transform: translateY(.07em) rotate(-25deg) scale(.8); }
  to   { opacity: 1; transform: translateY(.07em); }
}
@keyframes appare {
  to { opacity: 1; }
}
