.memory-body {
  --memory-paper: #f3f0e9;
  --memory-ink: #012354;
  --memory-muted: #58667a;
  color: var(--memory-ink);
  background: var(--memory-paper);
}

.memory-skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--navy);
  background: var(--white);
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.memory-skip-link:focus { transform: translateY(0); }

.memory-hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--white);
  background: var(--navy-deep);
  isolation: isolate;
}
.memory-hero__media,
.memory-hero__veil { position: absolute; inset: 0; }
.memory-hero__media { z-index: -2; overflow: hidden; }
.memory-hero__media img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(.78) contrast(1.07);
  transform: scale(1.03);
  will-change: transform;
}
.memory-hero__veil {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(1, 12, 36, .93) 0%, rgba(1, 12, 36, .72) 38%, rgba(1, 12, 36, .12) 75%),
    linear-gradient(0deg, rgba(1, 12, 36, .9) 0%, transparent 42%),
    linear-gradient(120deg, rgba(255, 16, 83, .16), transparent 38%);
}

.memory-topbar {
  position: relative;
  z-index: 5;
  width: min(1240px, calc(100% - 56px));
  margin-inline: auto;
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.memory-logo img { width: 160px; height: auto; }
.memory-topbar__links { display: flex; align-items: center; gap: 28px; }
.memory-topbar__links a {
  font-family: var(--font-corpo);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white-60);
  transition: color .2s ease, border-color .2s ease;
}
.memory-topbar__links a:hover { color: var(--white); }
.memory-topbar__archive { padding: 10px 14px; border: 1px solid rgba(255, 255, 255, .28); }

