:root {
  --espresso: #24130d;
  --cocoa: #3a2117;
  --coffee: #573722;
  --mustard: #a96d20;
  --mustard-deep: #8f5819;
  --cream: #f4ecde;
  --paper: #f8f4eb;
  --ink: #2a1a13;
  --muted: #766b60;
  --line: rgba(42, 26, 19, 0.2);
  --page: clamp(1.4rem, 5vw, 6rem);
  --content: 90rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--espresso);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

figure,
h1,
h2,
h3,
p {
  margin: 0;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

section[id] {
  scroll-margin-top: 4.5rem;
}

:focus-visible {
  outline: 2px solid var(--mustard);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--cream);
  color: var(--espresso);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.5rem;
  padding-inline: var(--page);
  color: var(--cream);
  border-bottom: 1px solid rgba(244, 236, 222, 0.22);
  transition:
    min-height 420ms var(--ease),
    color 300ms ease,
    background-color 300ms ease,
    border-color 300ms ease;
}

.site-header.is-scrolled {
  min-height: 3.8rem;
  background: rgba(248, 244, 235, 0.94);
  color: var(--ink);
  border-color: var(--line);
  backdrop-filter: blur(16px) saturate(120%);
}

.header-mark,
.header-order,
.main-nav a {
  text-decoration: none;
}

.header-mark {
  width: max-content;
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3.2rem);
}

.main-nav a,
.header-order {
  position: relative;
  padding-block: 0.8rem;
  font-size: 0.76rem;
  letter-spacing: 0.055em;
}

.main-nav a::after,
.header-order::after {
  position: absolute;
  right: 0;
  bottom: 0.55rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 260ms var(--ease);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.header-order:hover::after,
.header-order:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-order {
  justify-self: end;
  text-transform: uppercase;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  place-items: center;
  background: var(--espresso);
  color: var(--cream);
}

.hero-film,
.hero-vignette {
  position: absolute;
  inset: 0;
}

.hero-film {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 56%;
}

.hero-vignette {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(23, 10, 6, 0.5) 0%, transparent 28%, transparent 60%, rgba(23, 10, 6, 0.66) 100%),
    radial-gradient(circle at center, transparent 20%, rgba(20, 8, 4, 0.25) 100%);
  pointer-events: none;
}

.hero-identity {
  position: relative;
  z-index: 2;
  width: min(88%, 42rem);
  padding: 1.5rem;
  text-align: center;
  text-shadow: 0 2px 30px rgba(22, 9, 4, 0.5);
}

.hero-identity p,
.hero-identity span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.hero-identity h1 {
  margin-block: 0.6rem 0.7rem;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 6vw, 5.8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.94;
  text-wrap: balance;
}

.hero-identity span {
  letter-spacing: 0.14em;
  text-transform: none;
}

.scroll-cue {
  position: absolute;
  right: var(--page);
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  min-width: 5rem;
  color: var(--cream);
  font-size: 0.69rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-transform: uppercase;
}

.scroll-cue i {
  display: block;
  width: 1px;
  height: clamp(2.5rem, 6vh, 4.25rem);
  overflow: hidden;
  background: rgba(244, 236, 222, 0.4);
}

.scroll-cue i::after {
  display: block;
  width: 100%;
  height: 50%;
  background: var(--cream);
  content: "";
  animation: scrollLine 2.2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: translateY(-110%); }
  55%, 100% { transform: translateY(210%); }
}

.section-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.introduction {
  display: grid;
  min-height: 76svh;
  padding: clamp(7rem, 11vw, 10rem) var(--page);
  place-content: center;
  background: var(--paper);
  text-align: center;
}

.introduction h2,
.collection-heading h2,
.order-section h2 {
  font-size: clamp(3.3rem, 7.4vw, 7.9rem);
  font-weight: 350;
  letter-spacing: -0.06em;
  line-height: 0.94;
  text-wrap: balance;
}

.introduction h2 {
  max-width: 15ch;
  margin: clamp(1.6rem, 3vw, 2.5rem) auto 0;
}

.introduction h2 em,
.collection-heading h2 em,
.order-section h2 em,
.story-copy em {
  font-family: var(--serif);
  font-weight: 400;
}

.intro-copy {
  max-width: 35rem;
  margin: clamp(2rem, 4vw, 3.5rem) auto 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.55;
}

