/* ================================
   MEDIAS.CSS | Posiciona y Convierte
   Media queries del sitio
================================ */

/* ================================
   ACCESIBILIDAD | Movimiento reducido
================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* ================================
   GLOBAL | Ajustes hasta 1180px
================================ */

@media (max-width: 1180px) {
  :root {
    --space-page-x: 32px;
    --space-section: 112px;
    --space-section-small: 88px;
  }

  .hero__inner {
    gap: 56px;
  }

  .authority__inner {
    gap: 52px;
  }

  .search-shift__inner,
  .diagnostic__inner,
  .faq__inner {
    gap: 56px;
  }

  .apadi-item {
    grid-template-columns: 100px 0.9fr 1.35fr auto;
    gap: 26px;
  }

  .metric-card {
    padding: 30px 18px;
  }

  .site-footer__main {
    gap: 36px;
  }
}

/* ================================
   GLOBAL | Tablet horizontal
================================ */

@media (max-width: 1024px) {
  :root {
    --space-section: 104px;
    --space-section-small: 80px;
  }

  body {
    font-size: 16.5px;
  }

  .section-intro {
    margin-bottom: 52px;
  }

  .section-intro p {
    font-size: 17px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__content {
    max-width: 760px;
  }

  .hero-panel {
    max-width: 680px;
  }

  .authority__inner {
    grid-template-columns: 1fr;
  }

  .authority__media {
    max-width: 520px;
  }

  .authority__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .authority__stat:nth-child(2) {
    border-right: 0;
    padding-right: 0;
  }

  .authority__stat:nth-child(3) {
    padding-left: 0;
    border-right: 1px solid var(--border-soft);
  }

  .authority__stat:nth-child(3),
  .authority__stat:nth-child(4) {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
  }

  .bento-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search-shift__inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .search-shift__sticky {
    position: static;
  }

  .step-list {
    max-width: 760px;
  }

  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-card {
    border-bottom: 1px solid rgba(251, 250, 247, 0.14);
  }

  .metric-card:nth-child(3n) {
    border-right: 0;
  }

  .metric-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .apadi-item {
    grid-template-columns: 86px 1fr;
    gap: 12px 28px;
    padding-right: 0;
  }

  .apadi-item:hover {
    padding-left: 12px;
  }

  .apadi-item__letter {
    grid-row: span 2;
    font-size: 72px;
  }

  .apadi-item h3 {
    align-self: end;
  }

  .apadi-item p {
    grid-column: 2;
  }

  .apadi-item__tag {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }

  .diagnostic__inner {
    grid-template-columns: 1fr;
  }

  .diagnostic__content {
    position: static;
    max-width: 760px;
  }

  .diagnostic-form {
    max-width: 760px;
  }

  .faq__inner {
    grid-template-columns: 1fr;
  }

  .faq__intro {
    position: static;
    max-width: 760px;
  }

  .site-footer__main {
    grid-template-columns: 1fr 1fr;
    gap: 42px 48px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

/* ================================
   NAVBAR | Menú móvil
================================ */

@media (max-width: 900px) {
  .site-nav {
    position: relative;
  }

  .site-nav__inner {
    padding: 12px var(--space-page-x);
  }

  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(91, 117, 137, 0.24);
    border-radius: var(--radius-md);
    background: rgba(251, 250, 247, 0.8);
    color: var(--color-primary);
  }

  .site-nav__toggle-line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--color-primary);
    transition:
      transform var(--transition-base),
      opacity var(--transition-base);
  }

  .site-nav__toggle[aria-expanded="true"] .site-nav__toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-nav__toggle[aria-expanded="true"] .site-nav__toggle-line:nth-child(2) {
    opacity: 0;
  }

  .site-nav__toggle[aria-expanded="true"] .site-nav__toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav__menu {
    position: absolute;
    top: calc(100% + 1px);
    right: var(--space-page-x);
    left: var(--space-page-x);
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    max-height: 0;
    overflow: hidden;
    padding: 0 18px;
    border: 1px solid rgba(91, 117, 137, 0);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: rgba(251, 250, 247, 0.96);
    box-shadow: 0 18px 40px -28px rgba(20, 48, 75, 0.38);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition:
      max-height 260ms ease,
      opacity 200ms ease,
      transform 200ms ease,
      padding 200ms ease,
      border-color 200ms ease;
  }

  .site-nav__menu.is-open {
    max-height: 420px;
    padding: 18px;
    border-color: rgba(91, 117, 137, 0.22);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav__list {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

  .site-nav__list li {
    border-bottom: 1px solid rgba(91, 117, 137, 0.14);
  }

  .site-nav__list li:last-child {
    border-bottom: 0;
  }

  .site-nav__link {
    display: block;
    min-height: 44px;
    padding: 12px 0;
    font-size: 15px;
  }

  .btn--nav {
    width: 100%;
  }
}

/* ================================
   GLOBAL | Tablet vertical
================================ */

@media (max-width: 860px) {
  :root {
    --space-page-x: 28px;
    --space-section: 92px;
    --space-section-small: 76px;
  }

  .section-title {
    font-size: clamp(30px, 7vw, 44px);
  }

  .section-intro {
    margin-bottom: 44px;
  }

  .hero {
    padding-top: 82px;
    padding-bottom: 78px;
  }

  .hero__title {
    font-size: clamp(40px, 9vw, 58px);
  }

  .hero__lead {
    font-size: 18px;
  }

  .hero-panel__stamp {
    top: -10px;
    right: 10px;
  }

  .authority__content p {
    font-size: 17px;
  }

  .bento-grid--three {
    grid-template-columns: 1fr;
  }

  .info-card {
    padding: 28px 24px;
  }

  .quote-block {
    padding: 34px 32px 34px 48px;
  }

  .quote-block p {
    font-size: 22px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-card:nth-child(3n) {
    border-right: 1px solid rgba(251, 250, 247, 0.14);
  }

  .metric-card:nth-child(2n) {
    border-right: 0;
  }

  .metric-card:nth-last-child(-n + 2) {
    border-bottom: 1px solid rgba(251, 250, 247, 0.14);
  }

  .metric-card:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .live-board__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 28px;
  }

  .live-board__date {
    align-items: flex-start;
  }

  .live-board__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .fit-filter__grid {
    grid-template-columns: 1fr;
  }

  .diagnostic-form {
    padding: 36px 30px;
  }

  .faq-item__button {
    font-size: 18px;
  }
}

/* ================================
   GLOBAL | Móvil amplio
================================ */

@media (max-width: 680px) {
  :root {
    --space-page-x: 22px;
    --space-section: 78px;
    --space-section-small: 68px;
  }

  body {
    font-size: 16px;
  }

  .section {
    padding-right: var(--space-page-x);
    padding-left: var(--space-page-x);
  }

  .section-kicker,
  .eyebrow,
  .hero__microcopy {
    font-size: 10px;
  }

  .section-intro p {
    font-size: 16.5px;
  }

  .btn {
    width: 100%;
    white-space: normal;
  }

  .link-action {
    width: 100%;
    justify-content: center;
  }

  .site-brand__label {
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    padding-top: 72px;
  }

  .hero__grid-bg {
    background-size: 46px 46px;
  }

  .hero__actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .hero-panel__card {
    border-radius: var(--radius-md);
  }

  .hero-panel__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .hero-panel__item {
    grid-template-columns: 30px 1fr;
  }

  .hero-panel__tag {
    grid-column: 2;
    justify-self: start;
  }

  .hero-panel__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .hero-panel__footer strong {
    text-align: left;
  }

  .hero-panel__stamp {
    position: static;
    display: inline-flex;
    margin-top: 12px;
  }

  .authority__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .authority__stat {
    min-width: 0;
    padding: 18px 18px;
    border-right: 0 !important;
    border-top: 1px solid var(--border-soft);
  }

  .authority__stat:nth-child(odd) {
    padding-left: 0;
    border-right: 1px solid var(--border-soft) !important;
  }

  .authority__stat:nth-child(even) {
    padding-right: 0;
  }

  .authority__stat:nth-child(1),
  .authority__stat:nth-child(2) {
    padding-top: 0;
    border-top: 0;
  }

  .authority__stat strong {
    font-size: 32px;
  }

  .clients {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .client-logo {
    width: 148px;
    height: 78px;
    padding: 16px 20px;
  }

  .client-logo img {
    max-height: 42px;
  }

  .search-shift__inner {
    gap: 36px;
  }

  .step-card {
    gap: 16px;
    padding: 24px 22px;
  }

  .step-card__number {
    min-width: 28px;
  }

  .apadi .section-intro {
    margin-bottom: 44px;
  }

  .apadi-item {
    grid-template-columns: 64px 1fr;
    gap: 8px 20px;
    padding: 30px 0;
  }

  .apadi-item:hover {
    padding-left: 8px;
  }

  .apadi-item__letter {
    font-size: 58px;
  }

  .apadi-item h3 {
    font-size: 24px;
  }

  .apadi-item p {
    font-size: 16px;
  }

  .fit-card {
    padding: 30px 26px;
  }

  .diagnostic-form {
    padding: 30px 24px;
  }

  .form-field + .form-field,
  .form-field + .btn,
  .form-field + button {
    margin-top: 18px;
  }

  .closing p {
    font-size: 17px;
  }

  .faq__inner {
    gap: 44px;
  }

  .faq-item__button {
    gap: 18px;
    min-height: 70px;
    padding: 22px 0;
    font-size: 17px;
  }

  .faq-item__icon {
    width: 26px;
    height: 26px;
  }

  .site-footer__main {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ================================
   GLOBAL | Móvil estándar
================================ */

@media (max-width: 520px) {
  :root {
    --space-page-x: 20px;
    --space-section: 70px;
    --space-section-small: 62px;
  }

  .site-nav__inner {
    gap: 16px;
  }

  .site-brand__mark {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .site-brand__name {
    font-size: 14px;
  }

  .site-brand__label {
    max-width: 145px;
    font-size: 9px;
  }

  .hero__title {
    font-size: clamp(36px, 11vw, 48px);
  }

  .hero__lead {
    font-size: 17px;
  }

  .hero__text {
    font-size: 16px;
  }

  .eyebrow--pill,
  .eyebrow--dark {
    align-items: flex-start;
    border-radius: var(--radius-md);
    line-height: 1.5;
  }

  .hero-panel__body {
    padding: 20px;
  }

  .authority__placeholder {
    aspect-ratio: 1 / 1.16;
  }

  .authority__stats {
    grid-template-columns: 1fr;
  }

  .authority__stat,
  .authority__stat:nth-child(odd),
  .authority__stat:nth-child(even) {
    padding: 16px 0;
    border-right: 0 !important;
    border-top: 1px solid var(--border-soft);
  }

  .authority__stat:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .quote-block {
    margin-top: 38px;
    padding: 32px 24px 30px 40px;
  }

  .quote-block::before {
    left: 14px;
    font-size: 40px;
  }

  .quote-block p {
    font-size: 20px;
  }

  .step-card {
    flex-direction: column;
    gap: 10px;
  }

  .step-card__number {
    padding-top: 0;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric-card,
  .metric-card:nth-child(2n),
  .metric-card:nth-child(3n),
  .metric-card:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid rgba(251, 250, 247, 0.14);
  }

  .metric-card:last-child {
    border-bottom: 0;
  }

  .metric-card__value {
    font-size: 44px;
  }

  .apadi-item {
    grid-template-columns: 1fr;
  }

  .apadi-item__letter,
  .apadi-item h3,
  .apadi-item p,
  .apadi-item__tag {
    grid-column: auto;
  }

  .apadi-item__letter {
    font-size: 52px;
  }

  .fit-card {
    padding: 28px 22px;
  }

  .fit-card__header {
    align-items: flex-start;
  }

  .diagnostic-form {
    padding: 28px 20px;
  }

  .form-field input,
  .form-field textarea {
    font-size: 16px;
    padding: 13px 14px;
  }

  .closing .section-title {
    font-size: clamp(34px, 10vw, 46px);
  }

  .closing__statement {
    margin-top: 38px;
    margin-bottom: 38px;
  }

  .faq-item__button {
    font-size: 16.5px;
  }

  .site-footer {
    padding-top: 54px;
    padding-bottom: 34px;
  }

  .form-location {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ================================
   GLOBAL | Móvil compacto
================================ */

@media (max-width: 390px) {
  :root {
    --space-page-x: 18px;
  }

  .site-brand__label {
    max-width: 120px;
  }

  .site-nav__toggle {
    width: 42px;
    height: 42px;
  }

  .hero__title {
    font-size: 34px;
  }

  .section-title {
    font-size: 30px;
  }

  .btn {
    padding-right: 20px;
    padding-left: 20px;
  }

  .hero-panel__item {
    grid-template-columns: 26px 1fr;
    gap: 12px;
  }

  .hero-panel__question {
    font-size: 12px;
  }

  .info-card,
  .step-card,
  .fit-card,
  .diagnostic-form {
    border-radius: 8px;
  }

  .site-footer__bottom span {
    line-height: 1.6;
  }
}

/* ================================
   INTERACCIÓN | Dispositivos sin hover
================================ */

@media (hover: none) {
  .btn--primary:hover,
  .btn--outline-light:hover,
  .link-action:hover,
  .site-footer__column a:hover {
    transform: none;
  }

  .btn--primary:hover {
    box-shadow: var(--shadow-cta);
  }
}

/* ================================
   IMPRESIÓN | Limpieza básica
================================ */

@media print {
  .site-header,
  .site-footer,
  .hero__grid-bg,
  .btn,
  .link-action,
  .faq-item__icon {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 12pt;
  }

  .section,
  .hero,
  .authority,
  .live-board,
  .closing {
    padding: 24px 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .container,
  .container--narrow,
  .container--center {
    max-width: none;
  }

  .section-title,
  .section-title--light,
  h1,
  h2,
  h3 {
    color: #000000 !important;
  }

  .faq-item__panel {
    max-height: none !important;
  }
}

/* ================================
   MARCAS Y PROYECTOS | Media queries
================================ */

@media (min-width: 760px) {
  .brand-strip {
    padding: 5.25rem 0;
  }

  .brand-strip__inner {
    width: min(100% - 3rem, 1180px);
  }

  .brand-strip__content {
    margin-bottom: 2.75rem;
  }

  .brand-marquee__item {
    width: 14rem;
    min-width: 14rem;
    height: 6.75rem;
    padding: 1.1rem 1.5rem;
    border-radius: 20px;
  }

  .brand-marquee__item img {
    width: auto;
    height: 3.75rem;
    max-width: 100%;
    max-height: none;
  }
}

/* ================================
   MARCAS Y PROYECTOS | Desktop
================================ */

@media (min-width: 1080px) {
  .brand-strip {
    padding: 5.75rem 0;
  }

  .brand-strip__inner {
    display: block;
  }

  .brand-strip__content {
    max-width: 100%;
    margin-bottom: 3rem;
  }

  .brand-strip__title {
    white-space: nowrap;
  }

  .brand-marquee {
    width: 100%;
    padding: 1rem 0;
  }

  .brand-marquee__item {
    width: 14.5rem;
    min-width: 14.5rem;
    height: 7rem;
  }

  .brand-marquee__item img {
    width: auto;
    height: 4rem;
    max-width: 100%;
    max-height: none;
  }
}
