/* ============================================================================
   Es Bassol Nou — Home
   Calca el mockup (desktop + móvil). Mobile-first.
   Secciones: hero, intro, valores, "our projects" (terracota),
   proyecto destacado (Can Roig), CTA "let's talk" (azul).
   ========================================================================== */

/* ===========================================================================
   HEADER en Home — wordmark gigante (solo desktop)
   En móvil se mantiene el header estándar (MENU · logo · CONTACT US).
   ========================================================================== */
/* El título gigante se muestra solo en desktop; en móvil el header estándar. */
.home-title {
  display: none;
}

/* Home móvil: navegación superpuesta sobre la foto, sin el logo pequeño del
   header. El wordmark principal vive dentro del hero. */
@media (max-width: 63.99rem) {
  .home .site-header {
    position: absolute;
    inset: 0 0 auto;
    background: transparent;
    color: var(--c-cream);
  }

  .home .site-header__inner {
    max-width: none;
    padding: clamp(1.5rem, 5vw, 3rem) clamp(1.5rem, 8.5vw, 4.75rem);
  }

  .home .site-header .logo-wordmark {
    display: none;
  }

  .home .site-header__left {
    grid-column: 1;
  }

  .home .site-header__right {
    grid-column: 3;
  }

  .home .site-header__menu-btn,
  .home .site-header__contact {
    color: var(--c-cream);
    font-size: clamp(1rem, 3.1vw, 1.75rem);
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
  }
}

@media (min-width: 64rem) {
  .home .site-header__inner {
    display: block;
    /* el layout lo controla .home-title */
    max-width: none;
    /* a TODO el ancho como el mockup (escala con vw) */
    padding-inline: 0;
    /* el margen lateral es la 1ª columna de la rejilla */
    padding-block: calc(var(--space-l) + 0.5rem) var(--space-l);
    /* +8px arriba = altura del mockup */
  }

  /* Oculta los disparadores/logo móviles en desktop */
  .home .site-header__left,
  .home .site-header__right,
  .home .logo-wordmark {
    display: none;
  }

  /* Título + nav sobre la misma rejilla de 12 columnas (barras verticales).
     Palabras en la fila 1, enlaces en la fila 2, cada uno en su columna. */
  .home-title {
    display: block;
    width: 100%;
  }

  .home-title__wordmark {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.15em;
    padding: 0.9%;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 9.7vw;
    line-height: 0.78;
    letter-spacing: 0.068em;
    color: var(--text);
    padding-top: 1.1vw;
    padding-bottom: 0;
  }

  .home-title__word {
    display: block;
    white-space: nowrap;
  }

  .home-title__nav {
    display: grid;
    grid-template-columns: 2.1% 24.3% 14.6% 17.8% 16.0% 0.4% 13.1% 11.7%;
    align-items: baseline;
    margin-top: 1.4vw;
    margin-bottom: 1.4vw;
  }

  .home-title__nav a {
    grid-row: 1;
    justify-self: start;
    white-space: nowrap;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: clamp(1.25rem, 2.08vw, 4.4rem);
    /* escala en pantallas anchas */
    line-height: 1;
    letter-spacing: 0.01em;
    color: var(--text);
    transform: translate(var(--nav-offset-x, 0),
        var(--nav-offset-y, 0));
    transition: opacity var(--transition);
  }

  .home-title__nav a:hover {
    opacity: 0.55;
  }

  /* Posición individual de cada enlace.
     Modifica --nav-offset-x / --nav-offset-y para ajustar su posición sin
     alterar la rejilla del resto del menú. Se aceptan px, rem, vw, etc. */
  .home-title__nav-link--projects {
    grid-column: 2;
    --nav-offset-x: -0.9vw;
    --nav-offset-y: 0;
  }

  .home-title__nav-link--approach {
    grid-column: 3;
    --nav-offset-x: -0.2vw;
    --nav-offset-y: 0;
  }

  .home-title__nav-link--property {
    grid-column: 4;
    --nav-offset-x: -1.9vw;
    --nav-offset-y: 0;
  }

  .home-title__nav-link--services {
    grid-column: 5;
    --nav-offset-x: -2.6vw;
    --nav-offset-y: 0;
  }

  .home-title__nav-link--about {
    grid-column: 7;
    --nav-offset-x: 1.3vw;
    --nav-offset-y: 0;
  }

  .home-title__nav-link--contact {
    grid-column: 8;
    --nav-offset-x: 0.2vw;
    --nav-offset-y: 0;
  }
}

/* ===========================================================================
   HERO
   ========================================================================== */
.home-hero__media {
  position: relative;
  margin: 0;
  width: 100%;
  /* Misma altura editorial que el hero de Property Care. */
  height: 77.6vw;
  overflow: hidden;
}