.selection {
  padding: clamp(5.5rem, 8vw, 8rem) var(--page) clamp(6rem, 9vw, 9rem);
  background: var(--cream);
}

.editorial-heading {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  width: min(100%, var(--content));
  margin-inline: auto;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.editorial-heading p,
.editorial-heading span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.editorial-heading h2 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 3.5vw, 3.5rem);
  font-weight: 400;
  line-height: 1;
}

.editorial-heading span {
  justify-self: end;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.5rem, 2.5vw, 3rem);
  width: min(100%, var(--content));
  margin: clamp(3rem, 5vw, 5rem) auto 0;
}

.editorial-item-large {
  grid-column: 1 / span 8;
}

.editorial-item-small {
  grid-column: 9 / span 4;
  margin-top: clamp(2rem, 4vw, 4rem);
}

.media-reveal {
  position: relative;
  overflow: hidden;
  background: var(--cocoa);
}

.editorial-item-large .media-reveal {
  aspect-ratio: 1.3 / 1;
}

.editorial-item-small .media-reveal {
  aspect-ratio: 0.88 / 1;
}

.media-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}

.editorial-item-large img {
  object-position: 52% center;
}

.editorial-item-small img {
  object-position: 56% center;
}

.item-caption {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  align-items: start;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.item-caption > span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.item-caption h3 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 400;
  line-height: 1;
}

.item-caption p {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.signature-story {
  --photo-scale: 1;
  --photo-x: 0vw;
  --plane-y: 102%;
  --line-progress: 0;
  height: 300svh;
  background: var(--espresso);
  color: var(--cream);
}

.signature-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 40rem;
  overflow: hidden;
  background: var(--espresso);
}

.mustard-plane {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: 44%;
  background: var(--mustard);
  transform: translateY(var(--plane-y));
  will-change: transform;
}

.signature-media {
  position: absolute;
  top: 10vh;
  right: 5vw;
  z-index: 1;
  width: 61vw;
  height: 80vh;
  overflow: hidden;
  transform: translate3d(var(--photo-x), 0, 0) scale(var(--photo-scale));
  transform-origin: 70% center;
  will-change: transform;
}

.signature-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 12, 7, 0.2), transparent 38%);
  content: "";
  pointer-events: none;
}

.signature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% center;
}

.signature-index {
  position: absolute;
  top: clamp(5rem, 9vh, 7rem);
  left: var(--page);
  z-index: 3;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.story-copy {
  position: absolute;
  top: 50%;
  left: var(--page);
  z-index: 3;
  width: min(43vw, 43rem);
  opacity: 0;
  transform: translateY(calc(-50% + 2.5rem));
  transition: opacity 500ms ease, transform 700ms var(--ease), color 350ms ease;
  pointer-events: none;
}

/* Una sombra lateral difusa separa el titular de la fotografía sin crear una tarjeta. */
.story-copy-2 {
  isolation: isolate;
}

.story-copy-2::before {
  position: absolute;
  z-index: -1;
  inset: -3rem -4rem -3rem calc(-1 * var(--page));
  background: linear-gradient(90deg, rgba(24, 12, 8, 0.9), rgba(24, 12, 8, 0.68) 57%, rgba(24, 12, 8, 0));
  content: "";
  pointer-events: none;
}

.story-copy > p {
  margin-bottom: 1.1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.story-copy h2,
.story-copy h3 {
  font-size: clamp(3.5rem, 6.4vw, 7rem);
  font-weight: 350;
  letter-spacing: -0.065em;
  line-height: 0.9;
  text-wrap: balance;
}

.story-copy a {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2.2rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid currentColor;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  pointer-events: auto;
}

.signature-story[data-step="0"] .story-copy-0,
.signature-story[data-step="1"] .story-copy-1,
.signature-story[data-step="2"] .story-copy-2 {
  opacity: 1;
  transform: translateY(-50%);
}

.signature-story[data-step="2"] .story-copy-2 {
  color: var(--cream);
}

.story-progress {
  position: absolute;
  bottom: 2.5rem;
  left: var(--page);
  z-index: 4;
  width: min(16rem, 28vw);
  height: 1px;
  overflow: hidden;
  background: rgba(244, 236, 222, 0.28);
}

.story-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  transform: scaleX(var(--line-progress));
  transform-origin: left;
}

.collection-index {
  padding: clamp(8rem, 15vw, 15rem) var(--page);
  background: var(--paper);
}

.collection-heading,
.product-index {
  width: min(100%, var(--content));
  margin-inline: auto;
}

.collection-heading h2 {
  max-width: 13ch;
  margin-top: 1.6rem;
}

.product-index {
  margin-top: clamp(4rem, 7vw, 7rem);
  border-top: 1px solid var(--line);
}

.index-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(14rem, 0.68fr) minmax(24rem, 1.32fr);
  gap: clamp(1.25rem, 3vw, 4rem);
  align-items: center;
  padding-block: clamp(1.75rem, 3vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.index-row > span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.index-row h3 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 3.1rem);
  font-weight: 400;
  line-height: 1;
  transition: transform 300ms var(--ease);
}

