.aperture .eyebrow,
.cover .eyebrow,
.hgallery .eyebrow {
  color: var(--brand-200);
}

.aperture .eyebrow::before,
.cover .eyebrow::before,
.hgallery .eyebrow::before {
  background: radial-gradient(circle, #fff 0 1.5px, transparent 2px);
  box-shadow: inset 0 0 0 2.5px var(--brand-300);
}

.aperture {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  overflow: clip;
  background: var(--navy);
  color: #fff;
}

.aperture-stage {
  display: contents;
}

.aperture-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.aperture-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aperture-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(13 34 54 / 0.9), rgb(13 34 54 / 0.6) 55%, rgb(13 34 54 / 0.3));
}

.aperture .eye-rings,
.aperture .er-pupil,
.aperture-intro,
.aperture-iris {
  display: none;
}

.aperture .er-ring {
  animation: none;
}

.aperture-copy {
  position: relative;
  padding-block: calc(var(--header-h) + var(--s5)) var(--s6);
}

.aperture-copy h2 {
  max-width: 18ch;
  color: #fff;
  font-size: var(--step-4);
}

.aperture-copy p:not(.eyebrow) {
  max-width: 34rem;
  margin-bottom: var(--s4);
  color: rgb(255 255 255 / 0.86);
  font-size: var(--step-1);
}

.aperture.is-armed .aperture-iris {
  position: absolute;
  top: calc(58% - 80vmax);
  left: calc(50% - 80vmax);
  z-index: -1;
  display: block;
  width: 160vmax;
  height: 160vmax;
  border: 71vmax solid var(--navy);
  border-radius: 50%;
  will-change: transform;
}

.aperture.is-armed .eye-rings {
  top: calc(58% - 12rem);
  left: calc(50% - 12rem);
  z-index: -1;
  display: block;
  width: 24rem;
}

.aperture.is-armed .aperture-intro {
  position: absolute;
  top: calc(var(--header-h) + 4%);
  left: 0;
  right: 0;
  display: block;
  margin: 0;
  padding-inline: var(--gutter);
  color: #fff;
  font-family: var(--font-head);
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

.aperture.is-armed:not(.is-playing) .aperture-copy {
  opacity: 0;
}

.aperture.is-armed:not(.is-playing) .aperture-media img {
  transform: scale(1.35);
}

.aperture.is-playing .aperture-iris {
  animation: aperture-iris 1.3s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.aperture.is-playing .aperture-media img {
  animation: aperture-zoom 1.6s var(--ease-out) both;
}

.aperture.is-playing .eye-rings {
  animation: aperture-rings 1.2s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.aperture.is-playing .aperture-intro {
  animation: aperture-intro 500ms var(--ease) both;
}

.aperture.is-playing .aperture-copy {
  animation: aperture-copy 700ms var(--ease-out) 750ms both;
}

.aperture.is-open .aperture-iris,
.aperture.is-open .eye-rings,
.aperture.is-open .aperture-intro {
  display: none;
}

.cover {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  overflow: clip;
  background: var(--navy);
  color: #fff;
}

.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(13 34 54 / 0.6) 0, transparent 25%),
    linear-gradient(0deg, rgb(13 34 54 / 0.97) 0%, rgb(13 34 54 / 0.75) 45%, rgb(13 34 54 / 0.15) 80%);
}

.cover-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.cover-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.cover-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: calc(var(--header-h) + var(--s6)) var(--s5);
}

