/* Paleta de la demo Digital Agency, aplicada al contenido de ANIA. */
main#contenido {
  --paper: #0d0d0d;
  --ania-accent: #f45153;
  --gencyo-surface: #151515;
  --violet: var(--ania-accent);
  --line: #343434;
  background: var(--paper);
}
main .cover { background: var(--paper); min-height: clamp(520px, 50vw, 730px); }
main .cover-images::after {
  background: linear-gradient(90deg, #0d0d0d 8%, #0d0d0de8 30%, #0d0d0d30 82%),
              linear-gradient(0deg, #0d0d0d, transparent 35%);
}
main .cover-body { padding-top: clamp(60px, 8vw, 118px); }
main .cover-story h1 {
  font-size: clamp(42px, 7.4vw, 108px);
  font-weight: 750;
  letter-spacing: -.06em;
}
main .cover-story h1 em, .front main h2 em {
  font: inherit;
  color: var(--ania-accent);
}
main .cover .kicker { color: #fff; }
.front main .kicker::before, .interior main .eyebrow::before { background: var(--ania-accent); }
main .cover .action-light, main .action-ink, .interior main .section .btn-primary {
  background: var(--ania-accent);
  border-color: var(--ania-accent);
  color: #151515;
  font-weight: 700;
}
main .cover .action-light:hover, main .action-ink:hover { background: #fa8586; color: #151515; }
main .catalogue, main .buying, main .services,
.interior main .section--dark2.section, .interior main .section--dark3.section {
  background: var(--paper);
}
main .programs, main .home-contact, main .film-feature, .interior main .cta-band {
  background: var(--gencyo-surface);
}
main .image-card { background: var(--gencyo-surface); padding: 0; border-radius: 18px; overflow: hidden; }
main .image-card .image-view { border-radius: 0; }
main .image-card .image-meta { padding: 17px 20px; }
main .image-meta .out-arrow { color: var(--ania-accent); }
main .services .section-intro { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
@media (max-width: 660px) {
  main .cover-images::after {
    background: linear-gradient(90deg, #0d0d0df5, #0d0d0d73), linear-gradient(0deg, #0d0d0d, transparent 45%);
  }
  main .cover-story h1 { font-size: clamp(36px, 8.5vw, 55px); }
}

/* Movimiento de portada, limitado al contenido de inicio. */
main .cover { overflow: hidden; }
.gencyo-motion {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
  opacity: .65;
}
.gencyo-motion span {
  position: relative;
  border-right: 1px solid #d5d7de26;
}
.gencyo-motion span::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 2px;
  height: 82px;
  background: linear-gradient(transparent, #f45153);
  box-shadow: 0 0 14px #f4515380;
  animation: gencyo-scan 5s linear infinite;
}
.gencyo-motion span:nth-child(2)::after { animation-delay: -1.3s; }
.gencyo-motion span:nth-child(3)::after { animation-delay: -3s; }
.gencyo-motion span:nth-child(4)::after { animation-delay: -4.2s; }
main .cover-body, main .cover-controls { position: relative; }
main .cover-story h1 { animation: gencyo-title .85s cubic-bezier(.22,.7,.3,1) both; }
main .cover-story h1 em { position: relative; display: inline-block; }
main .cover-story h1 em::after {
  content: "";
  position: absolute;
  left: 1%;
  right: 4%;
  bottom: -.045em;
  height: .14em;
  border-bottom: 3px solid currentColor;
  border-radius: 50%;
  transform: rotate(-2deg) scaleX(0);
  transform-origin: left;
  animation: gencyo-trace .85s .65s cubic-bezier(.22,.7,.3,1) forwards;
}
main .cover-story > p:last-child, main .hero-actions {
  animation: gencyo-title .7s .32s ease both;
}
main .cover-image.selected { animation: gencyo-pan 15s ease-out both; }
main .action-light .out-arrow { transition: transform .25s ease; }
main .action-light:hover .out-arrow,
main .action-light:focus-visible .out-arrow { transform: translateX(4px); }
@keyframes gencyo-scan { from { top: -82px; } to { top: 100%; } }
@keyframes gencyo-title { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gencyo-trace { to { transform: rotate(-2deg) scaleX(1); } }
@keyframes gencyo-pan { from { transform: scale(1); } to { transform: scale(1.075); } }
@media (prefers-reduced-motion: reduce) {
  .gencyo-motion span::after, main .cover-story h1, main .cover-story h1 em::after,
  main .cover-story > p:last-child, main .hero-actions, main .cover-image.selected { animation: none; }
  .gencyo-motion span::after { display: none; }
  main .cover-story h1 em::after { transform: rotate(-2deg); }
  main .action-light .out-arrow { transition: none; }
}

/* Tarjetas negras sobre textura de fibra, con acentos ANIA. */
#contenido .services {
  background: linear-gradient(110deg, #111e, #171719ed), url("img/fiber.webp") center / cover;
}
#contenido .service-directory { gap: 12px; }
#contenido .service-directory a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  align-items: end;
  min-height: 245px;
  padding: clamp(20px, 2.8vw, 38px);
  border: 1px solid #37373d;
  border-radius: 22px;
  background: #09090b;
  transition: border-color .2s, background-color .2s;
}
#contenido .service-directory a:hover,
#contenido .service-directory a:focus-visible { border-color: var(--ania-accent); background: #190d11; }
#contenido .service-directory .ania-service-symbol {
  grid-column: 1 / -1;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid #f4515370;
  border-radius: 14px;
  font-size: 30px;
  color: var(--ania-accent);
}
#contenido .buying {
  background: radial-gradient(ellipse at 5% 100%, #461922, transparent 52%), #101012;
}
#contenido .buying-steps > div {
  position: relative;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 22px;
  padding: 16px 0;
}
#contenido .buying-steps > div > span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  justify-self: start;
  align-self: stretch;
  padding: 12px 8px;
  border-radius: 8px;
  background: #25252a;
  color: #eee;
  white-space: nowrap;
}
#contenido .buying-steps > div:last-child > span { background: #b52c37; color: #fff; }
#contenido .buying-steps > div > div { border-bottom: 1px solid #62626a; padding-bottom: 16px; }
#contenido .buying-steps > div > div::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ania-accent);
}
#contenido .image-card { background: transparent; border-radius: 22px; }
#contenido .image-card .image-view img { aspect-ratio: 1.35; }
#contenido .image-card .image-meta {
  position: relative;
  margin-top: -26px;
  padding: 24px;
  border: 1px solid #36363c;
  border-radius: 22px;
  background: #09090b;
}
#contenido .image-meta p { color: #f8797a; }
#contenido .image-meta h3 { color: #f5f5f7; }
@media (prefers-reduced-motion: reduce) {
  #contenido .service-directory a { transition: none; }
}
#contenido .buying-steps > div { display: grid; border: 0; }
#contenido .buying-steps > div > div { min-width: 0; }

/* Páginas interiores: portada de infraestructura, superficies grafito y acento ANIA. */
.interior #contenido {
  --paper: #101012;
  --ink: #f1f1f4;
  --line: #3a3a40;
  --muted: #c2c2ca;
  --violet: #fa7276;
}
.interior #contenido .page-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(330px, 34vw, 510px);
  display: flex;
  align-items: center;
  padding-block: 42px 70px;
  border-bottom: 1px solid #702e35;
  background: #101012;
}
.interior #contenido .page-hero::before {
  background-image: linear-gradient(90deg,#0b0b0dfc 8%,#0b0b0de8 38%,#0b0b0d35 100%), var(--scene);
  background-position: center, right center;
  background-size: cover, 78% auto;
}
.interior #contenido .page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 8%, #f45153 35%, #9c9da5 50%, transparent 78%);
}
.interior #contenido .page-hero h1 {
  max-width: 19ch;
  font-size: clamp(35px, 5vw, 82px);
  line-height: 1.03;
  font-weight: 730;
}
.interior #contenido .page-hero .lead { color: #e1e0e5; }
.interior #contenido .section {
  --white: #f6f6f8;
  --navy: #101012;
  --navy2: #19191d;
  --navy3: #222226;
  --card-bg: #151518;
  --card-b: #3c3b42;
  --silver: #d4d3da;
  --silver2: #bab9c3;
  --red: #ff777b;
  --red-h: #ff9699;
  --red-dim: #422127;
  --cyan: #ff878b;
  background: var(--paper);
}
.interior #contenido .section--dark2.section,
.interior #contenido .section--dark3.section {
  background: radial-gradient(ellipse at 91% 105%,#371b22 0%,transparent 59%),#17171a;
}
.interior #contenido .section-header {
  position: relative;
  padding-top: 20px;
  border-top: 1px solid #49474d;
}
.interior #contenido .section-header::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 54px;
  height: 2px;
  background: var(--ania-accent);
}
.interior #contenido .section h2 { font-weight: 680; }
.interior #contenido :is(.service-card,.form-card,.info-item,.cert-card,.invest-item,.svc-card,.svc-full,.portal-role-card,.rp-block,.pricing-card,.country-card,.team-card,.post-card) {
  border-radius: 22px;
  border: 1px solid #3a3a42;
  background-color: #111114;
}
.interior #contenido :is(.service-card,.svc-card,.post-card,.cert-card):hover { border-color: #b7454d; }
.interior #contenido :is(.sc-icon,.why-icon) {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border: 1px solid #72353c;
  border-radius: 13px;
  background: #25161a;
  color: #ff777b;
  filter: grayscale(.72);
}
.interior #contenido :is(.sc-link,.svc-arrow,.role-code,.post-cat) { color: #ff858a; }
.interior #contenido .cta-band {
  background: radial-gradient(ellipse at 77% 140%, #5c2029, transparent 67%), #141416;
  border-top: 1px solid #663239;
}
.interior #contenido .btn-primary, .interior #contenido .cat-tab.active {
  background: #b32636;
  border-color: #da4c57;
  color: #fff;
}
.interior #contenido .btn-primary:not(.is-soon):hover { background: #d13848; }
.interior #contenido :is(.form-input,.form-select,.form-textarea) {
  background: #1f1f24;
  border-color: #55535e;
  color: #f7f7fa;
  color-scheme: dark;
}
.interior #contenido :is(.form-input,.form-select,.form-textarea):focus { outline-color: #ff777b; }
.interior #contenido .spec-table :is(th,td) { border-color: #3d3d43; }
.interior #contenido .spec-table th { background: #25252a; color: #f5f5f7; }
.interior #contenido .media-frame { border-radius: 21px; border: 1px solid #45454d; overflow: hidden; }
@keyframes ania-interior-enter {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .interior #contenido .page-hero-inner { animation: ania-interior-enter .62s ease-out both; }
}
@media (max-width: 720px) {
  .interior #contenido .page-hero { min-height: 0; padding-block: 28px 48px; }
  .interior #contenido .page-hero-inner { max-width: 100%; }
  .interior #contenido .page-hero::before {
    background-size: cover, cover;
    background-image: linear-gradient(90deg,#0b0b0dfa,#0b0b0d99), var(--scene);
  }
}

