@import url('service-page.css');

/* Ajustes propios de esta página. */
.page-hero h1 {
  max-width: 11ch;
  font-size: clamp(48px, 7vw, 108px);
  letter-spacing: -0.075em;
}
.page-hero h1 span {
  display: block;
}
.intro {
  max-width: 52ch;
  margin-top: 32px;
  padding-top: 17px;
  border-top: 2px solid currentColor;
  font-size: clamp(17px, 1.4vw, 22px);
}
.page-hero .button {
  margin-top: 28px;
}
.service-list {
  list-style: none;
  margin: 46px 0 0;
  padding: 0;
  border-top: 1px solid #858783;
}
.service-list li {
  display: grid;
  grid-template-columns: 42px 1fr 0.9fr;
  gap: 18px;
  padding: 22px 12px;
  border-bottom: 1px solid #858783;
}
.service-list h3 {
  font-size: clamp(20px, 2vw, 29px);
}
.closing .section-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(36px, 8vw, 120px);
  align-items: center;
}
.closing h2 {
  font-size: clamp(42px, 5.5vw, 84px);
}
.closing aside {
  padding: 30px;
  background: var(--panel);
  border-top: 3px solid var(--blue);
  box-shadow: 6px 6px 0 var(--blue);
}
.closing aside p {
  margin-bottom: 24px;
}
@media (max-width: 700px) {
  .page-hero h1 {
    font-size: clamp(43px, 14vw, 68px);
  }
  .service-list li {
    grid-template-columns: 30px 1fr;
  }
  .service-list li p {
    grid-column: 2;
  }
  .closing .section-inner {
    grid-template-columns: 1fr;
  }
  .site-nav .nav-links {
    z-index: 2;
  }
}
/* Sistemas: plano técnico y módulos de infraestructura. */
.page-hero {
  background-color: var(--panel);
  background-image:
    linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
  background-size: 48px 48px;
}
.page-hero::after {
  position: absolute;
  top: 20%;
  right: 10%;
  width: min(35vw, 500px);
  aspect-ratio: 1;
  border: 1px solid rgb(46 106 177 / 55%);
  box-shadow:
    0 0 0 28px rgb(46 106 177 / 8%),
    0 0 0 72px rgb(245 242 233 / 3%);
  content: '';
  transform: rotate(45deg);
}
.page-hero .section-inner {
  z-index: 1;
}
.service-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border: 0;
}
.service-list li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 230px;
  padding: 26px 22px 20px;
  border: 1px solid rgb(12 13 12 / 22%);
  background: rgb(245 242 233 / 66%);
}
.service-list li .number {
  order: -1;
  padding-bottom: 44px;
}
.service-list li h3 {
  margin-bottom: 12px;
}
.service-list li p {
  grid-column: auto;
  align-self: end;
}
.service-list li::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  content: '';
}
.closing {
  background-image: linear-gradient(135deg, transparent 0 44%, rgb(46 106 177 / 10%) 44% 44.3%, transparent 44.3%);
}
.closing aside {
  border-left: 3px solid var(--blue);
}
@media (max-width: 700px) {
  .page-hero {
    background-size: 28px 28px;
  }
  .service-list {
    grid-template-columns: 1fr;
  }
  .service-list li {
    min-height: 0;
    grid-template-columns: 1fr !important;
    padding: 18px 24px 48px !important;
  }
  .service-list li .number {
    padding-bottom: 20px;
  }
  .service-list li::after {
    right: 18px;
    bottom: 16px;
    width: 20px;
    height: 20px;
  }
}
@media (min-width: 701px) {
  .page-hero h1 {
    max-width: 13ch;
    font-size: clamp(52px, 5.1vw, 82px);
  }
  .page-hero .intro {
    margin-top: clamp(20px, 3vh, 32px);
  }
}
/* Sistemas: footer convertido en barra de especificaciones. */
.closing > .site-footer {
  border-top: 1px solid rgb(117 167 222 / 42%);
}
.closing > .site-footer nav a::before {
  margin-right: 6px;
  color: #75a7de;
  content: '□';
}

