/* ==========================================================================
   La Estelar — Home
   Monochrome editorial. Photography carries the page; depth comes from
   overlap, shadow and fades, not color.
   Shape rule: buttons are pills, cards 20px, large media 28px.
   ========================================================================== */

.page-home{
  --h-card-r: 20px;
  --h-media-r: var(--radius-lg);
  --h-shadow: 0 40px 80px -40px rgba(0,0,0,.85), 0 12px 24px -12px rgba(0,0,0,.5);
  --h-ease: cubic-bezier(.16,1,.3,1);
}

/* Film grain: fixed, non-interactive, never repaints on scroll */
.page-home::after{
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page-home [data-reveal]{ transition-delay: calc(var(--i, 0) * 90ms); }

/* ==========================================================================
   Hero
   ========================================================================== */

.h-hero{
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-h) + var(--space-5));
  padding-bottom: var(--space-6);
  overflow: hidden;
}
.h-hero__bg{
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(55% 60% at 74% 44%, rgba(255,255,255,.075), transparent 70%),
    radial-gradient(35% 40% at 6% 100%, rgba(255,255,255,.03), transparent 70%);
}

.h-hero__grid{
  flex: 1;
  display: grid;
  align-items: center;
  gap: var(--space-7);
}

.h-hero .hero__eyebrow::before{
  width: 28px;
  height: 1px;
  border-radius: 0;
  background: currentColor;
}
/* "METODO, PRECISIÓN" is ~7.05em wide; scale keeps it on one line per column */
.h-hero .hero__title{
  font-size: min(11.6vw, 4rem);
  line-height: .92;
  margin-bottom: var(--space-5);
}
.h-hero .hero__lead{ margin-bottom: var(--space-6); }

/* Layered photography */
.h-hero__media{ position: relative; }
.h-hero__main,
.h-hero__inset{ margin: 0; overflow: hidden; }
.h-hero__main img,
.h-hero__inset img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  display: block;
}
.h-hero__pan{ width: 100%; height: 100%; }

.h-hero__stats{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 0;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
}
.h-hero__stats .stat{ padding-right: var(--space-7); }
.h-hero__stats .stat + .stat{
  padding-left: var(--space-7);
  border-left: 1px solid var(--line);
}

/* Desktop: text left, overlapping photos right */
@media (min-width: 960px){
  .h-hero__grid{ grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
  .h-hero .hero__title{ font-size: clamp(3.2rem, 5.6vw, 5rem); }
  .h-hero__media{
    height: clamp(460px, calc(100svh - 300px), 660px);
  }
  .h-hero__main{
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 78%;
    border-radius: var(--h-media-r);
    box-shadow: var(--h-shadow);
  }
  .h-hero__inset{
    position: absolute;
    left: 0;
    bottom: 7%;
    width: 40%;
    aspect-ratio: 4 / 5;
    border-radius: var(--h-card-r);
    border: 8px solid var(--bg);
    box-shadow: var(--h-shadow);
  }
}

/* Mobile / tablet: full-bleed photo behind, copy over its fade */
@media (max-width: 959px){
  .h-hero{ padding-top: calc(var(--header-h) + 38svh); }
  .h-hero__grid{ align-items: end; }
  .h-hero__media{
    position: absolute;
    inset: 0 0 auto 0;
    height: 72svh;
    z-index: -1;
  }
  .h-hero__main{ position: absolute; inset: 0; }
  .h-hero__main::after{
    content: '';
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to bottom, rgba(11,11,12,.55) 0%, rgba(11,11,12,0) 22%, rgba(11,11,12,0) 45%, var(--bg) 96%);
  }
  .h-hero__main img{ object-position: 50% 30%; }
  .h-hero__inset{ display: none; }
  .h-hero__stats .stat{ padding-right: var(--space-5); }
  .h-hero__stats .stat + .stat{ padding-left: var(--space-5); }
}
@media (max-width: 480px){
  .h-hero__stats{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .h-hero__stats .stat{ padding-right: var(--space-3); }
  .h-hero__stats .stat + .stat{ padding-left: var(--space-3); }
  .h-hero__stats .stat__value{ font-size: 1.35rem; }
  .h-hero__stats .stat__label{ font-size: .65rem; letter-spacing: .06em; }
}

/* ==========================================================================
   Services bento
   ========================================================================== */

.h-services{
  padding-block: var(--space-9);
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg-alt) 14%, var(--bg-alt) 86%, var(--bg) 100%);
}
.h-services .section-head{ max-width: none; margin-bottom: var(--space-7); }

