/*
 * Layout: page-level structure — header, footer, section rhythm and the
 * per-section grids. Reusable widgets live in components.css.
 */

/* ============================ HEADER ============================ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.header.is-stuck {
  border-bottom-color: var(--color-line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

.header__logo {
  display: inline-flex;
  flex: 0 0 auto;
}

.header__logo img {
  height: 34px;
  width: auto;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ============================ HERO ============================ */
.hero {
  padding-top: 7px;
}

.hero__frame {
  position: relative;
}

/* Wraps the image + title so the title centres on the image, not the whole
   frame (which also holds the promo card, stacked below on mobile). */
.hero__media {
  position: relative;
}

.hero__img {
  width: 100%;
  aspect-ratio: 1400 / 905;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt);
}

.hero__title {
  position: absolute;
  top: 50%;
  left: clamp(1.25rem, 3vw, 2.5rem);
  transform: translateY(-50%);
  margin: 0;
  color: var(--color-invert);
  font-size: var(--fs-h1);
  font-weight: var(--fw-regular);
  line-height: 0.86;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.28);
}

.hero__card {
  position: absolute;
  right: clamp(1rem, 2vw, 1.75rem);
  bottom: clamp(1rem, 2vw, 1.75rem);
  width: min(300px, 70%);
}

/* ============================ SECTION HELPERS ============================ */
.display-word {
  margin: 0;
  font-size: var(--fs-display);
  font-weight: var(--fw-regular);
  line-height: 0.95;
  text-align: center;
  letter-spacing: -0.02em;
  color: #a9b3b3; /* fallback if background-clip:text is unsupported */
  background: var(--gradient-display);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

/* ============================ TALENTO ============================ */
.talento {
  position: relative;
  overflow: hidden; /* clip the decorative glow that bleeds past the right edge */
}

/* Soft mint blur that trails off the right side, behind the cards. */
.talento__glow {
  position: absolute;
  z-index: 0;
  top: 32%;
  right: -6%;
  width: min(70%, 900px);
  aspect-ratio: 1160 / 665; /* SVG has no intrinsic size (100% w/h), so reserve it here */
  height: auto;
  pointer-events: none;
  user-select: none;
}

.talento .container {
  position: relative;
  z-index: 1;
}

.talento__intro {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: var(--space-5);
  margin-bottom: var(--section-gap); /* match the section's top padding */
}

.talento__lead {
  max-width: 46rem;
  font-size: var(--fs-lead);
  color: var(--color-text);
}

/* Full-bleed joined photo strip: total width exceeds the viewport, centred so
   the edge images bleed off, with a horizontal mask fading both ends. */
.talento-strip {
  position: relative;
  z-index: 1;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%);
}

.cards-row {
  display: flex;
  justify-content: center;
  min-width: 100%;
}

.cards-row li {
  flex: 0 0 24vw;
}

.cards-row__img {
  display: block;
  width: 100%;
  height: clamp(340px, 32vw, 500px);
  object-fit: cover;
  filter: grayscale(1);
  background: var(--color-surface-alt);
}

/* The centre image stays in colour. */
.cards-row__img--color {
  filter: none;
}

/* ============================ DESCUBRE ============================ */
.descubre {
  padding-top: 0;
}

.descubre__intro {
  text-align: left;
  display: grid;
  justify-items: start;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.descubre__intro .display-word {
  text-align: left;
}

.descubre__subtitle {
  font-size: var(--fs-h2);
  color: #8a9091; /* matches the dark stop of the display gradient */
  line-height: 0.86; /* ≈55px at the 64px desktop size, and scales on mobile */
  max-width: 16ch;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(var(--space-4), 2vw, var(--space-6));
}

/* Collaborators strip */
.collaborators {
  margin-top: var(--space-9);
  text-align: center;
}

.collaborators__title {
  color: var(--color-text-soft);
  font-size: var(--fs-lead);
  margin-bottom: var(--space-6);
}

.collaborators__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.collaborators__list img {
  height: clamp(28px, 3vw, 44px);
  width: auto;
  filter: grayscale(1);
  opacity: 0.75;
}

/* ============================ CÁTEDRAS ============================ */
.catedras {
  padding-top: var(--space-6);
}

.catedras__title {
  text-align: right;
  color: var(--color-muted);
  line-height: 0.9;
  max-width: 34rem;
  margin-left: auto;
  margin-bottom: var(--space-7);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}

.catedras__carousel {
  --peek: clamp(1.25rem, 7vw, 7rem);
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--peek);
  padding-inline: var(--peek);
  padding-bottom: var(--space-3);
  scrollbar-width: none;
}

.catedras__carousel::-webkit-scrollbar {
  display: none;
}

.catedras__carousel .catedra-card {
  flex: 0 0 calc(100% - 2 * var(--peek));
  scroll-snap-align: start;
  transition: opacity var(--transition);
}

/* The two off-centre cards read as dimmed/hidden. */
.catedras__carousel .catedra-card:not(.is-active) {
  opacity: 0.4;
  cursor: pointer;
}

