/* GameStart: the 2022 layout, modernized. Every value lives in a token below. */

/* Self-hosted, latin subset only: no third-party round trip, works from disk too */
@font-face {
  font-family: "Pixelify Sans";
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/pixelify-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Saira";
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/saira-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* Slate-navy world, from the original #2c3e50 */
  --ground: #0f1620;
  --surface: #172230;
  --surface-2: #1f2c3d;
  --banner: #2c3e50;
  --line: #2f3f53;
  --line-strong: #44576e;
  --tray: #edf0f4;

  --text: #e8edf3;
  --muted: #9aa8b8;
  --accent: #b3a1f7;
  --accent-strong: #6d4fd8;
  --accent-hover: #5a3fc4;
  --danger: #f5a3a5;
  --on-accent: #fff;
  --input-line: #6b7f96;
  --header-bg: rgb(15 22 32 / 0.88);
  --focus-ring: 0 0 0 3px rgb(109 79 216 / 0.45);

  /* Pixel display face for the arcade feel, Saira (squared, controller-era tech) for readable body copy */
  --font-display: "Pixelify Sans", "Segoe UI", sans-serif;
  --font-body: "Saira", "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  --step-3: clamp(2rem, 1.5rem + 2.6vw, 3.25rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: clamp(3rem, 2rem + 4vw, 5rem);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --max: 75rem;
  --gutter: 16px;

  --shadow: 0 10px 24px -12px rgb(3 7 18 / 0.85);
  --shadow-lift: 0 20px 36px -14px rgb(3 7 18 / 0.95);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 180ms;
  --slow: 450ms;

  --z-grain: 1;
  --z-header: 10;
  --z-skip: 20;
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-color: var(--line-strong) var(--ground);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font: 400 var(--step-0) / 1.6 var(--font-body);
  caret-color: var(--accent);
  accent-color: var(--accent-strong);
}

/* Faint grain so the slate never reads as flat fill */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* No italics anywhere: emphasis comes from weight and colour */
em,
i,
cite,
address,
dfn,
var {
  font-style: normal;
}

::selection {
  background: var(--accent-strong);
  color: var(--on-accent);
}

main {
  flex: 1;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}
h1 {
  font-size: var(--step-3);
}
h2 {
  font-size: var(--step-2);
}
h3 {
  font-size: var(--step-0);
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-4);
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color var(--fast) var(--ease-out);
}
a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}
.muted {
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -6rem;
  z-index: var(--z-skip);
  background: var(--accent-strong);
  color: var(--on-accent);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  top: var(--gutter);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--accent-strong);
  color: var(--on-accent);
  font: 600 var(--step-0) / 1 var(--font-display);
  padding: 0.85rem 1.4rem;
  border: 0;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    background var(--fast) var(--ease-out),
    transform var(--fast) var(--ease-out);
}
.btn:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn .icon {
  transition: translate var(--fast) var(--ease-out);
}
.btn:hover .icon {
  translate: 0.25rem 0;
}

/* Tagline bar (the original "Slagzin") */
.tagline {
  margin: 0;
  background: var(--banner);
  color: var(--text);
  text-align: center;
  font: 600 var(--step--1) / 1.4 var(--font-display);
  letter-spacing: 0.02em;
  padding: var(--space-2) var(--gutter);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 4.25rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  text-decoration: none;
  font: 700 var(--step-1) / 1 var(--font-display);
}
.logo img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
}

.nav {
  display: flex;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  position: relative;
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--muted);
  font: 600 var(--step-0) / 1.2 var(--font-display);
  text-decoration: none;
}
.nav a::after {
  content: "";
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--fast) var(--ease-out);
}
.nav a:hover {
  color: var(--text);
}
.nav a:hover::after {
  transform: scaleX(0.4);
}
.nav a[aria-current="page"] {
  color: var(--text);
}
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Sections */
.section {
  padding-block: var(--space-8);
}
.section-title {
  text-align: center;
  margin-bottom: var(--space-6);
}
.section-title p {
  color: var(--muted);
  margin: 0;
}

/* The month band: slate field like the original "Beste Deals" bar */
.band {
  background: var(--banner);
  border-block: 1px solid var(--line-strong);
}
.band .card {
  background: var(--surface);
}