.cover-title {
  max-width: 13ch;
  margin-bottom: var(--s4);
  color: #fff;
  font-size: clamp(3rem, 0.8rem + 7.4vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

@media (max-height: 30rem) and (orientation: landscape) {
  .cover-title {
    max-width: none;
    font-size: clamp(2.2rem, 1rem + 7vh, 3.6rem);
  }

  .cover-inner {
    padding-block: calc(var(--header-h) + var(--s3)) var(--s4);
  }
}

.cover-title em {
  color: #a9d0f5;
  font-style: normal;
}

.cover-foot {
  display: grid;
  gap: var(--s3);
  align-items: end;
}

@media (min-width: 60rem) {
  .cover-foot {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.cover-foot .lead {
  max-width: 34rem;
  margin: 0;
  color: rgb(255 255 255 / 0.86);
}

.cover-status {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: var(--s2);
  border-top: 1px solid rgb(255 255 255 / 0.18);
  color: rgb(255 255 255 / 0.78);
  font-size: 1rem;
}

.cover-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
}

.cover-status .status {
  color: #fff;
}

.cover-status .status-detail {
  color: inherit;
}

.cover-status-sep {
  width: 4px;
  height: 4px;
  margin-inline: 0.4rem;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.4);
}

.cover-status-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

@media (max-width: 60rem) {
  .cover-status {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .cover-status-sep {
    display: none;
  }
}

.cover-status .icon {
  color: #fff;
}

.cover-status .status.is-open::before {
  background: #3ccf7e;
}

.statement {
  padding-block: var(--s7);
}

.statement-text {
  width: fit-content;
  max-width: 28ch;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 1rem + 3.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.statement-text span {
  color: var(--brand);
}

.hgallery {
  padding-block: var(--s7);
  background: var(--navy);
  color: #fff;
}

.hgallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s3);
}

.hgallery-head h2 {
  margin-bottom: 0;
  color: #fff;
}

.hgallery-nav {
  display: none;
  gap: var(--s1);
}

@media (min-width: 40rem) {
  .hgallery-nav {
    display: flex;
  }
}

.hgallery-btn {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.hgallery-btn:hover:not(:disabled) {
  border-color: #fff;
  background: rgb(255 255 255 / 0.12);
}

.hgallery-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.hgallery-track {
  display: flex;
  gap: var(--s3);
  margin: 0;
  padding: var(--s4) max(var(--gutter), calc((100% - var(--container)) / 2)) var(--s3);
  overflow-x: auto;
  list-style: none;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
  scroll-snap-type: x mandatory;
  scrollbar-color: rgb(255 255 255 / 0.3) transparent;
  scrollbar-width: thin;
}

.hgallery-item {
  position: relative;
  flex: none;
  width: min(80vw, 28rem);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--navy-2);
  scroll-snap-align: start;
}

.hgallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

@media (hover: hover) {
  .hgallery-item:hover img {
    transform: scale(1.04);
  }
}

.hgallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(13 34 54 / 0.95) 0%, rgb(13 34 54 / 0.6) 40%, transparent 70%);
}

.hgallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: var(--s3);
}

.hgallery-index {
  display: block;
  color: rgb(255 255 255 / 0.45);
  font-family: var(--font-head);
  font-size: var(--step-2);
  font-weight: 800;
}

.hgallery-caption h3 {
  margin-bottom: 0.4rem;
  font-size: var(--step-2);
}

.hgallery-caption h3 a {
  color: #fff;
  text-decoration: none;
}

.hgallery-caption h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hgallery-caption p {
  margin: 0;
  color: rgb(255 255 255 / 0.84);
  font-size: 1rem;
}

.hgallery.is-enhanced .hgallery-track {
  scrollbar-width: none;
}

.hgallery.is-enhanced .hgallery-track::-webkit-scrollbar {
  display: none;
}

.hgallery-btn .icon-play,
.hgallery.is-paused .hgallery-btn .icon-pause {
  display: none;
}

.hgallery.is-paused .hgallery-btn .icon-play {
  display: block;
}

.hgallery-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: var(--s2);
}

.hgallery-dot {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: none;
}

.hgallery-dot::before,
.hgallery-dot::after {
  content: "";
  position: absolute;
  top: calc(50% - 2px);
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
}

.hgallery-dot::before {
  background: rgb(255 255 255 / 0.25);
}

.hgallery-dot::after {
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}

.hgallery-dot[aria-current="true"]::after {
  transform: scaleX(1);
}

.hgallery-dot:hover::before {
  background: rgb(255 255 255 / 0.45);
}

.vision {
  padding-block: var(--s7);
}

.vision-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.vision-grid {
  display: grid;
  gap: var(--s5);
  align-items: center;
}

@media (min-width: 60rem) {
  .vision-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s6);
  }
}

.vision-copy .lead {
  margin-bottom: var(--s3);
}

.vision-sim {
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
}

.vision-modes {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: var(--s2);
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
}

