/* RMH Trading — featured projects, Rialto-inspired editorial carousel.
   Isolated to homepage; doesn't change the complete project archive. */
.rmh-featured-projects {
  --rmh-carousel-wine:#612027;
  --rmh-carousel-orange:#E18763;
  background:#fff;
  color:#202c34;
  padding:clamp(64px,7vw,110px) 0 clamp(76px,7vw,104px);
  overflow:hidden;
  isolation:isolate;
}
.rmh-featured-projects__heading {
  text-align:center;
  padding:0 22px;
  margin:0 auto clamp(20px,2.4vw,37px);
  max-width:920px;
}
.rmh-featured-projects__eyebrow {
  margin:0 0 9px;
  font-size:clamp(10px,.85vw,13px);
  font-weight:800;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--rmh-carousel-orange);
}
.rmh-featured-projects__heading h2 {
  margin:0;
  color:var(--rmh-carousel-wine);
  font-family:'DM Sans',system-ui,sans-serif;
  font-size:clamp(2.9rem,6vw,6.2rem);
  font-weight:800;
  letter-spacing:-.065em;
  line-height:1.04;
}
.rmh-featured-projects__description {
  margin:12px auto 0;
  max-width:560px;
  font-size:clamp(13px,1vw,15px);
  line-height:1.7;
  color:#667078;
}
.rmh-project-carousel {
  position:relative;
  margin:0 auto;
  width:100%;
  min-width:0;
  outline:none;
}
.rmh-project-carousel:focus-visible {outline:2px solid var(--rmh-carousel-wine);outline-offset:3px;}
.rmh-project-carousel__stage {
  position:relative;
  width:100%;
  height:clamp(430px,39vw,608px);
  display:flex;
  align-items:center;
  gap:14px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
  padding:0 max(12px,calc(50% - 205px));
  touch-action:pan-y;
}
.rmh-project-carousel__stage::-webkit-scrollbar{display:none;}
.rmh-project-carousel.is-ready .rmh-project-carousel__stage {
  display:block;
  overflow:hidden;
  padding:0;
  scroll-snap-type:none;
}
.rmh-project-carousel__slide {
  flex:0 0 auto;
  display:block;
  position:relative;
  width:clamp(290px,28vw,440px);
  height:clamp(385px,36vw,555px);
  overflow:hidden;
  background:#e8e3de;
  color:white;
  cursor:pointer;
  text-decoration:none;
  scroll-snap-align:center;
  box-shadow:0 14px 42px rgba(33,24,24,.13);
  -webkit-tap-highlight-color:transparent;
}
.rmh-project-carousel.is-ready .rmh-project-carousel__slide {
  position:absolute;
  left:50%;top:50%;
  margin:0;
  transform:translate3d(-50%,-50%,0) scale(.5);
  transform-origin:center center;
  opacity:0;
  pointer-events:none;
  visibility:hidden;
  transition:transform .62s cubic-bezier(.2,.7,.2,1),opacity .55s ease,visibility .55s;
  will-change:transform,opacity;
}
.rmh-project-carousel__slide.is-visible {visibility:visible!important;opacity:1!important;pointer-events:auto!important;}
.rmh-project-carousel__slide:focus-visible {outline:3px solid var(--rmh-carousel-orange);outline-offset:-5px;}
.rmh-project-carousel__media,
.rmh-project-carousel__media img {position:absolute;inset:0;width:100%;height:100%;display:block;}
.rmh-project-carousel__media img{object-fit:cover;object-position:center;transition:filter .36s ease,transform .55s ease;}
.rmh-project-carousel__slide:hover .rmh-project-carousel__media img,
.rmh-project-carousel__slide:focus-visible .rmh-project-carousel__media img{transform:scale(1.025);}
.rmh-project-carousel__label {
  position:absolute;
  z-index:2;
  top:20px;left:20px;right:18px;
  width:max-content;max-width:calc(100% - 40px);
  color:white;
  text-shadow:0 1px 10px rgba(0,0,0,.5);
  font-size:clamp(13px,1vw,16px);
  font-weight:800;
  line-height:1.25;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.rmh-project-carousel__label::before {
  content:'';position:absolute;z-index:-1;inset:-7px -8px;
  background:linear-gradient(90deg,rgba(24,18,17,.34),transparent);
  pointer-events:none;
}
.rmh-project-carousel__overlay {
  position:absolute;inset:0;z-index:3;
  padding:clamp(22px,2.3vw,35px);
  background:rgba(97,32,39,.82);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
  color:white;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:clamp(12px,1.2vw,20px);
  opacity:0;visibility:hidden;
  transition:opacity .28s ease,visibility .28s ease;
  overflow:auto;
}
.rmh-project-carousel__slide:hover .rmh-project-carousel__overlay,
.rmh-project-carousel__slide:focus-visible .rmh-project-carousel__overlay{
  opacity:1;visibility:visible;
}
.rmh-project-carousel__overlay-kicker {
  color:#f5c9b9;
  font-size:clamp(9px,.75vw,11px);
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.rmh-project-carousel__overlay-title {
  font-size:clamp(22px,2.05vw,32px);
  line-height:1.18;
  letter-spacing:-.045em;
  font-weight:760;
  overflow-wrap:break-word;
}
.rmh-project-carousel__overlay-text{
  font-size:clamp(13px,1vw,15px);
  line-height:1.65;
  color:#ffebe5;
}
.rmh-project-carousel__overlay-action {
  margin-top:auto;
  padding:12px 0 5px;
  border-top:1px solid rgba(255,255,255,.34);
  font-size:11px;
  font-weight:800;
  letter-spacing:.11em;
}
.rmh-project-carousel__controls {
  width:min(500px,calc(100% - 44px));
  display:flex;align-items:center;gap:18px;
  margin:clamp(2px,1vw,14px) auto 0;
}
.rmh-project-carousel__arrow {
  appearance:none;
  width:34px;height:34px;flex:0 0 34px;
  display:grid;place-items:center;
  border:1px solid var(--rmh-carousel-wine);
  background:white;color:var(--rmh-carousel-wine);
  font-family:inherit;
  font-size:20px;font-weight:500;
  line-height:1;
  border-radius:0;
  cursor:pointer;
  transition:background .2s ease,color .2s ease;
}
.rmh-project-carousel__arrow:hover,
.rmh-project-carousel__arrow:focus-visible {
  background:var(--rmh-carousel-wine);
  color:white;
}
.rmh-project-carousel__progress {
  flex:1;min-width:0;height:2px;
  position:relative;background:#d9d2d0;
}
.rmh-project-carousel__progress-fill {
  position:absolute;left:0;top:0;height:100%;width:4.55%;
  background:var(--rmh-carousel-wine);
  transition:width .55s ease;
}
.rmh-project-carousel__footer {text-align:center;margin-top:20px;}
.rmh-project-carousel__all {
  display:inline-flex;align-items:center;justify-content:center;
  min-height:39px;padding:9px 23px;
  background:var(--rmh-carousel-wine);
  border:1px solid var(--rmh-carousel-wine);
  color:#fff;
  text-transform:uppercase;
  text-decoration:none;
  font-size:10px;font-weight:800;letter-spacing:.16em;
  transition:color .2s,background .2s;
}
.rmh-project-carousel__all:hover {background:white;color:var(--rmh-carousel-wine);}
@media(max-width:900px) {
  .rmh-featured-projects {padding-top:60px;padding-bottom:74px;}
  .rmh-project-carousel__stage {height:clamp(370px,65vw,500px);}
  .rmh-project-carousel__slide {width:clamp(270px,45vw,345px);height:clamp(345px,55vw,445px);}
}
@media(max-width:640px) {
  .rmh-featured-projects{padding:48px 0 59px;}
  .rmh-featured-projects__heading {margin-bottom:12px;padding:0 17px;}
  .rmh-featured-projects__eyebrow{font-size:9px;letter-spacing:.15em;}
  .rmh-featured-projects__heading h2 {font-size:clamp(2.5rem,12vw,4rem);}
  .rmh-featured-projects__description {font-size:12px;max-width:310px;line-height:1.5;}
  .rmh-project-carousel__stage {height:clamp(335px,100vw,460px);padding-inline:max(12px,calc(50% - 35vw));gap:12px;}
  .rmh-project-carousel__slide {width:min(69vw,305px);height:clamp(305px,90vw,415px);}
  .rmh-project-carousel__label{top:13px;left:14px;right:10px;font-size:11px;max-width:calc(100% - 28px);}
  .rmh-project-carousel__controls{gap:11px;width:min(320px,calc(100% - 44px));margin-top:2px;}
  .rmh-project-carousel__arrow {width:32px;height:32px;flex-basis:32px;font-size:19px;}
  .rmh-project-carousel__footer{margin-top:16px;}
  .rmh-project-carousel__all{min-height:34px;padding:8px 16px;font-size:9px;}
  .rmh-project-carousel__overlay{padding:20px;gap:11px;}
  .rmh-project-carousel__overlay-title{font-size:20px;}
}
@media(hover:none) {
  /* On touch devices, a tap always opens the project instead of revealing a hover layer. */
  .rmh-project-carousel__slide:hover .rmh-project-carousel__overlay{opacity:0;visibility:hidden;}
  .rmh-project-carousel__slide:focus-visible .rmh-project-carousel__overlay{opacity:1;visibility:visible;}
}
@media(prefers-reduced-motion:reduce){
  .rmh-project-carousel__slide,.rmh-project-carousel__progress-fill,
  .rmh-project-carousel__overlay,.rmh-project-carousel__arrow,
  .rmh-project-carousel__all{transition:none!important;}
}

/* 2026-10-10 — Center tile elevated, side tiles bottom-aligned on every viewport.
   JS computes the exact vertical offset for each scale; the transform transition
   animates rise/fall together with horizontal travel and change of prominence. */
.rmh-project-carousel__stage {overflow-x:hidden;overscroll-behavior-x:contain;}
.rmh-project-carousel.is-ready .rmh-project-carousel__slide {
  transition:transform .72s cubic-bezier(.22,.72,.18,1),opacity .55s ease,visibility .55s;
}


/* El carrusel de Inicio usa portadas cuadradas únicamente en desktop;
   los desplazamientos verticales se calculan con el tamaño real en JS. */
@media(min-width:901px){
  .rmh-project-carousel__stage{height:clamp(380px,37vw,560px)}
  .rmh-project-carousel__slide{aspect-ratio:1/1;height:auto}
}