/* Cover shelf slider */
.shelf {
  position: relative;
  margin-inline: auto;
  max-width: 64rem;
}
.shelf-track {
  position: relative;
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-block: var(--space-4) var(--space-6);
  padding-inline: calc(50% - var(--slide-w) / 2);
  --slide-w: min(78vw, 26rem);
}
.shelf-track::-webkit-scrollbar {
  display: none;
}
/* While script.js animates a glide, snapping would fight each frame */
.shelf-track.is-gliding {
  scroll-snap-type: none;
}
@media (min-width: 52rem) {
  .shelf-track {
    mask-image: linear-gradient(
      90deg,
      transparent,
      #000 18%,
      #000 82%,
      transparent
    );
  }
}

.slide {
  flex: 0 0 var(--slide-w);
  margin: 0;
  scroll-snap-align: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0.4;
  transform: scale(0.88);
  filter: saturate(0.5);
  transition:
    opacity var(--slow) var(--ease-out),
    transform var(--slow) var(--ease-out),
    filter var(--slow) var(--ease-out),
    box-shadow var(--slow) var(--ease-out);
}
.slide.is-active {
  opacity: 1;
  transform: none;
  filter: none;
  box-shadow: var(--shadow-lift);
}
.slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.slide figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font: 600 var(--step-0) / 1.3 var(--font-display);
}
.slide figcaption span {
  color: var(--muted);
  font: 400 var(--step--1) / 1.3 var(--font-body);
}

.shelf-btn {
  position: absolute;
  top: calc(50% - var(--space-5));
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    background var(--fast) var(--ease-out),
    transform var(--fast) var(--ease-out);
}
.shelf-btn:hover {
  background: var(--accent-strong);
}
.shelf-btn:active {
  transform: scale(0.96);
}
.shelf-btn.prev {
  left: 0;
}
.shelf-btn.next {
  right: 0;
}

.shelf-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
}
/* Autoplay control; sits in the CTA row, so it skips the absolute arrow placement */
.shelf-btn.shelf-pause {
  position: static;
  translate: none;
}
.shelf-pause[hidden] {
  display: none;
}
.shelf-pause .play,
.shelf-pause[aria-pressed="true"] .pause {
  display: none;
}
.shelf-pause[aria-pressed="true"] .play {
  display: block;
}

/* Product grids */
.grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 52rem) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-5);
  }
}
.grid-slot {
  display: contents;
}

/* Decorative quote tiles that flank the accessory and console rows */
.deco {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
/* The white "play stupid games" tile, flipped to light-on-dark like the map */
.deco-invert img {
  filter: invert(1);
}
.deco img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product card */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition:
    transform var(--fast) var(--ease-out),
    box-shadow var(--fast) var(--ease-out);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
.card:has(a:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-tray {
  margin: var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--tray);
  padding: var(--space-3);
  overflow: hidden;
}
.card-tray img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  transition: scale var(--slow) var(--ease-out);
}
/* Pick it up off the shelf: box art zooms, arrow nudges */
.card:hover .card-tray img {
  scale: 1.06;
}
.card .more .icon {
  transition: translate var(--fast) var(--ease-out);
}
.card:hover .more .icon {
  translate: 0.25rem 0;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-2) var(--space-4) var(--space-4);
}
.card-body h3 {
  margin-bottom: var(--space-1);
}
.card-body h3 a {
  color: var(--text);
  text-decoration: none;
}
.card-body h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.card-body h3 a:focus-visible {
  outline: none;
}
.card .platform {
  margin-bottom: var(--space-3);
}
.card .prices {
  margin: auto 0 var(--space-2);
}
.card .more {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  color: var(--accent);
  font: 600 var(--step--1) / 1 var(--font-display);
}

.platform {
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.3;
}

/* Prices stay in the body face: the pixel face draws € like a 6 and 5 like an S */
.price {
  color: var(--accent);
  font: 700 var(--step-1) / 1 var(--font-body);
  font-variant-numeric: tabular-nums;
}
.was {
  color: var(--muted);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  margin-inline-start: var(--space-2);
}

/* Detail page */
.breadcrumb {
  color: var(--muted);
  font-size: var(--step--1);
  margin-bottom: var(--space-5);
}
.breadcrumb a {
  color: var(--muted);
}
.breadcrumb a:hover {
  color: var(--text);
}

.detail {
  display: grid;
  gap: var(--space-6);
  grid-template-areas: "head" "gallery" "buy" "info";
}
@media (min-width: 56rem) {
  .detail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    grid-template-areas: "gallery head" "gallery info" "buy info";
    grid-template-rows: auto 1fr auto;
    align-items: start;
    column-gap: var(--space-7);
  }
}
.detail-head {
  grid-area: head;
  max-width: 40rem;
}
.detail-head h1 {
  margin-bottom: var(--space-2);
}
.detail-head .facts {
  margin: 0;
}
.gallery {
  grid-area: gallery;
  display: flex;
  gap: var(--space-3);
}
.buy {
  grid-area: buy;
}
.info {
  grid-area: info;
  max-width: 40rem;
}