/* Responsive final de servicio: este bloque vive después del @import para
   prevalecer sobre la composición específica de cada página en móvil/tablet. */
@media (max-width: 1199px) {
  :root {
    --service-page-clearance: max(96px, calc(76px + env(safe-area-inset-bottom)));
  }
  main > .screen {
    height: auto;
    min-height: 100svh;
    overflow-x: clip;
    overflow-y: visible;
    padding-bottom: var(--service-page-clearance);
  }
  main > .screen > .section-inner {
    max-height: none;
  }
  main > .screen:last-child {
    display: block;
    min-height: 100svh;
  }
  main > .screen:last-child > .section-inner {
    padding-bottom: 30px;
  }
  main > .screen:last-child > .site-footer {
    margin-inline: 0;
    padding: 24px var(--gutter) var(--service-page-clearance);
  }
  .screen,
  .section-heading,
  .service-list li,
  .cards article,
  .flow article,
  .rows li,
  .closing .section-inner,
  .end .section-inner,
  .last .section-inner,
  .finish .section-inner {
    text-align: center;
  }
  .section-heading p,
  .page-hero .intro,
  .auto .intro,
  .lead,
  .box {
    margin-inline: auto;
  }
  .service-list li,
  .rows li {
    grid-template-columns: 1fr !important;
  }
  .service-list li p,
  .rows li p {
    grid-column: auto;
  }
  .service-list li .number,
  .rows li .number,
  .flow .number {
    justify-self: center;
  }
  .page-hero .button,
  .auto .button,
  .lead .button,
  .box .button,
  .panel .button,
  .closing .button,
  .end .button,
  .last .button,
  .finish .button {
    margin-inline: auto;
  }
  .site-nav .nav-links {
    pointer-events: none;
  }
  .site-nav.is-open .nav-links {
    pointer-events: auto;
  }
}
@media (max-width: 700px) {
  .screen > .section-inner {
    gap: 20px !important;
  }
  .page-hero h1,
  .hero2 h1,
  .auto h1,
  .support h1 {
    font-size: clamp(32px, 10.5vw, 46px) !important;
    line-height: 0.98;
  }
  .section-heading h2,
  .closing h2,
  .end h2,
  .last h2,
  .finish h2 {
    font-size: clamp(28px, 9vw, 38px) !important;
    line-height: 1;
  }
  .service-list,
  .cards,
  .flow,
  .rows {
    gap: 12px !important;
  }
  .service-list li,
  .cards article,
  .flow article,
  .rows li {
    padding: 16px !important;
  }
  .service-list p,
  .cards p,
  .flow p,
  .rows p {
    font-size: 13px !important;
    line-height: 1.32 !important;
  }
  .service-list li {
    padding-bottom: 48px !important;
  }
  .service-list li::after {
    right: 18px;
    bottom: 16px;
  }
}

@media (min-width: 701px) and (max-width: 1199px) and (orientation: portrait) {
  main > .screen {
    padding-top: calc(var(--nav-height) + clamp(18px, 2.2dvh, 26px));
  }
  .page-hero h1,
  .hero2 h1,
  .auto h1,
  .support h1 {
    font-size: clamp(40px, min(6.5vw, 5.6dvh), 56px) !important;
    line-height: 0.96;
  }
  .section-heading h2,
  .closing h2,
  .end h2,
  .last h2,
  .finish h2 {
    font-size: clamp(34px, min(5.5vw, 4.8dvh), 46px) !important;
    line-height: 0.98;
  }
  .intro,
  .lead,
  .section-heading > p {
    font-size: clamp(14px, 1.9vw, 16px);
    line-height: 1.4;
  }
  .service-list,
  .cards,
  .flow,
  .rows {
    gap: clamp(12px, 2dvh, 18px) !important;
  }
  .service-list li,
  .cards article,
  .flow article,
  .rows li {
    min-height: 0;
    padding: clamp(16px, 2.2dvh, 22px) !important;
  }
}

