/* Presentación DICOMSA — paneles a pantalla completa */
:root {
  --black: #000000;
  --gold: #faaf4c;
  --white: #ffffff;
  --ink: #141414;
  --muted: rgba(255, 255, 255, .72);
  --muted-dark: rgba(0, 0, 0, .62);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --spring: cubic-bezier(.16, 1, .3, 1);
  --display: "Oswald", "Arial Narrow", sans-serif;
  --sans: "Lato", "Segoe UI", sans-serif;
  --nav: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, a { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--gold);
  color: var(--black);
  padding: 8px 12px;
}
.skip:focus { top: 12px; }

/* ---------- Barra ---------- */
.nav {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  color: var(--white);
  pointer-events: none;
}
body[data-surface="gold"] .nav,
body[data-surface="white"] .nav { color: var(--black); }
.nav__brand {
  display: flex;
  align-items: center;
  pointer-events: auto;
  background: #000;
  padding: 6px 12px 8px;
  border-radius: 12px;
}
.logo { height: 48px; width: auto; }
.nav__links { display: flex; gap: 18px; margin-left: auto; pointer-events: auto; }
.nav__links a {
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.nav__links a:hover { border-bottom-color: currentColor; }

/* ---------- Índice, línea de tiempo ---------- */
.menu__panel {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(420px, 88vw);
  background: var(--gold);
  color: var(--black);
  padding: calc(var(--nav) + 8px) 28px 28px;
  overflow: auto;
  transition: width .45s var(--spring), padding .45s var(--spring);
}
.menu.is-compact .menu__panel { width: 92px; padding-left: 16px; padding-right: 12px; }
.menu__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; }
.menu__top p {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.03em;
  transition: opacity .3s var(--ease);
}
.menu.is-compact .menu__top p { opacity: 0; width: 0; overflow: hidden; }
.menu__size { min-height: 44px; min-width: 44px; }
.menu__size:hover { opacity: .65; }
.menu__size:active { transform: translateY(1px); }
.menu__list {
  position: relative;
  margin-top: 18px;
  --p: 0;
}
.menu__list::before,
.menu__list::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(0, 0, 0, .18);
  pointer-events: none;
}
.menu__list::after {
  background: #000;
  transform: scaleY(var(--p));
  transform-origin: top center;
  transition: transform 1.25s linear;
}
.menu__item {
  position: relative;
  width: 100%;
  display: flex;
  gap: 16px;
  align-items: baseline;
  text-align: left;
  padding: 11px 0 11px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, .18);
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--black);
  transition: opacity .35s var(--ease), transform .45s var(--spring);
}
.menu__item:hover { opacity: .55; }
.menu__item:active { transform: translateY(1px); }
.menu__item[aria-current="true"] { opacity: 1; transform: translate3d(8px, 0, 0); }
.menu__n {
  font-family: var(--sans);
  font-size: 13px;
  width: 1.5rem;
  position: relative;
  z-index: 1;
}
.menu__item[aria-current="true"] .menu__n { font-weight: 700; }
.menu.is-compact .menu__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.menu.is-compact .menu__item { justify-content: center; padding-left: 0; transform: none; }
.menu.is-compact .menu__item[aria-current="true"] { transform: none; }

/* ---------- Pista ---------- */
.viewport {
  height: 100dvh;
  overflow: hidden;
  margin-left: min(420px, 88vw);
  width: calc(100vw - min(420px, 88vw));
}
.menu.is-compact ~ .viewport {
  margin-left: 92px;
  width: calc(100vw - 92px);
}
.track {
  height: 100%;
  display: flex;
  transition: transform 1.25s linear;
  position: relative;
  will-change: transform;
}
.track.is-dragging { transition: none; }
.tile {
  flex: 0 0 100%;
  width: 100%;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  border-top-right-radius: 36px;
  border-bottom-right-radius: 36px;
}
.tile--landing,
.tile--projects,
.tile--split[data-surface="black"] { background: var(--black); color: var(--white); }
.tile--gold,
.tile--split[data-surface="gold"] { background: var(--gold); color: var(--black); }
.tile--about,
.tile--list,
.tile--contact,
.tile--split[data-surface="white"] { background: var(--white); color: var(--ink); }

h1, h2, .claims h3, .about__pair h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: .92;
}

