/* Secciones del inicio: portada, catálogo, Historia y página de error. */

/* Portada */
.hero {
  position: relative;
  min-height: min(700px, calc(100svh - 82px));
  overflow: hidden;
  color: #faf5e8;
  background: #1c3023;
}

.hero-portrait {
  position: absolute;
  inset: 0 0 0 auto;
  width: 66%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 53%;
  filter: saturate(.9) contrast(1.02);
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #203927 0%, #203927 31%, rgba(32, 57, 39, .98) 37%, rgba(32, 57, 39, .7) 45%, rgba(32, 57, 39, .26) 54%, rgba(32, 57, 39, .05) 62%, transparent 68%);
}

.hero .shell {
  position: relative;
  display: flex;
  align-items: center;
  min-height: inherit;
  padding: 72px 0 68px;
}

.hero-copy {
  width: 70%;
  max-width: 870px;
}

.hero .intro-label {
  color: var(--color-sun);
}

.hero h1 {
  margin: 27px 0 34px;
  font: 900 clamp(4.4rem, 8.1vw, 9.2rem)/.84 var(--font-serif);
  letter-spacing: -.085em;
  text-transform: uppercase;
}

.hero h1 em {
  color: var(--color-sun);
  font-size: clamp(4rem, 7.1vw, 8.1rem);
  font-weight: 400;
  letter-spacing: -.075em;
  text-transform: none;
  white-space: nowrap;
}

.hero-copy > p:not(.intro-label) {
  max-width: 465px;
  color: rgba(250, 245, 232, .91);
  font-size: 1.065rem;
  font-weight: 400;
  line-height: 1.7;
}

/* Franja de identidad */
.ticker {
  overflow: hidden;
  color: var(--color-forest);
  background: #e8d894;
  border-bottom: 1px solid var(--color-forest);
}

.ticker .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  min-height: 66px;
}

.ticker span {
  font: 400 clamp(.9rem, 1.75vw, 1.55rem) var(--font-serif);
  letter-spacing: -.015em;
  white-space: nowrap;
}

.ticker b {
  font-size: .8rem;
}

/* Catálogo y carruseles */
.catalogue {
  padding-block: 94px 102px;
  background: #fefbf2;
}

.catalogue-head {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, .55fr);
  align-items: end;
  gap: clamp(40px, 8vw, 120px);
  margin-bottom: 35px;
}

.catalogue-head h2 {
  max-width: 720px;
  margin-top: 14px;
  font: 900 clamp(3.15rem, 5.55vw, 5.85rem)/.93 var(--font-serif);
  letter-spacing: -.075em;
  text-transform: uppercase;
}

.head-info {
  justify-self: end;
  max-width: 330px;
  color: var(--color-forest);
  font-size: .86rem;
  line-height: 1.68;
}

.catalogue-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  margin-bottom: 36px;
  border-top: 1px solid var(--color-border);
}

.product-rail {
  position: relative;
  min-width: 0;
}

.products {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 54px) / 4);
  gap: 18px;
  padding-bottom: 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.products::-webkit-scrollbar {
  display: none;
}

.products .product {
  scroll-snap-align: start;
}

.rail-nav {
  position: absolute;
  top: 42%;
  z-index: 4;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--color-forest);
  background: rgba(254, 251, 242, .94);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(31, 55, 36, .1);
  place-items: center;
  transform: translateY(-50%);
}

.rail-nav--prev {
  left: -23px;
}

.rail-nav--next {
  right: -23px;
}

.rail-nav:disabled {
  opacity: .28;
  cursor: default;
}

.product-rail:not(.is-scrollable) .rail-nav {
  display: none;
}

.catalogue-content.is-compact .products {
  grid-auto-columns: calc((100% - 72px) / 5);
}

.catalogue-content.is-compact .product-desc h3 {
  font-size: clamp(1.18rem, 1.45vw, 1.48rem);
}

.catalogue-content.is-compact .product-photo {
  aspect-ratio: 4 / 5;
}

