.hero {
  --homepage-section-gap: 80px;
}

.product-shot,
.feature-card {
  margin: 0;
}

.product-shot {
  display: grid;
  grid-template-rows: auto auto;
  align-items: start;
}

.product-title {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}

.product-shot__title {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(1.35em + 18px);
  padding: 18px 8px 0;
  color: #b7b7b7;
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 600;
  line-height: 1.35;
}

.subline {
  color: #e5e5e5;
}

.device-button {
  position: relative;
  appearance: none;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
}

.device-button::after {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background:
    linear-gradient(#ffffff, #ffffff) center / 10px 1px no-repeat,
    linear-gradient(#ffffff, #ffffff) center / 1px 10px no-repeat,
    rgba(10, 10, 10, 0.82);
  content: "";
  opacity: 0.68;
  pointer-events: none;
  transition: opacity 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.device-button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 5px;
}

.device-button.device-button--pointer-restored-focus:focus {
  outline: 0;
}

@media (hover: hover) and (pointer: fine) {
  .device-button:hover::after,
  .device-button:focus-visible::after {
    border-color: #ffffff;
    background-color: #222222;
    opacity: 1;
  }
}

@media (hover: none) {
  .device-button::after {
    opacity: 0.72;
  }
}

.device-button .product-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

.device-button--hero {
  --hero-device-height: clamp(460px, 58vw, 520px);
  place-items: end center;
  height: var(--hero-device-height);
}

.device-button--hero .product-image {
  max-height: var(--hero-device-height);
}

.product-shot--watch .product-image {
  max-width: min(100%, 320px);
}

.product-shot--iphone .product-image {
  max-width: min(100%, 300px);
}

.feature-gallery-shell {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  column-gap: 8px;
  width: 100%;
  max-width: 920px;
  min-width: 0;
  margin: 0 auto;
}

.feature-gallery-section {
  width: 100%;
  max-width: 920px;
  min-width: 0;
  margin: 88px auto var(--homepage-section-gap);
  text-align: left;
}

.feature-gallery-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 52px 34px;
}

.feature-gallery-heading h2 {
  min-width: 0;
  margin: 0;
  font-size: clamp(24px, 2.2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.closing-sections {
  width: 100%;
  max-width: 920px;
  min-width: 0;
  margin: 0 auto var(--homepage-section-gap);
  padding: 0 52px;
  text-align: left;
}

.closing-section + .closing-section {
  margin-top: var(--homepage-section-gap);
}

.guide-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: var(--homepage-section-gap);
}

.guide-choice-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.035);
}

.guide-choice-card + .guide-choice-card {
  margin-top: 0;
}

.guide-choice-card .closing-section__description {
  flex: 1 1 auto;
}

.closing-section h2 {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.closing-section__description {
  max-width: 680px;
  margin: 16px 0 0;
  color: #b7b7b7;
  font-size: 17px;
  line-height: 1.65;
}

.closing-section .match-report-link {
  width: min(100%, 310px);
}

.match-report-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  margin-top: 24px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f5;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .match-report-link:hover {
    border-color: #ffffff;
    background: #ffffff;
    color: #0a0a0a;
  }
}

.match-report-link:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.fictional-match-note {
  max-width: 760px;
  margin: 24px 52px 0;
  color: #8f949c;
  font-size: 13px;
  line-height: 1.55;
}

.feature-gallery-shell .feature-gallery {
  grid-area: auto;
  width: 100%;
  max-width: none;
  margin-top: 0;
}

.feature-card {
  display: grid;
  grid-template-rows: minmax(3.6em, auto) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background: #15171A;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.feature-card__title {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 3.6em;
  padding: 18px 14px 0;
  font-size: 16px;
  line-height: 1.3;
}

.gallery-nav {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0 0 3px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: #15171a;
  color: #d8d9db;
  font: inherit;
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.gallery-nav:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.48);
  background: #202328;
  color: #ffffff;
}

.gallery-nav:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.gallery-nav:disabled {
  opacity: 0.28;
  cursor: default;
  box-shadow: none;
}

.gallery-nav[hidden] {
  display: none;
}

.device-button--gallery {
  --gallery-device-height: clamp(340px, 42vw, 380px);
  place-items: start center;
  height: var(--gallery-device-height);
  padding: 10px 18px 22px;
}

.device-button--gallery .product-image {
  max-height: calc(var(--gallery-device-height) - 32px);
}

.device-button--gallery,
.device-button--gallery .product-image {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.device-button--gallery .product-image {
  -webkit-user-drag: none;
}

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

.device-lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  overflow: hidden;
  border: 0;
  background: rgba(3, 4, 5, 0.94);
  color: #ffffff;
}