/* Fotografías editoriales por tema. */
.interior.visual-corporativo #contenido .page-hero { --scene: url("img/tema-corporativo.webp"); }
.interior.visual-ingenieria #contenido .page-hero { --scene: url("img/tema-ingenieria.webp"); }
.interior.visual-seguridad #contenido .page-hero { --scene: url("img/tema-seguridad.webp"); }
.interior.visual-logistica #contenido .page-hero { --scene: url("img/tema-logistica.webp"); }
.interior.visual-empresas #contenido .page-hero { --scene: url("img/tema-empresas.webp"); }
.interior.visual-cable-submarino #contenido .page-hero { --scene: url("img/tema-cable-submarino.webp"); }
.interior.visual-empalme #contenido .page-hero { --scene: url("img/tema-empalme.webp"); }
.interior.visual-nube #contenido .page-hero { --scene: url("img/tema-nube.webp"); }
.interior.visual-intercambio #contenido .page-hero { --scene: url("img/tema-intercambio.webp"); }
.interior.visual-campo #contenido .page-hero { --scene: url("img/tema-campo.webp"); }
.interior.visual-pagos #contenido .page-hero { --scene: url("img/tema-pagos.webp"); }
.interior.visual-soporte #contenido .page-hero { --scene: url("img/tema-soporte.webp"); }
@media (min-width: 721px) {
  .interior[class*=" visual-"] #contenido .page-hero::before {
    background-image: linear-gradient(90deg, #0b0b0d 20%, #0b0b0df2 37%, #0b0b0d42 76%, #0b0b0d22), var(--scene);
    background-size: cover, 58% auto;
  }
}