/* ============================ DESARROLLO ============================ */
.desarrollo {
  background: radial-gradient(90% 78% at 62% 76%, rgba(198, 231, 224, 0.55) 0%, rgba(210, 228, 236, 0.28) 42%, rgba(253, 253, 253, 0) 72%);
}

/* Two-column: text left, bleeding carousel right. */
.desarrollo__layout {
  display: grid;
  grid-template-columns: minmax(240px, 30%) 1fr;
  align-items: center;
  gap: clamp(var(--space-5), 4vw, var(--space-8));
  padding-left: var(--container-pad); /* right edge bleeds so the carousel runs off-screen */
}

.desarrollo__title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  line-height: 0.9;
  letter-spacing: -0.01em;
  color: #939b9c; /* fallback if background-clip:text is unsupported */
  background: linear-gradient(115deg, #939b9c 0%, #939b9c 38%, #d4dde3 74%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.desarrollo__title span {
  display: block;
}

.desarrollo__title span:nth-child(2) { padding-left: 1em; }
.desarrollo__title span:nth-child(3) { padding-left: 2em; }

.desarrollo__subtitle {
  margin-top: var(--space-6);
  font-size: var(--fs-lead);
  color: var(--color-text);
}

.desarrollo__text .btn {
  margin-top: var(--space-6);
}

.desarrollo__carousel {
  min-width: 0;
}

.feature-grid {
  display: flex;
  gap: clamp(var(--space-4), 2vw, var(--space-5));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-3);
  scrollbar-width: none;
}

.feature-grid::-webkit-scrollbar {
  display: none;
}

.feature {
  flex: 0 0 min(440px, 72%);
  scroll-snap-align: start;
}

.carousel-dots {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-line);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.carousel-dots button.is-active {
  background: var(--color-muted);
  transform: scale(1.1);
}

/* ============================ RAZÓN / CONSTRUYENDO ============================ */
.razon__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.razon__img {
  width: 100%;
  aspect-ratio: 1400 / 619;
  object-fit: cover;
  object-position: left center;
  background: var(--color-surface-alt);
}

.razon__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  text-align: right;
  padding: clamp(1.75rem, 4vw, 3.5rem);
}

.razon__title {
  max-width: 18ch;
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  color: var(--color-invert);
}

.razon__bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-5);
}

.razon__text {
  max-width: 34ch;
  color: var(--color-invert);
  font-size: var(--fs-body);
  opacity: 0.9;
}

/* ============================ TESTIMONIOS ============================ */
.testimonios {
  background: var(--gradient-dark);
  border-radius: var(--radius-lg);
  color: var(--color-on-dark);
  overflow: hidden;
}

.testimonios__head {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.testimonios__title {
  color: var(--color-on-dark);
}

.testimonios__head-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.testimonios__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonios__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full, 9999px);
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-on-dark, #ffffff);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
}

.testimonios__btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.testimonios__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.testimonios__footer {
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
}

.testi-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: var(--space-4);
  padding-inline: var(--container-pad);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.testi-grid::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.testi-card {
  scroll-snap-align: start;
}

/* ============================ NEWSLETTER ============================ */
.newsletter {
  padding-block: var(--space-6);
}

.newsletter__frame {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.newsletter__panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: clamp(1.75rem, 4vw, 3.5rem);
  background: linear-gradient(144deg, #d4dde3 34%, #fcfcfc 100%);
}

.newsletter__title {
  font-size: clamp(1.75rem, 3.4vw, 3rem);
  font-weight: var(--fw-regular);
  line-height: 1.02;
  color: #555758;
}

.newsletter__form {
  margin-top: auto;
  display: grid;
  gap: var(--space-4);
}

.newsletter__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
  background: var(--color-surface-alt);
}

/* ============================ FOOTER ============================ */
.site-footer {
  padding-block: var(--space-6) var(--space-6);
}

.site-footer__card {
  background: var(--color-footer);
  color: var(--color-invert);
  border-radius: var(--radius-card);
  padding: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: clamp(var(--space-6), 4vw, var(--space-9));
}

.site-footer__logo {
  height: 44px;
  width: auto;
  margin-bottom: var(--space-5);
}

.site-footer__about {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  opacity: 0.92;
  max-width: 34ch;
}

.site-footer__contact {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-5);
  font-style: normal;
  font-size: var(--fs-sm);
}

.site-footer__social-label {
  margin-top: var(--space-5);
  font-size: var(--fs-sm);
  opacity: 0.92;
}

.social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  color: var(--color-invert);
  transition: background var(--transition);
}

.social a:hover {
  background: rgba(255, 255, 255, 0.3);
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-6);
}

.footer-col h2 {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  color: var(--color-invert);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  display: grid;
  gap: var(--space-3);
}

.footer-col a {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.85);
}

.footer-col a:hover {
  color: var(--color-invert);
}

.site-footer__bar {
  margin-top: var(--space-3);
  background: var(--color-footer-bar);
  color: var(--color-on-dark-muted);
  border-radius: var(--radius-card);
  padding: var(--space-4) clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--fs-sm);
}

.site-footer__legal a {
  color: var(--color-on-dark-muted);
}

.site-footer__legal a:hover {
  color: var(--color-invert);
}
