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

/* Ajustes propios de esta página. */
.hero2 .section-inner,
.end .section-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(36px, 8vw, 130px);
  align-items: end;
}
.hero2 h1,
.end h2 {
  font-size: clamp(48px, 7vw, 108px);
  letter-spacing: -0.075em;
}
.hero2 h1 span,
.end h2 span {
  display: block;
}
.lead {
  position: relative;
  padding-top: 17px;
}
.lead::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 2px;
  background: var(--blue);
  content: '';
}
.lead .button {
  margin-top: 28px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 4vw, 64px);
  margin-top: 48px;
}
.cards article {
  padding: 20px 12px;
  border-top: 3px solid var(--blue);
  border-bottom: 1px solid #858783;
}
.cards h3 {
  margin: 18px 0 12px;
}
.end aside {
  padding: 30px;
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 var(--blue);
}
.end aside p {
  margin-bottom: 24px;
}
@media (max-width: 700px) {
  .hero2 .section-inner,
  .end .section-inner,
  .cards {
    grid-template-columns: 1fr;
  }
  .hero2 h1,
  .end h2 {
    font-size: clamp(43px, 14vw, 68px);
  }
  .site-nav .nav-links {
    z-index: 2;
  }
}
/* Software y web: composición editorial y productos digitales. */
.hero2 {
  background: linear-gradient(115deg, var(--paper) 0 58%, #e8edf3 58% 100%);
}
.hero2::after {
  position: absolute;
  right: clamp(6vw, 12vw, 18vw);
  bottom: 16%;
  width: clamp(72px, 10vw, 150px);
  aspect-ratio: 1;
  border: 18px solid var(--blue);
  content: '';
  transform: rotate(45deg);
}
.hero2 .section-inner {
  align-items: center;
}
.hero2 h1 {
  max-width: 8ch;
}
.hero2 .lead {
  max-width: 34ch;
  padding: 24px;
  border: 1px solid rgb(12 13 12 / 22%);
  background: rgb(245 242 233 / 76%);
  box-shadow: 7px 7px 0 var(--ink);
}
.cards {
  grid-template-columns: 1.1fr 0.9fr 1.1fr;
  gap: 18px;
}
.cards article {
  min-height: 260px;
  padding: 26px 22px;
  border: 0;
  background: #2c2d36;
  color: var(--paper);
  box-shadow: inset 0 3px var(--blue);
}
.cards article:nth-child(2) {
  background: var(--blue);
  transform: translateY(34px);
}
.cards article:nth-child(3) {
  background: #15161a;
}
.cards article .number {
  color: #bcd7f4;
}
.cards article h3 {
  font-size: clamp(22px, 2.1vw, 32px);
}
.end {
  background-image: radial-gradient(circle at 80% 18%, rgb(46 106 177 / 16%) 0 1px, transparent 1px);
  background-size: 18px 18px;
}
.end aside {
  background: var(--paper);
}
@media (max-width: 700px) {
  .hero2 {
    isolation: isolate;
    background: var(--paper);
  }
  .hero2::after {
    z-index: -1;
    width: 78px;
    border-width: 10px;
    right: 18px;
    bottom: 38px;
  }
  .hero2 .section-inner {
    z-index: 1;
  }
  .hero2 .lead {
    display: grid;
    justify-items: center;
    gap: 22px;
    width: min(100%, 36ch);
    padding: 24px 20px;
    border-color: var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    text-align: center;
  }
  .hero2 .lead::before {
    left: 50%;
    transform: translateX(-50%);
  }
  .hero2 .lead .button {
    margin: 0;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .cards article,
  .cards article:nth-child(2) {
    min-height: 0;
    transform: none;
  }
}
@media (min-width: 701px) {
  .hero2 h1 {
    max-width: 11ch;
    font-size: clamp(52px, 5.1vw, 82px);
  }
  .hero2 .lead {
    margin-bottom: 14px;
  }
}
/* Software y web: footer editorial, limpio y alineado a la retícula. */
.end > .site-footer {
  border-top: 3px solid var(--ink);
}
.end > .site-footer nav a {
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.end > .site-footer nav a:hover {
  border-bottom-color: var(--blue);
}

/* 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;
  }
}

@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)));
  }
}
/* Identidades específicas de cada servicio. */
.build-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.build-flow li {
  padding: 6px 8px;
  border: 1px solid currentColor;
  font:
    700 9px/1 Arial,
    sans-serif;
  letter-spacing: 0.08em;
}
.build-flow li + li::before {
  margin-right: 8px;
  color: var(--blue);
  content: '→';
}
.cards article {
  position: relative;
}
.cards article::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 28px;
  height: 18px;
  border: 1px solid currentColor;
  opacity: 0.28;
  content: '';
}
@media (max-width: 700px) {
  .build-flow {
    justify-content: center;
  }
  .build-flow li {
    font-size: 8px;
  }
  .cards article::after {
    right: 14px;
    bottom: 14px;
  }
}
@media (max-width: 700px) {
  .cards article::after {
    display: none;
  }
}
@media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
  body[data-service='software-web'] .service-page-ribbon {
    justify-content: flex-start;
  }
  body[data-service='software-web'] .service-page-ribbon span {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    animation: contained-service-ribbon-sweep 13s linear infinite alternate;
    animation-delay: 0s;
  }
}
