/* Home — Dirección: Arquitectónica + Materialidad
   Capas, marcos, tipografía oversized, fotografía full-bleed.
   Concepto: “Transformamos espacios.” */

:root {
  --ink: #0e0f10;
  --ink-soft: #2c3034;
  --stone: #6a6f74;
  --line: #d9d6d0;
  --paper: #f1f0ec;
  --paper-deep: #e6e4df;
  --white: #ffffff;
  --accent: #9a1b24;
  --accent-hover: #7a151c;
  --frame: rgba(255, 255, 255, 0.28);
  --max-wide: 1400px;
  --header-h: 72px;
}

body.page-home {
  background: var(--paper);
}

/* Header integrado al hero (una sola composición) */
body.page-home .site-header {
  position: absolute;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
}

body.page-home .site-header.is-scrolled {
  position: fixed;
  background: rgba(241, 240, 236, 0.94);
  border-bottom-color: var(--line);
  backdrop-filter: blur(12px);
}

body.page-home .site-header:not(.is-scrolled) .brand-name,
body.page-home .site-header:not(.is-scrolled) .nav > a,
body.page-home .site-header:not(.is-scrolled) .nav-dropdown > button {
  color: #fff;
}

body.page-home .site-header:not(.is-scrolled) .brand-tag {
  color: rgba(255, 255, 255, 0.65);
}

/* Hamburguesa legible sobre el hero (evita blanco sobre blanco) */
body.page-home .site-header:not(.is-scrolled) .nav-toggle {
  background: rgba(14, 15, 16, 0.28);
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}

body.page-home .site-header:not(.is-scrolled) .nav-toggle span,
body.page-home .site-header:not(.is-scrolled) .nav-toggle span::before,
body.page-home .site-header:not(.is-scrolled) .nav-toggle span::after {
  background: #fff;
}

body.page-home .site-header:not(.is-scrolled) .mobile-nav.open {
  background:
    linear-gradient(180deg, rgba(14, 15, 16, 0.92) 0%, rgba(14, 15, 16, 0.96) 100%);
  border-top-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

body.page-home .site-header:not(.is-scrolled) .mobile-nav a:not(.btn),
body.page-home .site-header:not(.is-scrolled) .mobile-nav summary {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

body.page-home .site-header:not(.is-scrolled) .mobile-nav details a {
  color: rgba(255, 255, 255, 0.72);
}

body.page-home .site-header:not(.is-scrolled) .mobile-nav .btn-primary {
  background: #fff;
  color: var(--ink) !important;
  border-color: #fff;
}

body.page-home .site-header:not(.is-scrolled) .header-actions .btn-primary {
  background: #fff;
  color: var(--ink) !important;
}

body.page-home .site-header:not(.is-scrolled) .header-actions .btn-primary:hover {
  background: var(--paper);
  color: var(--ink) !important;
}

body.page-home main {
  padding-top: 0;
}

/* —— HERO —— */
.home-hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: grid;
  color: var(--white);
  overflow: clip;
}

.home-hero__stage {
  position: absolute;
  inset: 0;
}

.home-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transform: scale(1.02);
}

.home-hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      rgba(14, 15, 16, 0.78) 0%,
      rgba(14, 15, 16, 0.35) 42%,
      rgba(14, 15, 16, 0.15) 62%,
      rgba(14, 15, 16, 0.55) 100%
    ),
    linear-gradient(to top, rgba(14, 15, 16, 0.7) 0%, transparent 45%);
  pointer-events: none;
}

/* marco / materialidad: líneas tipo estructura */
.home-hero__frame {
  position: absolute;
  inset: 1.25rem;
  border: 1px solid var(--frame);
  pointer-events: none;
  z-index: 2;
}

.home-hero__content {
  position: relative;
  z-index: 3;
  align-self: end;
  width: min(100% - 2.5rem, 42rem);
  margin: 0 0 clamp(2.5rem, 6vh, 4.5rem) clamp(1.25rem, 4vw, 3.5rem);
  padding-top: calc(var(--header-h) + 2rem);
}

.home-hero__brand {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
  color: #fff;
}