.gallery-main {
  flex: 1;
  margin: 0;
  background: var(--tray);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}
.gallery-main img {
  width: 100%;
  max-height: 32rem;
  object-fit: contain;
}

.thumbs {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.thumbs button {
  width: 4.5rem;
  aspect-ratio: 1;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: var(--tray);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition:
    opacity var(--fast) var(--ease-out),
    border-color var(--fast) var(--ease-out);
}
.thumbs button:hover {
  opacity: 1;
}
.thumbs button[aria-pressed="true"] {
  opacity: 1;
  border-color: var(--accent);
}
.thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.buy {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}
.buy .price {
  font-size: var(--step-3);
}
.buy .prices {
  margin-bottom: var(--space-3);
}
.save {
  display: inline-block;
  margin: 0 0 var(--space-3);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--accent);
  font: 700 var(--step--1) / 1.2 var(--font-body);
  /* Stepped timing so the deal pops in like an 8-bit power-up */
  animation: power-up 0.4s steps(4, jump-end) 0.45s backwards;
}
.buy .muted {
  font-size: var(--step--1);
}

.info h2 {
  font-size: var(--step-1);
  margin-top: var(--space-6);
}
.info p {
  max-width: 65ch;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  color: var(--muted);
  margin-bottom: var(--space-4);
}

/* Star rating: inputs reversed so ~ lights every lower star */
.stars {
  border: 0;
  padding: 0;
  margin: 0;
}
.stars legend {
  padding: 0;
  margin-bottom: var(--space-1);
  color: var(--muted);
  font-size: var(--step--1);
}
.stars-row {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: var(--space-1);
}
.stars input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.stars label {
  cursor: pointer;
  color: var(--line-strong);
  transition: color var(--fast) var(--ease-out);
}
.stars label::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  background: currentColor;
  -webkit-mask: var(--star) center / contain no-repeat;
  mask: var(--star) center / contain no-repeat;
}
.stars {
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z'/%3E%3C/svg%3E");
}
.stars input:checked ~ label,
.stars label:hover,
.stars label:hover ~ label {
  color: var(--accent);
}
/* The picked star powers up like a coin block */
.stars input:checked + label::before {
  animation: power-up 0.4s steps(4, jump-end);
}
.stars input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.empty {
  text-align: center;
  padding-block: var(--space-8);
}

/* Contact page */
.contact-top {
  display: grid;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
@media (min-width: 52rem) {
  .contact-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }
}
.map-large {
  min-height: 20rem;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}
@media (min-width: 52rem) {
  .panel {
    padding: var(--space-6);
  }
}
.panel address {
  font-style: normal;
}
.panel h2 {
  font-size: var(--step-1);
}

.map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 16rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  filter: invert(0.9) hue-rotate(180deg) saturate(0.6);
}

.form-grid {
  display: grid;
  gap: 0 var(--space-5);
}
@media (min-width: 52rem) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid .field-wide {
    grid-column: 1 / -1;
  }
}

/* Forms */
.field {
  display: grid;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}
label {
  font-weight: 700;
  font-size: var(--step--1);
}
input,
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--ground);
  border: 1px solid var(--input-line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  transition:
    border-color var(--fast) var(--ease-out),
    box-shadow var(--fast) var(--ease-out);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
input:user-invalid,
textarea:user-invalid {
  border-color: var(--danger);
}
textarea {
  min-height: 9rem;
  resize: vertical;
}
.field-error {
  color: var(--danger);
  font-size: var(--step--1);
  margin: 0;
}
.form-status {
  margin: var(--space-3) 0 0;
  color: var(--accent);
  font-size: var(--step--1);
}
.field-error:empty,
.form-status:empty {
  display: none;
}
.field-error:not(:empty),
.form-status:not(:empty) {
  animation: fade-in 0.4s var(--ease-out);
}

/* Doormat: follow us + newsletter, as in the original */
.doormat {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.doormat .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-5);
}
.follow {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.follow p {
  margin: 0;
  font: 600 var(--step-0) / 1 var(--font-display);
}
.socials {
  display: flex;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.socials a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  color: var(--text);
  transition:
    background var(--fast) var(--ease-out),
    border-color var(--fast) var(--ease-out),
    transform var(--fast) var(--ease-out);
}
.socials a:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: translateY(-2px);
}

