/*
 * Responsive foundation
 * This file is intentionally loaded after styles.css. It owns the fluid scale,
 * shared adaptation rules and page-specific responsive corrections.
 */

:root {
  --type-display: clamp(2.5rem, 1.76rem + 3.68vw, 4.9rem);
  --type-h1: clamp(2.35rem, 1.7rem + 3.25vw, 4.45rem);
  --type-h2: clamp(1.95rem, 1.47rem + 2.38vw, 3.5rem);
  --type-h3: clamp(1.25rem, 1.13rem + 0.63vw, 1.65rem);
  --type-card: clamp(1.35rem, 1.16rem + 0.94vw, 1.95rem);
  --type-body-lg: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
  --type-body: clamp(1rem, 0.98rem + 0.1vw, 1.0625rem);
  --type-small: clamp(0.875rem, 0.85rem + 0.12vw, 0.95rem);
  --space-section: clamp(4.5rem, 3.29rem + 6.03vw, 7.5rem);
  --space-section-tight: clamp(3.75rem, 3rem + 3.75vw, 5.75rem);
  --space-heading: clamp(1.875rem, 1.55rem + 1.63vw, 2.875rem);
  --space-gutter: clamp(1.125rem, 0.68rem + 2.2vw, 2.5rem);
  --space-grid: clamp(1rem, 0.76rem + 1.18vw, 1.75rem);
  --space-card: clamp(1.5rem, 1.18rem + 1.6vw, 2.5rem);
  --container: 1366px;
}

html {
  scroll-padding-top: 88px;
}

body {
  font-size: var(--type-body);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: normal;
  text-wrap: balance;
}

h1 {
  font-size: var(--type-h1);
}

h2,
.section-heading h2 {
  font-size: var(--type-h2);
}

h3 {
  font-size: var(--type-h3);
}

p {
  text-wrap: pretty;
}

.container,
.projects-hero__inner,
.services-hero__inner,
.about-hero__inner,
.contact-hero__inner {
  width: min(calc(100% - (2 * var(--space-gutter))), var(--container));
  margin-inline: auto;
}

.section,
.home-method {
  padding-block: var(--space-section);
}

.section-heading,
.home-method .section-heading,
.home-projects .projects-head,
.clients-head {
  margin-bottom: var(--space-heading);
}

.section-heading h2,
.home-method .section-heading h2,
.home-projects .section-heading h2,
.clients-head .section-heading h2 {
  max-width: 20ch;
}

.section-heading p:not(.eyebrow) {
  max-width: 68ch;
  font-size: var(--type-body-lg);
}

.button,
.nav-toggle,
.clients-control,
.hero-slider__arrow,
.service-sector-tab,
.projects-filter button,
.contact-social__links a {
  min-block-size: 44px;
}

.site-nav a,
.site-footer a,
.contact-channel__links a,
.contact-channel__email,
.projects-gallery-card__action,
.text-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
}

.brand {
  min-block-size: 44px;
}

.hero-slider__dot {
  position: relative;
  width: 44px;
  min-width: 44px;
  height: 44px;
  background: transparent;
}

.hero-slider__dot::after {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  content: "";
  transform: translateY(-50%);
  transition: background-color 220ms ease, transform 220ms ease;
}

.hero-slider__dot.is-active {
  width: 58px;
  min-width: 58px;
  background: transparent;
}

.hero-slider__dot.is-active::after {
  background: var(--color-accent);
  transform: translateY(-50%) scaleY(1.25);
}

/* Home */
.hero--editorial .hero__content h1 {
  max-width: 16ch;
  font-size: var(--type-display);
}

.hero--editorial .hero__content p:not(.eyebrow) {
  max-width: 64ch;
  font-size: var(--type-body-lg);
}

.home-solutions .solution-copy h3 {
  max-width: 17ch;
  font-size: clamp(1.85rem, 1.42rem + 2.14vw, 3.25rem);
}

.home-method__grid {
  gap: var(--space-grid);
}

.home-method__card {
  min-width: 0;
  padding: var(--space-card);
}

.home-projects .section-heading h2,
.home-contact h2 {
  max-width: 20ch;
  font-size: var(--type-h2);
}

.home-projects .project-card h3,
.projects-gallery-card h3 {
  font-size: var(--type-card);
}

/* Nosotros */
.about-hero__content h1,
.about-intro__copy h2,
.about-team__copy h2 {
  max-width: 18ch;
}

.about-purpose__content h2 {
  max-width: 18ch;
  font-size: var(--type-h2);
}

