/* Isle Hours product page: what differs from the Harlo page (harlo.css). */

.isle-hero {
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

.isle-icons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 20px);
  max-width: 420px;
  margin: 0 auto;
}

.isle-icons img,
.isle-tab img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22.5%;
  image-rendering: pixelated;
}

/* ---------- Four islands ---------- */

.isle-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 20px);
  max-width: 640px;
  margin: 28px 0 32px;
}

.isle-tab {
  padding: 8px 6px 10px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}

.isle-tab img {
  margin-bottom: 8px;
}

.isle-tab[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  box-shadow: inset 0 0 0 2px var(--ink);
}

.isle-tab:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.isle-phones {
  display: flex;
  align-items: flex-end;
  gap: clamp(16px, 3vw, 36px);
}

.isle-phones figure {
  margin: 0;
  min-width: 0;
}

/* widths in the ratio of the two screens, plus their borders, so both come out the same height */
.isle-duo {
  flex: 1.489 1 12px;
}

.isle-slab {
  flex: 0.46 1 12px;
}

.isle-pano {
  display: block;
  width: 100%;
  height: auto;
  background: var(--space-bottom);
  border: 6px solid #111;
  border-radius: 26px;
}

/* the whole island is wider than the Duo's screen: the film slides behind it */
.isle-pano {
  position: relative;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.isle-pano::before {
  content: "";
  display: block;
  aspect-ratio: 1304 / 876;
}

.isle-pano-slab::before {
  aspect-ratio: 604 / 1314;
}

/* the film is not filmed on a phone, so the Dynamic Island is drawn on top */
.isle-pano-slab::after {
  content: "";
  position: absolute;
  top: 2%;
  left: 35%;
  width: 30%;
  height: 3.4%;
  background: #000;
  border-radius: 999px;
  pointer-events: none;
}

.isle-pano.is-dragging {
  cursor: grabbing;
}

.isle-phones .isle-pano video {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  max-width: none;
  height: 100%;
  border: 0;
  border-radius: 0;
  pointer-events: none;
}

.isle-phones figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
}

.isle-words {
  max-width: var(--measure);
  margin-top: 28px;
}

.isle-words p + p {
  margin-top: 0.8em;
}

.isle-film {
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  .isle-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .isle-icons {
    max-width: 260px;
  }

  .isle-tab {
    font-size: 0.8rem;
  }

  .isle-phones {
    flex-direction: column;
    align-items: stretch;
  }

  .isle-duo {
    flex: none;
  }

  .isle-phones .isle-slab {
    flex: none;
    width: 62%;
    margin: 0 auto;
  }
}