.newsletter {
  flex: 1 1 20rem;
  max-width: 30rem;
}
.newsletter label {
  display: block;
  margin-bottom: var(--space-1);
}
.newsletter-row {
  display: flex;
  gap: var(--space-2);
}
.newsletter-row input {
  flex: 1;
  min-width: 0;
}

/* Footer: About us | map | pages */
.site-footer {
  background: var(--surface);
}
.footer-grid {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-7);
}
@media (min-width: 52rem) {
  .footer-grid {
    grid-template-columns: 1fr 1.4fr 0.8fr;
  }
}
.site-footer h2 {
  font-size: var(--step-0);
  margin-bottom: var(--space-3);
}
.site-footer address {
  font-style: normal;
  color: var(--muted);
}
.site-footer address a {
  color: var(--text);
}
.site-footer .map {
  height: 12rem;
  min-height: 0;
}
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav a {
  display: block;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition: color var(--fast) var(--ease-out);
}
.footer-nav li:first-child a {
  border-top: 1px solid var(--line);
}
.footer-nav a:hover {
  color: var(--accent);
}

.copyright {
  border-top: 1px solid var(--line);
  padding-block: var(--space-4);
  color: var(--muted);
  font-size: var(--step--1);
}
.copyright p {
  margin: 0;
}

/* Below the fold on every page: skip their layout and paint until scrolled near */
.doormat,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 30rem;
}

/* Motion */

/* Load-in: the first screen powers up in one staggered moment. Everything is visible without it. */
.intro > *,
.shelf,
.shelf-cta,
.breadcrumb,
.detail > * {
  animation: hero-in 0.8s var(--ease-out) backwards;
}
.intro > :nth-child(2),
.detail > :nth-child(2) {
  animation-delay: 0.08s;
}
.shelf,
.detail > :nth-child(3) {
  animation-delay: 0.16s;
}
.shelf-cta,
.detail > :nth-child(4) {
  animation-delay: 0.24s;
}

/* Scroll-driven, no JS. Browsers without support simply show everything static. */
@supports (animation-timeline: view()) {
  .section-title:not(.intro),
  .card,
  .deco,
  .panel {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }

  /* A row of cards lands left to right. Deco tiles take columns 1 and 4 around the slot. */
  .grid > :nth-child(4n + 2),
  .grid-slot > :nth-child(1) {
    animation-range: entry 6% entry 41%;
  }
  .grid > :nth-child(4n + 3),
  .grid-slot > :nth-child(2) {
    animation-range: entry 12% entry 47%;
  }
  .grid > :nth-child(4n + 4),
  .grid-slot + .deco {
    animation-range: entry 18% entry 53%;
  }
}

@keyframes hero-in {
  from {
    opacity: 0;
    translate: 0 1.25rem;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 1.5rem;
    scale: 0.96;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    translate: 0 0.5rem;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes power-up {
  from {
    opacity: 0;
    scale: 0.4;
  }
  60% {
    opacity: 1;
    scale: 1.15;
  }
}

@media (max-width: 30rem) {
  .logo span {
    display: none;
  }
  .nav a {
    padding-inline: var(--space-2);
  }
  .card-body {
    padding-inline: var(--space-3);
  }
  .price {
    font-size: var(--step-0);
  }
  .shelf-track {
    --slide-w: 64vw;
  }
  .slide figcaption {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .shelf-btn {
    width: 2.5rem;
    height: 2.5rem;
  }
  .gallery {
    flex-direction: column-reverse;
  }
  .thumbs {
    flex-direction: row;
  }
}

/* Reduced motion: every moment still plays, as a plain fade. No travel, zoom or tilt. */
@media (prefers-reduced-motion: reduce) {
  .intro > *,
  .shelf,
  .shelf-cta,
  .breadcrumb,
  .detail > *,
  .save,
  .stars input:checked + label::before,
  .field-error:not(:empty),
  .form-status:not(:empty) {
    animation-name: fade;
  }
  /* Scroll-linked reveals keep their timing but only change opacity */
  .section-title:not(.intro),
  .card,
  .deco,
  .panel {
    animation-name: fade;
  }
  .slide,
  .btn:hover,
  .btn:active,
  .card:hover,
  .socials a:hover,
  .shelf-btn:active {
    transform: none;
  }
  .btn:hover .icon,
  .card:hover .more .icon {
    translate: none;
  }
  .card:hover .card-tray img {
    scale: none;
  }
}