.catalogue-content.is-compact.is-yuyos-view .products {
  grid-auto-flow: row;
  grid-auto-columns: unset;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: visible;
  scroll-snap-type: none;
}

.catalogue-content.is-compact.is-yuyos-view .rail-nav {
  display: none;
}

.catalogue-groups {
  display: grid;
  gap: 84px;
}

.catalogue-group-head, .catalogue-category-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.catalogue-group-head .intro-label, .catalogue-category-head .intro-label {
  color: var(--color-muted);
  font-size: .61rem;
}

.catalogue-group-head h3, .catalogue-category-head h3 {
  margin-top: 12px;
  font: 800 clamp(2.65rem, 4.5vw, 4.8rem)/.91 var(--font-serif);
  letter-spacing: -.06em;
  text-transform: uppercase;
}

.category-link, .load-more {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 48px;
  padding: 11px 15px;
  margin-top: 28px;
  color: var(--color-forest);
  background: transparent;
  border: 1px solid var(--color-forest);
  font-size: .76rem;
  font-weight: 800;
}

.category-link:hover, .load-more:hover {
  color: var(--color-cream);
  background: var(--color-forest);
}

.category-link span, .load-more span {
  font-size: 1rem;
}

/* Historia: cabecera, recorrido y cierre */
#marca {
  --paper: var(--color-story);
  --sun: var(--color-sun);
  position: relative;
  overflow: hidden;
  color: var(--color-ink);
  background: var(--paper);
}

#marca .story-hero {
  position: relative;
  overflow: hidden;
  color: var(--color-cream);
  background: var(--color-forest);
}

#marca .hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  align-items: end;
  gap: 36px;
  min-height: 365px;
  max-width: 1390px;
  padding: 105px 5.5% 66px;
  margin: auto;
}

#marca .eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: var(--sun);
  font: 900 11px/1.3 Arial, sans-serif;
  letter-spacing: .19em;
  text-transform: uppercase;
}

#marca .eyebrow::before {
  width: 38px;
  height: 2px;
  background: var(--sun);
  content: "";
}

#marca .hero-title {
  max-width: 1050px;
  font: 800 clamp(3.5rem, 7vw, 8rem)/.86 var(--font-serif);
  letter-spacing: -.075em;
}

#marca .hero-title em {
  display: block;
  color: var(--sun);
  font-weight: 400;
  letter-spacing: -.07em;
}

#marca .hero-side {
  justify-self: end;
  max-width: 300px;
  padding: 14px 0 4px 29px;
  border-left: 1px solid rgba(255, 248, 235, .35);
}

#marca .hero-side p {
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.45;
}

#marca .hero-side span {
  display: block;
  margin-top: 20px;
  color: var(--sun);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#marca .hero-decoration {
  position: absolute;
  top: -55px;
  right: -30px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(243, 216, 115, .18);
  border-radius: 50%;
}

#marca .hero-decoration::before, #marca .hero-decoration::after {
  position: absolute;
  inset: 35px;
  border: 1px solid rgba(243, 216, 115, .12);
  border-radius: 50%;
  content: "";
}

#marca .hero-decoration::after {
  inset: 90px;
}

#marca .story-main {
  max-width: 1370px;
  padding-inline: 5.5%;
  margin-inline: auto;
}

#marca .story-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding: 54px 0 30px;
  border-bottom: 1px solid #bcbca5;
}

#marca .story-intro p {
  max-width: 560px;
  font: 400 clamp(20px, 2vw, 27px)/1.3 var(--font-serif);
}

#marca .timeline {
  --progress: 0;
  position: relative;
  z-index: 0;
  padding: 55px 0 70px;
  margin: 0;
  list-style: none;
}

#marca .timeline::before, #marca .timeline::after {
  position: absolute;
  top: 60px;
  bottom: 90px;
  left: 50%;
  z-index: -1;
  width: 2px;
  background: #b4b89e;
  transform: translateX(-50%);
  content: "";
}

