/* Actions and links */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.625rem 1.375rem;
  border: 1px solid var(--color-accent-strong);
  border-radius: var(--radius);
  background: var(--color-accent-strong);
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--duration), border-color var(--duration);
}

.button:hover {
  border-color: var(--color-accent-hover);
  background: var(--color-accent-hover);
}

.button--quiet {
  border-color: var(--color-line-strong);
  background: transparent;
}

.button--quiet:hover {
  border-color: var(--color-text);
  background: transparent;
}

.text-link {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.3em;
  overflow-wrap: anywhere;
  transition: text-decoration-color var(--duration);
}

.text-link:hover {
  text-decoration-color: currentcolor;
}

.breadcrumb {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li + li::before {
  padding-inline: var(--space-1);
  content: "/";
  /* Not read aloud, where supported */
  content: "/" / "";
}

.breadcrumb a {
  display: inline-block;
  padding-block: 0.25rem;
  color: var(--color-accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.125rem;
  border-top: 1px solid var(--color-line);
  font-size: var(--text-lg);
  text-decoration: none;
  transition: color var(--duration);
}

.link-list li:last-child a {
  border-bottom: 1px solid var(--color-line);
}

.link-list a::after {
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.25rem;
  border: solid currentcolor;
  border-width: 2px 2px 0 0;
  content: "";
  transform: rotate(45deg);
}

.link-list a:hover {
  color: var(--color-accent);
}

/* Title and text pairs */

.principles__item {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-3);
  border-top: 1px solid var(--color-line);
}

.principles__item:last-child {
  border-bottom: 1px solid var(--color-line);
}

.principles dt {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

@media (min-width: 48rem) {
  .principles__item {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: var(--space-4);
    padding-block: var(--space-4);
  }

  .columns .principles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .columns .principles__item {
    grid-template-columns: none;
    align-content: start;
    gap: var(--space-2);
    padding-block: var(--space-3) 0;
    border-top-color: var(--color-line-strong);
    border-bottom: 0;
  }
}

/* Product cards */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-3);
}

.product-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-graphite);
  transition: border-color var(--duration), background-color var(--duration);
}

.product-card:hover,
.product-card:focus-within {
  border-color: var(--color-line-strong);
  background: var(--color-raised);
}

.product-card__art {
  aspect-ratio: 16 / 9;
}

.product-card__body {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: var(--space-2);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.product-card__name {
  font-size: var(--text-2xl);
}

.product-card__name a {
  text-decoration: none;
}

/* Makes the whole card clickable with a single link */
.product-card__name a::after {
  position: absolute;
  inset: 0;
  content: "";
}

/* A single product uses the full width */
@media (min-width: 52rem) {
  .product-card:only-child {
    grid-template-rows: none;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .product-card:only-child .product-card__art {
    min-height: 24rem;
    aspect-ratio: auto;
  }

  .product-card:only-child .product-card__body {
    align-content: center;
  }
}

.product-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem var(--space-2);
  font-size: var(--text-sm);
}

.product-facts__status {
  color: var(--color-accent);
}

/* Product artwork */

.visual {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--color-navy);
}

.visual__waves {
  display: block;
  width: 100%;
  height: 100%;
}

.visual__name {
  padding: var(--space-3);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.wave,
.pulse {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.25;
}

.wave--primary {
  stroke-opacity: 0.4;
}

.wave--secondary {
  stroke: var(--color-text);
  stroke-opacity: 0.2;
}

.sphere {
  fill: var(--color-line-strong);
}

.sphere--active {
  fill: var(--color-text);
}

.sphere__halo {
  fill: var(--color-accent-strong);
  fill-opacity: 0.55;
}

.pulse {
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 6s var(--ease) infinite;
}

@keyframes pulse {
  from {
    opacity: 0.9;
    transform: scale(0.35);
  }

  70%,
  to {
    opacity: 0;
    transform: scale(3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse {
    display: none;
  }
}

/* Notices, stores and placeholders */

.draft-notice {
  display: grid;
  gap: 0.25rem;
  padding: var(--space-3);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  background: var(--color-graphite);
}

.draft-notice strong {
  color: var(--color-accent);
}

.draft-notice p {
  color: var(--color-text);
}

.store {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 5.5rem;
  padding-block: var(--space-2);
  border-top: 1px solid var(--color-line);
}

.store:last-child {
  border-bottom: 1px solid var(--color-line);
}

/* Scrolls sideways until all four screenshots fit next to each other */
.screenshots {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
}

.screenshots ul {
  display: flex;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
}

.screenshots li {
  flex: 0 0 min(70%, 17rem);
  scroll-snap-align: start;
}

.screenshots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
}

@media (min-width: 60rem) {
  .screenshots ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: 0;
  }
}

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--space-3);
}

.panel {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: var(--space-2);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-graphite);
}

.panel h2 {
  font-size: var(--text-xl);
}