/* ---------- Portada ---------- */
.tile--landing { display: grid; grid-template-columns: 1.05fr .95fr; }
.landing__copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav) + 24px) 6vw 11vh;
}
.landing__year { font-size: 16px; color: var(--gold); margin-bottom: 18px; }
.tile--landing h1 {
  font-size: clamp(64px, 7.2vw, 124px);
  max-width: 8ch;
}
.landing__roles { margin-top: 28px; max-width: 28ch; }
.landing__roles li {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .28);
  font-size: 18px;
}
.landing__photo { margin: 0; height: 100%; }
.landing__photo img,
.split__photo img,
.split__stack img,
.about__photo img,
.pcard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 7s var(--spring);
}
.js .tile.is-on .landing__photo img,
.js .tile.is-on .split__photo img,
.js .tile.is-on .split__stack img,
.js .tile.is-on .about__photo img {
  transform: scale(1);
}
.pcard img { transform: scale(1); transition: transform .7s var(--spring); }
.pcard:hover img { transform: scale(1.08); }
.pcard:active { transform: translateY(1px); }

.js .rise {
  opacity: 0;
  transform: translate3d(-36px, 22px, 0);
  transition: opacity .7s var(--spring), transform .85s var(--spring);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .tile.is-on .rise {
  opacity: 1;
  transform: none;
}

/* ---------- Enfoque ---------- */
.tile--gold {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav) + 12px) 8vw 12vh;
}
.claims li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px 0;
  border-top: 1px solid rgba(0, 0, 0, .28);
}
.claims li:last-child { border-bottom: 1px solid rgba(0, 0, 0, .28); }
.claims span {
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
}
.claims h3 { font-size: clamp(32px, 3.4vw, 52px); }
.claims p { max-width: 46ch; margin-top: 6px; font-size: 18px; }
.gold__sign {
  margin-top: 36px;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.03em;
}

/* ---------- Empresa ---------- */
.tile--about { display: grid; grid-template-columns: .78fr 1.22fr; }
.about__photo { margin: 0; height: 100%; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav) + 16px) 6vw 10vh 5vw;
}
.about__copy h2 { font-size: clamp(36px, 3.6vw, 58px); max-width: 16ch; }
.about__copy > p { max-width: 52ch; margin-top: 16px; color: var(--muted-dark); }
.about__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 32px; }
.about__pair h3 { font-size: 28px; margin-bottom: 8px; }
.about__pair p { color: var(--muted-dark); font-size: 16px; max-width: 36ch; }

/* ---------- Proyectos ---------- */
.tile--projects {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav) + 12px) 0 12vh 5vw;
}
.tile--projects h2 { font-size: clamp(48px, 5vw, 80px); margin-bottom: 22px; }
.pcards {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-right: 6vw;
  scroll-snap-type: x mandatory;
}
.pcard {
  flex: 0 0 min(280px, 72vw);
  height: min(62vh, 560px);
  scroll-snap-align: start;
  position: relative;
  border: 1px solid rgba(255, 255, 255, .45);
  color: var(--white);
  text-align: left;
  overflow: hidden;
  transition: border-color .25s var(--ease);
}
.pcard:hover { border-color: var(--gold); }
.pcard img { width: 100%; height: 100%; object-fit: cover; }
.pcard__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 16px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78));
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.pcard__body small {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  margin-bottom: 6px;
  color: var(--gold);
}
.pcard--plain { background: var(--gold); }
.pcard--plain .pcard__body {
  position: static;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: none;
  color: var(--black);
}
.pcard--plain .pcard__body small { color: var(--black); }

/* ---------- Fichas ---------- */
.tile--split { display: grid; grid-template-columns: 1fr 1fr; }
.split__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav) + 16px) 5vw 12vh 6vw;
}
.split__copy h2 { font-size: clamp(42px, 4.4vw, 72px); max-width: 12ch; }
.split__copy > p,
.notes p,
.fine { max-width: 42ch; margin-top: 16px; }
.tile--split[data-surface="black"] .split__copy > p,
.tile--split[data-surface="black"] .notes,
.tile--split[data-surface="black"] .fine { color: var(--muted); }
.tile--split[data-surface="white"] .split__copy > p,
.tile--split[data-surface="white"] .notes { color: var(--muted-dark); }
.split__copy ul { margin-top: 22px; }
.split__copy li { padding: 8px 0; border-top: 1px solid currentColor; max-width: 36ch; }
.mark {
  margin-top: 22px;
  font-family: var(--display);
  font-size: clamp(22px, 2vw, 32px);
  letter-spacing: -0.03em;
  color: var(--gold);
}
.tile--split[data-surface="gold"] .mark,
.tile--split[data-surface="white"] .mark { color: var(--black); }
.lead-in { margin-bottom: 8px; }
.fine { font-size: 15px; }
.split__photo, .split__stack { height: 100%; min-height: 0; }
.split__photo { margin: 0; }
.split__stack { display: grid; grid-template-rows: 1fr 1fr; }
.split__stack figure { margin: 0; min-height: 0; }