.h-bento{
  display: grid;
  gap: var(--space-4);
}
.h-bento__cell{ min-width: 0; }
.h-bento__cell > .h-svc{ height: 100%; }

@media (min-width: 1000px){
  .h-bento{
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: repeat(2, minmax(290px, auto));
  }
  .h-bento__cell--tall{ grid-row: 1 / span 2; }
}

.h-svc{
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--h-card-r);
  background: var(--bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition:
    transform var(--dur-base) var(--h-ease),
    border-color var(--dur-base) var(--h-ease),
    box-shadow var(--dur-base) var(--h-ease);
}
.h-svc:hover{
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--h-shadow);
}
.h-svc__media{ overflow: hidden; }
.h-svc__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  display: block;
  transition: transform 1s var(--h-ease);
}
.h-svc:hover .h-svc__media img{ transform: scale(1.06); }

.h-svc__body{
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
}
.h-svc .service-card__desc{ flex: 0 1 auto; max-width: 40ch; }

/* Tall: photo fills the card, copy sits on its fade */
.h-svc--tall{
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 520px;
}
.h-svc--tall .h-svc__media{
  position: absolute;
  inset: 0;
}
.h-svc--tall .h-svc__media::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 8%, rgba(11,11,12,.82) 34%, rgba(11,11,12,.15) 62%, rgba(11,11,12,0) 80%);
}
.h-svc--tall .h-svc__media img{ object-position: 50% 20%; }
.h-svc--tall .h-svc__body{ position: relative; padding: var(--space-7) var(--space-6) var(--space-6); }
.h-svc--tall .service-card__price{ font-size: clamp(1.9rem, 1vw + 1.4rem, 2.6rem); }
.h-svc--tall .service-card__desc{ color: #cfcdc8; }

/* Wide: copy and photo side by side */
.h-svc--wide{
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
}
.h-svc--wide .h-svc__body{ justify-content: center; }
.h-svc--wide .h-svc__media{ position: relative; min-height: 240px; }
.h-svc--wide .h-svc__media::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg), rgba(11,11,12,0) 38%);
}
.h-svc--flip{ grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.h-svc--flip .h-svc__media{ order: -1; }
.h-svc--flip .h-svc__media::after{ background: linear-gradient(to left, var(--bg), rgba(11,11,12,0) 38%); }
.h-svc--wide .h-svc__media img{ object-position: 50% 25%; }

@media (max-width: 639px){
  .h-svc--tall{ min-height: 460px; }
  .h-svc--wide,
  .h-svc--flip{ grid-template-columns: 1fr; }
  .h-svc--wide .h-svc__media{ order: -1; aspect-ratio: 16 / 10; min-height: 0; }
  .h-svc--wide .h-svc__media::after{ background: linear-gradient(to top, var(--bg), rgba(11,11,12,0) 45%); }
}

/* ==========================================================================
   Visit: shop photo bleeds in from the right, info floats over it
   ========================================================================== */

.h-visit{
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 720px;
  padding-block: var(--space-9);
}
.h-visit__photo{
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 66%;
  z-index: -1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 42%);
          mask-image: linear-gradient(to right, transparent 0%, #000 42%);
}
.h-visit__photo::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(11,11,12,0) 16%, rgba(11,11,12,0) 80%, var(--bg) 100%);
}
.h-visit__photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: grayscale(1) contrast(1.05);
  display: block;
}