.index-row p {
  max-width: 28rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.25vw, 1.12rem);
  line-height: 1.55;
}

.index-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  background: var(--cocoa);
}

.index-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease);
}

.index-row:nth-child(2) .index-media img {
  object-position: 50% 50%;
}

.index-row:nth-child(4) .index-media img {
  object-position: 54% 54%;
}

.order-section {
  display: grid;
  min-height: 92svh;
  padding: clamp(7rem, 12vw, 11rem) var(--page);
  place-content: center;
  background: var(--espresso);
  color: var(--cream);
  text-align: center;
}

.order-section .section-label {
  color: rgba(244, 236, 222, 0.66);
}

.order-section h2 {
  max-width: 13ch;
  margin: 1.5rem auto 0;
}

.order-section > p:not(.section-label) {
  max-width: 36rem;
  margin: 2.2rem auto 0;
  color: rgba(244, 236, 222, 0.66);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
}

.order-link {
  display: inline-flex;
  justify-self: center;
  gap: 0.65rem;
  margin-top: 2.2rem;
  padding: 0.9rem 0 0.45rem;
  border-bottom: 1px solid var(--mustard);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 220ms ease, border-color 220ms ease;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 6.5rem;
  padding: 1.5rem var(--page);
  background: var(--espresso);
  color: var(--cream);
  border-top: 1px solid rgba(244, 236, 222, 0.17);
}

.site-footer a {
  font-size: 0.78rem;
  text-decoration: none;
}

.site-footer > a:first-child {
  width: max-content;
  font-family: var(--serif);
  font-size: 1rem;
}

