/* ==========================================================================
   Hero — four copies of the headline, each clipped to one slanted slice.
   .hero is a grid; absolutely positioned children that sit in grid-area 1/1
   use the headline's box as their containing block, so % offsets are
   relative to the headline exactly like the reference.
   ========================================================================== */

.hero {
  --slip: .6; /* scales the per-slice row misregistration measured on the reference */
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 100%;
  align-content: start;
  justify-items: center;
  min-height: 100vh;
  padding: 7rem 1rem 3rem;
}

/* --------------------------------------------------------------------------
   Headline
   -------------------------------------------------------------------------- */
.hero__title {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  width: 100%;
  font-family: var(--serif);
  font-size: 19vw;
  line-height: .92;
  letter-spacing: -.01em;
  color: var(--ash);
  opacity: .88;
  backface-visibility: hidden;
  user-select: none;
}

.hero__layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}
.hero__layer--1 { position: relative; }

.hero__row {
  position: relative;
  display: block;
  white-space: nowrap;
}

.js .hero__row,
.js .hero__line { opacity: 0; }
.no-motion .hero__row,
.no-motion .hero__line { opacity: 1; }

/* mobile row placement */
.hero__row--1 { left: -2%; text-align: right; }
.hero__row--2 { left: 6%; }
.hero__row--3 { padding-left: 1.4em; }
.hero__row--4 { padding-left: 1.9em; }

/* mobile slices */
.hero__layer--1 { clip-path: polygon(0 0, 24.5% 0, 29.8% 100%, 0 100%); }
.hero__layer--2 { clip-path: polygon(24.5% 0, 29.7% 0, 36.7% 100%, 29.7% 100%); }
.hero__layer--3 { clip-path: polygon(29.7% 0, 72.8% 0, 63% 100%, 36.6% 100%); }
.hero__layer--4 { clip-path: polygon(100% 0, 72.8% 0, 63% 100%, 100% 100%); }

/* rows slip vertically inside some slices, so words read as cut */
.hero__layer--2 .hero__row--2 { top: calc(-.1em * var(--slip)); }
.hero__layer--3 .hero__row--1 { top: calc(.1em * var(--slip)); }
.hero__layer--3 .hero__row--4 { top: calc(-.3em * var(--slip)); }
.hero__layer--4 .hero__row--1 { top: calc(.2em * var(--slip)); }
.hero__layer--4 .hero__row--3 { top: calc(-.15em * var(--slip)); }
.hero__layer--4 .hero__row--4 { top: calc(-.35em * var(--slip)); }

/* --------------------------------------------------------------------------
   Seam hairlines (hero.js grows them in, composing the rotation below)
   -------------------------------------------------------------------------- */
.hero__lines {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: .52;
  pointer-events: none;
}
.hero__line {
  position: absolute;
  top: 0;
  width: 1px;
  background: var(--ash);
  transform: rotate(var(--rot));
}
.hero__line--1 { --rot: -4deg;   left: 25.5%;  top: 11.75%; height: 15%;  transform-origin: center top; }
.hero__line--2 { --rot: -4.6deg; left: 32.8%;  height: 40vw;              transform-origin: center bottom; }
.hero__line--3 { --rot: 6.7deg;  left: 72.5%;  height: 77vw;              transform-origin: center top; }

/* --------------------------------------------------------------------------
   Intro copy
   -------------------------------------------------------------------------- */
.hero__intro {
  z-index: 2;
  grid-area: 2 / 1;
  max-width: 34ch;
  margin-top: 1.5rem;
  text-align: center;
}
.hero__lead {
  margin-bottom: .6rem;
  font-size: .95rem;
  line-height: 1;
  letter-spacing: .01em;
}
.hero__body {
  font-size: .9rem;
  line-height: 1.25;
  opacity: .55;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.hero__actions {
  z-index: 2;
  grid-area: 3 / 1;
  justify-content: center;
  margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   "See our stores"
   -------------------------------------------------------------------------- */
.hero__showcase {
  z-index: 2;
  grid-area: 4 / 1;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  margin-top: 3.5rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1;
  text-transform: uppercase;
}
.hero__showcase-b { padding-left: .5rem; }
.hero__showcase i { color: var(--champagne); }

/* --------------------------------------------------------------------------
   Starburst (behind the headline)
   -------------------------------------------------------------------------- */
.hero__burst {
  position: absolute;
  z-index: 0;
  grid-area: 1 / 1;
  top: 30vw;
  left: 53.75%;
  width: 26vw;
  pointer-events: none;
}
.hero__burst svg { opacity: .6; } /* the reveal engine owns the wrapper's opacity */

/* ==========================================================================
   ≥768: reference desktop geometry
   ========================================================================== */
@media (min-width: 768px) {
  .hero {
    grid-template-columns: max-content;
    justify-content: center;
    padding: 8rem 3.5rem 3.5rem;
  }

  .hero__title {
    width: auto;
    /* the widest row (indent 2.5em + "Atelier") is ~5.2em; never wider than the padded viewport */
    font-size: min(16vw, calc((100vw - 7rem) / 5.3));
  }

  .hero__row--1 { left: 0; padding-left: 1.05em; text-align: left; }
  .hero__row--2 { left: 0; }
  .hero__row--3 { padding-left: 1.75em; }
  .hero__row--4 { padding-left: 2.5em; }

  .hero__layer--1 { clip-path: polygon(0 0, 20.5% 0, 29.8% 100%, 0 100%); }
  .hero__layer--2 { clip-path: polygon(20.49% 0, 38.7% 0, 45.7% 100%, 29.7% 100%); }
  .hero__layer--3 { clip-path: polygon(38.7% 0, 72.8% 0, 63% 100%, 45.6% 100%); }

  .hero__layer--2 .hero__row--3 { top: calc(-.3em * var(--slip)); }
  .hero__layer--3 .hero__row--3 { top: calc(-.2em * var(--slip)); }

  /* angles re-derived for this headline's aspect so each line sits on its cut */
  .hero__line--1 { --rot: -7.45deg; left: 22.5%;  top: 21.75%; height: 33%; }
  .hero__line--2 { --rot: -5.55deg; left: 44.35%; top: 0;      height: 80%; }
  .hero__line--3 { --rot: 7.9deg;   left: 72.8%;  top: 0;      height: 100%; }

  .hero__intro {
    position: absolute;
    grid-area: 1 / 1;
    top: 27%;
    left: 56%;
    width: 24%;
    max-width: none;
    margin: 0;
    text-align: left;
  }
  .hero__lead { font-size: 1.45vw; line-height: .95; }
  .hero__body { font-size: 1.35vw; line-height: 1.15; }

  .hero__showcase {
    position: absolute;
    grid-area: 1 / 1;
    top: 39.5%;
    left: 85%;
    flex-direction: column;
    gap: 0;
    margin: 0;
    font-size: max(.95rem, 1.1vw);
  }

  .hero__burst { top: 34.5%; left: 57%; width: 19vw; }

  /* 768–991: buttons sit in a row under the headline */
  .hero__actions { grid-area: 2 / 1; margin-top: 2.5rem; }
}

/* ≥992: stacked in the empty lower-left pocket beside "Store" / "Atelier" */
@media (min-width: 992px) {
  .hero__actions {
    position: absolute;
    grid-area: 1 / 1;
    top: 67%;
    left: 1.5%;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
  }
}

@media (min-width: 992px) {
  .hero__body { font-size: 1vw; }
}

@media (min-width: 1200px) {
  .hero { padding: 5rem 3.5rem; }
  .hero__intro { width: 18%; }
  .hero__lead { font-size: 1.05vw; }
}