#marca .timeline::after {
  bottom: auto;
  height: calc((100% - 150px) * var(--progress));
  background: var(--color-pine);
  transition: height .09s linear;
}

#marca .chapter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
  align-items: center;
  min-height: 335px;
}

#marca .chapter + .chapter {
  margin-top: 24px;
}

#marca .chapter-copy {
  grid-column: 1;
  grid-row: 1;
  max-width: 560px;
  padding: 30px 7% 30px 0;
}

#marca .chapter:nth-child(even) .chapter-copy {
  grid-column: 3;
  padding: 30px 0 30px 7%;
}

#marca .chapter:nth-child(even) .stamp {
  grid-column: 2;
  grid-row: 1;
}

#marca .chapter:nth-child(even) .chapter-art {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

#marca .chapter:nth-child(odd) .stamp {
  grid-column: 2;
  grid-row: 1;
}

#marca .chapter:nth-child(odd) .chapter-art {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

#marca .chapter-number {
  display: inline-block;
  padding: 7px 10px;
  margin-bottom: 14px;
  color: var(--color-deep);
  background: var(--sun);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

#marca .stage {
  margin-bottom: 8px;
  color: var(--color-green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .17em;
  text-transform: uppercase;
}

#marca .chapter h3 {
  margin-bottom: 23px;
  font: 1000 clamp(2.8rem, 5.3vw, 5.8rem)/.88 "Arial Black", Impact, Arial, sans-serif;
  letter-spacing: -.075em;
  text-transform: uppercase;
}

#marca .chapter-copy > p:last-child {
  max-width: 525px;
  font: 400 clamp(17px, 1.4vw, 21px)/1.48 var(--font-serif);
}

#marca .chapter:nth-child(3) .chapter-copy > p:last-child {
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  line-height: 1.52;
}

#marca .stamp {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 100px;
  height: 100px;
  overflow: visible;
  color: var(--color-forest);
  background: var(--sun);
  border: 2px solid var(--color-forest);
  border-radius: 50%;
  box-shadow: 0 0 0 13px var(--paper);
  transition: transform .35s ease, background .35s ease;
}

#marca .stamp::before {
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(36, 61, 44, .43);
  border-radius: 50%;
  content: "";
}

#marca .chapter.is-current .stamp {
  background: #eebc59;
  transform: rotate(-8deg) scale(1.07);
}

#marca .stamp svg {
  width: 55px;
  height: 55px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#marca .stamp-brand {
  overflow: hidden;
  background: #f8eacb;
}

#marca .brand-stamp-image {
  width: 78px;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

#marca .chapter-art {
  width: 100%;
  max-width: 420px;
  padding-block: 20px;
}

#marca .timeline-photo {
  width: min(100%, 420px);
}

#marca .timeline-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #d0bc9e;
  border: 6px solid #e1d6bd;
}

#marca .timeline-photo--family img {
  aspect-ratio: 4 / 3;
}

#marca .timeline-photo--legacy img {
  aspect-ratio: 1 / 1;
}

#marca .timeline-photo--today img {
  aspect-ratio: 4 / 4.2;
  object-position: 50% 25%;
}

#marca .timeline-photo figcaption, #marca .route-label {
  margin-top: 10px;
  color: var(--color-green);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.5;
  text-transform: uppercase;
}

#marca .art-route {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 190px;
  overflow: hidden;
}

#marca .art-route svg {
  max-width: 100%;
  height: auto;
  fill: none;
  stroke: #4c6948;
  stroke-width: 2.7;
  stroke-linecap: round;
}

#marca .art-route .route-ship {
  position: absolute;
  top: 51%;
  left: 7%;
  width: 49px;
  height: 49px;
  opacity: 0;
  fill: var(--sun);
  stroke: var(--color-forest);
  transition: left 1.5s cubic-bezier(.19, 1, .25, 1), opacity .35s ease;
}

#marca .chapter.is-visible .route-ship {
  left: 73%;
  opacity: 1;
  transform: translateY(-88%) rotate(5deg);
}