.h-visit__card{
  max-width: 540px;
  padding: var(--space-7) var(--space-6);
  border-radius: var(--h-card-r);
  background: rgba(20,20,21,.66);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
          backdrop-filter: blur(18px) saturate(120%);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--h-shadow);
}
.h-visit__card .visit__list{ margin: var(--space-6) 0; }
@media (min-width: 768px){
  .h-visit__card{ padding: var(--space-7); }
}
@media (prefers-reduced-transparency: reduce){
  .h-visit__card{ background: var(--bg-elevated); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (max-width: 859px){
  .h-visit{
    display: block;
    min-height: 0;
    padding-block: 0 var(--space-9);
  }
  .h-visit__photo{
    position: relative;
    width: 100%;
    height: 62svh;
    min-height: 380px;
    -webkit-mask-image: none;
            mask-image: none;
  }
  .h-visit__photo::after{
    background: linear-gradient(to bottom, var(--bg-alt) 0%, rgba(11,11,12,0) 18%, rgba(11,11,12,0) 55%, var(--bg) 100%);
  }
  .h-visit__card{ margin-top: -160px; position: relative; }
}

/* ==========================================================================
   Story
   ========================================================================== */

.h-story__grid{
  display: grid;
  gap: var(--space-7);
}
.h-story .h2{ font-size: clamp(2.4rem, 1rem + 3.4vw, 4.25rem); line-height: .96; }
.h-story__body .lead{
  font-size: clamp(1.2rem, .5vw + 1.05rem, 1.5rem);
  color: var(--fg);
  line-height: 1.5;
  max-width: 34ch;
  margin-bottom: var(--space-6);
}
.h-story__body p:not(.lead){
  color: var(--fg-muted);
  max-width: 58ch;
}
.h-story__body p:not(.lead) + p{ margin-top: var(--space-4); }

.h-story__stats{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-8);
}
.h-story__stats .stat{
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--h-card-r);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 70%);
}
.h-story__stats .stat__value{ font-size: clamp(2rem, 1.4vw + 1.4rem, 2.9rem); }

@media (min-width: 640px){
  .h-story__stats{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 960px){
  .h-story__grid{
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-9);
    align-items: start;
  }
  .h-story__head{
    position: sticky;
    top: calc(var(--header-h) + var(--space-6));
  }
}

/* ==========================================================================
   Closing CTA with film strip
   ========================================================================== */

.h-cta{
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: var(--space-8);
  padding-bottom: var(--space-9);
}
.h-cta::before{
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(50% 60% at 50% 100%, rgba(255,255,255,.06), transparent 70%);
}
.h-cta .cta-band__inner{ margin-top: var(--space-8); }
.h-cta .h2{ font-size: clamp(2.4rem, 1.2rem + 3.4vw, 4.25rem); }

.h-strip{
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.h-strip__track{
  display: flex;
  gap: var(--space-4);
  width: max-content;
  padding-block: var(--space-2) var(--space-6);
  /* trailing gap so -50% lands exactly on the start of the duplicate set */
  padding-inline-end: var(--space-4);
}
.h-strip__item{
  margin: 0;
  flex: 0 0 auto;
  width: clamp(150px, 15vw, 230px);
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.h-strip__item:nth-child(even){ transform: translateY(var(--space-5)); }
.h-strip__item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  display: block;
}

/* ==========================================================================
   Motion (all gated behind reduced-motion preference)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference){
  .h-anim{
    animation: h-rise .9s var(--h-ease) both;
    animation-delay: calc(var(--d, 0) * 110ms + 120ms);
  }
  .h-hero__main{
    animation: h-unveil 1.3s var(--h-ease) both .1s;
  }
  .h-hero__main img{
    animation: h-settle 1.8s var(--h-ease) both .1s;
  }
  .h-hero__inset{
    animation: h-rise 1s var(--h-ease) both .55s;
  }

  .h-strip__track{ animation: h-marquee 70s linear infinite; }
  .h-strip:hover .h-strip__track{ animation-play-state: paused; }

  @supports (animation-timeline: view()){
    .h-hero__pan{
      animation: h-drift linear both;
      animation-timeline: view();
      animation-range: exit;
    }
    .h-visit__photo img{
      animation: h-parallax linear both;
      animation-timeline: view();
      animation-range: cover;
    }
  }
}

@keyframes h-rise{
  from{ opacity: 0; transform: translateY(26px); }
  to{ opacity: 1; transform: none; }
}
@keyframes h-unveil{
  from{ clip-path: inset(100% 0 0 0); }
  to{ clip-path: inset(0 0 0 0); }
}
@keyframes h-settle{
  from{ transform: scale(1.14); }
  to{ transform: scale(1); }
}
@keyframes h-drift{
  from{ transform: translateY(0); }
  to{ transform: translateY(8%); }
}
@keyframes h-parallax{
  from{ transform: translateY(-5%) scale(1.12); }
  to{ transform: translateY(5%) scale(1.12); }
}
@keyframes h-marquee{
  to{ transform: translateX(-50%); }
}