/* La escala de iPad Pro se ajusta sin afectar a escritorio ni al menú móvil. */
@media (min-width: 901px) and (max-width: 1199px) and (orientation: portrait) {
  .page-hero h1,
  .hero2 h1,
  .auto h1,
  .support h1 {
    font-size: clamp(52px, 5.5vw, 64px) !important;
  }
  .section-heading h2,
  .closing h2,
  .end h2,
  .last h2,
  .finish h2 {
    font-size: clamp(44px, 4.8vw, 56px) !important;
  }
  .intro,
  .lead,
  .section-heading > p,
  .box {
    font-size: 18px;
    line-height: 1.45;
  }
  .service-list h3,
  .cards h3,
  .flow h3,
  .rows h3 {
    font-size: 23px;
  }
  .service-list p,
  .cards p,
  .flow p,
  .rows p {
    font-size: 16px;
    line-height: 1.4;
  }
  .closing aside p,
  .end aside p,
  .panel p,
  .finish p {
    font-size: 18px;
    line-height: 1.45;
  }
}

@media (max-width: 700px) {
  main > .screen {
    min-height: 0;
    height: auto;
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: 64px;
    align-content: start;
  }
  main > .screen > .section-inner {
    min-height: 0;
    height: auto;
  }
  main > .screen:last-child {
    padding-bottom: 0;
  }
  main > .screen:last-child > .section-inner {
    padding-bottom: 52px;
  }
}