/* Visuales exclusivos de Programas ONE */
.interior.visual-one-experience #contenido .page-hero { --scene: url("img/one-experience-hero.webp"); }
.interior.visual-one-enterprise #contenido .page-hero { --scene: url("img/one-enterprise-hero.webp"); }
.interior.visual-one-ix #contenido .page-hero { --scene: url("img/one-ix-hero.webp"); }
.interior.visual-one-carrier #contenido .page-hero { --scene: url("img/one-carrier-hero.webp"); }

/* Fondo y profundidad visual de MARKO para el sitio público. */
:root {
  --ania-page-bg: #040404;
  --ania-card-bg: #151219;
  --ania-card-border: #403647;
  --ania-card-depth: inset 0 1px 0 #ffffff12, 0 4px 0 #080609, 0 12px 24px #0009;
}
body.front, body.interior { background-color: var(--ania-page-bg); }
main#contenido { --paper: var(--ania-page-bg); background-color: var(--paper); }
body #contenido :is(.catalogue, .buying, .services, .programs, .home-contact, .film-feature, .section, .cta-band) {
  background-color: var(--ania-page-bg);
}
body #contenido :is(.buying, .services, .section, .cta-band) {
  background-image: none;
}
body #contenido .services {
  background-image: linear-gradient(110deg, #040404ee, #040404db), url("img/fiber.webp");
}

body #contenido :is(
  .service-card, .image-card, .svc-card, .svc-full, .team-card, .country-card,
  .pricing-card, .post-card, .cert-card, .pop-card, .form-card, .portal-role-card,
  .participation-panel, .why-item, .info-item, .contact-info-item, .revenue-item,
  .invest-item, .roadmap-item, .faq-item, .stat-item, .media-frame,
  .service-directory > a, .buying-steps > div, .program-rail > a,
  .detail-grid > div
),
.site-header :is(.site-sheet, .sheet-feature) {
  background-color: var(--ania-card-bg);
  border: 1px solid var(--ania-card-border);
  box-shadow: var(--ania-card-depth);
}
body #contenido :is(.service-card, .image-card, .svc-card, .team-card, .post-card, .cert-card, .service-directory > a):is(:hover, :focus-within),
.site-header .sheet-feature:focus-within {
  border-color: #f45153;
  box-shadow: inset 0 1px 0 #ffffff16, 0 5px 0 #10090b, 0 16px 30px #000b;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body #contenido :is(.service-card, .image-card, .svc-card, .team-card, .post-card, .cert-card, .service-directory > a):hover {
    translate: 0 -2px;
  }
}