.about-direction__grid,
.about-values__grid {
  gap: var(--space-grid);
}

.about-direction__panel,
.about-value-card {
  min-width: 0;
}

.about-team__lead,
.about-team__columns p,
.about-intro__copy > p:not(.eyebrow),
.about-purpose__content > p:not(.eyebrow) {
  max-width: 68ch;
}

/* Servicios */
.services-hero__content h1 {
  max-width: 16ch;
  font-size: var(--type-h1);
}

.services-catalog__head,
.services-sectors__head {
  gap: var(--space-grid);
}

.services-catalog__head .section-heading h2,
.services-sectors__head .section-heading h2 {
  max-width: 20ch;
}

.services-catalog__grid,
.service-process__grid {
  gap: var(--space-grid);
}

.service-card,
.service-process__step,
.service-sector-panel__content {
  min-width: 0;
}

.service-card strong {
  max-width: 20ch;
  overflow-wrap: normal;
  font-size: var(--type-card);
}

.service-process__step h3,
.service-sector-panel h3 {
  overflow-wrap: normal;
}

/* Projects */
.projects-hero__content h1 {
  max-width: 16ch;
  font-size: var(--type-h1);
}

.projects-gallery__head h2 {
  max-width: 22ch;
}

.projects-filter {
  scroll-padding-inline: var(--space-gutter);
  scroll-snap-type: inline proximity;
}

.projects-filter button {
  scroll-snap-align: start;
}

.projects-gallery-card__link {
  min-height: clamp(27.5rem, 35vw, 33.75rem);
}

.projects-gallery-card__body {
  min-width: 0;
}

.projects-gallery-card__action {
  width: 100%;
  overflow-wrap: anywhere;
}

/* Project detail */
.detail-hero {
  padding-block: var(--space-section-tight);
}

.detail-hero__grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(28rem, 1.1fr);
  gap: clamp(2rem, 4.5vw, 4.5rem);
}

.detail-hero h1 {
  max-width: 15ch;
  margin-top: 1rem;
  font-size: var(--type-h1);
  text-wrap: balance;
}

.detail-hero p:not(.eyebrow) {
  max-width: 58ch;
  font-size: var(--type-body-lg);
}

.detail-hero img {
  height: clamp(22rem, 38vw, 32rem);
}

.split {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.split h2,
.cta-band h2 {
  max-width: 18ch;
  font-size: var(--type-h2);
}

.rich-text {
  min-width: 0;
}

.rich-text p,
.rich-text li {
  max-width: 68ch;
  font-size: var(--type-body);
}

.gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-grid);
}

.gallery__item {
  min-block-size: 44px;
}

.gallery__item img {
  height: clamp(14rem, 20vw, 18rem);
}

.gallery-modal {
  padding: var(--space-gutter);
}

.gallery-modal img {
  max-width: min(100%, 80rem);
  max-height: calc(100dvh - 2 * var(--space-gutter));
}

/* Contact */
.contact-hero__content h1,
.contact-office__details h2,
.contact-careers__grid h2 {
  max-width: 18ch;
  font-size: var(--type-h1);
}

.contact-channels__head h2,
.contact-social__inner h2 {
  font-size: var(--type-h2);
}

.contact-channel {
  padding: var(--space-card);
}