.fleet a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .28);
  transition: color .25s var(--ease);
}
.fleet a:hover { color: var(--gold); }
.fleet span { color: var(--gold); }

/* ---------- Servicios ---------- */
.tile--list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav) + 16px) 7vw 12vh;
}
.tile--list h2 { font-size: clamp(42px, 4.6vw, 72px); margin-bottom: 18px; }
.catalog { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.catalog a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .16);
  font-family: var(--display);
  font-size: clamp(20px, 1.7vw, 28px);
  letter-spacing: -0.02em;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.catalog a:hover { color: #9a6410; border-bottom-color: var(--gold); }
.catalog a:active { transform: translateY(1px); }
.catalog span { font-family: var(--sans); font-size: 15px; letter-spacing: 0; color: var(--muted-dark); }

/* ---------- Contacto ---------- */
.tile--contact {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav) + 16px) 7vw 14vh;
}
.tile--contact h2 { font-size: clamp(52px, 6.4vw, 108px); max-width: 12ch; margin: 12px 0 28px; }
.mail {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 56px;
  padding: 0 28px;
  background: var(--black);
  color: var(--white);
  border-radius: 999px;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.mail:hover { background: var(--gold); color: var(--black); }
.mail:active { transform: translateY(1px); }
.contacts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 28px; }
.contacts a { border-bottom: 1px solid transparent; transition: border-color .25s var(--ease); }
.contacts a:hover { border-bottom-color: var(--black); }