/* El pie replica el cierre claro de la landing y reserva siempre el bot?n flotante. */
main > .screen:last-child > .site-footer {
  color: var(--ink) !important;
  background: var(--paper) !important;
  border-top-color: rgb(12 13 12 / 16%) !important;
}
main > .screen:last-child > .site-footer::before {
  display: none;
}
main > .screen:last-child > .site-footer img {
  filter: invert(1) !important;
}
main > .screen:last-child > .site-footer .footer-legal {
  color: #50514f !important;
}
main > .screen:is(.closing, .finish) > .site-footer {
  color: var(--paper) !important;
  background: var(--panel) !important;
  border-top-color: rgb(245 242 233 / 22%) !important;
}
main > .screen:is(.closing, .finish) > .site-footer img {
  filter: none !important;
}
main > .screen:is(.closing, .finish) > .site-footer .footer-legal {
  color: rgb(245 242 233 / 62%) !important;
}
@media (max-width: 1199px) {
  main > .screen:last-child {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  main > .screen:last-child > .section-inner {
    align-self: center;
  }
  main > .screen:last-child > .site-footer {
    padding-bottom: max(86px, calc(66px + env(safe-area-inset-bottom)));
  }
}

/* Composición editorial propia de Sistemas. */
.page-hero .section-inner {
  width: min(100%, 720px);
}
.page-hero h1 {
  max-width: 9ch;
  font-size: clamp(58px, 6.25vw, 104px);
  line-height: 0.88;
}
.page-hero h1 .outline {
  -webkit-text-stroke-width: 1.5px;
}
.page-hero .intro {
  max-width: 43ch;
  margin-top: clamp(26px, 4vh, 46px);
  border-top-color: rgb(245 242 233 / 88%);
  line-height: 1.42;
}
.page-hero .button {
  min-height: 52px;
  padding-inline: 24px;
  letter-spacing: 0.08em;
}
.page-hero .button span:last-child {
  transition: transform 180ms ease;
}
.service-page-ribbon {
  letter-spacing: 0.16em;
}
.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: clamp(38px, 5vh, 64px);
  border-top: 1px solid rgb(12 13 12 / 42%);
}
.service-list li {
  display: grid;
  grid-template-columns: 76px minmax(240px, 0.82fr) minmax(300px, 1.18fr);
  gap: clamp(18px, 3vw, 52px);
  align-items: center;
  min-height: clamp(152px, 18vh, 210px);
  padding: clamp(24px, 3vw, 42px) 4px;
  border: 0;
  border-bottom: 1px solid rgb(12 13 12 / 42%);
  background: transparent;
}
.service-list li .number {
  align-self: start;
  padding: 4px 0 0;
  color: var(--blue);
  font-size: 11px;
  letter-spacing: 0.14em;
}
.service-list li h3 {
  margin: 0;
  font-size: clamp(25px, 2.2vw, 38px);
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.service-list li p {
  align-self: center;
  max-width: 39ch;
  margin: 0;
  color: #464844;
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.43;
}
.closing h2 {
  max-width: 11ch;
  font-size: clamp(48px, 5.6vw, 88px);
  line-height: 0.9;
}
.closing aside {
  padding: clamp(28px, 3.4vw, 46px);
  border-top: 1px solid rgb(117 167 222 / 55%);
  border-left-width: 2px;
}
.closing aside p {
  max-width: 36ch;
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.45;
}
@media (hover: hover) and (pointer: fine) {
  .page-hero .button:hover span:last-child {
    transform: translate(3px, -3px);
  }
  .service-list li:hover {
    background: rgb(46 106 177 / 6%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .service-page-ribbon span {
    animation: none;
  }
}

@media (max-width: 700px) {
  .page-hero .section-inner {
    width: 100%;
  }
  .page-hero h1 {
    max-width: 10ch;
    font-size: clamp(42px, 12.2vw, 58px) !important;
    line-height: 0.91;
  }
  .page-hero .intro {
    max-width: 35ch;
    margin-top: 24px;
    font-size: 15px;
    line-height: 1.38;
  }
  .page-hero .button {
    min-height: 48px;
    margin-top: 24px;
    padding-inline: 18px;
    font-size: 10px;
  }
  .service-page-ribbon {
    height: 32px;
    font-size: 8px;
    letter-spacing: 0.11em;
  }
  .service-list {
    margin-top: 30px;
  }
  .service-list li {
    grid-template-columns: 30px 1fr !important;
    gap: 12px;
    min-height: 0;
    padding: 22px 2px 24px !important;
    text-align: left;
  }
  .service-list li .number {
    justify-self: start;
    padding-top: 3px;
  }
  .service-list li h3 {
    font-size: clamp(21px, 6.1vw, 26px);
    line-height: 1;
  }
  .service-list li p {
    grid-column: 2;
    max-width: 38ch;
    font-size: 13px !important;
    line-height: 1.36 !important;
  }
  .closing h2 {
    max-width: 12ch;
    font-size: clamp(34px, 10.2vw, 43px) !important;
  }
  .closing aside {
    padding: 22px 18px;
  }
  .closing aside p {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }
  .closing .section-inner {
    justify-items: center;
    text-align: center;
  }
  .closing h2 {
    margin-inline: auto;
  }
  .closing aside {
    width: min(100%, 38ch);
    margin-inline: auto;
    border: 1px solid rgb(117 167 222 / 55%);
    border-top: 3px solid var(--blue);
    box-shadow: 5px 5px 0 var(--blue);
  }
  .closing aside p {
    margin-inline: auto;
  }
  .closing aside .button {
    margin-inline: auto;
  }
}

@media (min-width: 1200px) {
  .service-list {
    margin-top: clamp(30px, 3.6vh, 42px);
  }
  .service-list li {
    min-height: clamp(128px, 15vh, 168px);
    padding-block: clamp(20px, 2.4vw, 30px);
  }
  .service-list li h3 {
    font-size: clamp(22px, 1.75vw, 30px);
  }
  .service-list li p {
    font-size: clamp(14px, 0.96vw, 16px);
    line-height: 1.36;
  }
}

@keyframes systems-ribbon-sweep {
  from {
    transform: translateX(32px);
  }
  to {
    transform: translateX(calc(32px + var(--systems-ribbon-travel, 0px)));
  }
}
@media (min-width: 1200px) and (prefers-reduced-motion: no-preference) {
  body[data-service='sistemas'] .service-page-ribbon {
    justify-content: flex-start;
  }
  body[data-service='sistemas'] .service-page-ribbon span {
    animation: systems-ribbon-sweep 13s linear infinite alternate;
    animation-delay: 0s;
  }
}