.site-footer p {
  color: rgba(244, 236, 222, 0.52);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer > a:last-child {
  justify-self: end;
}

@media (hover: hover) and (pointer: fine) {
  .editorial-item:hover .media-reveal img {
    transform: scale(1.025);
  }

  .index-row:hover h3 {
    transform: translateX(0.35rem);
  }

  .index-row:hover .index-media img {
    transform: scale(1.025);
  }

  .order-link:hover,
  .order-link:focus-visible {
    color: var(--mustard);
    border-color: currentColor;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .has-js .reveal {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 700ms ease, transform 850ms var(--ease);
  }

  .has-js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .editorial-item-large {
    grid-column: 1 / span 8;
  }

  .editorial-item-small {
    grid-column: 9 / span 4;
  }

  .signature-media {
    right: 3vw;
    width: 66vw;
  }

  .story-copy {
    width: 49vw;
  }

  .index-row {
    grid-template-columns: 3rem minmax(12rem, 0.75fr) minmax(18rem, 1.25fr);
  }
}

@media (max-width: 700px) {
  :root {
    --page: 1.25rem;
  }

  section[id] {
    scroll-margin-top: 3.8rem;
  }

  .site-header,
  .site-header.is-scrolled {
    min-height: 3.8rem;
  }

  .header-mark {
    font-size: 0.96rem;
  }

  .header-order {
    font-size: 0.68rem;
  }

  .hero {
    min-height: 92svh;
  }

  .hero-film {
    object-position: 50% center;
  }

  .hero-identity {
    width: min(92%, 34rem);
  }

  .hero-identity h1 {
    font-size: clamp(2.9rem, 12.5vw, 4.6rem);
    line-height: 0.94;
  }

  .hero-identity p,
  .hero-identity span {
    font-size: 0.7rem;
  }

  .introduction {
    min-height: 78svh;
    padding-block: 7.5rem;
  }

  .introduction h2,
  .collection-heading h2,
  .order-section h2 {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .selection {
    padding-block: 5.5rem 8rem;
  }

  .editorial-heading {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .editorial-heading h2 {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0.8rem;
  }

  .editorial-heading span {
    grid-column: 2;
    grid-row: 1;
  }

  .editorial-grid {
    display: block;
    margin-top: 3.5rem;
  }

  .editorial-item-small {
    width: 88%;
    margin: 3.5rem 0 0 auto;
  }

  .editorial-item-large .media-reveal {
    aspect-ratio: 1 / 1.05;
  }

  .editorial-item-small .media-reveal {
    aspect-ratio: 0.88 / 1;
  }

  .item-caption {
    grid-template-columns: 2.5rem 1fr;
  }

  .signature-story {
    height: auto;
  }

  .signature-stage {
    position: relative;
    top: auto;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    padding: 5.75rem var(--page) 0;
    overflow: hidden;
  }

  .mustard-plane,
  .story-progress {
    display: none;
  }

  .signature-index {
    position: relative;
    top: auto;
    left: auto;
    order: 0;
    margin-bottom: 1.5rem;
  }

  .signature-media {
    position: relative;
    top: auto;
    right: auto;
    order: 2;
    width: calc(100% + 2 * var(--page));
    height: auto;
    aspect-ratio: 1 / 1.05;
    margin: 3rem calc(-1 * var(--page)) 0;
    transform: none !important;
  }

  .signature-media::after {
    background: linear-gradient(180deg, rgba(28, 12, 7, 0.05), rgba(28, 12, 7, 0.32));
  }

  .signature-media img {
    object-position: 50% center;
  }

  .story-copy {
    position: relative;
    top: auto;
    left: auto;
    order: 1;
    width: 100%;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto;
  }

  .story-copy h2,
  .story-copy h3 {
    font-size: clamp(3rem, 13.5vw, 4.8rem);
  }

  .story-copy-1 {
    order: 3;
    padding-block: 5rem;
  }

  .story-copy-2 {
    order: 4;
    margin-inline: calc(-1 * var(--page));
    padding: 5rem var(--page) 6rem;
    width: calc(100% + 2 * var(--page));
    background: var(--mustard);
    color: var(--espresso);
  }

  .signature-story[data-step="2"] .story-copy-2 {
    color: var(--espresso);
  }

  .story-copy-2::before {
    display: none;
  }

  .collection-index {
    padding-block: 7.5rem;
  }

  .product-index {
    margin-top: 4.5rem;
  }

  .index-row {
    grid-template-columns: 2.25rem 1fr;
    gap: 0.75rem 1rem;
    padding-block: 2.25rem;
  }

  .index-copy,
  .index-media {
    grid-column: 2;
  }

  .index-media {
    margin-top: 1.2rem;
    aspect-ratio: 4 / 3;
  }


  .order-section {
    min-height: 82svh;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    min-height: 5.5rem;
  }

  .site-footer p {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .hero {
    background-image: url("./assets/film-hero-completo-poster.webp");
    background-position: 50% 56%;
    background-size: cover;
  }

  .hero-film {
    display: none;
  }

  .signature-story {
    height: auto;
  }

  .signature-stage {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: minmax(16rem, 0.8fr) minmax(24rem, 1.2fr);
    gap: 2rem 4rem;
    height: auto;
    min-height: 0;
    padding: 7rem var(--page);
  }

  .mustard-plane,
  .story-progress {
    display: none;
  }

  .signature-index,
  .signature-media,
  .story-copy {
    position: relative;
    inset: auto;
  }

  .signature-index,
  .story-copy {
    grid-column: 1;
  }

  .signature-media {
    grid-column: 2;
    grid-row: 1 / span 4;
    width: 100%;
    height: 100%;
    min-height: 36rem;
    transform: none;
  }

  .story-copy {
    top: auto;
    left: auto;
    width: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .story-copy h2,
  .story-copy h3 {
    font-size: clamp(2.7rem, 4.6vw, 5rem);
  }

  .story-copy-2 {
    color: var(--cream) !important;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 700px) {
  .signature-stage {
    display: flex;
    padding: 5.75rem var(--page) 0;
  }

  .signature-media {
    width: calc(100% + 2 * var(--page));
    min-height: 0;
  }

  .story-copy-2 {
    color: var(--espresso) !important;
  }
}
