@layer global, component, utility;

@layer global {
  /* dm-sans-regular - latin */
  @font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400;
    src: url("..//dm-sans-v17-latin-regular.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
  }
  /* dm-sans-700 - latin */
  @font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 700;
    src: url("..//dm-sans-v17-latin-700.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
  }

  /* fonts */
  :root {
    --fs-14: calc(14 / 16 * 1rem);
    --fs-16: calc(16 / 16 * 1rem);
    --fs-24: calc(24 / 16 * 1rem);
    --fs-36: calc(36 / 16 * 1rem);
    --fs-42: calc(42 / 16 * 1rem);
    --fs-48: calc(48 / 16 * 1rem);
    --fs-72: calc(72 / 16 * 1rem);

    --font-size-topnav: var(--fs-14);
    --font-size-h1: var(--fs-42);
    --font-size-h2: var(--fs-36);
    --font-size-h3: var(--fs-24);

    @media (width <= calc(600 / 16 * 1rem)) {
      --font-size-h1: var(--fs-36);
      --font-size-h2: var(--fs-24);
      --font-size-topnav: var(--fs-16);
      --font-size-h1: var(--fs-72);
      --font-size-h2: var(--fs-48);
    }
  }

  /* colors */
  :root {
    --c-dark: hsl(0, 0%, 0%);
    --c-gray-light: var(--c-white);
    --c-gray-dark: hsl(233, 14%, 25%);
    --c-purple: hsl(232, 58%, 55%);
    --c-teal: hsl(180, 100%, 42%);
    --c-transparent: transparent;
    --c-magenta: hsl(320, 85%, 41%);

    --color-main-bg: var(--c-dark);
    --color-text-dark: var(--c-gray-dark);
    --color-text-light: var(--c-gray-light);
    --color-headder-bg: var(--c-purple);
    --color-hero-bg: var(--c-purple);
    --color-button-primary-bg: var(--c-teal);
    --color-button-primary-text: var(--c-gray-dark);
    --color-button-secondary-bg: var(--c-transparent);
    --color-button-secondary-border: var(--c-white);
    --color-button-secondary-text: var(--c-white);
    --color-fullwidth-bg: var(--c-magenta);
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  * {
    margin: 0;
  }
  html {
    scroll-behavior: smooth;
    scroll-behavior: 5rem;
  }

  body {
    font-family: "DM Sans", sans-serif;
    line-height: 1.3;
    color: #f8f5f0;
    background-color: #111111;
    padding-block-end: 50vh; /* TEMPORALY*/
  }

  h1,
  h2,
  h3 {
    line-height: 1.1;
  }

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

  h2 {
    font-size: var(--font-size-h2);
  }

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

  a {
    text-decoration: none;
  }

  img,
  picture,
  svg {
    max-width: 100%;
    height: auto;
    display: block;
  }

  .wrapper {
    width: min(calc(100% - 48px), calc(1200 / 16 * 1rem));
    margin-inline: auto;
  }

}

@layer component {
  .hero-image {
    width: 100%;
    aspect-ratio: 1366 / 768;
    min-height: 31.5rem;
    background-image: url("background.webp");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
  }

  .topnav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    & .topnav__wrapper {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    background-color: transparent;

    .topnav__homelink {
      &:hover {
        opacity: 0.7;
      }
    }

    .topnav__logo {
      width: calc(70 / 16 * 1rem);
    }

    .topnav__links {
      flex-wrap: wrap;
      display: flex;
      gap: 20px;
      list-style-type: none;
      padding: 0;
    }

    .topnav__item {
    }

    .topnav__link {
      display: block;
      padding-block: 15px;
      font-size: var(--fs-14);
      line-height: 1;
      font-family: "IBM _Plex_Sans", sans-serif;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: none;
      color: #f8f5f0;

      transition: color 0.25s ease;
    }

  }
  .topnav__link.active {
    font-family: "IBM _Plex_Sans", sans-serif;
    color: #d8b37a;
  }
  
  .topnav .topnav__link:hover, {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }
  
  .topnav .topnav__link:focus-visible {
    outline: 2px solid #d8b37a;
    text-underline-offset: 4px;
  }
}

@layer utility {
  .visually-hidden {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;

    &.skip:focus {
      left: 0;
      width: auto;
      height: auto;
      background: #fff;
      padding: 10px;
      border: 1px solid;
    }
  }
}

.topnav .topnav__link--quote {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 15px;
  transition: border-color 0.2s ease;
}

.topnav .topnav__link--quote:hover,
.topnav .topnav__link:focus-visible {
  border-color: #d8b37a;
}

.services {
  padding-block: 2rem 5rem; 
}

.services-grid {
  margin-top: 0;
}

.services-grid> .service-card__copy {
  padding: 0.5rem 0 0;
}

#services-title {
  max-width: 27ch;
  margin: 0;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.1em;
  text-align: left;
}

.services__eyebrow {
  color: #d8b37a;
  letter-spacing: 0.12em;
}

.services-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  gap: 2rem;
  align-items: start;
}

.services-feature__copy h1 {
  max-width: 30ch;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.11em;
  text-align: left;
}