.home-hero__media picture,
.home-hero__media picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* encuadra la parte superior como el mockup (la foto fuente es retrato;
     centrada mostraba de más el objeto borroso inferior) */
  object-position: center 20%;
}

.home-hero__caption {
  position: absolute;
  left: 50%;
  top: 48.8%;
  /* centro del caption como el mockup */
  transform: translate(-50%, -50%);
  width: 90%;
  text-align: center;
  font-family: var(--font-body);
  font-weight: var(--fw-light);
  /* 60pt @1920 como el mockup (escala con vw) */
  font-size: clamp(1.35rem, 3.13vw, 5rem);
  color: var(--c-cream);
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.02em;
}

.home-hero__caption-mobile,
.home-hero__mobile-brand {
  display: none;
}

.home-hero__logo,
.home-hero__caption-mobile {
  display: none;
}

/* Home móvil: hero compacto, logo blanco centrado y claim al pie. */
@media (max-width: 63.99rem) {
  .home-hero__media {
    height: 70vw;
  }

  .home-hero__media picture img {
    object-position: center 20%;
  }

  .home-hero__logo {
    display: block;
    position: absolute;
    z-index: 1;
    top: 43%;
    left: 50%;
    width: 52%;
    height: auto;
    transform: translate(-50%, -50%);
  }

  .home-hero__caption {
    top: auto;
    bottom: 6%;
    width: 86%;
    transform: translateX(-50%);
    font-size: clamp(0.8rem, 3.2vw, 1.2rem);
    line-height: 1.12;
  }

  .home-hero__caption-desktop {
    display: none;
  }

  .home-hero__caption-mobile {
    display: inline;
  }
}

/* ===========================================================================
   INTRO (sobre rejilla vertical)
   ========================================================================== */
/* Intro a ancho completo, calcado del mockup: dos columnas 2.1%→96%,
   fuente 48pt (2.5vw @1920), interlineado 1.05, bloque derecho con offset. */
.home-intro {
  padding-block: clamp(2.5rem, 15.4vw, 20rem) clamp(2.5rem, 17.7vw, 22rem);
}

.home-intro>.container {
  max-width: none;
  padding-inline: 2.1%;
  /* margen lateral del mockup */
}

.home-intro__grid {
  display: grid;
  gap: var(--space-l);
}

.home-intro__lead {
  font-size: clamp(1.1rem, 2.5vw, 4rem);
  /* 48pt @1920 */
  line-height: 1.06;
  max-width: none;
}

@media (min-width: 48rem) {
  .home-intro__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 6%;
  }

  /* los saltos (.brk) definen el partido exacto; nowrap evita el re-envuelto
     de la línea más ancha (el mínimo excedente cae en el hueco entre columnas) */
  .home-intro__lead {
    white-space: nowrap;
  }

  .home-intro__lead--right {
    margin-top: 10.8vw;
    /* bloque derecho 207px más abajo @1920 */
  }
}

/* Saltos de línea que replican el partido EXACTO del mockup en desktop.
   En móvil se desactivan y el texto fluye natural (responsive). */
@media (max-width: 47.99rem) {
  .home-intro {
    padding-block: 3.5rem;
    background: var(--c-cream);
  }

  .home-intro>.container {
    padding-inline: 1.25rem;
  }

  .home-intro__grid {
    display: grid;
    gap: 0;
  }

  .home-intro__lead {
    width: 74%;
    margin-inline: auto;
    font-size: clamp(1.05rem, 4.4vw, 1.2rem);
    line-height: 1.25;
    text-align: center;
  }

  .home-intro__lead:first-child {
    order: 1;
  }

  .home-intro__lead--right {
    order: 4;
    margin-top: 2.5rem;
  }

  br.brk {
    display: none;
  }
}

/* ===========================================================================
   VALORES (bloque sand, como el mockup)
   ========================================================================== */
.home-values {
  background: var(--c-sand);
  overflow-x: clip;
  /* padding del mockup: 226px arriba, 258px abajo @1920 (escala con vw) */
  padding-block: clamp(2rem, 11.8vw, 15rem) clamp(2rem, 13.4vw, 17rem);
}

.home-values>.container {
  max-width: none;
  padding-inline: 2.1%;
}

.home-values__grid {
  display: grid;
  gap: var(--space-2xl);
}

.home-values__list {
  display: grid;
  gap: clamp(2rem, 4.7vw, 7rem);
}

.value h3 {
  font-size: clamp(2rem, 4.0vw, 7.5rem);
  /* ajuste del compañero */
  line-height: 0.95;
  margin-bottom: clamp(0.6rem, 1vw, 3rem);
}

.value p {
  font-size: clamp(1rem, 1.41vw, 2.6rem);
  /* ajuste del compañero */
  line-height: 1.16;
  color: var(--text);
}

