/* Home page (index.html): hero with the animated shirts (js/pages/home.js). */

.story {
  height: 400vh;
}

.hero {
  height: 100svh;
  min-height: 620px;
  position: sticky;
  top: 0;
  overflow: hidden;
  background: #758185;
  isolation: isolate;
}

.ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 51% 39%, rgba(255, 255, 255, .27), transparent 60%),
    linear-gradient(120deg, rgba(0, 0, 0, .08), transparent 44%, rgba(0, 0, 0, .22));
  z-index: -1;
}

.copy {
  position: absolute;
  top: 29%;
  left: 5.3%;
  width: 29%;
  z-index: 5;
  max-width: 400px;
}

.arrows {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.arrows button {
  border: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  background: #0003;
  font-size: 24px;
  line-height: 1;
}

.arrows button:hover {
  background: #0006;
}

.arrows button:disabled {
  opacity: .3;
  cursor: default;
}

.copy > p {
  max-width: 315px;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 26px;
  color: #fffffff0;
}

.products {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.shirt {
  position: absolute;
  width: min(33vw, 48vh);
  top: 50%;
  left: 51%;
  margin: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 18px 14px #0002);
}

.shirt:first-child {
  opacity: 1;
}

.shirt img {
  display: block;
  width: 100%;
  height: auto;
}

.shirt[data-color=green] img {
  filter: url(#green-cutout);
}

.shirt[data-color=red] img {
  filter: url(#red-cutout);
}

.shirt[data-color=yellow] img {
  filter: url(#yellow-cutout);
}

.ground-shadow {
  position: absolute;
  width: 24%;
  height: 3%;
  left: 39%;
  top: 81%;
  background: #0005;
  border-radius: 50%;
  filter: blur(14px);
  z-index: 1;
}

.details {
  position: absolute;
  right: 5.3%;
  top: 28%;
  text-align: left;
  width: 160px;
  z-index: 5;
}

.product-kind {
  font-size: .75rem;
  letter-spacing: .08em;
  margin: 0 0 15px;
}

.details h2 {
  font-size: 2.1rem;
  line-height: 1.1;
  font-weight: 400;
  margin: 0 0 4px;
  letter-spacing: -.04em;
}

.old-price {
  font-size: 1.05rem;
  margin: 0;
  color: #ffffffa6;
}

.fit {
  font-size: .9rem;
  line-height: 1.5;
  color: #ffffffdf;
}

.choose-label {
  font-size: .875rem;
  margin: 32px 0 15px;
}

.swatches {
  display: flex;
  gap: 12px;
}

.swatches button {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 2px solid #ffffff45;
  position: relative;
  padding: 0;
}

.swatches button[aria-pressed=true]:after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid #fff;
  border-radius: 50%;
}

.white {
  background: #f1f2ef;
}

.yellow {
  background: #ffdb32;
}

.red {
  background: #ef2429;
}

.green {
  background: #00833c;
}

.hero-footer {
  position: absolute;
  bottom: 6%;
  left: 5.3%;
  right: 5.3%;
  display: flex;
  align-items: end;
  justify-content: space-between;
  z-index: 6;
}

.hero-footer > p {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -7px;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 0;
}

.progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff1;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #ffffff8a;
}

@media (min-width: 1500px) {
  .details {
    width: 180px;
  }

  .copy,
  .details {
    top: 31%;
  }
}

@media (max-width: 1050px) {
  .copy {
    width: 28%;
    top: 25%;
  }

  .details {
    width: 140px;
    right: 4%;
  }

  .details h2 {
    font-size: 1.7rem;
  }

  .shirt {
    width: 36vw;
  }
}

@media (max-width: 700px) {
  .hero {
    min-height: 800px;
  }

  .copy {
    left: 7%;
    top: 13%;
    width: 86%;
    max-width: none;
  }

  .arrows {
    position: absolute;
    right: 0;
    top: 0;
    margin: 0;
  }

  .copy h1 {
    font-size: 2.5rem;
    margin-bottom: 13px;
    max-width: 75%;
  }

  .copy > p {
    font-size: 1rem;
    line-height: 1.5;
    max-width: 290px;
    margin-bottom: 14px;
  }

  .shirt {
    width: min(60vw, 310px);
    left: 40%;
    top: 65%;
  }

  .ground-shadow {
    left: 15%;
    width: 50%;
    top: 86%;
    height: 2%;
  }

  .details {
    top: 53%;
    right: 5%;
    width: 100px;
  }

  .details h2 {
    font-size: 1.3rem;
  }

  .old-price {
    font-size: .875rem;
  }

  .product-kind {
    font-size: .75rem;
    line-height: 1.5;
  }

  .fit {
    font-size: .875rem;
  }

  .choose-label {
    font-size: .875rem;
    margin-top: 20px;
  }

  .swatches {
    display: grid;
    grid-template-columns: repeat(2, 25px);
    gap: 14px;
  }

  .swatches button {
    width: 25px;
    height: 25px;
  }

  .hero-footer {
    bottom: 3%;
    left: 7%;
    right: 7%;
    align-items: center;
  }

  .hero-footer > p {
    font-size: .75rem;
    left: 44%;
    bottom: 0;
  }

  .progress {
    height: 2px;
  }
}

@media (max-width: 700px) {
  .hero {
    min-height: 0;
  }

  .shirt {
    width: min(58vw, 34svh);
  }
}

@media (max-width: 700px) and (max-height: 740px) {
  .copy {
    top: 13%;
  }

  .copy h1 {
    font-size: 2rem;
  }

  .copy > p {
    font-size: .875rem;
    line-height: 1.4;
    max-width: 280px;
  }

  .arrows {
    top: 0;
  }

  .details {
    top: 54%;
  }

  .fit {
    display: none;
  }

  .choose-label {
    margin-top: 16px;
  }
}

html,
body {
  overflow: hidden;
  overscroll-behavior: none;
}

.story {
  height: 100svh;
}

.hero {
  position: relative;
}

/* Keep the small visual swatches, with larger independent touch targets. */
@media (max-width: 700px), (pointer: coarse) {
  .arrows button {
    width: 44px;
    height: 44px;
  }

  .swatches {
    grid-template-columns: repeat(2, 25px);
    gap: 22px;
  }

  .swatches button::before {
    content: '';
    position: absolute;
    width: 44px;
    height: 44px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

/* Horizontal phones and short windows use native scrolling, not a clipped hero. */
@media (max-height: 600px) {
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
  }

  .story {
    height: auto;
  }

  .hero {
    height: 680px;
    min-height: 680px;
  }

  .shirt {
    width: min(32vw, 300px);
  }
}

@media (max-width: 700px) and (max-height: 600px) {
  .hero {
    height: 740px;
    min-height: 740px;
  }

  .shirt {
    width: min(58vw, 250px);
  }
}