/* ---------- Pie de presentación ---------- */
.pager {
  position: fixed;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 28px 16px;
  color: var(--white);
  pointer-events: none;
}
body[data-surface="gold"] .pager,
body[data-surface="white"] .pager,
body[data-surface="gold"] .pager button,
body[data-surface="white"] .pager button { color: var(--black); }
.pager p { margin: 0; display: flex; gap: 10px; align-items: baseline; }
#slide-name { opacity: .8; }
.pager div { display: flex; gap: 8px; pointer-events: auto; }
.pager button {
  min-height: 40px;
  padding: 6px 2px;
  color: var(--white);
  transition: opacity .25s var(--ease);
}
.pager button:hover { opacity: .65; }
.pager button:disabled { opacity: .35; cursor: default; }
.pager button:active:not(:disabled) { transform: translateY(1px); }
.live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.rail {
  position: fixed;
  z-index: 24;
  left: 28px;
  right: 28px;
  bottom: 0;
  display: flex;
  gap: 6px;
  height: 18px;
  pointer-events: auto;
}
.rail button {
  flex: 1;
  height: 18px;
  position: relative;
}
.rail button::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  background: currentColor;
  opacity: .28;
  transform: scaleX(.35);
  transform-origin: left center;
  transition: transform .45s var(--spring), opacity .45s var(--spring), background-color .45s var(--spring);
}
.rail button[aria-current="true"]::before,
.rail button.is-done::before {
  opacity: 1;
  transform: scaleX(1);
  background: var(--gold);
}
body[data-surface="gold"] .rail button[aria-current="true"]::before,
body[data-surface="white"] .rail button[aria-current="true"]::before,
body[data-surface="gold"] .rail button.is-done::before,
body[data-surface="white"] .rail button.is-done::before { background: var(--black); }
.rail button:hover::before { opacity: .8; }
.rail button:active::before { transform: scaleX(1) translateY(1px); }
/* La excavadora viaja pegada al borde de la lámina que entra. */
.hauler {
  position: absolute;
  z-index: 12;
  top: 58%;
  left: var(--seam-x, 100%);
  width: min(380px, 42vw);
  transform: translate3d(-42%, -50%, 0);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 10px 0 rgba(0, 0, 0, .28));
}
.hauler svg { display: block; width: 100%; height: auto; overflow: visible; }
.hauler .paint { fill: #faaf4c; stroke: #000; stroke-width: 4; stroke-linejoin: round; }
.hauler .ink { fill: #111; stroke: #faaf4c; stroke-width: 3; stroke-linejoin: round; }
.hauler .spoke { fill: none; stroke: #faaf4c; stroke-width: 3; stroke-linecap: round; }
.hauler .dust { fill: #faaf4c; opacity: .0; }
.hauler.is-next,
.hauler.is-prev { animation: haul-fade 1.25s linear forwards; }
.hauler.is-next .rig { transform: scaleX(-1); transform-origin: 50% 60%; }
.hauler.is-next .dust,
.hauler.is-prev .dust { animation: dust 1.25s linear; }
.hauler.is-next .wheel,
.hauler.is-prev .wheel { animation: spin .28s linear infinite; transform-box: fill-box; transform-origin: center; }
.hauler.is-next .boom,
.hauler.is-prev .boom { animation: dig 1.25s var(--spring); transform-box: view-box; transform-origin: 174px 100px; }
.hauler.is-next .stick,
.hauler.is-prev .stick { animation: reach 1.25s var(--spring); transform-box: view-box; transform-origin: 280px 50px; }
.hauler.is-next .bucket,
.hauler.is-prev .bucket { animation: curl 1.25s var(--spring); transform-box: view-box; transform-origin: 340px 130px; }
@keyframes haul-fade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes dust {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  20% { opacity: .7; }
  100% { opacity: 0; transform: translate3d(-28px, -8px, 0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dig {
  0% { transform: rotate(10deg); }
  42% { transform: rotate(-16deg); }
  100% { transform: rotate(4deg); }
}
@keyframes reach {
  0% { transform: rotate(-8deg); }
  42% { transform: rotate(12deg); }
  100% { transform: rotate(0deg); }
}
@keyframes curl {
  0% { transform: rotate(18deg); }
  46% { transform: rotate(-22deg); }
  100% { transform: rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hauler { animation: none !important; opacity: 0 !important; }
  .track, .menu__item, .menu__panel, .pcard, .catalog a, .fleet a, .mail, .rise, .rail button::before,
  .landing__photo img, .split__photo img, .split__stack img, .about__photo img, .pcard img { transition: none; }
  .js .rise, .js .tile.is-on .rise { opacity: 1; transform: none; }
  .landing__photo img, .split__photo img, .split__stack img, .about__photo img, .pcard img { transform: none; }
}

@media (max-width: 860px) {
  body { overflow: auto; height: auto; }
  .viewport { height: auto; overflow: visible; margin-left: 0; width: auto; }
  .track { display: block; height: auto; transform: none !important; }
  .hauler {
    position: fixed;
    top: auto;
    bottom: 16vh;
    left: 0;
    width: 210px;
    margin: 0;
    transform: none;
  }
  .hauler.is-next { animation: haul-fade 1.25s linear forwards, drive-next 1.25s var(--spring) forwards; }
  .hauler.is-prev { animation: haul-fade 1.25s linear forwards, drive-prev 1.25s var(--spring) forwards; }
@keyframes drive-next {
  from { transform: translate3d(108vw, 0, 0); }
  to { transform: translate3d(-46vw, 0, 0); }
}
@keyframes drive-prev {
  from { transform: translate3d(-46vw, 0, 0); }
  to { transform: translate3d(108vw, 0, 0); }
}
  .tile {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    border-radius: 0;
    flex: none;
  }
  .tile--landing,
  .tile--about,
  .tile--split { grid-template-columns: 1fr; }
  .landing__photo { height: 42vh; }
  .about__photo { height: 46vh; }
  .split__photo { height: 42vh; }
  .split__stack { height: 52vh; }
  .about__pair, .catalog { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .menu__panel { width: min(420px, 92vw); }
  .menu.is-compact .menu__panel { width: 72px; }
  .tile--projects { min-height: 100dvh; }
  .pcard { height: 360px; }
  .pager,
  body[data-surface="gold"] .pager,
  body[data-surface="white"] .pager,
  .pager button,
  body[data-surface="gold"] .pager button,
  body[data-surface="white"] .pager button {
    color: var(--white);
  }
  .pager { background: linear-gradient(transparent, rgba(0, 0, 0, .72)); }
}
