:root {
  --teal: #57b6b2;
  --ink: #244b5a;
  --ink-dark: #17323d;
  --muted: #66777d;
  --line: #d9e5e7;
  --paper: #f7faf9;
  --white: #ffffff;
  --yellow: #ffd44a;
  --coral: #f26d55;
  --lavender: #b49dcc;
  --shadow: 0 18px 48px rgba(23, 50, 61, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-dark);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

.page-top {
  display: block;
  height: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  align-items: center;
  background: rgba(247, 250, 249, 0.94);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: auto 1fr auto;
  min-height: 110px;
  padding: 18px clamp(18px, 4vw, 54px);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand img {
  height: 74px;
  width: auto;
}

.nav {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.nav a,
.footer a {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover,
.footer a:hover {
  color: var(--teal);
}

.language {
  align-items: center;
  border: 1px solid var(--line);
  display: inline-flex;
  padding: 3px;
}

.language__button,
.filter-button {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  min-height: 34px;
  padding: 0 10px;
}

.language__button.is-active,
.filter-button.is-active {
  background: var(--ink);
  color: var(--white);
}

.hero {
  background:
    linear-gradient(90deg, rgba(23, 50, 61, 0.94), rgba(36, 75, 90, 0.84)),
    url("../images/brand/motivo-esmart-colores.png") center / cover;
  color: var(--white);
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 320px);
  min-height: min(720px, calc(100vh - 76px));
  overflow: hidden;
  padding: clamp(64px, 10vw, 116px) clamp(22px, 6vw, 88px) clamp(58px, 8vw, 92px);
  position: relative;
}

.hero::after {
  background: var(--yellow);
  bottom: 0;
  content: "";
  height: 8px;
  left: clamp(22px, 6vw, 88px);
  position: absolute;
  width: min(250px, 48vw);
}

.hero__content {
  align-self: end;
  max-width: 880px;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.9rem, 8vw, 7.2rem);
  line-height: 0.95;
  margin: 0;
  max-width: 980px;
}

.hero__lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.1rem, 2.1vw, 1.55rem);
  margin: 28px 0 0;
  max-width: 720px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  align-items: center;
  border: 2px solid transparent;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  text-decoration: none;
}

.button--primary {
  background: var(--teal);
  color: var(--ink-dark);
}

.button--secondary {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.hero__mark {
  align-self: center;
  justify-self: end;
  opacity: 0.46;
  width: min(32vw, 250px);
}

.stats {
  background: var(--ink);
  color: var(--white);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 clamp(22px, 6vw, 88px);
}

.stats div {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  padding: 24px 24px 26px;
}

.stats div:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.stats strong {
  color: var(--teal);
  display: block;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.stats span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.section {
  padding: clamp(62px, 9vw, 112px) clamp(22px, 6vw, 88px);
}

.section__heading {
  margin-bottom: 34px;
  max-width: 780px;
}

.section__heading h2,
.section--split h2 {
  color: var(--ink-dark);
  font-size: clamp(2rem, 4vw, 4.3rem);
  line-height: 1.02;
  margin: 0;
}

.section__heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 18px 0 0;
}

.section__lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 18px 0 0;
  max-width: 520px;
}

.section--intro {
  background: var(--white);
}

.text-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.text-grid article,
.output-list article {
  border-top: 4px solid var(--teal);
  background: var(--paper);
  padding: 24px;
}

.text-grid h3,
.output-list h3 {
  color: var(--ink);
  font-size: 1.28rem;
  margin: 0 0 12px;
}

.text-grid p,
.output-list p {
  color: var(--muted);
  margin: 0;
}

.group-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.group-card,
.member-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 26px rgba(23, 50, 61, 0.06);
}

.group-card {
  border-top: 5px solid var(--group-color, var(--teal));
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 22px;
}

.group-card__logo {
  align-items: center;
  display: flex;
  height: 58px;
  margin-bottom: 24px;
}

.group-card__logo img {
  max-height: 54px;
  max-width: 170px;
}

.group-card h3 {
  color: var(--ink-dark);
  font-size: 1.25rem;
  line-height: 1.15;
  margin: 0 0 12px;
}

.group-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.group-card__meta {
  color: var(--group-color, var(--ink));
  font-size: 0.86rem;
  font-weight: 800;
  margin-top: auto;
  padding-top: 22px;
}

.section--pattern {
  background:
    linear-gradient(rgba(23, 50, 61, 0.9), rgba(23, 50, 61, 0.9)),
    url("../images/brand/motivo-esmart-colores.png") center / cover;
}

.section__heading--light h2 {
  color: var(--white);
}

.value-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  max-width: 980px;
  padding: 0;
}

.value-list li {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-weight: 700;
  padding: 10px 14px;
}

.team-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.team-toolbar .filter-button {
  border-color: color-mix(in srgb, var(--group-color, var(--line)) 35%, white);
}

.team-toolbar .filter-button.is-active {
  background: var(--group-color, var(--ink));
  border-color: var(--group-color, var(--ink));
}