@media (max-width: 63.99rem) {
  .home-values {
    background: var(--c-sand);
    padding-block: 3rem 4rem;
  }

  .home-values>.container {
    padding-inline: 1.25rem;
  }

  .home-values__grid {
    display: grid;
    gap: 0;
  }

  .home-values__list {
    display: contents;
  }

  .home-values__list .value {
    width: 90%;
    max-width: 31rem;
    margin: 0 auto;
    text-align: center;
  }

  .home-values__list .value:nth-child(1) {
    order: 5;
    margin-top: 2.5rem;
  }

  .home-values__list .value:nth-child(2) {
    order: 1;
  }

  .home-values__list .value:nth-child(3) {
    order: 2;
    margin-top: 2.5rem;
  }

  .home-values__list .value:nth-child(4) {
    order: 4;
    margin-top: 2.5rem;
  }

  .value h3 {
    margin-bottom: 0.75rem;
    font-size: clamp(2rem, 9.5vw, 2.75rem);
    line-height: 0.94;
  }

  .value p {
    max-width: 19rem;
    margin-inline: auto;
    font-size: clamp(0.95rem, 4.1vw, 1.1rem);
    line-height: 1.2;
  }

}

@media (min-width: 64rem) {
  .home-values__grid {
    display: block;
  }

  .value p {
    max-width: none;
  }

  .home-values .value:nth-child(2) p br.brk,
  .home-values .value:nth-child(3) p br.brk {
    display: none;
  }

  .home-values .value:nth-child(2) p {
    max-width: 38ch;
  }

  .home-values .value:nth-child(3) p {
    max-width: 43ch;
  }

  .home-values__list {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 4.7vw, 7rem);
    margin-top: 0;
  }

  .home-values__list .value {
    width: min(100%, 43vw);
    margin-top: 0;
    transform: translateX(5vw);
  }

  .home-values__list .value:nth-child(2) {
    transform: translateX(22.2vw);
  }

  .home-values__list .value:nth-child(3) {
    transform: translateX(45vw);
  }

  .home-values__list .value:nth-child(4) {
    transform: translateX(68.4vw);
  }
}

/* ===========================================================================
   OUR PROJECTS (banda terracota)
   ========================================================================== */
.home-projects-intro {
  background: var(--c-terracota);
  color: var(--c-ink);
  /* título + body OSCUROS como el PDF (#221f20) */
  text-align: center;
  /* padding del mockup: ~159px arriba, ~133px abajo @1920 */
  padding-block: clamp(3rem, 8.3vw, 11rem) clamp(3rem, 6.9vw, 9rem);
}

.home-projects-intro h2 {
  font-size: clamp(3rem, 9.375vw, 15rem);
  /* 180pt @1920, 2 líneas OUR/PROJECTS */
  line-height: 0.86;
}

/* el .section-lead genérico limita a 46rem; en Home el bloque va más ancho
   (como el PDF) para que el body se parta en las mismas líneas */
.home-projects-intro .section-lead {
  max-width: none;
}

.home-projects-intro p {
  font-size: clamp(1rem, 1.61vw, 2.6rem);
  /* 31pt @1920 */
  line-height: 1.11;
  /* ajuste del compañero */
  margin-inline: auto;
  margin-top: clamp(1.5rem, 3vw, 6rem) !important;
  /* ajuste del compañero */
  max-width: 90%;
}

.home-projects-intro .link-underline {
  display: inline-block;
  color: var(--c-cream);
  font-size: clamp(1.1rem, 2.04vw, 3.2rem);
  /* 39pt "View Projects" */
  margin-top: clamp(1.5rem, 6.3vw, 9rem);
  /* gap body→view ~138px */
}

@media (min-width: 48rem) {
  .home-projects-intro p {
    max-width: 43vw;
  }

  /* ancho del bloque del PDF (~42%) */
}

/* ===========================================================================
   PROYECTO DESTACADO dinámico: imagen + título enlazado
   ========================================================================== */
.home-featured {
  position: relative;
}

.home-featured__card {
  display: block;
  color: inherit;
  position: relative;
}

/* imagen full-bleed casi cuadrada como el mockup (1920x1780 @1920) */
.home-featured__media {
  aspect-ratio: 1920 / 1780;
  overflow: hidden;
  position: relative;
}

/* el <picture> también a 100% para que object-fit:cover rellene el marco
   (si no, la imagen se muestra a su alto natural y deja franja crema abajo) */
.home-featured__media picture,
.home-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.home-featured__name {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1rem, 2.25vw, 3rem);
  line-height: 0.98;
  position: absolute;
  z-index: 1;
  left: 50%;
  right: auto;
  bottom: 2.4vw;
  width: max-content;
  text-align: center;
  color: rgba(242, 239, 227, 0.9);
  text-decoration: none;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: color 350ms ease;
}