.contact-careers__email,
.contact-office__list a,
.site-footer p {
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  :root {
    --space-section: clamp(4.25rem, 2.9rem + 4.2vw, 5.75rem);
  }

  .hero--editorial .hero__content h1,
  .services-hero__content h1,
  .projects-hero__content h1,
  .contact-hero__content h1 {
    max-width: 17ch;
  }

  .solution-console {
    min-height: 0;
  }

  .solution-tabs {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: inline proximity;
    scrollbar-width: thin;
  }

  .solution-tab {
    flex: 0 0 auto;
    min-width: 180px;
    scroll-snap-align: start;
  }

  .home-solutions .solution-stage,
  .home-solutions .solution-panel,
  .home-solutions .solution-panel figure {
    min-height: clamp(31rem, 60vw, 39rem);
  }

  .about-intro__grid,
  .about-team__grid {
    gap: clamp(2rem, 5vw, 4rem);
  }

  .about-purpose__content h2 {
    max-width: 20ch;
  }

  .services-catalog__grid,
  .projects-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero__grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(22rem, 1.15fr);
    gap: clamp(2rem, 4vw, 3rem);
  }

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

  .service-card--6 {
    grid-column: auto;
  }

  .service-sector-panel {
    grid-template-columns: minmax(17rem, 0.75fr) minmax(0, 1.25fr);
  }

  .contact-channels__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-footer .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --type-display: clamp(2.45rem, 2.11rem + 1.7vw, 2.9rem);
    --type-h1: clamp(2.25rem, 1.97rem + 1.4vw, 2.65rem);
    --type-h2: clamp(1.9rem, 1.66rem + 1.2vw, 2.25rem);
    --type-h3: clamp(1.2rem, 1.12rem + 0.4vw, 1.35rem);
    --type-card: clamp(1.4rem, 1.25rem + 0.75vw, 1.65rem);
    --space-section: clamp(4rem, 3.45rem + 2.75vw, 4.75rem);
    --space-section-tight: clamp(3.5rem, 3.13rem + 1.85vw, 4rem);
    --space-heading: clamp(1.75rem, 1.57rem + 0.9vw, 2rem);
    --space-card: clamp(1.375rem, 1.1rem + 1.35vw, 1.75rem);
  }

  html {
    scroll-padding-top: 76px;
  }

  .site-header__inner {
    min-height: 72px;
  }

  .site-nav.is-open a {
    min-block-size: 52px;
  }

  .section-heading,
  .home-method .section-heading,
  .home-projects .projects-head,
  .clients-head {
    max-width: none;
  }

  .section-heading h2,
  .home-method .section-heading h2,
  .home-projects .section-heading h2,
  .clients-head .section-heading h2,
  .home-contact h2 {
    max-width: 18ch;
    font-size: var(--type-h2);
  }

  .hero--editorial .hero__grid,
  .about-hero__inner,
  .services-hero__inner,
  .projects-hero__inner,
  .contact-hero__inner {
    min-height: clamp(35rem, 84svh, 42rem);
    padding-top: clamp(6.5rem, 16vh, 8.5rem);
    padding-bottom: clamp(3.75rem, 8vh, 5rem);
  }

  .hero--editorial .hero__content h1,
  .about-hero__content h1,
  .services-hero__content h1,
  .projects-hero__content h1,
  .contact-hero__content h1 {
    max-width: 16ch;
    font-size: var(--type-h1);
    line-height: 1.02;
  }

  .hero--editorial .hero__content p:not(.eyebrow),
  .about-hero__content > p:not(.eyebrow),
  .services-hero__content > p:not(.eyebrow),
  .projects-hero__content > p:not(.eyebrow),
  .contact-hero__content > p:not(.eyebrow) {
    max-width: 38ch;
    font-size: 1rem;
  }

  .hero__actions,
  .contact-hero__actions {
    gap: 0.75rem;
  }

  .hero-slider__controls {
    gap: 0.75rem;
  }

  .solution-tabs {
    display: flex;
    width: calc(100% + var(--space-gutter));
    margin-right: calc(-1 * var(--space-gutter));
    padding-right: var(--space-gutter);
    overflow-x: auto;
    scroll-padding-inline: var(--space-gutter);
  }

  .solution-tab {
    flex: 0 0 min(72vw, 17rem);
    min-height: 58px;
    padding-inline: 1.125rem;
    overflow-wrap: normal;
  }

  .home-solutions .solution-stage,
  .home-solutions .solution-panel,
  .home-solutions .solution-panel figure {
    min-height: 0;
  }

  .home-solutions .solution-panel {
    grid-template-rows: auto clamp(14rem, 62vw, 18rem);
  }

  .home-solutions .solution-copy {
    padding: var(--space-card);
  }

  .home-solutions .solution-copy h3 {
    max-width: 18ch;
    font-size: clamp(1.8rem, 1.46rem + 1.7vw, 2.25rem);
  }

  .home-method__grid,
  .about-values__grid,
  .service-process__grid,
  .projects-gallery__grid,
  .home-footer .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .home-method__card {
    min-height: 0;
  }

  .home-projects .project-card,
  .home-projects .project-card:not(:first-child) {
    min-height: clamp(21rem, 105vw, 28rem);
  }

  .home-contact__actions .button,
  .contact-careers__content .button {
    width: 100%;
  }

  .about-intro__grid,
  .about-purpose__grid,
  .about-direction__grid,
  .about-team__grid,
  .detail-hero__grid,
  .split,
  .contact-careers__grid,
  .contact-social__inner {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding-block: var(--space-section-tight);
  }

  .detail-hero h1 {
    max-width: 17ch;
    font-size: var(--type-h1);
  }

  .detail-hero img {
    height: clamp(17rem, 72vw, 23rem);
  }

  .detail-hero__meta {
    flex-wrap: wrap;
  }

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

  .gallery__item img {
    height: clamp(15rem, 68vw, 20rem);
  }

  .cta-band__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-intro__copy,
  .about-team__copy {
    padding: 0;
  }

  .about-purpose__content h2,
  .about-team__copy h2,
  .about-intro__copy h2,
  .contact-careers__grid h2,
  .contact-office__details h2 {
    max-width: 18ch;
    font-size: var(--type-h2);
  }

  .services-catalog__head,
  .services-sectors__head,
  .projects-gallery__head {
    grid-template-columns: 1fr;
  }

  .services-catalog__head > p,
  .services-sectors__head > p {
    max-width: 40ch;
    margin: 0;
  }

  .services-catalog__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: clamp(20rem, 102vw, 25rem);
  }

  .service-card--1,
  .service-card--2,
  .service-card--3,
  .service-card--4,
  .service-card--5,
  .service-card--6 {
    grid-column: auto;
  }

  .service-card strong {
    max-width: 18ch;
    font-size: var(--type-card);
  }

  .service-process__step {
    min-height: 0;
  }

  .service-sector-tabs {
    scroll-snap-type: inline proximity;
  }

  .service-sector-tab {
    flex-basis: min(72vw, 13rem);
    scroll-snap-align: start;
  }

  .service-sector-panel {
    grid-template-columns: 1fr;
  }

  .service-sector-panel figure {
    height: clamp(15rem, 72vw, 20rem);
  }

  .service-sector-panel h3 {
    max-width: 19ch;
    padding-right: 2rem;
    font-size: clamp(1.7rem, 1.38rem + 1.6vw, 2.1rem);
  }

  .service-sector-panel__lists {
    grid-template-columns: 1fr;
  }

  .projects-gallery__head h2 {
    max-width: 20ch;
  }

  .projects-gallery__count {
    justify-self: end;
    text-align: right;
  }

  .projects-filter {
    width: calc(100% + var(--space-gutter));
    margin-right: calc(-1 * var(--space-gutter));
    padding-right: var(--space-gutter);
  }

  .projects-gallery-card__link {
    min-height: clamp(25rem, 122vw, 31rem);
  }

  .projects-gallery-card__body {
    padding: var(--space-card);
  }

  .contact-channels__grid {
    grid-template-columns: 1fr;
  }

  .contact-channel,
  .contact-channel:nth-child(2),
  .contact-channel:last-child {
    min-height: 0;
  }

  .contact-office__grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .contact-map,
  .contact-map__frame {
    min-height: clamp(22rem, 105vw, 29rem);
  }

  .contact-social__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  :root {
    --type-display: clamp(2.3rem, 1.82rem + 2.4vw, 2.55rem);
    --type-h1: clamp(2.15rem, 1.86rem + 1.45vw, 2.3rem);
    --type-h2: clamp(1.8rem, 1.61rem + 0.95vw, 1.95rem);
    --space-gutter: clamp(1rem, 0.71rem + 1.45vw, 1.125rem);
  }

  .brand img {
    width: min(10.25rem, 52vw);
  }

  .hero--editorial .hero__content h1,
  .about-hero__content h1,
  .services-hero__content h1,
  .projects-hero__content h1,
  .contact-hero__content h1 {
    max-width: none;
  }

  .hero__actions,
  .contact-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero__actions .button,
  .contact-hero__actions .button {
    width: 100%;
  }

  .hero-slider__controls {
    justify-content: flex-end;
  }

  .hero-slider__dots {
    gap: 0;
  }

  .hero-slider__dot {
    width: 38px;
    min-width: 38px;
  }

  .hero-slider__dot.is-active {
    width: 48px;
    min-width: 48px;
  }

  .clients-head {
    align-items: end;
  }

  .clients-controls {
    flex: 0 0 auto;
  }

  .about-direction__panel,
  .about-value-card,
  .service-process__step,
  .contact-channel {
    padding: 1.375rem;
  }

  .about-team__columns,
  .about-team__careers,
  .contact-office__list > div,
  .contact-social__links {
    grid-template-columns: 1fr;
  }

  .projects-gallery__head {
    gap: 1.125rem;
  }

  .projects-gallery__count {
    justify-self: end;
  }

  .projects-gallery-card__link {
    min-height: clamp(23rem, 126vw, 27rem);
  }

  .projects-gallery-card__action {
    gap: 1rem;
  }

  .contact-social__links a {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slider__dot::after {
    transition: none;
  }
}