.filter-button {
  border: 1px solid var(--line);
  min-height: 38px;
  padding: 0 14px;
}

.team-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.member-card {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color, var(--teal)) 8%, white), transparent 34%);
  border-left: 4px solid color-mix(in srgb, var(--group-color, var(--teal)) 72%, white);
  color: inherit;
  display: grid;
  gap: 14px;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 130px;
  overflow: hidden;
  padding: 14px;
  text-decoration: none;
}

.member-card:hover {
  border-color: color-mix(in srgb, var(--group-color, var(--teal)) 55%, white);
  border-left-color: var(--group-color, var(--teal));
  box-shadow: var(--shadow);
}

.member-card__photo,
.member-card__initials {
  aspect-ratio: 4 / 5;
  background: color-mix(in srgb, var(--group-color, var(--teal)) 12%, white);
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--group-color, var(--teal)) 24%, white);
  height: 90px;
  overflow: hidden;
  width: 72px;
}

.member-card__photo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.member-card__initials {
  align-items: center;
  background: color-mix(in srgb, var(--group-color, var(--teal)) 14%, var(--ink));
  color: var(--white);
  display: flex;
  font-size: 1.1rem;
  font-weight: 900;
  justify-content: center;
}

.member-card h3 {
  color: var(--ink-dark);
  font-size: 1.02rem;
  line-height: 1.18;
  margin: 2px 0 8px;
}

.member-card p {
  color: color-mix(in srgb, var(--group-color, var(--ink)) 58%, var(--muted));
  font-size: 0.86rem;
  font-weight: 700;
  margin: 0;
}

.member-card__role {
  color: var(--coral);
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.member-card__link {
  color: color-mix(in srgb, var(--group-color, var(--ink)) 56%, var(--ink));
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 10px;
}

.section--split {
  background: var(--white);
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.production-panel {
  display: grid;
  gap: 18px;
}

.production-counts {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.production-count {
  background: var(--paper);
  border-top: 4px solid var(--teal);
  padding: 18px;
}

.production-count strong {
  color: var(--ink);
  display: block;
  font-size: 2.2rem;
  line-height: 1;
}

.production-count span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.production-toolbar {
  display: grid;
  gap: 10px;
}

.production-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.production-toolbar__row--groups .filter-button.is-active {
  background: var(--group-color, var(--ink));
  border-color: var(--group-color, var(--ink));
  color: var(--white);
}

.production-toolbar__row--groups .filter-button:not(.is-active) {
  border-color: color-mix(in srgb, var(--group-color, var(--line)) 45%, white);
}

.production-list {
  display: grid;
  gap: 10px;
  max-height: 760px;
  overflow: auto;
  padding-right: 6px;
}

.production-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 16px;
}

.production-item__meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.production-item__group {
  background: color-mix(in srgb, var(--group-color) 16%, white);
  border: 1px solid color-mix(in srgb, var(--group-color) 45%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--group-color) 70%, black);
  padding: 3px 8px;
}

.production-item h3 {
  color: var(--ink-dark);
  font-size: 1rem;
  line-height: 1.25;
  margin: 0;
}

.production-item p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.production-item__authors {
  color: var(--ink) !important;
  font-weight: 700;
}

.production-item a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.production-item a:hover {
  color: var(--teal);
}

.contact {
  background: var(--paper);
}

.contact-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
}

address {
  background: var(--ink);
  color: var(--white);
  display: grid;
  font-style: normal;
  gap: 8px;
  padding: 28px;
}

address strong {
  color: var(--teal);
  font-size: 1.2rem;
}

address a {
  color: var(--white);
  font-weight: 800;
  margin-top: 8px;
  text-decoration: none;
}

address a:hover {
  color: var(--teal);
}

.role-list {
  display: grid;
  gap: 12px;
}

.role-card {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-dark);
  display: grid;
  gap: 7px;
  padding: 20px;
}

.role-card:hover {
  border-color: var(--teal);
}

.role-list span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.role-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 4px;
}

.role-card__links a {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.role-card__links a:hover {
  color: var(--teal);
}

.footer {
  align-items: center;
  background: var(--ink-dark);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  padding: 24px clamp(22px, 6vw, 88px);
}

.footer img {
  height: 52px;
  width: auto;
}

.footer a {
  color: var(--white);
}

@media (max-width: 1180px) {
  .group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 880px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__mark {
    display: none;
  }

  .stats,
  .text-grid,
  .section--split,
  .contact-grid,
  .production-counts {
    grid-template-columns: 1fr;
  }

  .stats div,
  .stats div:last-child {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

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

@media (max-width: 620px) {
  .site-header {
    padding: 12px 16px;
  }

  .brand img {
    height: 52px;
  }

  .nav {
    gap: 14px;
  }

  .hero,
  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .group-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .member-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .member-card__photo,
  .member-card__initials {
    height: 80px;
    width: 64px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
}