.vision-modes button {
  min-height: 2.5rem;
  padding: 0.4rem 1.1rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 700;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.vision-modes button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.vision-frame {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
}

.vision-frame:has(.vision-range:focus-visible) {
  box-shadow: var(--focus);
}

.eye-chart {
  width: 100%;
  height: auto;
}

.ch-bg {
  fill: #fff;
}

.ch-row {
  fill: var(--ink);
  font-family: var(--font-head);
  font-weight: 800;
  text-anchor: middle;
}

.ch-visus {
  fill: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
}

.vision-blur .eye-chart {
  filter: blur(4px);
}

.vision-sim[data-mode="astigmatismo"] .vision-blur .eye-chart {
  filter: url("#vision-astigmatismo");
}

.vision-clear {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos));
}

.vision-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0;
  pointer-events: none;
}

.vision-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: var(--brand);
}

.vision-handle .icon {
  position: relative;
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  color: #fff;
}

.vision-handle::after {
  content: "";
  position: absolute;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 4px 14px rgb(9 113 206 / 0.4);
}

.vision-handle .icon {
  z-index: 1;
}

.vision-label {
  position: absolute;
  bottom: var(--s2);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgb(13 34 54 / 0.8);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  pointer-events: none;
}

.vision-label-start {
  left: var(--s2);
}

.vision-label-end {
  right: var(--s2);
  background: var(--brand-strong);
}

.vision-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}

.vision-note {
  margin: var(--s2) 0 0;
  color: var(--muted);
  font-size: var(--step--1);
}

.cover-title .word {
  display: inline-block;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  overflow: hidden;
  overflow: clip;
  vertical-align: bottom;
}

.cover-title .word > span {
  display: inline-block;
}

@media (prefers-reduced-motion: no-preference) {
  .cover-title .word > span {
    animation: word-rise 750ms var(--ease-out) calc(var(--i) * 55ms) both;
  }

  .cover .eyebrow {
    animation: rise 600ms var(--ease-out) both;
  }

  .cover-foot > * {
    animation: rise 700ms var(--ease-out) 380ms both;
  }

  .cover-foot > :nth-child(2) {
    animation-delay: 460ms;
  }

  .cover-foot > :nth-child(3) {
    animation-delay: 540ms;
  }

  .cover-bg {
    animation: settle 2s var(--ease-out) both;
  }

  .vision-clear,
  .vision-handle {
    transition: clip-path 600ms var(--ease-out), left 600ms var(--ease-out);
  }

  .vision-frame.is-dragging .vision-clear,
  .vision-frame.is-dragging .vision-handle {
    transition: none;
  }

  .hgallery.is-auto .hgallery-dot[aria-current="true"]::after {
    animation: dot-progress 3s linear both;
  }

  .hgallery.is-auto.is-paused .hgallery-dot[aria-current="true"]::after,
  .hgallery.is-auto.is-offscreen .hgallery-dot[aria-current="true"]::after,
  .hgallery.is-auto.is-hovered .hgallery-dot[aria-current="true"]::after,
  .hgallery.is-auto:has(:focus-visible) .hgallery-dot[aria-current="true"]::after {
    animation-play-state: paused;
  }
}

@keyframes word-rise {
  from {
    transform: translateY(110%);
  }
}

@keyframes dot-progress {
  from {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-fill.is-pending,
  .reveal-fill.is-revealed {
    background: linear-gradient(90deg, var(--ink) 50%, var(--line-strong) 50%) 100% 0 / 200% 100% no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .reveal-fill.is-pending span,
  .reveal-fill.is-revealed span {
    color: transparent;
  }

  .reveal-fill.is-revealed {
    background-position: 0 0;
    transition: background-position 1.8s var(--ease-out);
  }

  @supports (animation-timeline: view()) {
    .cover-bg img {
      animation: cover-zoom linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
    }
  }
}

@keyframes aperture-iris {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(9);
  }
}

@keyframes aperture-zoom {
  from {
    transform: scale(1.35);
  }
}

@keyframes aperture-rings {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes aperture-intro {
  to {
    opacity: 0;
    transform: translateY(-24px);
  }
}

@keyframes aperture-copy {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
}

@keyframes cover-zoom {
  to {
    transform: scale(1.12);
  }
}