.home-featured[data-featured-contrast="backdrop"] .home-featured__media::after {
  background: linear-gradient(180deg, transparent 54%, rgba(19, 17, 12, 0.7) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.home-featured[data-featured-contrast="backdrop"] .home-featured__name,
.home-featured[data-featured-contrast="backdrop"] .home-featured__name:hover,
.home-featured[data-featured-contrast="backdrop"] .home-featured__name:focus-visible {
  color: var(--c-cream);
  text-shadow: 0 1px 12px rgba(19, 17, 12, 0.72);
}

.home-featured__name:hover,
.home-featured__name:focus-visible {
  color: var(--c-terracota);
}

@media (min-width: 48rem) {
  .home-cta .lets-talk {
    right: 11.7%;
    width: 11.8%;
  }

  .home-featured__name {
    left: 50%;
    bottom: 2.4vw;
  }
}

@media (max-width: 47.99rem) {
  .home-cta .lets-talk {
    right: 11.5%;
    width: 12.4%;
  }

  .home-featured__name {
    left: 50%;
    bottom: 4vw;
  }
}

/* ===========================================================================
   CTA "LET'S TALK" (banda azul)
   ========================================================================== */
/* banda azul con la ESPIRAL EN RELIEVE real del logo (imagen del cliente) */
.home-cta {
  background: var(--c-blue) url(/assets/img/home/cta-blue.jpeg) center / cover no-repeat;
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 10vw, 10rem);
}

.home-cta .container {
  display: flex;
  justify-content: center;
}

.home-cta .lets-talk {
  container-type: inline-size;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  background: var(--c-cream);
}

/* Tarjeta escalonada como el mockup: LET'S(11%) · TALK(27%) · ES/BASSOL(31%) ·
   NOU(der 87%) · flecha. Cada elemento a lo ancho de la tarjeta para los %. */
.home-cta .lets-talk__label {
  color: #7FA7B4;
  font-size: clamp(1.1rem, 1.93vw, 3.1rem);
  font-size: 15.5cqw;
  /* 37pt @1920 */
  line-height: 0.92;
  align-self: stretch;
}

.home-cta .lets-talk__label span {
  display: block;
}

.home-cta .lets-talk__label span:nth-child(1) {
  margin-left: 11%;
}

/* LET'S */
.home-cta .lets-talk__label span:nth-child(2) {
  margin-left: 27%;
}

/* TALK */
.home-cta .lets-talk__brand {
  font-size: clamp(1.1rem, 1.93vw, 3.1rem);
  font-size: 15.5cqw;
  /* 37pt @1920 */
  line-height: 0.92;
  margin-left: 31%;
  width: 56%;
  /* 31%..87% */
  text-align: left;
}

.home-cta .lets-talk__brand span:last-child {
  text-align: right;
}

/* NOU a la derecha */
.home-cta .lets-talk__arrow {
  width: clamp(0.7rem, 0.933vw, 1.55rem);
  width: 7.5cqw;
  /* flecha vectorial idéntica al PDF (17.91px @1920) */
  aspect-ratio: 17.91 / 13.74;
  background-color: var(--c-ink);
  -webkit-mask: url(/assets/icons/arrow-right.svg) center / contain no-repeat;
  mask: url(/assets/icons/arrow-right.svg) center / contain no-repeat;
  margin-left: 68%;
  /* centro ~72% del card, bajo NOU (como el PDF) */
  margin-top: 0.35em;
  /* algo más de hueco bajo NOU */
}

@media (min-width: 48rem) {

  /* banda azul 1120px @1920, tarjeta crema abajo-derecha (se funde con el footer) */
  .home-cta {
    min-height: 58.3vw;
    padding-block: 0;
  }

  .home-cta .container {
    display: block;
    max-width: none;
    padding: 0;
  }

  .home-cta .lets-talk {
    position: absolute;
    top: auto;
    bottom: 0;
    right: 11.7%;
    /* borde derecho a 87.4% (igual que el panel olivo) */
    width: 11.8%;
    min-width: 0;
    gap: 0;
    padding: 1.4vw 0;
  }
}

/* Por debajo de 768px conserva la tarjeta lateral del diseño desktop; la regla
   base móvil la centraba y provocaba el salto visible en el mockup. */
@media (max-width: 47.99rem) {
  .home-cta {
    min-height: 58.3vw;
    padding-block: 0;
  }

  .home-cta .container {
    display: block;
    max-width: none;
    padding: 0;
  }

  .home-cta .lets-talk {
    position: absolute;
    top: auto;
    right: 11.5%;
    bottom: 0;
    width: 12.4%;
    min-width: 0;
    gap: 0;
    padding: 0.5vw;
  }
}

@media (max-width: 63.99rem) {
  .home-cta {
    min-height: 75vw;
  }
}
