/* ==========================================================================
   Rivera House — Nuestra historia
   ========================================================================== */

.historia-section {
  min-height: 100vh;
  box-sizing: border-box;
  padding: clamp(120px,19vh,200px) clamp(20px,5vw,80px) clamp(32px,6vh,64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
}

.historia-div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font: 500 11px/1.4 Montserrat,sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #4A4A4A;
}

.historia-a {
  color: #1F3A5F;
  opacity: 0;
  transform: translateY(16px);
}

.historia-span {
  opacity: 0;
  transform: translateY(16px);
}

.historia-hero-title {
  margin: 0;
  font: 400 clamp(56px,12.6vw,230px)/.94 'Playfair Display',Georgia,serif;
  letter-spacing: -.035em;
  color: #1F3A5F;
}

.historia-span-2 {
  display: block;
  overflow: hidden;
  padding-bottom: .06em;
}

.historia-span-3 {
  display: block;
  transform: translateY(110%);
}

.historia-span-4 {
  display: block;
  overflow: hidden;
  padding: 0 0 .08em clamp(24px,14vw,260px);
}

.historia-em {
  font-style: italic;
}

.historia-div-2 {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}

.historia-div-3 {
  display: flex;
  align-items: center;
  gap: 16px;
}

.historia-div-4 {
  width: 1px;
  height: 56px;
  background: rgba(31,58,95,.18);
  overflow: hidden;
}

.historia-div-5 {
  width: 100%;
  height: 100%;
  background: #1F3A5F;
  animation: rhScroll 2.4s cubic-bezier(.65,0,.35,1) infinite;
}

.historia-span-5 {
  font: 500 11px/1.4 Montserrat,sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(16px);
}

.historia-div-6 {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  transform: translateY(24px);
}

.historia-p {
  margin: 0;
  font: 300 clamp(15px,1.15vw,18px)/1.7 Montserrat,sans-serif;
  color: #4A4A4A;
  text-wrap: pretty;
}

.historia-a-2 {
  align-self: flex-start;
  font: 500 12px/1 Montserrat,sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #1F3A5F;
  padding-bottom: 8px;
  border-bottom: 1px solid #1F3A5F;
}

.historia-section-2 {
  padding: clamp(80px,14vh,160px) clamp(20px,5vw,80px);
  display: flex;
  justify-content: center;
}

.historia-man {
  margin: 0;
  max-width: 1100px;
  text-align: center;
  font: 500 clamp(30px,4.6vw,80px)/1.1 'Playfair Display',Georgia,serif;
  letter-spacing: -.01em;
  color: #1F3A5F;
  text-wrap: balance;
}

.historia-mw {
  opacity: .14;
}

.historia-mw-2 {
  opacity: .14;
  font-style: italic;
}

.historia-serp {
  position: relative;
  padding: clamp(40px,6vh,80px) 0 clamp(80px,14vh,160px);
}

.historia-serp-svg {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.historia-desk {
  position: absolute;
  top: 0;
  bottom: 0;
  right: clamp(12px,2vw,32px);
  z-index: 3;
}

.historia-nav {
  position: sticky;
  top: 36vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.historia-chap-nav {
  font: 500 11px/1 Montserrat,sans-serif;
  letter-spacing: .16em;
  color: #1F3A5F;
  opacity: .35;
  transition: opacity .5s ease,transform .7s cubic-bezier(.16,1,.3,1);
}

.historia-chap {
  position: relative;
  display: flex;
  flex-flow: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vw, 96px);
  padding: clamp(80px, 14vh, 160px) clamp(40px, 8vw, 160px);
}

.historia-chap-dot {
  position: absolute;
  z-index: 2;
  top: clamp(80px, 14vh, 160px);
  left: clamp(20px, 4vw, 72px);
  width: 18px;
  height: 18px;
  margin: -9px 0px 0px -9px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid rgb(31, 58, 95);
  background: rgb(243, 243, 243);
  transform: scale(0.35);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), background 0.5s;
}

.historia-div-7 {
  position: relative;
  z-index: 1;
  flex: 1 1 340px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  transform: translateY(50px);
}

.historia-span-6 {
  font: italic 400 clamp(72px,10vw,180px)/.8 'Playfair Display',Georgia,serif;
  color: #1F3A5F;
}

.historia-span-7 {
  font: 500 11px/1.4 Montserrat,sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #4A4A4A;
}

.historia-h2 {
  margin: 0;
  font: 400 clamp(32px,3.8vw,64px)/1.04 'Playfair Display',Georgia,serif;
  letter-spacing: -.02em;
  color: #1F3A5F;
  text-wrap: balance;
}

.historia-p-2 {
  margin: 0;
  font: 300 clamp(15px,1.1vw,18px)/1.7 Montserrat,sans-serif;
  color: #4A4A4A;
  text-wrap: pretty;
}

.historia-span-8 {
  font: 500 11px/1.4 Montserrat,sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #1F3A5F;
}

.historia-div-8 {
  position: relative;
  z-index: 1;
  flex: 1 1 320px;
  max-width: 560px;
  height: clamp(300px,62vh,640px);
  border-radius: 4px;
  overflow: hidden;
  background: #E1E1E1;
  opacity: 0;
  transform: translateY(80px);
}

.historia-par {
  position: absolute;
  left: 0;
  right: 0;
  top: -12%;
  bottom: -12%;
}

.historia-img {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  background: rgba(127,127,127,.08);
}

.historia-chap-2 {
  position: relative;
  display: flex;
  flex-flow: row-reverse wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vw, 96px);
  padding: clamp(80px, 14vh, 160px) clamp(40px, 8vw, 160px);
}

.historia-chap-dot-2 {
  position: absolute;
  z-index: 2;
  top: clamp(80px, 14vh, 160px);
  left: calc(100% - clamp(20px, 4vw, 72px));
  width: 18px;
  height: 18px;
  margin: -9px 0px 0px -9px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid rgb(31, 58, 95);
  background: rgb(243, 243, 243);
  transform: scale(0.35);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), background 0.5s;
}

.historia-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(80px,14vh,160px) clamp(20px,5vw,80px);
  border-top: 1px solid rgba(31,58,95,.16);
}

.historia-row-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  font: 400 clamp(48px,9vw,168px)/.96 'Playfair Display',Georgia,serif;
  letter-spacing: -.035em;
  color: #1F3A5F;
  transition: transform .9s cubic-bezier(.16,1,.3,1);
}

/* Móvil (< 760px) */
@media (max-width: 759px) {
.historia-chap {
    position: relative;
    display: flex;
    flex-flow: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(32px, 5vw, 96px);
    padding: 72px 24px 72px 44px;
  }

.historia-chap-dot {
    position: absolute;
    z-index: 2;
    top: 72px;
    left: 20px;
    width: 18px;
    height: 18px;
    margin: -9px 0px 0px -9px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid rgb(31, 58, 95);
    background: rgb(243, 243, 243);
    transform: scale(0.35);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), background 0.5s;
  }

.historia-chap-2 {
    position: relative;
    display: flex;
    flex-flow: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(32px, 5vw, 96px);
    padding: 72px 24px 72px 44px;
  }

.historia-chap-dot-2 {
    position: absolute;
    z-index: 2;
    top: 72px;
    left: 20px;
    width: 18px;
    height: 18px;
    margin: -9px 0px 0px -9px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid rgb(31, 58, 95);
    background: rgb(243, 243, 243);
    transform: scale(0.35);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), background 0.5s;
  }
}
