:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;

  background: #0b0e13;
  color: #f7f9fc;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(230, 42, 42, 0.16),
      transparent 35rem
    ),
    linear-gradient(145deg, #151a22 0%, #090b0f 70%);
}

/* Main page */

main {
  width: min(1120px, calc(100% - 2rem));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 4rem) 0;

  display: grid;
  align-content: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

/* Header */

header {
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.45rem;

  color: #ff5454;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;

  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

/* Reader cards */

.reader-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

.reader-card {
  position: relative;

  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;

  display: block;

  color: inherit;
  text-decoration: none;

  background: linear-gradient(
    145deg,
    rgba(40, 47, 59, 0.96),
    rgba(21, 25, 33, 0.96)
  );

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: clamp(1.25rem, 3vw, 2rem);

  box-shadow: 0 1.4rem 3.5rem rgba(0, 0, 0, 0.3);

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;

  -webkit-tap-highlight-color: transparent;
}

.reader-card:hover,
.reader-card:focus-visible {
  transform: translateY(-6px);

  border-color: rgba(255, 76, 76, 0.8);

  box-shadow:
    0 1.7rem 4rem rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 76, 76, 0.18);

  outline: none;
}

.reader-card:active {
  transform: scale(0.985);
}

/* Reader image */

.image-wrap {
  position: absolute;
  inset: 0.75rem 0.75rem 3.5rem;

  display: grid;
  place-items: center;

  overflow: hidden;
}

.image-wrap img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center;

  filter: drop-shadow(0 1rem 1rem rgba(0, 0, 0, 0.35));
}

/* Text overlay */

.card-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;

  min-height: 7.5rem;
  padding: 3rem 1.5rem 1.1rem;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;

  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(10, 13, 18, 0.7) 38%,
    rgba(10, 13, 18, 0.97) 100%
  );
}

.card-label strong,
.card-label small {
  display: block;
}

.card-label strong {
  color: #ffffff;

  font-size: clamp(1.3rem, 2.7vw, 2rem);
  line-height: 1.1;

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}

.card-label small {
  margin-top: 0.3rem;

  color: #d1d7e1;
  font-size: clamp(0.9rem, 1.5vw, 1rem);

  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
}

/* Red arrow */

.arrow {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 50%;
  background: #ed3333;

  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;

  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
}

/* Phone layout */

@media (max-width: 680px) {
  main {
    width: calc(100% - 1rem);
    min-height: 100svh;

    padding: 0.75rem 0;

    align-content: start;
    gap: 0.75rem;
  }

  .eyebrow {
    margin-bottom: 0.2rem;
    font-size: 0.65rem;
  }

  h1 {
    font-size: 1.7rem;
  }

  .reader-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  /*
   * Wide horizontal cards on phones.
   * The fixed responsive height gives the square icons
   * enough room to display completely.
   */

  .reader-card {
    width: 100%;
    height: clamp(210px, 36svh, 290px);

    aspect-ratio: auto;
    border-radius: 1.25rem;
  }

  .image-wrap {
    inset: 0.25rem 0.25rem 2.75rem;
  }

  .image-wrap img {
    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;
  }

  .card-label {
    min-height: 5.5rem;
    padding: 2.25rem 1rem 0.75rem;

    background: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(10, 13, 18, 0.78) 42%,
      rgba(10, 13, 18, 0.98) 100%
    );
  }

  .card-label strong {
    font-size: 1.25rem;
  }

  .card-label small {
    font-size: 0.85rem;
  }

  .arrow {
    width: 2.25rem;
    height: 2.25rem;

    font-size: 1.15rem;
  }
}

/* Short phone screens */

@media (max-width: 680px) and (max-height: 650px) {
  main {
    padding: 0.5rem 0;
    gap: 0.5rem;
  }

  header {
    display: none;
  }

  .reader-grid {
    gap: 0.5rem;
  }

  .reader-card {
    height: calc((100svh - 1.5rem) / 2);
  }

  .image-wrap {
    inset: 0.2rem 0.2rem 2.4rem;
  }

  .card-label {
    min-height: 4.75rem;
    padding: 1.8rem 0.85rem 0.55rem;
  }

  .card-label strong {
    font-size: 1.1rem;
  }

  .card-label small {
    margin-top: 0.15rem;
    font-size: 0.75rem;
  }

  .arrow {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .reader-card {
    transition: none;
  }
}