@font-face {
  font-family: "Neue Montreal";
  src: url("/assets/avva/fonts/NeueMontreal-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Neue Montreal";
  src: url("/assets/avva/fonts/NeueMontreal-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --m256-ink: #252620;
  --m256-olive: #646657;
  --m256-paper: #eceae2;
  --m256-canvas: #f6f4ee;
  --m256-white: #fbfaf6;
  --m256-line: rgba(37, 38, 32, 0.2);
  --m256-gutter: clamp(20px, 4.2vw, 72px);
  --m256-section: clamp(84px, 10vw, 152px);
  --m256-display: clamp(3.1rem, 7.4vw, 7.7rem);
  --m256-heading: clamp(2.6rem, 5vw, 5.4rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--m256-canvas);
}

body.morada256-page {
  margin: 0;
  overflow-x: hidden;
  background: var(--m256-canvas);
  color: var(--m256-ink);
  font-family: "Neue Montreal", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.morada256-page img,
.morada256-page video {
  display: block;
  max-width: 100%;
}

.morada256-page h1,
.morada256-page h2,
.morada256-page h3,
.morada256-page p,
.morada256-page figure,
.morada256-page dl,
.morada256-page dd { margin: 0; }

.morada256-page h1,
.morada256-page h2,
.morada256-page h3 {
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-wrap: balance;
}

.morada256-page p { text-wrap: pretty; }

.m256-link {
  position: relative;
  display: inline-flex;
  width: fit-content;
  padding: 0.2rem 0 0.65rem;
  color: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.m256-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.m256-link:hover::after,
.m256-link:focus-visible::after { transform: scaleX(0.35); }

.m256-link:focus-visible,
.m256-carousel button:focus-visible,
.m256-carousel__viewport:focus-visible,
.m256-immersive__viewer:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.m256-link--light { color: var(--m256-white); }

.m256-hero {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--m256-ink);
  color: var(--m256-white);
}

.m256-hero__video,
.m256-hero__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.m256-hero__video { object-fit: cover; }

.m256-hero__veil {
  background:
    linear-gradient(0deg, rgba(20, 21, 17, 0.62) 0%, rgba(20, 21, 17, 0.18) 58%),
    linear-gradient(90deg, rgba(20, 21, 17, 0.2), rgba(20, 21, 17, 0.08), rgba(20, 21, 17, 0.2));
}

.m256-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100dvh;
  width: 100%;
  margin: 0 auto;
  padding: 96px var(--m256-gutter) 56px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.m256-hero__logo {
  width: clamp(240px, 29vw, 430px);
  margin-bottom: clamp(42px, 7vh, 74px);
}

.m256-hero__status {
  display: flex;
  margin: 0 !important;
  align-items: center;
  flex-direction: column;
  gap: 0.5rem;
  font-size: clamp(0.72rem, 0.9vw, 0.84rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  line-height: 1.5;
  text-transform: uppercase;
}

.m256-hero__status span {
  display: block;
}

.m256-hero .m256-link { margin-top: clamp(30px, 5vh, 46px); }

.m256-story,
.m256-legacy {
  position: relative;
  min-height: min(92dvh, 960px);
  overflow: hidden;
  background: var(--m256-ink);
  color: var(--m256-white);
}

.m256-story > img,
.m256-legacy > img,
.m256-media-veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.m256-story > img,
.m256-legacy > img { object-fit: cover; }
.m256-story > img { object-position: right center; }

.m256-media-veil {
  background: linear-gradient(0deg, rgba(20, 21, 17, 0.8) 0%, rgba(20, 21, 17, 0.18) 60%, rgba(20, 21, 17, 0.04));
}

.m256-story__copy,
.m256-legacy__content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: min(92dvh, 960px);
  max-width: 92rem;
  margin: 0 auto;
  padding: var(--m256-section) var(--m256-gutter);
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

.m256-story h2,
.m256-legacy h2 {
  max-width: 11ch;
  font-size: var(--m256-heading);
}

.m256-story p,
.m256-legacy p {
  max-width: 46ch;
  margin-top: 1.6rem !important;
  color: rgba(251, 250, 246, 0.82);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.m256-facts {
  max-width: 92rem;
  margin: 0 auto;
  padding: var(--m256-section) var(--m256-gutter);
}

.m256-facts__header {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: end;
}

.m256-facts h2 {
  max-width: 10ch;
  font-size: var(--m256-heading);
}

.m256-facts__header p {
  max-width: 43ch;
  color: rgba(37, 38, 32, 0.68);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
}

.m256-facts__grid {
  display: grid;
  margin-top: clamp(54px, 7vw, 94px) !important;
  border-top: 1px solid var(--m256-line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.m256-facts__grid > div {
  min-height: 158px;
  padding: 1.2rem 1.4rem 1.2rem 0;
  border-right: 1px solid var(--m256-line);
}

.m256-facts__grid > div:not(:first-child) { padding-left: 1.4rem; }
.m256-facts__grid > div:last-child { border-right: 0; }

.m256-facts dt {
  color: rgba(37, 38, 32, 0.58);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.m256-facts dd {
  margin-top: 2.8rem !important;
  font-size: clamp(2rem, 3vw, 3.35rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.m256-carousel,
.m256-immersive {
  background: var(--m256-ink);
  color: var(--m256-white);
}

.m256-carousel { padding-top: var(--m256-section); }

.m256-carousel__header,
.m256-immersive__header {
  max-width: 92rem;
  margin: 0 auto;
  padding: 0 var(--m256-gutter);
}

.m256-carousel__header {
  display: flex;
  margin-bottom: clamp(40px, 5vw, 72px);
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.m256-carousel__header h2,
.m256-immersive__header h2 { font-size: var(--m256-heading); }

.m256-carousel__controls {
  display: grid;
  grid-template-columns: auto minmax(4rem, auto) auto;
  align-items: center;
  gap: 1rem;
}

.m256-carousel button {
  position: relative;
  padding: 0 0 0.35rem;
  border: 0;
  border-bottom: 1px solid rgba(251, 250, 246, 0.62);
  background: transparent;
  color: var(--m256-white);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-transform: uppercase;
  transition: opacity 180ms ease, transform 180ms ease;
}

.m256-carousel button:hover { opacity: 0.65; }
.m256-carousel button:active { transform: translateY(1px); }

.m256-carousel__controls span {
  color: rgba(251, 250, 246, 0.65);
  font-size: 0.76rem;
  text-align: center;
}

.m256-carousel__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

.m256-carousel__track {
  display: flex;
  width: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 720ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.m256-carousel__track.is-dragging { transition: none; }

.m256-carousel__slide {
  position: relative;
  min-width: 100%;
  height: clamp(540px, 78dvh, 880px);
  overflow: hidden;
}

.m256-carousel__slide::after {
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(0deg, rgba(20, 21, 17, 0.6), transparent);
  content: "";
  pointer-events: none;
}

.m256-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m256-carousel__slide figcaption {
  position: absolute;
  z-index: 1;
  right: var(--m256-gutter);
  bottom: 1.5rem;
  left: var(--m256-gutter);
  color: var(--m256-white);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.m256-immersive { padding: var(--m256-section) 0; }

.m256-immersive__header { margin-bottom: clamp(40px, 5vw, 72px); }
.m256-immersive__header h2 { max-width: 10ch; }

.m256-immersive__header p {
  max-width: 42ch;
  margin-top: 1.5rem !important;
  color: rgba(251, 250, 246, 0.66);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
}

.m256-immersive__options {
  display: flex;
  max-width: 92rem;
  margin: 0 auto clamp(28px, 4vw, 48px);
  padding: 0 var(--m256-gutter);
  flex-wrap: wrap;
  gap: 0.7rem clamp(18px, 2.4vw, 34px);
}

.m256-immersive__options button {
  padding: 0 0 0.45rem;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: rgba(251, 250, 246, 0.52);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  cursor: pointer;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.m256-immersive__options button:hover,
.m256-immersive__options button[aria-pressed="true"] {
  border-color: rgba(251, 250, 246, 0.8);
  color: var(--m256-white);
}

.m256-immersive__options button:active { transform: translateY(1px); }

.m256-immersive__options button:focus-visible {
  outline: 2px solid var(--m256-white);
  outline-offset: 5px;
}

.m256-immersive__stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 640px;
  overflow: hidden;
  background: #34342e;
}

.m256-immersive__viewer {
  width: 100%;
  height: 100%;
  background: #34342e;
  cursor: grab;
}

.m256-immersive__viewer:active { cursor: grabbing; }

.m256-immersive__drag-cue {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  min-width: 186px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(251, 250, 246, 0.5);
  background: rgba(37, 38, 32, 0.72);
  color: var(--m256-white);
  align-items: center;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  pointer-events: none;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  transition: opacity 280ms ease, visibility 280ms ease;
}

.m256-immersive__drag-arrows {
  font-size: 1rem;
  letter-spacing: 0;
}

.m256-immersive__stage.is-used .m256-immersive__drag-cue {
  opacity: 0;
  visibility: hidden;
}

.m256-immersive__badge {
  position: absolute;
  top: 18px;
  left: var(--m256-gutter);
  z-index: 2;
  padding: 0.62rem 0.78rem;
  border: 1px solid rgba(251, 250, 246, 0.46);
  background: rgba(37, 38, 32, 0.58);
  color: var(--m256-white);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.m256-immersive__hint {
  max-width: 92rem;
  margin: 1rem auto 0 !important;
  padding: 0 var(--m256-gutter);
  color: rgba(251, 250, 246, 0.58);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.m256-immersive .pnlm-container { background: #34342e; }

.m256-immersive .pnlm-controls-container {
  top: 16px;
  right: 16px;
  left: auto;
}

.m256-immersive .pnlm-controls {
  border-color: rgba(251, 250, 246, 0.5);
  border-radius: 0;
  background-color: rgba(37, 38, 32, 0.62);
  filter: invert(1);
}

.m256-immersive .pnlm-controls:hover { background-color: rgba(37, 38, 32, 0.85); }

.m256-legacy { min-height: min(94dvh, 980px); }
.m256-legacy__content { min-height: min(94dvh, 980px); }

.m256-legacy__content > img {
  width: 64px;
  margin-bottom: clamp(44px, 6vw, 88px);
}

.m256-legacy .m256-link { margin-top: 2rem; }

.m256-reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 760ms cubic-bezier(0.16, 1, 0.3, 1), transform 760ms cubic-bezier(0.16, 1, 0.3, 1);
}

.m256-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (max-width: 900px) {
  .m256-hero__veil {
    background: linear-gradient(0deg, rgba(20, 21, 17, 0.62), rgba(20, 21, 17, 0.14));
  }

  .m256-hero__content { padding-top: 104px; }

  .m256-facts__header {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .m256-facts__grid { grid-template-columns: 1fr 1fr; }
  .m256-facts__grid > div:nth-child(2) { border-right: 0; }
  .m256-facts__grid > div:nth-child(n + 3) { border-top: 1px solid var(--m256-line); }
}

@media (max-width: 640px) {
  :root { --m256-section: 76px; }

  .m256-hero__content {
    min-height: 100dvh;
    padding-top: 96px;
    padding-bottom: 44px;
  }

  .m256-hero__logo {
    width: min(68vw, 270px);
    margin-bottom: 52px;
  }

  .m256-hero__status {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .m256-hero__status span {
    padding-left: 0;
    border-left: 0;
  }

  .m256-story,
  .m256-story__copy,
  .m256-legacy,
  .m256-legacy__content { min-height: 100dvh; }

  .m256-story > img { object-position: right center; }

  .m256-facts__grid { grid-template-columns: 1fr; }

  .m256-facts__grid > div,
  .m256-facts__grid > div:not(:first-child) {
    min-height: 126px;
    padding: 1.1rem 0;
    border-top: 1px solid var(--m256-line);
    border-right: 0;
  }

  .m256-facts__grid > div:first-child { border-top: 0; }
  .m256-facts dd { margin-top: 1.8rem !important; }

  .m256-carousel__header {
    margin-bottom: 34px;
    align-items: flex-start;
    flex-direction: column;
  }

  .m256-carousel__controls {
    width: 100%;
    grid-template-columns: auto 1fr auto;
  }

  .m256-carousel__slide {
    height: 68dvh;
    min-height: 500px;
  }

  .m256-immersive__viewer {
    height: 100%;
  }

  .m256-immersive__stage {
    height: min(70dvh, 680px);
    min-height: 480px;
  }

  .m256-immersive__drag-cue {
    min-width: 170px;
    padding: 0.9rem 1rem;
  }

  .m256-immersive__options {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .m256-immersive__options::-webkit-scrollbar { display: none; }

  .m256-media-veil {
    background: linear-gradient(0deg, rgba(20, 21, 17, 0.86), rgba(20, 21, 17, 0.12) 74%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .m256-reveal { opacity: 1; transform: none; transition: none; }
  .m256-link::after,
  .m256-carousel__track { transition: none; }
}