.home-hero__brand span {
  color: #f0a8ad;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.home-hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
  max-width: 11ch;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

.home-hero__lead {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  max-width: 34rem;
  margin: 0 0 1.75rem;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-hero__actions .btn-primary {
  background: var(--white);
  color: var(--ink) !important;
}

.home-hero__actions .btn-primary:hover {
  background: var(--paper);
  color: var(--ink) !important;
}

.home-hero__actions .btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.home-hero__actions .btn-ghost:hover {
  background: #fff;
  color: var(--ink);
}

/* Costura / materialidad: franja de lona que corta el marco */
.home-hero__seam {
  position: absolute;
  z-index: 3;
  top: calc(var(--header-h) + 1.5rem);
  bottom: 1.25rem;
  right: clamp(1.25rem, 5vw, 3.25rem);
  width: min(18vw, 140px);
  border-left: 1px solid var(--frame);
  pointer-events: none;
}

.home-hero__material {
  position: absolute;
  z-index: 3;
  margin: 0;
  right: clamp(1.25rem, 5vw, 3.25rem);
  bottom: clamp(2rem, 5vh, 3.5rem);
  width: min(22vw, 168px);
  overflow: hidden;
}

.home-hero__material img {
  width: 100%;
  height: min(42vh, 340px);
  object-fit: cover;
  /* Crop extremo sobre la malla microperforada */
  object-position: 42% 62%;
  filter: contrast(1.08) saturate(0.9);
  outline: 1px solid var(--frame);
}

.home-hero__material figcaption {
  margin-top: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 959px) {
  .home-hero__seam,
  .home-hero__material {
    display: none !important;
  }

  .home-hero h1 {
    margin-bottom: 1rem;
  }
}

/* —— CASO EDITORIAL —— */
.home-case {
  display: grid;
  background: var(--ink);
  color: var(--white);
}

.home-case__media {
  position: relative;
  min-height: 52vh;
}

.home-case__media img {
  width: 100%;
  height: 100%;
  min-height: 52vh;
  object-fit: cover;
}

.home-case__body {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.home-case__kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e08a90;
  margin: 0;
  font-weight: 700;
}

.home-case h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  max-width: 14ch;
  margin: 0;
  color: #fff;
}

.home-case__meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1.25rem;
}

.home-case__meta li {
  display: grid;
  gap: 0.2rem;
}

.home-case__meta strong {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 650;
}

.home-case__meta span {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
}

.home-case__link {
  margin-top: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  align-self: start;
  padding-bottom: 0.15rem;
}

.home-case__link:hover {
  border-color: #fff;
}

@media (min-width: 900px) {
  .home-case {
    grid-template-columns: 1.35fr 0.85fr;
    min-height: 78vh;
  }

  .home-case__media {
    min-height: 100%;
  }

  .home-case__media img {
    min-height: 100%;
    position: absolute;
    inset: 0;
  }

  .home-case__body {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }

  .home-case__media {
    min-height: 88vh;
  }
}

/* —— ÍNDICE DE SOLUCIONES (no cards) —— */
.home-index {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background: var(--paper);
}

.home-index__head {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 2.5rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .home-index__head {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

.home-index__head h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 12ch;
  margin: 0;
}

.home-index__head p {
  margin: 0;
  color: var(--stone);
  max-width: 32rem;
}

.home-index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.home-index__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1.25rem;
  padding: 1.35rem clamp(1.25rem, 4vw, 0);
  width: min(100%, var(--max));
  margin-inline: auto;
  border-bottom: 1px solid var(--line);
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: background 0.25s ease;
}

.home-index__item:hover {
  background: var(--white);
}

.home-index__num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  line-height: 1.2;
  padding-top: 0.15rem;
}

.home-index__copy h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  margin: 0 0 0.35rem;
}

.home-index__copy p {
  margin: 0;
  color: var(--stone);
  max-width: 40rem;
  font-size: 0.98rem;
}

.home-index__thumb {
  display: none;
}

