/* ==========================================
   ARTE D&P · HEADER
   ========================================== */

#adph-header {
  --adph-ink: #1d1029;
  --adph-purple: #7435c9;
  --adph-lime: #d6f45c;
  --adph-paper: #fcfaf6;
  --adph-muted: #766783;
  --adph-line: #e8dff0;

  position: relative;
  z-index: 9990;
  width: 100%;

  border-bottom: 1px solid rgba(29, 16, 41, 0.08);
  background: var(--adph-paper);
  color: var(--adph-ink);

  font-family: var(--adp-font, "Manrope"), sans-serif;
  line-height: 1.4;
}

#adph-header,
#adph-header * {
  box-sizing: border-box;
}

#adph-header :where(ul, li, p) {
  margin: 0;
  padding: 0;
}

#adph-header ul {
  list-style: none;
}

#adph-header a {
  color: inherit;
  text-decoration: none;
}

#adph-header button,
#adph-header summary {
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}

#adph-header button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
}

#adph-header [hidden],
#adph-backdrop[hidden] {
  display: none !important;
}

#adph-header :is(a, button, summary):focus-visible {
  outline: 3px solid var(--adph-purple);
  outline-offset: 5px;
}

/* CABECERA FIJA */

#adph-header.is-ready {
  position: fixed;
  top: var(--adph-admin, 0px);
  left: 0;
  right: 0;
}

#adph-header.is-scrolled {
  box-shadow: 0 5px 24px rgba(29, 16, 41, 0.07);
}

#adph-header .adph-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;

  width: min(1360px, calc(100% - 64px));
  min-height: 86px;
  margin-inline: auto;

  transition: min-height 200ms ease;
}

#adph-header.is-scrolled .adph-inner {
  min-height: 72px;
}

#adph-spacer {
  display: none;
}

#adph-spacer.is-ready {
  display: block;
  height: 87px;
}

/* LOGOTIPO TIPOGRÁFICO */

#adph-header .adph-brand {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
}

#adph-header .adph-brand__name {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.07em;
}

#adph-header .adph-brand__caption {
  margin-top: 5px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.32em;
}

/* NAVEGACIÓN */

#adph-header .adph-nav {
  position: static;
  margin-left: auto;
}

#adph-header .adph-links {
  display: flex;
  align-items: center;
  gap: 25px;
}

#adph-header .adph-links > li {
  position: static;
}

#adph-header .adph-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;

  width: fit-content;
  padding: 13px 0;

  color: var(--adph-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;

  transition: color 180ms ease;
}

#adph-header .adph-link::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;

  height: 3px;
  border-radius: 999px;
  background: var(--adph-purple);

  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

#adph-header .adph-link:hover,
#adph-header .adph-link[aria-current],
#adph-header .adph-services[open] > summary,
#adph-header .adph-services.has-current > summary {
  color: var(--adph-purple);
}

#adph-header .adph-link:hover::after,
#adph-header .adph-link[aria-current]::after {
  transform: scaleX(1);
}

/* DESPLEGABLE NATIVO */

#adph-header .adph-services {
  position: static;
}

#adph-header .adph-services > summary {
  list-style: none;
}

#adph-header .adph-services > summary::-webkit-details-marker {
  display: none;
}

#adph-header .adph-chevron {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms ease;
}

#adph-header .adph-services[open] .adph-chevron {
  transform: rotate(180deg);
}

/* MENÚ GRANDE DE SERVICIOS */

#adph-header .adph-mega {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 26px;

  max-height: calc(
    100svh - var(--adph-height, 87px) - var(--adph-admin, 0px) - 30px
  );

  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;

  border: 1px solid var(--adph-line);
  border-radius: 20px;
  background: var(--adph-paper);
  box-shadow: 0 24px 60px rgba(29, 16, 41, 0.18);
}

#adph-header .adph-services[open] .adph-mega {
  animation: adph-enter 180ms ease-out;
}

#adph-header .adph-mega__content {
  min-width: 0;
}

#adph-header .adph-eyebrow {
  margin: 0 10px 17px;
  color: var(--adph-purple);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.5;
}

#adph-header .adph-service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
}

#adph-header .adph-service {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 72px;
  padding: 12px;

  border-radius: 12px;
  transition: background 180ms ease;
}

#adph-header .adph-service:hover,
#adph-header .adph-service[aria-current] {
  background: #f0e8fb;
}

#adph-header .adph-service__icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;

  fill: none;
  stroke: var(--adph-purple);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#adph-header .adph-service strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

#adph-header .adph-service small {
  display: block;
  margin-top: 4px;
  color: var(--adph-muted);
  font-size: 12px;
  line-height: 1.4;
}

#adph-header .adph-all-services {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 12px 10px 0;

  color: var(--adph-purple);
  font-size: 13px;
  font-weight: 800;
}

#adph-header .adph-all-services span {
  font-size: 21px;
  transition: transform 180ms ease;
}

#adph-header .adph-all-services:hover span {
  transform: translateX(4px);
}

/* PANEL DE AYUDA */

#adph-header .adph-help {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  overflow: hidden;

  padding: 30px;
  border-radius: 15px;
  background: #54219b;
  color: #fff;
}

#adph-header .adph-help::before,
#adph-header .adph-help::after {
  content: "";
  position: absolute;
  right: -35px;
  width: 110px;
  height: 210px;
  border-radius: 100% 0 100% 0;
  background: rgba(175, 108, 255, 0.25);
  pointer-events: none;
}

#adph-header .adph-help::before {
  top: -80px;
  transform: rotate(-25deg);
}