.device-lightbox[open] {
  display: grid;
  place-items: center;
}

.device-lightbox::backdrop {
  background: transparent;
}

.device-lightbox__surface {
  display: grid;
  place-items: center;
  max-width: min(92vw, 1500px);
  max-height: calc(100dvh - 48px);
}

.device-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 1500px);
  max-height: calc(100dvh - 48px);
  object-fit: contain;
}

.device-lightbox__close {
  position: fixed;
  z-index: 1;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0 0 3px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(15, 17, 20, 0.9);
  color: #ffffff;
  font: 300 34px/1 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
}

.device-lightbox__close:hover {
  border-color: #ffffff;
  background: #22252a;
}

.device-lightbox__close:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

@media (min-width: 1280px) {
  .hero {
    --homepage-section-gap: 112px;
  }

  .product-shot {
    align-self: start;
    padding-top: clamp(154px, 11.8vw, 170px);
  }

  .device-button--hero {
    --hero-device-height: 452px;
  }

  .product-shot--watch .product-image {
    max-width: min(88%, 248px);
  }

  .product-shot--iphone .product-image {
    max-width: min(88%, 212px);
  }

  .feature-gallery-section {
    grid-area: gallery;
    width: 100%;
    max-width: 1280px;
    margin-top: 100px;
    margin-bottom: var(--homepage-section-gap);
    justify-self: center;
  }

  .feature-gallery-shell {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    column-gap: 14px;
    max-width: 1280px;
  }

  .feature-gallery-shell .feature-gallery {
    grid-auto-columns: calc((100% - 48px) / 4);
    gap: 16px;
  }

  .feature-gallery-heading {
    margin-right: 62px;
    margin-bottom: 36px;
    margin-left: 62px;
  }

  .closing-sections {
    grid-column: 1 / -1;
    max-width: 1280px;
    margin-bottom: var(--homepage-section-gap);
    padding-right: 62px;
    padding-left: 62px;
    justify-self: center;
  }

  .device-button--gallery {
    --gallery-device-height: 360px;
  }

  .gallery-nav {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 640px) {
  .hero {
    --homepage-section-gap: 68px;
  }

  .product-showcase {
    gap: 36px;
    margin-top: 44px;
  }

  .product-shot {
    grid-template-rows: auto auto;
  }

  .product-shot__title {
    min-height: 0;
    padding-top: 16px;
    padding-bottom: 0;
    font-size: 17px;
  }

  .device-button--hero {
    --hero-device-height: 460px;
  }

  .product-shot--watch .device-button--hero {
    --hero-device-height: 360px;
  }

  .product-shot--watch .product-image {
    max-width: min(100%, 225px);
  }

  .feature-card__title {
    font-size: 15px;
  }

  .feature-gallery-section {
    max-width: 100%;
    margin-top: 74px;
    margin-bottom: var(--homepage-section-gap);
  }

  .feature-gallery-heading {
    gap: 16px;
    margin: 0 0 22px;
  }

  .feature-gallery-heading h2 {
    font-size: 21px;
  }

  .closing-sections {
    max-width: 100%;
    margin-bottom: var(--homepage-section-gap);
    padding: 0;
  }

  .closing-section + .closing-section {
    margin-top: var(--homepage-section-gap);
  }

  .guide-choice-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .guide-choice-card + .guide-choice-card {
    margin-top: 0;
  }

  .closing-section h2 {
    font-size: 21px;
  }

  .closing-section__description {
    font-size: 16px;
  }

  .closing-section .match-report-link {
    width: 100%;
    padding-right: 14px;
    padding-left: 14px;
    font-size: 14px;
    white-space: normal;
  }

  .fictional-match-note {
    margin-right: 0;
    margin-left: 0;
  }

  .feature-gallery-shell {
    display: block;
    max-width: 100%;
  }

  .feature-gallery-shell .feature-gallery {
    grid-auto-columns: min(70vw, 260px);
    gap: 12px;
  }

  .gallery-nav {
    display: none;
  }

  .device-button--gallery {
    --gallery-device-height: 330px;
    padding: 8px 14px 18px;
  }

  .device-button--gallery .product-image {
    max-height: calc(var(--gallery-device-height) - 26px);
  }

  .ref7-footer__nav {
    column-gap: 22px;
    row-gap: 14px;
  }

  .ref7-footer__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .device-lightbox {
    padding: 16px;
  }

  .device-lightbox__surface {
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
  }

  .device-lightbox__image {
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
  }

  .device-lightbox__close {
    width: 44px;
    height: 44px;
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .device-button::after,
  .gallery-nav,
  .device-lightbox,
  .device-lightbox * {
    transition: none;
    scroll-behavior: auto;
  }
}
