:root {
  color-scheme: light dark;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #FBEBD5;
  --card: #FFF8EC;
  --heading: #5E3D28;
  --section: #4A5A30;
  --text: #3A2A1E;
  --muted: #6A5545;
  --rule: #DDBF9B;
  --focus: #4A5A30;
  --shadow: rgb(58 42 30 / 0.16);

  --espresso: #5E3D28;
  --on-espresso: #FBEBD5;
  --gold: #F2A56B;
  --on-gold: #3A2A1E;
  --forest: #4A5A30;
  --on-forest: #FFF8EC;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2B1E15;
    --card: #3A2A1E;
    --heading: #FBEBD5;
    --section: #BCCB92;
    --text: #F6E7D2;
    --muted: #D8B48C;
    --rule: #5E4635;
    --focus: #F2A56B;
    --shadow: rgb(0 0 0 / 0.4);
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
}

body::before {
  content: "";
  display: block;
  height: 2.25rem;
  background: repeating-linear-gradient(90deg, var(--espresso) 0 2rem, var(--gold) 2rem 4rem);
  mask:
    linear-gradient(#000 0 0) top / 100% 1.25rem no-repeat,
    radial-gradient(circle 1rem at 1rem 1.25rem, #000 calc(100% - 0.5px), transparent 100%) top left / 2rem 100% repeat-x;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  text-wrap: balance;
}

h1 {
  color: var(--heading);
  font-size: clamp(2.75rem, 1.6rem + 6.4vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

h2 {
  margin-bottom: 1.125rem;
  color: var(--section);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.page {
  width: 100%;
  max-width: 62rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

main.page {
  padding-block: clamp(2.25rem, 1.5rem + 4vw, 5rem) 3rem;
}

.lead {
  max-width: 36rem;
  margin: 1.125rem 0 0;
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.columns {
  display: grid;
  gap: 2.75rem;
  margin-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}

@media (min-width: 56rem) {
  .columns {
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: start;
  }
}

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  text-wrap: pretty;
}

.rows li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.5rem;
  border-top: 1px dashed var(--rule);
}

.rows li::before {
  content: "";
  position: absolute;
  top: 1.3rem;
  left: 0.125rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--gold);
}

.steps {
  display: grid;
  gap: 1.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 0.75rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
}

.game-card {
  position: relative;
  display: block;
  padding: 1.5rem 3.25rem 1.5rem 1.5rem;
  border-radius: 1rem;
  background: var(--espresso);
  color: var(--on-espresso);
  text-decoration: none;
}

.game-card::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.5rem;
  width: 0.75rem;
  height: 0.75rem;
  border-top: 3px solid var(--gold);
  border-right: 3px solid var(--gold);
  transform: translateY(-50%) rotate(45deg);
}

.game-card h3 {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.game-card p {
  margin: 0.5rem 0 0;
  text-wrap: balance;
}

.game-card:hover {
  box-shadow: 0 0.5rem 1.25rem var(--shadow);
}

.status {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  margin: 1.25rem 0 0;
  padding: 0.4rem 0.875rem 0.4rem 1.75rem;
  border-radius: 1.25rem;
  background: var(--forest);
  color: var(--on-forest);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
}

@media (min-width: 32rem) {
  .status {
    flex-direction: row;
    gap: 0.3em;
  }
}

.status::before {
  content: "";
  position: absolute;
  top: calc(50% - 0.25rem);
  left: 0.875rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
}

.receipt {
  position: relative;
  padding: 1.5rem 1.25rem 1.75rem;
  filter: drop-shadow(0 0.25rem 0.75rem var(--shadow));
}

.receipt::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--card);
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 0.5rem) no-repeat,
    conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) bottom / 1rem 0.5rem repeat-x;
}

.mark {
  display: block;
  width: 5.5rem;
  height: 5.5rem;
  margin-bottom: 1.25rem;
}

.mark-disc {
  fill: var(--gold);
}

.mark-cup {
  fill: var(--espresso);
}

.mark-handle,
.steam path {
  fill: none;
  stroke: var(--espresso);
  stroke-linecap: round;
}

.mark-handle {
  stroke-width: 5;
}

.steam path {
  stroke-width: 3.5;
}

.site-footer {
  padding-block: 0 2rem;
}

.site-footer a {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--muted);
  text-underline-offset: 0.2em;
}

.site-footer a:hover {
  color: var(--heading);
}

@media (prefers-reduced-motion: no-preference) {
  .game-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .game-card:hover {
    transform: translateY(-2px);
  }

  .steam path {
    animation: steam 3.2s ease-in-out infinite;
  }

  .steam path:nth-child(2) {
    animation-delay: 0.5s;
  }

  .steam path:nth-child(3) {
    animation-delay: 1s;
  }

  @keyframes steam {
    0%, 100% {
      opacity: 0.35;
      transform: translateY(2px);
    }
    50% {
      opacity: 1;
      transform: translateY(-2px);
    }
  }
}