.memory-hero__content {
  width: min(1240px, calc(100% - 56px));
  min-height: calc(100svh - 78px);
  margin-inline: auto;
  padding: clamp(90px, 15vh, 160px) 0 100px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.memory-kicker,
.memory-eyebrow {
  font-family: var(--font-corpo);
  font-size: clamp(.68rem, .9vw, .78rem);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.memory-kicker { margin-bottom: 24px; color: var(--cyan); }
.memory-hero h1 {
  max-width: 1000px;
  font-family: var(--font-titolo);
  font-weight: 900;
  line-height: .96;
  letter-spacing: -.04em;
  text-transform: uppercase;
}
.memory-hero h1 span,
.memory-hero h1 strong { display: block; }
.memory-hero h1 span { font-size: clamp(3.3rem, 8.2vw, 8.2rem); }
.memory-hero h1 strong {
  position: relative;
  width: fit-content;
  margin-top: .08em;
  color: var(--cyan);
  font-size: clamp(4.6rem, 12.5vw, 12.5rem);
  text-shadow: 0 12px 52px rgba(1, 12, 36, .48);
}
.memory-hero h1 strong::after {
  content: '';
  position: absolute;
  left: .02em;
  right: .02em;
  bottom: -.055em;
  height: max(5px, .035em);
  background: var(--pink);
}
.memory-hero__intro {
  width: min(550px, 100%);
  margin-top: clamp(34px, 5vh, 54px);
  color: rgba(255, 255, 255, .72);
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  line-height: 1.48;
}
.memory-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.memory-button {
  min-height: 49px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, .34);
  font-family: var(--font-corpo);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  transition: transform .2s ease, color .2s ease, border-color .2s ease, background .2s ease;
}
.memory-button:hover { transform: translateY(-2px); border-color: currentColor; }
.memory-button--primary { color: var(--white); border-color: var(--pink); background: var(--pink); }
.memory-button--primary:hover { border-color: #ff3a72; background: #ff3a72; }
.memory-button:focus-visible,
.memory-days button:focus-visible,
.memory-days a:focus-visible,
.memory-frame a:focus-visible,
.memory-topbar a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.memory-hero__index {
  position: absolute;
  right: max(28px, calc((100vw - 1240px) / 2));
  bottom: 36px;
  font-family: var(--font-corpo);
  font-size: .65rem;
  letter-spacing: .14em;
  color: var(--white-40);
}
.memory-hero__index span { color: var(--cyan); }

.memory-introduction { color: var(--white); background: var(--navy-deep); }
.memory-introduction__inner {
  width: min(1240px, calc(100% - 56px));
  margin-inline: auto;
  padding: clamp(100px, 14vw, 190px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
  gap: clamp(56px, 10vw, 140px);
  align-items: end;
}
.memory-introduction .memory-eyebrow { grid-column: 1 / -1; margin-bottom: -10px; color: var(--pink); }
.memory-introduction h2 {
  font-family: var(--font-titolo);
  font-size: clamp(3.2rem, 7vw, 7rem);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.025em;
  text-shadow: 0 .035em 0 var(--navy-deep);
  text-transform: uppercase;
}
.memory-introduction__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .2);
}
.memory-introduction__meta p { padding-top: 20px; }
.memory-introduction__meta strong { display: block; font-family: var(--font-titolo); font-size: clamp(2rem, 4vw, 4rem); line-height: .8; }
.memory-introduction__meta span { display: block; margin-top: 9px; color: var(--white-40); font-family: var(--font-corpo); font-size: .63rem; letter-spacing: .12em; text-transform: uppercase; }

.memory-days {
  position: sticky;
  top: 0;
  z-index: 30;
  color: var(--white);
  background: rgba(1, 35, 84, .97);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(16px);
}
.memory-days__inner {
  width: min(1240px, calc(100% - 56px));
  min-height: 74px;
  margin-inline: auto;
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.memory-days button {
  min-width: 66px;
  padding: 10px 13px;
  border-inline: 1px solid transparent;
  color: var(--white-40);
  font-family: var(--font-corpo);
  font-size: .58rem;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.memory-days button span,
.memory-days button strong { display: block; }
.memory-days button strong { margin-top: 7px; color: var(--white); font-family: var(--font-sottotitolo); font-size: 1.05rem; }
.memory-days button:hover,
.memory-days button.is-active { color: var(--cyan); border-color: rgba(102, 199, 244, .38); background: rgba(102, 199, 244, .08); }
.memory-days a {
  margin-left: auto;
  padding-left: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--cyan);
  font-family: var(--font-corpo);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.memory-story { padding: clamp(100px, 13vw, 180px) 0 60px; background: var(--memory-paper); }
.memory-story__heading {
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto clamp(90px, 12vw, 160px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .45fr);
  gap: 24px 80px;
  align-items: end;
}
.memory-story__heading .memory-eyebrow { grid-column: 1 / -1; color: var(--pink); }
.memory-story__heading h2 {
  font-family: var(--font-titolo);
  font-size: clamp(4rem, 9vw, 9rem);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.035em;
  text-shadow: 0 .035em 0 var(--memory-paper);
  text-transform: uppercase;
}
.memory-story__heading > p:last-child { max-width: 340px; color: var(--memory-muted); line-height: 1.55; }

.memory-grid {
  width: min(1240px, calc(100% - 56px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 34px);
  row-gap: clamp(70px, 11vw, 150px);
}
.memory-day-break {
  grid-column: 1 / -1;
  margin: clamp(24px, 6vw, 80px) 0 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  border-bottom: 1px solid rgba(1, 35, 84, .2);
}
.memory-day-break strong {
  font-family: var(--font-titolo);
  font-size: clamp(5rem, 14vw, 13rem);
  font-weight: 900;
  line-height: .65;
  letter-spacing: -.05em;
  color: var(--cyan);
}
.memory-day-break div { padding-bottom: 17px; }
.memory-day-break span { display: block; color: var(--pink); font-family: var(--font-corpo); font-size: .65rem; letter-spacing: .15em; text-transform: uppercase; }
.memory-day-break h3 { margin-top: 5px; font-family: var(--font-titolo); font-size: clamp(2rem, 4vw, 4rem); line-height: .84; text-transform: uppercase; }

.memory-frame {
  position: relative;
  margin: 0;
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .75s ease, transform .75s cubic-bezier(.2, .8, .2, 1);
  content-visibility: auto;
  contain-intrinsic-size: 520px;
}
.memory-frame.is-visible { opacity: 1; transform: translateY(0); }
.memory-frame a { display: block; position: relative; overflow: hidden; background: #d9d6cf; }
.memory-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1), filter .4s ease;
}
.memory-frame a:hover img { transform: scale(1.018); filter: saturate(1.06); }
.memory-frame figcaption {
  margin-top: 13px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  align-items: baseline;
}
.memory-frame figcaption strong { color: var(--pink); font-family: var(--font-corpo); font-size: .6rem; letter-spacing: .12em; }
.memory-frame figcaption span { color: var(--memory-muted); font-size: .78rem; line-height: 1.35; }
.memory-frame--feature { grid-column: 1 / -1; }
.memory-frame--feature img { max-height: 82vh; object-fit: cover; }
.memory-frame--wide-left { grid-column: 1 / span 8; }
.memory-frame--wide-right { grid-column: 5 / -1; }
.memory-frame--portrait-left { grid-column: 2 / span 4; }
.memory-frame--portrait-right { grid-column: 8 / span 4; }
.memory-frame--half-left { grid-column: 1 / span 6; }
.memory-frame--half-right { grid-column: 7 / -1; }
.memory-frame--quiet-left { grid-column: 2 / span 5; }
.memory-frame--quiet-right { grid-column: 7 / span 5; }

.memory-loader {
  width: 96px;
  height: 120px;
  margin: 80px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.memory-loader span { width: 6px; height: 6px; border-radius: 50%; background: var(--navy); animation: memory-pulse 1s ease-in-out infinite alternate; }
.memory-loader span:nth-child(2) { animation-delay: .16s; }
.memory-loader span:nth-child(3) { animation-delay: .32s; }
.memory-loader.is-complete { visibility: hidden; }
.memory-error { width: min(680px, calc(100% - 48px)); margin: 40px auto; color: #9b183e; text-align: center; }
@keyframes memory-pulse { to { opacity: .18; transform: translateY(-7px); } }

.memory-finale {
  min-height: min(900px, 100svh);
  padding: clamp(100px, 14vw, 180px) 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--navy-deep);
  text-align: center;
}
.memory-finale > img { width: 76px; margin-bottom: 38px; opacity: .55; }
.memory-finale .memory-eyebrow { margin-bottom: 28px; color: var(--pink); }
.memory-finale h2 { font-family: var(--font-titolo); font-size: clamp(4rem, 10vw, 10rem); font-weight: 900; line-height: .92; letter-spacing: -.035em; text-shadow: 0 .035em 0 var(--navy-deep); text-transform: uppercase; }
.memory-finale > p:not(.memory-eyebrow) { margin-top: 28px; color: var(--white-60); }
.memory-finale .memory-button { margin-top: 30px; }
.memory-footer { color: var(--white); background: var(--navy-deep); }
.memory-progress {
  position: fixed;
  z-index: 25;
  right: 20px;
  bottom: 18px;
  min-width: 104px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  background: rgba(1, 35, 84, .9);
  font-family: var(--font-corpo);
  font-size: .6rem;
  letter-spacing: .08em;
  backdrop-filter: blur(12px);
}
.memory-progress i { width: 24px; height: 1px; background: var(--cyan); }
.memory-noscript { padding: 20px; color: var(--white); background: var(--pink); text-align: center; }
.memory-noscript a { text-decoration: underline; }

@media (max-width: 820px) {
  .memory-introduction__inner,
  .memory-story__heading { grid-template-columns: 1fr; }
  .memory-introduction__meta { max-width: 520px; }
  .memory-story__heading > p:last-child { margin-top: 12px; }
  .memory-frame--wide-left,
  .memory-frame--wide-right { grid-column: 1 / -1; }
  .memory-frame--portrait-left { grid-column: 1 / span 6; }
  .memory-frame--portrait-right { grid-column: 7 / -1; }
  .memory-frame--quiet-left { grid-column: 1 / span 6; }
  .memory-frame--quiet-right { grid-column: 7 / -1; }
}

@media (max-width: 640px) {
  .memory-topbar,
  .memory-hero__content,
  .memory-introduction__inner,
  .memory-days__inner,
  .memory-story__heading,
  .memory-grid { width: min(100% - 32px, 1240px); }
  .memory-logo img { width: 132px; }
  .memory-topbar__links { gap: 14px; }
  .memory-topbar__links > a:first-child { display: none; }
  .memory-topbar__archive { padding: 9px 10px; }
  .memory-hero__veil {
    background:
      linear-gradient(0deg, rgba(1, 12, 36, .96) 0%, rgba(1, 12, 36, .42) 72%),
      linear-gradient(110deg, rgba(255, 16, 83, .2), transparent 44%);
  }
  .memory-hero__media img { object-position: 48% center; }
  .memory-hero__actions { width: 100%; flex-direction: column; align-items: stretch; }
  .memory-button { width: 100%; }
  .memory-hero__index { right: 16px; }
  .memory-introduction__inner { gap: 48px; }
  .memory-introduction__meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .memory-introduction__meta span { font-size: .52rem; }
  .memory-days { overflow-x: auto; scrollbar-width: none; }
  .memory-days::-webkit-scrollbar { display: none; }
  .memory-days__inner { width: max-content; min-width: 100%; padding-inline: 16px; }
  .memory-days a { padding: 0 16px; white-space: nowrap; }
  .memory-grid { row-gap: 72px; }
  .memory-day-break { gap: 14px; }
  .memory-frame--feature,
  .memory-frame--wide-left,
  .memory-frame--wide-right,
  .memory-frame--half-left,
  .memory-frame--half-right { grid-column: 1 / -1; }
  .memory-frame--portrait-left,
  .memory-frame--quiet-left { grid-column: 1 / span 10; }
  .memory-frame--portrait-right,
  .memory-frame--quiet-right { grid-column: 3 / -1; }
  .memory-frame figcaption { grid-template-columns: 1fr; gap: 5px; }
  .memory-frame--feature img { max-height: none; }
  .memory-progress { right: 10px; bottom: 10px; }
  .memory-finale { min-height: 82svh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .memory-frame { opacity: 1; transform: none; }
  .memory-hero__media img { transform: none !important; }
}