#adph-header .adph-help::after {
  bottom: -75px;
  transform: rotate(35deg);
}

#adph-header .adph-help > * {
  position: relative;
  z-index: 1;
}

#adph-header .adph-help__title {
  font-size: 31px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

#adph-header .adph-help__text {
  color: #e5d3fa;
  font-size: 16px;
  line-height: 1.5;
}

#adph-header .adph-help a {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 45px;
  padding: 11px 18px;

  border-radius: 10px;
  background: var(--adph-lime);
  color: var(--adph-ink);

  font-size: 14px;
  font-weight: 800;
}

#adph-header .adph-help a:focus-visible {
  outline-color: var(--adph-lime);
}

/* BOTÓN PARA COTIZAR */

#adph-header .adph-quote {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 14px;

  min-height: 50px;
  padding: 9px 10px 9px 18px;

  border-radius: 13px;
  background: var(--adph-ink);
  color: #fff;

  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;

  transition: background 180ms ease;
}

#adph-header .adph-quote:hover {
  background: #44205e;
}

#adph-header .adph-quote__arrow {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;

  border-radius: 50%;
  background: var(--adph-lime);
  color: var(--adph-ink);

  font-size: 23px;
  font-weight: 500;
  line-height: 1;

  transition: transform 200ms ease;
}

#adph-header .adph-quote:hover .adph-quote__arrow {
  transform: rotate(8deg);
}

#adph-header .adph-quote__short {
  display: none;
}

/* BOTÓN MÓVIL */

#adph-header .adph-toggle {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;

  border: 1px solid var(--adph-line);
  border-radius: 11px;
  background: #fff;
}

#adph-header .adph-toggle > span {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

#adph-header .adph-toggle > span::before,
#adph-header .adph-toggle > span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;

  border-radius: 2px;
  background: var(--adph-ink);
  transition: transform 200ms ease;
}

#adph-header .adph-toggle > span::before {
  top: 0;
}

#adph-header .adph-toggle > span::after {
  bottom: 0;
}

#adph-header.is-menu-open .adph-toggle > span::before {
  transform: translateY(6px) rotate(45deg);
}

#adph-header.is-menu-open .adph-toggle > span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* FONDO AL ABRIR EL MENÚ */

#adph-backdrop {
  position: fixed;
  z-index: 9989;
  top: calc(var(--adph-admin, 0px) + var(--adph-height, 87px));
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(21, 9, 34, 0.2);
}

/* Evita que el header tape los destinos de los enlaces */

:is(#adp-hero, #adp-services, #adp-projects, #adp-process) {
  scroll-margin-top: calc(
    var(--adph-height, 87px) + var(--adph-admin, 0px) + 18px
  );
}

@keyframes adph-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TABLET Y MENÚ MÓVIL */

@media (max-width: 1120px) {
  #adph-header .adph-inner {
    width: calc(100% - 40px);
    min-height: 74px;
    gap: 14px;
  }

  #adph-header.is-scrolled .adph-inner {
    min-height: 66px;
  }

  #adph-spacer.is-ready {
    height: 75px;
  }

  #adph-header .adph-quote {
    margin-left: auto;
  }

  #adph-header .adph-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;

    max-height: calc(
      100svh - var(--adph-height, 75px) - var(--adph-admin, 0px) - 25px
    );

    margin: 0;
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;

    border: 1px solid var(--adph-line);
    border-radius: 17px;
    background: var(--adph-paper);
    box-shadow: 0 18px 45px rgba(29, 16, 41, 0.16);
  }

  #adph-header .adph-links {
    display: block;
  }

  #adph-header .adph-links > li + li {
    border-top: 1px solid var(--adph-line);
  }

  #adph-header .adph-link {
    justify-content: space-between;
    width: 100%;
    padding: 15px 9px;
    font-size: 15px;
  }

  #adph-header .adph-link::after {
    display: none;
  }

  #adph-header .adph-mega {
    position: static;
    display: block;
    max-height: none;

    padding: 0 0 12px;
    overflow: visible;

    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #adph-header .adph-eyebrow {
    margin: 6px 10px 12px;
    font-size: 9px;
  }

  #adph-header .adph-service-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #adph-header .adph-help {
    display: none;
  }

  /* Navegación disponible incluso si el JS no carga */

  #adph-header:not(.is-ready) .adph-inner {
    flex-wrap: wrap;
  }

  #adph-header:not(.is-ready) .adph-nav {
    position: static;
    order: 4;
    flex: 1 0 100%;
    max-height: none;
    box-shadow: none;
  }
}

@media (max-width: 560px) {
  #adph-header .adph-inner {
    width: calc(100% - 32px);
    gap: 10px;
  }

  #adph-header .adph-brand__name {
    font-size: 28px;
  }

  #adph-header .adph-brand__caption {
    font-size: 6.5px;
    letter-spacing: 0.25em;
  }

  #adph-header .adph-quote {
    min-height: 42px;
    gap: 8px;
    padding: 7px 8px 7px 12px;
    border-radius: 11px;
    font-size: 12px;
  }

  #adph-header .adph-quote__full {
    display: none;
  }

  #adph-header .adph-quote__short {
    display: inline;
  }

  #adph-header .adph-quote__arrow {
    width: 27px;
    height: 27px;
    font-size: 20px;
  }

  #adph-header .adph-service-list {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  #adph-header .adph-service {
    min-height: 66px;
    padding: 10px;
  }
}

/* ACCESIBILIDAD */

@media (prefers-reduced-motion: reduce) {
  #adph-header *,
  #adph-header *::before,
  #adph-header *::after {
    animation: none !important;
    transition: none !important;
  }
}