@media (min-width: 900px) {
  .home-index__item {
    grid-template-columns: 3.5rem 1fr;
    align-items: center;
    padding-block: 1.1rem;
  }

  .home-index__item:has(.home-index__thumb) {
    grid-template-columns: 3.5rem 1fr min(22vw, 260px);
  }

  .home-index__thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    opacity: 0.92;
  }
}

/* —— APLICACIONES band —— */
.home-apps {
  position: relative;
  color: var(--white);
  min-height: 70vh;
  display: grid;
  align-items: end;
}

.home-apps__bg {
  position: absolute;
  inset: 0;
}

.home-apps__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.home-apps__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(14, 15, 16, 0.88) 0%,
    rgba(14, 15, 16, 0.35) 55%,
    rgba(14, 15, 16, 0.2) 100%
  );
}

.home-apps__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.home-apps__inner h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 14ch;
  margin: 0 0 0.75rem;
  color: #fff;
}

.home-apps__inner > p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 28rem;
  margin: 0 0 2rem;
}

.home-apps__links {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.home-apps__links a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  color: #fff;
}

.home-apps__links a span {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  align-self: center;
}

.home-apps__links a:hover {
  color: #f0a8ad;
}

/* —— TRABAJOS mosaic —— */
.home-work {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background: var(--white);
}

.home-work__head {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.home-work__head h2 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  max-width: 12ch;
}

.home-work__head a {
  font-weight: 700;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--ink);
}

.home-work__mosaic {
  width: min(100%, var(--max-wide));
  margin: 0 auto;
  display: grid;
  gap: 0.5rem;
  padding: 0 clamp(0.5rem, 2vw, 1rem);
  grid-template-columns: 1fr 1fr;
}

.home-work__mosaic figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
}

.home-work__mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  transition:
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.55s ease;
}

.home-work__mosaic figure:hover img {
  transform: scale(1.08);
  filter: saturate(1.05) contrast(1.03);
}

.home-work__mosaic figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem;
  background: linear-gradient(transparent, rgba(14, 15, 16, 0.85));
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-work__mosaic .span-2 {
  grid-column: 1 / -1;
}

.home-work__mosaic .span-2 img {
  aspect-ratio: 16 / 9;
}

@media (min-width: 800px) {
  .home-work__mosaic {
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.65rem;
  }

  .home-work__mosaic .span-2 {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .home-work__mosaic .span-2 img {
    aspect-ratio: auto;
    min-height: 100%;
    height: 100%;
  }
}

.home-work__note {
  width: min(100% - 2.5rem, var(--max));
  margin: 1rem auto 0;
  font-size: 0.82rem;
  color: var(--stone);
}

/* —— POR QUÉ (typography strip) —— */
.home-why {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
}

.home-why__inner {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .home-why__inner {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
  }
}

.home-why h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  max-width: 11ch;
  margin: 0;
}

.home-why__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.home-why__points li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
}

.home-why__points li:last-child {
  border-bottom: 1px solid var(--line);
}

.home-why__points strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 550;
}

.home-why__points p {
  margin: 0;
  color: var(--stone);
  font-size: 0.95rem;
}

/* —— CTA —— */
.home-cta {
  padding: clamp(4rem, 10vw, 6.5rem) 0;
  background: var(--ink);
  color: #fff;
  text-align: left;
}

.home-cta__inner {
  width: min(100% - 2.5rem, 40rem);
  margin-inline: max(1.25rem, calc((100% - var(--max)) / 2));
  margin-right: auto;
}

.home-cta h2 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  color: #fff;
  max-width: 14ch;
  margin: 0 0 1rem;
}

.home-cta p {
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 1.75rem;
  max-width: 32rem;
}

.home-cta .btn-primary {
  background: #fff;
  color: var(--ink);
}

.home-cta .btn-primary:hover {
  background: var(--paper);
}

/* reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .home-hero__img,
  .home-work__mosaic img {
    transition: none;
  }
}

@media (max-width: 719px) {
  .home-hero__frame {
    inset: 0.75rem;
  }

  .home-hero__content {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
    width: auto;
  }

  .home-hero h1 {
    max-width: 12ch;
  }

  .home-hero__lead {
    font-size: 0.98rem;
  }

  .home-apps__links a {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}
