/* Shirazi — home only. Loads after base.css; adds, never restyles chrome. */

/* ---- mechanic 2: film hero, words on the film ---- */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--ink);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.6s var(--ease);
}

.hero-media video.playing {
  opacity: 1;
}

/* graded so cream type holds at any frame of the loop */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 13, 15, .74) 0%, rgba(10, 13, 15, .42) 46%, rgba(10, 13, 15, .18) 100%),
    linear-gradient(180deg, rgba(10, 13, 15, .55) 0%, transparent 34%, rgba(10, 13, 15, .5) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  color: var(--cream);
  padding: 0 var(--pad);
  margin-left: min(8vw, 7rem);
  max-width: 46rem;
}

.hero-copy .eyebrow {
  opacity: .72;
  margin-bottom: clamp(1.25rem, .8rem + 1.4vw, 2.25rem);
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 1.1rem + 4.6vw, 4.5rem);
  font-weight: 300;
}

/* ---- mechanic 4: cream editorial on a 12-col grid ---- */
.ed {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(1rem, .5rem + 1.5vw, 2rem);
  padding-block: var(--sec);
}

.ed-brow {
  grid-column: 1 / 4;
  padding-top: .5em;
  opacity: .5;
}

.ed-head {
  grid-column: 5 / 13;
}

.ed-body {
  grid-column: 5 / 13;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  margin-top: clamp(3rem, 2rem + 4vw, 6rem);
}

.ed-body .lede {
  max-width: 22rem;
}

.arrow {
  display: inline-flex;
  align-items: center;
  gap: .9em;
  font-size: var(--eyebrow);
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* square boxed arrow — the house rule kills ballena's circle */
.box {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  font-size: .8rem;
  letter-spacing: 0;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}

.arrow:hover .box {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

/* ---- mechanic 3: 50/50 photo + flat terracotta. The void under the
   headline is the design; do not fill it. ---- */
.sp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 44rem;
}

.sp-img {
  overflow: hidden;
  /* the portrait source must not drive the row height — the text column +
     min-height own it, or the section grows past a full viewport */
  position: relative;
}

.sp-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-col {
  background: var(--terracotta);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(1.5rem, 1rem + 3vw, 4.5rem);
}

.sp-col .eyebrow {
  opacity: .68;
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

.sp-foot {
  margin-top: auto;
  padding-top: clamp(4rem, 2rem + 8vw, 9rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
}

.sp-foot p {
  max-width: 24rem;
  font-size: .9375rem;
  opacity: .9;
}

/* ---- mechanic 5: square photo cards on a snap rail ---- */
.rail {
  padding-block: var(--sec);
}

.rail-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: clamp(1rem, .5rem + 1.5vw, 1.5rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.rail-track::-webkit-scrollbar {
  display: none;
}

.card {
  position: relative;
  scroll-snap-align: start;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), filter .8s var(--ease);
  filter: saturate(.9);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(10, 13, 15, .68) 100%);
}

.card:hover img {
  transform: scale(1.045);
  filter: saturate(1);
}

.card-cap {
  position: absolute;
  z-index: 2;
  inset: auto 1.25rem 1.5rem;
  display: grid;
  justify-items: center;
  gap: .8em;
  text-align: center;
  color: var(--cream);
}

.card-cap .more {
  font-size: .625rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .62;
  transition: opacity .4s var(--ease);
}

.card:hover .card-cap .more {
  opacity: 1;
}

/* the three cards fill the row at desktop; controls appear only once it scrolls */
.rail-nav {
  display: none;
  align-items: center;
  gap: clamp(1rem, .5rem + 1.5vw, 1.75rem);
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

.rail.can-scroll .rail-nav {
  display: flex;
}

.rail-nav .box:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.rail-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}

.rail-line span {
  display: block;
  height: 100%;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(.18);
  transition: transform .3s var(--ease);
}

/* ---- mechanic 6: sage rectangle inset on a full-bleed ember loop ---- */
.band {
  position: relative;
  background: var(--ink);
  display: grid;
  place-items: center;
  padding: clamp(3rem, 2rem + 5vw, 7rem) var(--pad);
  overflow: hidden;
}

.band-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}

.band-media.playing {
  opacity: .85;
}

.inset {
  position: relative;
  z-index: 2;
  width: min(var(--cap), 100%);
  background: var(--sage);
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  padding: clamp(2.25rem, 1.5rem + 3vw, 4rem) clamp(1.5rem, 1rem + 2.5vw, 3.5rem);
}

.inset-head .eyebrow {
  opacity: .6;
  margin-bottom: clamp(3.5rem, 2rem + 6vw, 7rem);
}

.inset-head h2 {
  font-size: var(--display-sm);
}

.inset-meta {
  display: grid;
  gap: .35rem 0;
  font-size: .8125rem;
  line-height: 1.55;
}

.inset-meta dt {
  opacity: .55;
  margin-top: 1rem;
}

.inset-meta dt:first-child {
  margin-top: 0;
}

.inset-cta {
  grid-column: 1 / -1;
  justify-self: start;
  border-color: rgba(10, 13, 15, .4);
}

/* ---- responsive ---- */
@media (max-width: 1000px) {
  .ed-brow {
    grid-column: 1 / -1;
    margin-bottom: 1.5rem;
  }

  .ed-head,
  .ed-body {
    grid-column: 1 / -1;
  }

  .sp {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .sp-img {
    aspect-ratio: 16 / 10;
  }

  .sp-foot {
    padding-top: clamp(2.5rem, 2rem + 4vw, 5rem);
  }

  /* viewport units, not %: a % max is only a growth limit, so the track can
     never exceed the container and the rail would never overflow to scroll */
  .rail-track {
    grid-auto-columns: 60vw;
  }

  .inset {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .inset-head .eyebrow {
    margin-bottom: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  }
}

@media (max-width: 640px) {
  .hero-copy {
    margin-left: 0;
  }

  .ed-body {
    flex-direction: column;
    align-items: flex-start;
  }

  .rail-track {
    grid-auto-columns: 78vw;
  }
}



/* ---- mechanic 8: essence film — sticky interiors loop, three claim beats
   that trade places as you scroll. Cream on ink, one line at a time. ---- */
.film {
  height: 260vh;
  background: var(--ink);
}

.film-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  color: var(--cream);
}

.film-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.9) brightness(.66);
  opacity: 0;
  transition: opacity .8s var(--ease);
}

.film-media.playing {
  opacity: 1;
}

.film-line {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: clamp(6rem, 4rem + 8vh, 10rem) clamp(1.5rem, 1rem + 4vw, 6rem);
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  pointer-events: none;
}

.film-line.on {
  opacity: 1;
  transform: none;
}

.film-t {
  font-size: var(--display);
  font-weight: 300;
  line-height: 1.1;
}

.film-1 {
  align-content: start;
}

.film-2 {
  justify-items: end;
  text-align: right;
}

.film-3 {
  align-content: end;
  justify-items: center;
  text-align: center;
}

.film-3 .eyebrow {
  opacity: .72;
  margin-bottom: 1.1rem;
}

@media (max-width: 640px) {
  .film {
    height: 240vh;
  }

  .film-2 {
    justify-items: start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .film-line {
    transition: none;
    transform: none;
  }
}
