/* EXPANDHOME / Sistema — structural album */

body[data-page="sistema"] {
  --system-ink: #09142f;
  --system-navy: #07152f;
  --system-blue: #0d6dad;
  --system-cyan: #72c3f2;
  --system-paper: #f4f4f2;
  --system-line: #adb4be;
  background: var(--system-paper);
}

body[data-page="sistema"] ::selection {
  background: var(--system-cyan);
  color: var(--system-navy);
}

body[data-page="sistema"] .system-hero {
  min-height: calc(100svh - 88px);
  grid-template-columns: minmax(360px, 0.74fr) minmax(0, 1.26fr);
  background: var(--system-navy);
}

body[data-page="sistema"] .system-hero-copy {
  position: relative;
  z-index: 2;
  justify-content: flex-end;
  padding: clamp(78px, 8vw, 132px) clamp(34px, 5.8vw, 92px);
  border-color: rgb(255 255 255 / 22%);
}

body[data-page="sistema"] .system-hero-copy h1 {
  max-width: 8ch;
  margin-bottom: 34px;
  font-family: "Carlito", "Catamaran", sans-serif;
  font-size: clamp(4.15rem, 7.3vw, 6rem);
  font-weight: 700;
  line-height: 0.9;
}

body[data-page="sistema"] .system-hero-copy p {
  max-width: 37ch;
  color: #c4d3e2;
  font-size: clamp(1.05rem, 1.3vw, 1.22rem);
}

.system-text-link {
  display: inline-flex;
  width: max-content;
  min-height: 52px;
  align-items: center;
  gap: 28px;
  margin-top: 34px;
  border-bottom: 1px solid var(--system-cyan);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: color 220ms ease, gap 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.system-text-link:hover {
  gap: 38px;
  color: var(--system-cyan);
}

.system-text-link:focus-visible {
  outline: 3px solid var(--system-cyan);
  outline-offset: 5px;
}

.system-assembly {
  --assembly-opacity: 0.32;
  --assembly-shift: 0px;
  --assembly-scale: 1;
  --assembly-cut: 0%;
  position: relative;
  min-height: 720px;
  margin: 0;
  overflow: hidden;
  background: var(--system-navy);
}

.system-assembly::after {
  position: absolute;
  inset: 0;
  border-left: 1px solid rgb(255 255 255 / 20%);
  content: "";
  pointer-events: none;
}

.system-model-layer {
  position: absolute;
  z-index: 2;
  right: -5%;
  bottom: 9%;
  width: 108%;
  max-width: none;
  height: auto;
  object-fit: contain;
  transform: translate3d(0, var(--assembly-shift), 0) scale(var(--assembly-scale));
  transform-origin: 52% 72%;
  transition: filter 180ms linear;
}

.system-plan-layer {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 35%;
  height: 100%;
  padding: 7% 3%;
  border-left: 1px solid rgb(114 195 242 / 32%);
  background: #0b1d3c;
  opacity: var(--assembly-opacity);
  clip-path: inset(var(--assembly-cut) 0 0 0);
  overflow: hidden;
}

.system-plan-layer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(1) sepia(0.1) saturate(1.5) hue-rotate(160deg) brightness(1.8);
  mix-blend-mode: screen;
}

.system-assembly figcaption {
  position: absolute;
  z-index: 3;
  right: 5.6%;
  bottom: 4%;
  width: min(42ch, 52%);
  color: #a9bbcf;
  font-family: "Roboto Condensed", "Catamaran", sans-serif;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: right;
}

.system-structure-story {
  padding-top: clamp(100px, 12vw, 180px);
  padding-bottom: clamp(100px, 12vw, 180px);
}

.system-proof-layout {
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(0, 0.82fr) minmax(390px, 1.18fr);
  gap: clamp(54px, 7vw, 112px);
}

body[data-page="sistema"] .technical-ledger {
  display: block;
  border-color: var(--system-ink);
}

body[data-page="sistema"] .technical-ledger article,
body[data-page="sistema"] .technical-ledger article:first-child {
  display: grid;
  min-height: 180px;
  align-items: center;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0 26px;
  padding: 30px 0;
  border-right: 0;
  border-bottom: 1px solid var(--system-line);
}