#marca .route-label {
  position: absolute;
  right: 10px;
  bottom: -9px;
  left: 8px;
}

#marca .closing {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: end;
  gap: 52px;
  padding: 64px max(5.5%, calc((100vw - 1220px) / 2));
  color: var(--color-cream);
  background: var(--color-deep);
}

#marca .closing blockquote {
  font: 400 clamp(2.2rem, 4.5vw, 4.6rem)/1.07 var(--font-serif);
  letter-spacing: -.05em;
}

#marca .closing blockquote em {
  color: var(--sun);
}

#marca .closing aside {
  padding-left: 25px;
  border-left: 2px solid var(--sun);
  font-size: .88rem;
  line-height: 1.6;
}

#marca .closing aside strong {
  display: block;
  margin-bottom: 10px;
  color: var(--sun);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

html.js #marca .chapter {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}

html.js #marca .chapter.is-visible {
  opacity: 1;
  transform: none;
}

/* Página 404 */
.error-page {
  display: grid;
  min-height: 100vh;
  padding: 2rem;
  color: var(--color-cream);
  background: var(--color-forest);
  place-items: center;
}

.error-page > div {
  max-width: 42rem;
}

.error-page .error-code {
  color: var(--color-sun);
  font-weight: 900;
  letter-spacing: .16em;
}

.error-page h1 {
  margin: .5rem 0 1rem;
  font: 900 clamp(3rem, 10vw, 7rem)/.9 var(--font-serif);
}

.error-page a {
  display: inline-block;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  color: var(--color-forest);
  background: var(--color-sun);
  font-weight: 800;
  text-decoration: none;
}

/* Responsive: estos ajustes se aplican hasta 1040 px, incluidos. */
@media (max-width: 1040px) {
  .hero-portrait {
    object-position: 50% 50%;
  }

  .products, .catalogue-content.is-compact .products, .catalogue-content.is-compact.is-yuyos-view .products {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 18px;
    padding-right: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .product-rail .rail-nav {
    display: none;
  }

}

/* Responsive: estos ajustes se aplican hasta 900 px, incluidos. */
@media (max-width: 900px) {
  #marca .hero-inner {
    grid-template-columns: 1fr;
    min-height: 300px;
    padding: 90px 5% 58px;
  }

  #marca .hero-side {
    justify-self: start;
    max-width: 570px;
  }

  #marca .story-intro {
    padding: 38px 0 24px;
  }

  #marca .timeline {
    padding: 40px 0;
  }

  #marca .timeline::before, #marca .timeline::after {
    top: 46px;
    left: 47px;
  }

  /* Restablecer también las posiciones impares del recorrido de desktop. */
  #marca .timeline .chapter {
    grid-template-columns: 94px minmax(0, 1fr);
    align-items: start;
    min-height: auto;
    margin-bottom: 25px;
  }

  #marca .chapter + .chapter {
    margin-top: 0;
  }

  #marca .timeline .chapter .stamp {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: 76px;
    height: 76px;
    margin-top: 17px;
    box-shadow: 0 0 0 8px var(--paper);
  }

  #marca .timeline .chapter .chapter-copy {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    max-width: none;
    padding: 9px 0 0 8px;
  }

  #marca .timeline .chapter .chapter-art {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    max-width: 520px;
    padding: 17px 0 28px 8px;
  }

  #marca .stamp svg {
    width: 43px;
    height: 43px;
  }

  #marca .closing {
    grid-template-columns: 1fr;
    gap: 28px;
  }

}