@media (max-width: 48rem) {
  .services-feature {
    grid-template-columns: 1fr;
  }
}


.service-card {
  width: min(100%, 20rem);
  margin-left: auto;
  
  overflow: hidden;
  background: #181818;
  border: 1px solid rgb(216 179 122 / 30%);
}

.service-card__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.service-card h3 {
  color: #d8b37a;
  margin-bottom: 0.5rem;
}

.language-switch {
  display: flex;
  gap: 0.5rem;
}

.language-switch button {
  padding: 0.4rem 0.65rem;
  color: #f8f5f0;
  background: transparent;
  border: 1px solid #d8b37a;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  color: #111;
  background: #d8b37a;
}

/* Fuente que ya tienes en la carpeta Style */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./IBM_Plex_Sans/IBMPlexSans-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

#services-title {
  /* Scale the text while preserving the Figma proportions */
  font-size: clamp(18px, 2.5vw, 36px);
  width: 15.78em;
  max-width: 100%;
  min-width: 0;
  height: auto;

  margin: 0;
  padding: 0;

  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: normal;
  letter-spacing: 0.16em;

  color: #f8f5f0;
  text-align: left;
  text-transform: none;
  white-space: normal;
  overflow-wrap: break-word;
}

/* Photo size and crop */
img[src="./model editorial ph.jpg"],
img[src="model editorial ph.jpg"],
img[src="./model%20editorial%20ph.jpg"] {
  display: block;
  width: 100%;
  max-width: 28rem;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  margin-top: 0;
  border: 0;
  border-radius: 0;
}

/* Move the container upward */
.service-card:has(img[src*="model"]) {
  position: relative;
  top: -80px;
}

/* Allow the raised container to remain visible */
.service-card__media:has(.service-card img[src*="model"]) {
  overflow: visible;
}
/* Conserva el espacio que antes ocupaba el título */
.model-feature {
  padding-top: 1.65rem;
  overflow: visible;
  aspect-ratio: auto;
  height: auto;
}

/* Permite mostrar el título al lado de la foto */
.model-feature > .service-card {
  overflow: visible;
}

/* Modelos: dorado, vertical y centrado junto a la foto */
.model-feature .model-label {
  position: absolute;
  right: calc(100% + 1rem);
  top: 50%;

  margin: 0;
  padding: 0;
  width: max-content;

  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);

  font-family: "IBM Plex Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #d8b37a;
}

.model-caption {
  width: min(100%, 20rem);
  margin: 0.5rem 0 0 auto;

  position: relative;
  top: -80px;

  font-family: "IBM Plex Sans", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  color: #f8f5f0;
}
/* La posición se mantiene al cambiar el archivo de imagen. */
#talent-card {
  position: relative;
  top: -80px;
}

/* Modelos conserva el encuadre que ya te gustó. */
#talent-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  margin: 0;
}

/* Las otras fotos usan sus proporciones originales. */
#talent-image.is-natural {
  aspect-ratio: auto;
}

.talent-controls {
  position: relative;
  top: -80px;
  width: min(100%, 20rem);
  margin: 0.75rem 0 0 auto;

  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;

  color: #f8f5f0;
  font: 13px "IBM Plex Sans", sans-serif;
}

.talent-controls[hidden] {
  display: none;
}

.talent-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.65rem;

  border: 1px solid #d8b37a;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.talent-controls button:focus-visible {
  outline: 2px solid #f8f5f0;
  outline-offset: 3px;
}
/* Oculta flechas, contador y botón de reproducción. */
#talent-controls {
  display: none;
}

/* Transición suave del conjunto. */
#talent-card,
#talent-caption {
  transition: opacity 240ms ease-in-out;
}

#talent-card.is-changing,
#talent-caption.is-changing {
  opacity: 0;
}

/* Respeta la preferencia de movimiento reducido. */
@media (prefers-reduced-motion: reduce) {
  #talent-card,
  #talent-caption {
    transition: none;
  }
}
/* Fuente serif que acabas de agregar */
@font-face {
  font-family: "IBM Plex Serif";
  src: url("./IBM_Plex_Serif/IBMPlexSerif-Regular.ttf")
    format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Cambia únicamente la fuente de la frase introductoria */
#services-title {
  font-family: "IBM Plex Serif", Georgia, serif;
}

/* Referencia para colocar los iconos a la izquierda */
.services-grid > .service-card__copy {
  position: relative;
  min-height: 26rem;
}

.brand-values {
  position: absolute;
  top: 14rem;
  left: 0;

  width: min(100%, 18rem);
  margin: 0;
  padding: 0;
  list-style: none;

  display: grid;
  gap: 1rem;
}

.brand-values li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
}

.brand-values img {
  display: block;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.brand-values span {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f8f5f0;
}

/* En pantallas pequeñas, los elementos se acomodan en vertical */
@media (max-width: 48rem) {
  .brand-values {
    position: static;
    margin-top: 2.5rem;
  }

  .model-feature {
    padding-top: 2.5rem;
  }

  #talent-card,
  #talent-caption {
    top: 0;
  }
}