body[data-page="sistema"] .technical-ledger svg {
  grid-row: 1 / span 2;
}

body[data-page="sistema"] .technical-ledger h3 {
  margin: 0 0 9px;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

body[data-page="sistema"] .technical-ledger p {
  margin: 0;
}

.system-built-proof {
  position: relative;
  min-height: 600px;
  margin: 0;
  overflow: hidden;
}

.system-built-proof img {
  width: 100%;
  height: 100%;
  min-height: 600px;
  object-fit: cover;
  object-position: 52% 55%;
  filter: saturate(0.8) contrast(1.04);
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.system-built-proof.is-visible img {
  transform: scale(1.025);
}

.system-built-proof figcaption,
.system-equipment-intro figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 13px 18px;
  background: rgb(9 20 47 / 88%);
  color: #fff;
  font-family: "Roboto Condensed", "Catamaran", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.system-plan-atlas {
  padding: clamp(100px, 12vw, 180px) max(4.5vw, calc((100vw - var(--content-max)) / 2));
  overflow: hidden;
  background: var(--system-navy);
  color: #fff;
}

.system-plan-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.65fr);
  gap: clamp(42px, 7vw, 112px);
  align-items: end;
  margin-bottom: clamp(64px, 8vw, 112px);
}

.system-plan-heading h2 {
  max-width: 12ch;
  margin: 0;
  font-family: "Carlito", "Catamaran", sans-serif;
  font-size: clamp(3.4rem, 6vw, 5.7rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.system-plan-heading p {
  max-width: 38ch;
  margin: 0;
  color: #bccbda;
}

.system-plan-reel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgb(255 255 255 / 28%);
}

.system-plan-reel figure {
  display: grid;
  min-width: 0;
  margin: 0;
  background: var(--system-paper);
  color: var(--system-ink);
}

.system-plan-reel img {
  width: 100%;
  height: clamp(440px, 50vw, 720px);
  padding: clamp(22px, 3.5vw, 54px);
  object-fit: contain;
  background: var(--system-paper);
  transition: transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.system-plan-reel figure:hover img {
  transform: scale(1.018);
}

.system-plan-reel figcaption {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-top: 1px solid var(--system-line);
}

.system-plan-reel strong {
  color: var(--system-blue);
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  font-weight: 700;
}

.system-plan-reel span {
  color: var(--supporting-text, #59657a);
  font-size: 0.86rem;
}

.system-plan-note {
  max-width: 64ch;
  margin: 22px 0 0;
  color: #9fb2c8;
  font-family: "Roboto Condensed", "Catamaran", sans-serif;
  font-size: 0.82rem;
}

body[data-page="sistema"] .published-specs {
  border-bottom: 1px solid var(--system-line);
}

body[data-page="sistema"] .published-spec-grid div {
  transition: background 240ms ease, color 240ms ease;
}

body[data-page="sistema"] .published-spec-grid div:hover {
  background: #fff;
}

.system-equipment {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(58px, 8vw, 130px);
}

.system-equipment-intro {
  min-width: 0;
}

.system-equipment-intro .content-intro {
  display: block;
  margin-bottom: 54px;
}

.system-equipment-intro .content-intro h2 {
  max-width: 11ch;
  margin-bottom: 28px;
}

.system-equipment-intro figure {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
}

.system-equipment-intro img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.76) contrast(1.06);
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.system-equipment-intro figure.is-visible img {
  transform: scale(1.025);
}

body[data-page="sistema"] .equipment-matrix {
  align-self: end;
}

body[data-page="sistema"] .equipment-matrix article {
  min-height: 128px;
  grid-template-columns: 66px minmax(170px, 0.72fr) minmax(240px, 1fr);
  gap: 22px;
}

/* Motion: visible defaults, then a bounded material reveal once JS enhances. */
.has-js body[data-page="sistema"] .reveal[data-reveal="slide"] {
  opacity: 0.28;
  transform: translateY(34px);
}

.has-js body[data-page="sistema"] .reveal[data-reveal="clip"] {
  opacity: 0.72;
  clip-path: inset(0 0 16% 0);
  filter: saturate(0.62);
  transform: translateY(18px);
}

.has-js body[data-page="sistema"] .reveal[data-reveal="fade"] {
  opacity: 0.42;
  transform: none;
}

.has-js body[data-page="sistema"] .reveal[data-reveal="assembly"] {
  opacity: 1;
  transform: none;
}

.has-js body[data-page="sistema"] .reveal.is-visible[data-reveal] {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  filter: none;
  transform: translateY(0);
  transition:
    opacity 720ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 720ms cubic-bezier(0.16, 1, 0.3, 1),
    clip-path 860ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 700ms ease;
}

@media (max-width: 1120px) {
  .system-proof-layout {
    grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
    gap: 48px;
  }

  .system-equipment {
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    gap: 52px;
  }

  body[data-page="sistema"] .equipment-matrix article {
    grid-template-columns: 58px 1fr;
  }

  body[data-page="sistema"] .equipment-matrix p {
    grid-column: 2;
  }
}

@media (max-width: 900px) {
  body[data-page="sistema"] .system-hero {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  body[data-page="sistema"] .system-hero-copy {
    min-height: 58svh;
    padding: 76px 24px 62px;
    border-bottom-color: rgb(255 255 255 / 22%);
  }

  body[data-page="sistema"] .system-hero-copy h1 {
    max-width: 8ch;
    font-size: clamp(3.7rem, 15vw, 5.5rem);
  }

  .system-assembly {
    min-height: 64svh;
    border-top: 1px solid rgb(255 255 255 / 20%);
  }

  .system-assembly::after {
    display: none;
  }

  .system-model-layer {
    right: -22%;
    bottom: 15%;
    width: 139%;
  }

  .system-plan-layer {
    width: 42%;
    padding: 9% 2%;
  }

  .system-assembly figcaption {
    right: 24px;
    bottom: 22px;
    width: calc(100% - 48px);
    max-width: 44ch;
  }

  .system-proof-layout,
  .system-equipment {
    grid-template-columns: 1fr;
  }

  body[data-page="sistema"] .technical-ledger article,
  body[data-page="sistema"] .technical-ledger article:first-child {
    min-height: 156px;
    padding: 28px 0;
  }

  .system-built-proof {
    min-height: 70svh;
  }

  .system-built-proof img {
    min-height: 70svh;
  }

  .system-plan-atlas {
    padding: 94px 24px;
  }

  .system-plan-heading {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 58px;
  }

  .system-plan-heading h2 {
    font-size: clamp(3.2rem, 13vw, 4.8rem);
  }

  .system-plan-reel {
    grid-auto-columns: 84%;
    grid-template-columns: none;
    grid-auto-flow: column;
    gap: 12px;
    margin-right: -24px;
    padding-right: 24px;
    background: transparent;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .system-plan-reel::-webkit-scrollbar {
    display: none;
  }

  .system-plan-reel figure {
    scroll-snap-align: start;
  }

  .system-plan-reel img {
    height: min(118vw, 620px);
    padding: 26px;
  }

  .system-plan-reel figcaption {
    min-height: 74px;
  }

  .system-equipment-intro .content-intro {
    margin-bottom: 46px;
  }

  .system-equipment-intro figure {
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 560px) {
  body[data-page="sistema"] .system-hero-copy {
    min-height: 54svh;
  }

  .system-model-layer {
    right: -39%;
    bottom: 17%;
    width: 164%;
  }

  .system-plan-layer {
    width: 46%;
  }

  .system-proof-layout {
    gap: 56px;
  }

  .system-built-proof,
  .system-built-proof img {
    min-height: 560px;
  }

  .system-plan-reel {
    grid-auto-columns: 88%;
  }

  body[data-page="sistema"] .equipment-matrix article {
    min-height: 148px;
    grid-template-columns: 52px 1fr;
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .system-model-layer {
    transform: none !important;
  }

  .system-plan-layer {
    opacity: 0.32 !important;
    clip-path: none !important;
  }

  .has-js body[data-page="sistema"] .reveal[data-reveal] {
    opacity: 1;
    clip-path: none;
    filter: none;
    transform: none;
  }
}
