/* Aether Display — type design. Cielo fermo con la sua grana, vetro, Aether Display e Glancyr. */
@font-face {
  font-family: 'Aether Display';
  src: url('../assets/aether/fonts/aether-display.woff2') format('woff2');
  font-weight: 300 400;
  font-display: swap;
}
@font-face {
  font-family: 'Glancyr';
  src: url('../assets/aether/fonts/glancyr.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}
.project-aether {
  --ink: #121212;
  --ink-soft: rgb(18 18 18 / 62%);
  --line: rgb(18 18 18 / 38%);
  --mist: #e8e8e8;
  --ui: 'Glancyr', Arial, sans-serif;
  --display: 'Aether Display', Georgia, serif;
  --g: clamp(20px, 4vw, 64px);
  --u: min(calc(100vw / 1024), calc(100svh / 640));
  --grain-size: 120px;
  --out: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
  scroll-behavior: smooth;
}
.project-aether body {
  margin: 0;
  background: #d8d8d8;
  color: var(--ink);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.project-aether *,
.project-aether *::before,
.project-aether *::after {
  box-sizing: border-box;
}
.project-aether img {
  max-width: 100%;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  font: 500 13px var(--ui);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
.project-aether a {
  color: inherit;
  text-decoration: none;
}
.project-aether :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Cielo e nuvole basse --------------------------------------------------------------- */
.ae {
  overflow-x: clip;
}
.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #d8d8d8;
}
.sky img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.strips {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: calc(144 * var(--u));
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.9s ease;
}
.strip {
  position: absolute;
  top: 0;
  left: calc(-1 * var(--tile));
  width: calc(100vw + 2 * var(--tile));
  height: calc(360 * var(--u));
  background-repeat: repeat-x;
  background-size: var(--tile) 100%;
}
.strip-a {
  --tile: calc(1036 * var(--u));
  background-image: url('../assets/aether/img/strip-a.webp');
}
.strip-b {
  --tile: calc(763 * var(--u));
  top: calc(9 * var(--u));
  background-image: url('../assets/aether/img/strip-b.webp');
  background-position: calc(380 * var(--u)) 0;
}
.motion-ok .strip-a {
  animation: drift 80s linear infinite;
}
.motion-ok .strip-b {
  animation: drift 99s linear infinite;
}
@keyframes drift {
  to {
    transform: translateX(var(--tile));
  }
}
[data-zone='flight'] .strips,
[data-zone='wake'] .strips,
[data-zone='footer'] .strips {
  opacity: 0;
}
[data-zone='flight'] .strip,
[data-zone='wake'] .strip,
[data-zone='footer'] .strip {
  animation-play-state: paused;
}

/* Intestazione di vetro chiaro -------------------------------------------------------- */
.project-aether .portfolio-header.project-header {
  color: var(--ink);
  background: rgb(232 232 228 / 52%);
  box-shadow: inset 0 -1px rgb(255 255 255 / 55%), 0 1px 0 rgb(18 18 18 / 8%);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}
.project-aether .project-header .signature img,
.project-aether .project-header .burger img {
  filter: brightness(0);
}
.project-aether .project-header .header-project span {
  color: rgb(18 18 18 / 55%);
}
.project-aether .project-header .project-chapters a {
  color: rgb(18 18 18 / 72%);
}
.project-aether .project-header .project-chapters a:hover,
.project-aether .project-header .project-chapters a[aria-current='location'] {
  color: var(--ink);
}
.project-aether .project-header a:focus-visible {
  outline-color: var(--ink);
}
@media (max-width: 1100px) {
  .project-aether .project-header .project-chapters {
    box-shadow: inset 0 1px rgb(18 18 18 / 10%);
  }
}

/* Elementi comuni ---------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  height: 2em;
  margin: 0;
  padding: 0 0.85em;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font: 500 clamp(12px, 1.05vw, 15px) / 1 var(--ui);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.glass {
  position: relative;
  isolation: isolate;
  border-radius: 17px;
  background: rgb(255 255 255 / 6%);
  box-shadow: 0 4px 4px rgb(0 0 0 / 12%);
  backdrop-filter: blur(17px) saturate(1.05);
  -webkit-backdrop-filter: blur(17px) saturate(1.05);
}
/* Bordo a sfumare dall'alto, come nei pannelli Figma */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgb(255 255 255 / 80%), rgb(255 255 255 / 0%));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* La grana del cielo, ripresa sul vetro (la sfocatura la cancellerebbe) */
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url('../assets/aether/img/grain-ui.png') 0 0 / var(--grain-size) repeat;
  opacity: 0.9;
  pointer-events: none;
}
.wrap {
  width: min(100% - 2 * var(--g), 1240px);
  margin-inline: auto;
}
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s ease,
    transform 1.1s var(--out);
}
.reveal-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Apertura ------------------------------------------------------------------------------ */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: calc(var(--project-header-height) + 3svh) var(--g) 9svh;
  text-align: center;
}
.hero-mark {
  width: 64px;
  height: auto;
  margin-bottom: clamp(28px, 7svh, 72px);
  opacity: 0.85;
}
.hero-stage {
  position: relative;
  width: min(100%, 940px);
}
.hero-card {
  padding: clamp(34px, 6svh, 64px) clamp(18px, 5vw, 72px) clamp(30px, 5svh, 52px);
}
.hero-word {
  position: relative;
  width: fit-content;
  margin: 0 auto;
  font-size: clamp(54px, 11.6vw, 156px);
}
.hero-title {
  position: relative;
  margin: 0;
  font: 300 1em / 1 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.breathe {
  display: inline-block;
  font-variation-settings: 'wght' 340;
}
.motion-ok .breathe {
  animation: breathe 5.6s ease-in-out infinite alternate;
}
@keyframes breathe {
  from {
    font-variation-settings: 'wght' 300;
  }
  to {
    font-variation-settings: 'wght' 400;
  }
}
/* Linee guida della parola: altezza delle maiuscole, occhio medio, linea di base */
.hero-guides {
  position: absolute;
  inset: 0 -0.42em;
}
.hero-guides span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgb(18 18 18 / 32%);
}
/* altezza delle maiuscole (700), occhio medio (500), linea di base: la riga è alta 1em */
.hero-guides span:nth-child(1) {
  top: 5%;
}
.hero-guides span:nth-child(2) {
  top: 25%;
}
.hero-guides span:nth-child(3) {
  top: 75%;
}
.hero-guides em {
  position: absolute;
  right: 0;
  font: 500 clamp(8px, 0.62vw, 10px) / 1 var(--ui);
  font-style: normal;
  letter-spacing: 0.02em;
  transform: translate(calc(100% + 6px), -50%);
}
.hero-guides .g1 {
  top: 15%;
}
.hero-guides .g2 {
  top: 50%;
}
.hero-axis {
  position: relative;
  width: min(300px, 62%);
  height: 1px;
  margin: clamp(22px, 3.4svh, 34px) auto 0;
  background: rgb(18 18 18 / 45%);
}
.hero-axis .hero-track {
  position: absolute;
  inset: 0;
}
.hero-thumb {
  position: absolute;
  left: 0;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--ink);
}
.hero-axis .hero-track {
  transform: translateX(40%);
}
.motion-ok .hero-axis .hero-track {
  animation: thumb 5.6s ease-in-out infinite alternate;
}
@keyframes thumb {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(100%);
  }
}
.hero.is-off .breathe,
.hero.is-off .hero-track,
.hero.is-off .hero-cloud img {
  animation-play-state: paused;
}
.hero-cloud {
  position: absolute;
  z-index: 2;
  bottom: -46%;
  width: 58%;
  pointer-events: none;
  transform: translateX(calc(var(--hp, 0) * var(--dir) * 34vw));
  opacity: calc(1 - var(--hp, 0) * 0.9);
}
.hero-cloud img {
  display: block;
  width: 100%;
  height: auto;
}
.hero-cloud-l {
  --dir: -1;
  left: -27%;
}
.hero-cloud-r {
  --dir: 1;
  right: -27%;
}
.hero-cloud-r img {
  transform: scaleX(-1);
}
.motion-ok .hero-cloud-l img {
  animation: swing-l 40s ease-in-out infinite alternate;
}
.motion-ok .hero-cloud-r img {
  animation: swing-r 40s ease-in-out infinite alternate;
}
@keyframes swing-l {
  to {
    transform: translate(-2.6%, -3%);
  }
}
@keyframes swing-r {
  to {
    transform: scaleX(-1) translate(-3.4%, 0.5%);
  }
}
.hero-sub {
  position: relative;
  z-index: 3;
  margin: clamp(48px, 13svh, 128px) 0 0;
  font: 100 clamp(16px, 1.55vw, 23px) / 1.2 var(--ui);
  letter-spacing: 0.01em;
}
.hero-meta {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 36px;
  margin: 26px 0 0;
  font: 400 11px / 1.4 var(--ui);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-meta div {
  display: flex;
  gap: 8px;
}
.hero-meta dt {
  color: var(--ink-soft);
}
.hero-meta dd {
  margin: 0;
}

/* Film del logo ------------------------------------------------------------------------- */
.film {
  padding: 4svh var(--g) 14svh;
}
.film-frame {
  position: relative;
  width: min(100%, 1080px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
}
.film-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  color-scheme: normal;
}
.film-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  font: 400 12px / 1.5 var(--ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}
.film-frame.is-loaded .film-fallback {
  display: none;
}

/* Concept ------------------------------------------------------------------------------- */
.concept {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 12svh var(--g);
  text-align: center;
}
.concept-card {
  width: min(100%, 760px);
  padding: clamp(30px, 5vw, 60px) clamp(22px, 6vw, 84px);
}
.concept-card p {
  margin: 0;
  font: 300 clamp(16px, 1.32vw, 19.5px) / 1.7 var(--ui);
  text-wrap: pretty;
}
.concept-card p + p {
  margin-top: 1.1em;
}
.concept-card strong,
.concept-card b {
  font-weight: 760;
}

/* Features ------------------------------------------------------------------------------ */
.features {
  position: relative;
  padding: 10svh var(--g) 14svh;
}
.ghost {
  position: absolute;
  z-index: -1;
  font: 300 clamp(260px, 33vw, 560px) / 1 var(--display);
  color: rgb(18 18 18 / 30%);
  pointer-events: none;
  user-select: none;
}
.ghost-l {
  top: -4%;
  left: -2%;
  transform: rotate(180deg);
}
.ghost-r {
  bottom: -14%;
  right: -3%;
}
.features-card {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 34px clamp(18px, 5vw, 80px) clamp(30px, 5vw, 64px);
  text-align: center;
}
.features-figure {
  position: relative;
  margin-top: clamp(26px, 4vw, 52px);
}
.features-word {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.features-word .fw {
  fill: var(--ink);
}
.features-word .lead {
  stroke: var(--ink);
  stroke-width: 0.6;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.features-word .mark {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.8;
  transform-box: fill-box;
  transform-origin: center;
}
.features-word .mark-num {
  display: none;
  font: 500 11px var(--ui);
  fill: var(--ink);
}
.motion-ok .features-word .lead {
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.2s var(--out);
}
.motion-ok .features-word .mark {
  transform: scale(0);
  transition: transform 0.8s var(--out) 0.7s;
}
.motion-ok .features-card.is-in .lead {
  stroke-dashoffset: 0;
}
.motion-ok .features-card.is-in .mark {
  transform: none;
}
.features-list {
  position: absolute;
  inset: 0 0 auto;
  height: calc(100% * 30 / 236);
  margin: 0;
  padding: 0;
  list-style: none;
}
.features-list li {
  position: absolute;
  top: 0;
  left: var(--x);
  width: max-content;
  max-width: 21ch;
  padding-left: 8px;
  font: 400 clamp(9px, 0.82vw, 12px) / 1.3 var(--ui);
  letter-spacing: 0.02em;
  text-align: left;
  text-transform: uppercase;
}
.features-list li:last-child {
  padding: 0 8px 0 0;
  text-align: right;
  transform: translateX(-100%);
}
.features-list .num {
  display: none;
}

/* Specimen ------------------------------------------------------------------------------ */
.specimen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 10svh var(--g) 14svh;
}
.specimen-card {
  width: min(100%, 1100px);
  padding: clamp(22px, 3.4vw, 44px);
}
.weight {
  display: grid;
  grid-template-columns: auto minmax(120px, 340px) auto auto;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 34px);
  font: 500 11px / 1 var(--ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.weight-bold {
  font-weight: 1000;
}
.weight-value {
  min-width: 3ch;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.weight input {
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.weight input::-webkit-slider-runnable-track {
  height: 1px;
  background: rgb(18 18 18 / 55%);
}
.weight input::-moz-range-track {
  height: 1px;
  background: rgb(18 18 18 / 55%);
}
.weight input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.2s ease;
}
.weight input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}
.weight input:hover::-webkit-slider-thumb {
  transform: scale(1.25);
}
.glyphs {
  --w: 300;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.glyphs li {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.86;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font: 300 clamp(20px, 2.5vw, 38px) / 1 var(--display);
  font-variation-settings: 'wght' var(--w);
  transition:
    background 0.25s ease,
    color 0.25s ease;
}
.glyphs li:hover {
  background: rgb(18 18 18 / 88%);
  color: var(--mist);
}

/* Volo tra le tavole: versione statica (senza 3D o con movimento ridotto) --------------- */
.flight {
  position: relative;
}
.flight-pin {
  padding: 10svh var(--g);
}
.flight-stage,
.flight-nav,
.flight-hint {
  display: none;
}
.flight-head {
  width: min(100%, 1240px);
  margin: 0 auto 40px;
}
.flight-head h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  font: 300 clamp(40px, 6vw, 88px) / 1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.flight-index {
  font: 500 12px / 1 var(--ui);
  letter-spacing: 0.06em;
}
.stations {
  display: grid;
  gap: clamp(40px, 8svh, 96px);
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.station {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}
.plate {
  margin: 0;
  padding: clamp(18px, 3vw, 40px);
}
.plate img {
  display: block;
  width: 100%;
  height: auto;
}
.caption {
  padding: clamp(22px, 2.6vw, 32px);
}
.caption-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}
.count {
  font: 500 11px / 1 var(--ui);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.caption h3 {
  margin: 0 0 10px;
  font: 300 clamp(34px, 3.4vw, 50px) / 1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.caption p:not(.caption-top) {
  margin: 0;
  font: 300 clamp(14px, 1.06vw, 16px) / 1.6 var(--ui);
  text-wrap: pretty;
}
.legend {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font: 400 11px / 1.3 var(--ui);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.legend i {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1px rgb(18 18 18 / 25%);
}
.zoom-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 11px / 1 var(--ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: zoom-in;
  transition:
    background 0.2s,
    color 0.2s;
}
.zoom-btn:hover {
  background: var(--ink);
  color: var(--mist);
}

/* Volo tra le tavole: versione 3D (Three.js + Theatre) --------------------------------- */
.gl .flight:not(.is-static) {
  height: calc(var(--stations) * 125svh + 110svh);
}
.gl .flight:not(.is-static) .flight-pin {
  position: sticky;
  top: var(--project-header-height);
  height: calc(100svh - var(--project-header-height));
  padding: 0;
  overflow: hidden;
}
.gl .flight:not(.is-static) .flight-stage {
  display: block;
  position: absolute;
  inset: 0;
}
.flight-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.gl .flight:not(.is-static) .flight-head {
  position: absolute;
  z-index: 2;
  top: clamp(18px, 3.4svh, 34px);
  left: var(--g);
  width: auto;
  margin: 0;
}
.gl .flight:not(.is-static) .flight-head h2 {
  font-size: clamp(30px, 3.4vw, 52px);
}
.gl .flight:not(.is-static) .flight-hint {
  display: block;
  margin: 10px 0 0;
  font: 400 11px / 1.3 var(--ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: opacity 0.5s ease;
}
.gl .flight.has-travelled .flight-hint {
  opacity: 0;
}
.gl .flight:not(.is-static) .stations {
  display: block;
  position: absolute;
  inset: 0;
  width: auto;
}
.gl .flight:not(.is-static) .station {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.gl .flight:not(.is-static) .plate {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.gl .flight:not(.is-static) .caption {
  position: absolute;
  z-index: 3;
  left: var(--g);
  bottom: clamp(22px, 6svh, 64px);
  width: min(390px, 31vw);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition:
    opacity 0.4s ease,
    transform 0.6s var(--out),
    visibility 0s linear 0.4s;
}
.gl .flight:not(.is-static) .station.is-active .caption {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition:
    opacity 0.45s ease,
    transform 0.7s var(--out),
    visibility 0s;
}
.gl .flight:not(.is-static) .flight-nav {
  display: flex;
  position: absolute;
  z-index: 3;
  top: clamp(18px, 3.4svh, 34px);
  right: var(--g);
  gap: 4px;
}
.flight-nav button {
  position: relative;
  min-width: 40px;
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: rgb(18 18 18 / 55%);
  font: 500 11px / 1 var(--ui);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.flight-nav button::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.3s var(--out);
}
.flight-nav button:hover,
.flight-nav button[aria-current='step'] {
  color: var(--ink);
}
.flight-nav button[aria-current='step']::after {
  transform: none;
}
.flight-stage[data-state='loading']::after {
  content: 'Le nuvole arrivano…';
  position: absolute;
  left: 50%;
  top: 50%;
  font: 400 11px / 1 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transform: translate(-50%, -50%);
}

/* Letter shapes ------------------------------------------------------------------------- */
.shapes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 16svh var(--g) 18svh;
}
.shapes-card {
  width: min(100%, 980px);
  padding: clamp(14px, 2.6vw, 34px) clamp(20px, 4.4vw, 60px);
}
.shapes-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.shapes-list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: clamp(14px, 2.2vw, 24px) 0;
  border-bottom: 1px solid var(--line);
}
.shapes-list li:last-child {
  border-bottom: 0;
}
.shapes-list svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
  transition: fill 0.3s ease;
}
.shape-label {
  font: 500 clamp(10px, 0.85vw, 12px) / 1.3 var(--ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.shape-glyphs {
  font: 300 clamp(30px, 4vw, 58px) / 1 var(--display);
  font-variation-settings: 'wght' 300;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: font-variation-settings 0.5s var(--out);
}
.shapes-list li:hover .shape-glyphs {
  font-variation-settings: 'wght' 400;
}
.shapes-list li:hover svg {
  fill: rgb(18 18 18 / 14%);
}

/* Readability --------------------------------------------------------------------------- */
.readability {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 5svh, 52px);
  min-height: 118svh;
  padding: 14svh var(--g);
}
.birds {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.birds canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.sizes {
  display: grid;
  justify-items: center;
  gap: 0.15em;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sizes li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font: 300 max(11px, calc(var(--s) * clamp(0.6px, 0.094vw, 1.32px))) / 1.12 var(--display);
  letter-spacing: 0.02em;
}
.sizes small {
  width: 0;
  font: 400 10px / 1 var(--ui);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* Risveglio ------------------------------------------------------------------------------ */
/* Senza movimento (o senza JavaScript) è un riquadro grigio fermo; con il movimento entra da destra. */
.wake {
  position: relative;
}
.wake-pin {
  position: relative;
  height: 80svh;
  overflow: hidden;
}
:root:not(.motion-ok) .wake-text {
  --wt: 1;
}
.motion-ok .wake {
  height: 250svh;
}
.motion-ok .wake-pin {
  position: sticky;
  top: 0;
  height: 100svh;
}
.motion-ok .wake-layer,
.motion-ok .wake-text {
  clip-path: inset(0 0 0 calc((1 - var(--wk, 0)) * 100%));
}
.wake-layer {
  position: absolute;
  inset: 0;
  background: var(--mist);
}
.wake-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  text-transform: uppercase;
}
.wake-text .w1,
.wake-text .w2 {
  font: 400 clamp(11px, 0.9vw, 13px) / 1.45 var(--ui);
  letter-spacing: 0.08em;
}
.wake-text .w2 {
  opacity: calc(0.25 + var(--wt, 0) * 0.75);
}
.wake-text .w3 {
  margin-top: 6px;
  padding: 0.06em 0.22em 0;
  border: 1px solid rgb(18 18 18 / 55%);
  font: 300 clamp(60px, 9vw, 128px) / 1.05 var(--display);
  font-variation-settings: 'wght' calc(300 + var(--wt, 0) * 100);
  letter-spacing: 0.03em;
  color: rgb(18 18 18 / calc(0.35 + var(--wt, 0) * 0.65));
}

/* Footer --------------------------------------------------------------------------------- */
.project-aether .portfolio-footer {
  position: relative;
  padding: 80px var(--g) 28px;
  background: var(--ink);
  color: #d8d8d8;
  font-family: var(--ui);
}
.project-aether .portfolio-footer .signature img {
  width: 52px;
  height: auto;
  filter: brightness(0) invert(0.88);
}
.project-aether .portfolio-footer .label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.project-aether .footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: start;
  gap: 45px;
  margin-bottom: 64px;
}
.project-aether .footer-top > div p:last-child {
  margin: 14px 0 0;
  color: rgb(216 216 216 / 76%);
  font-size: 14px;
  line-height: 1.7;
}
.project-aether .footer-top > a:last-child {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
}
.tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 40px;
  margin-bottom: 56px;
}
.tools ul {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tools li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.tools img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.project-aether .project-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 35px;
  padding: 36px 0;
  border-top: 1px solid rgb(216 216 216 / 28%);
  border-bottom: 1px solid rgb(216 216 216 / 28%);
  text-decoration: none;
}
.project-aether .project-link p {
  margin: 15px 0 0;
  font: 300 clamp(40px, 6vw, 96px) / 1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.project-aether .project-link > span {
  font-size: clamp(40px, 5vw, 90px);
  font-weight: 200;
  transition: transform 0.3s var(--out);
}
.project-aether .project-link:hover > span {
  transform: translate(6px, -6px);
}
.project-aether .footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  padding-top: 30px;
  color: rgb(216 216 216 / 70%);
  font-size: 11px;
  line-height: 1.6;
}
.project-aether .portfolio-footer :focus-visible {
  outline-color: #d8d8d8;
}

/* Tavola ingrandita ------------------------------------------------------------------- */
.zoom {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.zoom::backdrop {
  background: rgb(220 220 214 / 82%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.zoom-frame {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: clamp(56px, 8vh, 90px) clamp(12px, 4vw, 60px) clamp(20px, 5vh, 48px);
  overflow: auto;
}
.zoom-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.zoom-close {
  position: fixed;
  top: 16px;
  right: 16px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: rgb(232 232 228 / 70%);
  color: var(--ink);
  font: 500 12px / 1 var(--ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Schermi stretti --------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .station {
    grid-template-columns: minmax(0, 1fr);
  }
  .gl .flight:not(.is-static) .caption {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    padding: 18px 20px 16px;
  }
  .gl .flight:not(.is-static) .caption h3 {
    font-size: 30px;
    margin-bottom: 6px;
  }
  .gl .flight:not(.is-static) .caption p:not(.caption-top) {
    font-size: 13.5px;
    line-height: 1.5;
  }
  .gl .flight:not(.is-static) .caption-top {
    margin-bottom: 12px;
  }
  .gl .flight:not(.is-static) .legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    font-size: 9.5px;
  }
  .gl .flight:not(.is-static) .zoom-btn {
    margin-top: 12px;
    min-height: 36px;
  }
  .gl .flight:not(.is-static) .flight-nav {
    top: auto;
    right: auto;
    left: 50%;
    bottom: calc(var(--caption-h, 220px) + 22px);
    transform: translateX(-50%);
  }
  .glyphs {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  .features-list {
    position: static;
    height: auto;
    display: grid;
    gap: 10px;
    margin-top: 24px;
  }
  .features-list li,
  .features-list li:last-child {
    position: static;
    max-width: none;
    padding: 0;
    text-align: left;
    transform: none;
    font-size: 11px;
  }
  .features-list .num {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    font-size: 10px;
  }
  .features-figure {
    display: flex;
    flex-direction: column-reverse;
  }
  .features-word .lead {
    display: none;
  }
  .features-word .mark-num {
    display: block;
  }
  .project-aether .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
  .project-aether .footer-top > a:last-child {
    justify-self: start;
  }
}
@media (max-width: 560px) {
  .glyphs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .weight {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
  }
  .weight-value {
    display: none;
  }
  .shapes-list li {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px 14px;
  }
  .shape-glyphs {
    grid-column: 1 / -1;
    font-size: clamp(26px, 8.6vw, 40px);
    letter-spacing: 0.08em;
  }
  .hero-meta {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 10px;
  }
  .hero-cloud {
    width: 70%;
    bottom: -40%;
  }
  .hero-cloud-l {
    left: -36%;
  }
  .hero-cloud-r {
    right: -36%;
  }
  .hero-guides em {
    display: none;
  }
}

/* Movimento ridotto: tutto fermo e leggibile ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .project-aether {
    scroll-behavior: auto;
  }
}