/* Responsive: estos ajustes se aplican hasta 720 px, incluidos. */
@media (max-width: 720px) {
  .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .hero-portrait {
    position: relative;
    order: 0;
    width: 100%;
    height: 402px;
    object-position: 50% 58%;
  }

  .hero-veil {
    display: none;
  }

  .hero .shell {
    order: 1;
    min-height: 0;
    padding: 34px 0 50px;
  }

  .hero-copy {
    width: 100%;
  }

  .hero h1 {
    margin: 24px 0 28px;
    font-size: clamp(3.45rem, 13vw, 5.5rem);
  }

  .hero h1 em {
    font-size: clamp(3.22rem, 12.2vw, 5.2rem);
    white-space: normal;
  }

  .ticker .shell {
    justify-content: space-between;
    min-height: 60px;
  }

  .ticker span {
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .ticker b {
    display: none;
  }

  .ticker span:nth-of-type(3) {
    display: none;
  }

  .catalogue {
    padding-block: 65px 76px;
  }

  .catalogue-head {
    display: block;
    margin-bottom: 26px;
  }

  .catalogue-head h2 {
    font-size: clamp(2.6rem, 11.3vw, 4.3rem);
  }

  .head-info {
    margin-top: 15px;
  }

  .catalogue-controls {
    align-items: flex-end;
    flex-direction: row;
  }

  .filters {
    gap: 8px;
  }

  .view-switcher {
    display: none;
  }

  .products, .catalogue-content.is-compact .products, .catalogue-content.is-compact.is-yuyos-view .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px 10px;
    padding-right: 0;
    overflow: visible;
  }

  .catalogue-groups {
    gap: 62px;
  }

  .catalogue-group-head h3, .catalogue-category-head h3 {
    font-size: 2.5rem;
  }

  .category-link, .load-more {
    width: 100%;
  }

}

/* Responsive: estos ajustes se aplican hasta 540 px, incluidos. */
@media (max-width: 540px) {
  #marca .hero-inner {
    min-height: 0;
    padding: 65px 22px 55px;
  }

  #marca .hero-title {
    font-size: clamp(3.05rem, 11vw, 5rem);
  }

  #marca .hero-side {
    max-width: 330px;
    padding: 19px 0 0;
    border-top: 1px solid rgba(255, 248, 235, .32);
    border-left: 0;
  }

  #marca .story-main {
    padding-inline: 20px;
  }

  #marca .story-intro {
    display: block;
  }

  #marca .story-intro p {
    margin-top: 16px;
    font-size: 21px;
  }

  #marca .timeline::before, #marca .timeline::after {
    top: 46px;
    bottom: 85px;
    left: 31px;
  }

  #marca .timeline .chapter {
    grid-template-columns: 64px minmax(0, 1fr);
    margin-bottom: 14px;
  }

  #marca .timeline .chapter .stamp {
    width: 62px;
    height: 62px;
    margin-top: 13px;
    border-width: 1px;
  }

  #marca .timeline .chapter .chapter-copy {
    padding: 8px 0 0 12px;
  }

  #marca .timeline .chapter .chapter-art {
    padding: 16px 0 38px 12px;
  }

  #marca .chapter h3 {
    margin-bottom: 14px;
    font-size: clamp(1.75rem, 8.5vw, 2.8rem);
  }

  #marca .chapter-copy > p:last-child {
    font-size: 1rem;
    line-height: 1.42;
  }

  #marca .stamp svg {
    width: 35px;
    height: 35px;
  }

  #marca .brand-stamp-image {
    width: 53px;
  }

  #marca .art-route {
    min-height: 140px;
  }

  #marca .art-route .route-ship {
    width: 32px;
    height: 32px;
  }

  #marca .closing {
    padding: 46px 25px;
  }

  #marca .closing blockquote {
    font-size: clamp(2.05rem, 9vw, 3.1rem);
  }

}

/* Responsive: estos ajustes se aplican hasta 390 px, incluidos. */
@media (max-width: 390px) {
  .catalogue-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .products {
    gap: 25px 9px;
  }

  .product-desc h3 {
    font-size: 1.15rem;
  }

  .product-type {
    font-size: .58rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 12.5vw, 4.5rem);
  }

  .hero-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }

}

/* Accesibilidad: respetar la preferencia de reducir movimiento. */
@media (prefers-reduced-motion: reduce) {
  html.js #marca .chapter {
    opacity: 1 !important;
    transform: none !important;
  }

  #marca .art-route .route-ship {
    left: 73% !important;
    opacity: 1 !important;
  }

}
