:root {
  --paper: #f3eee2;
  --paper-soft: #ebe5d6;
  --ink: #1a1a1a;
  --ink-soft: #5a544a;
  --ink-faint: #9a9387;
  --rule: rgba(26, 26, 26, 0.12);
  --max: 880px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(rgba(26, 26, 26, 0.025) 1px, transparent 1px);
  background-size: 4px 4px;
  background-position: 0 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

p {
  margin: 0;
}

/* ---------- nav ---------- */
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 32px 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand__mark {
  color: var(--ink);
  display: block;
}

.brand__name {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: -0.005em;
}

.nav__links {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}

.nav__link {
  font-size: 13.5px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav__link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.nav__link--current {
  color: var(--ink);
  border-bottom-color: var(--rule);
}

/* ---------- main ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- hero ---------- */
.hero {
  padding: 72px 0 96px;
  text-align: center;
}

.ship {
  margin: 0 auto 56px;
  max-width: 560px;
}

.ship img {
  width: 100%;
  height: auto;
  animation: drift 14s ease-in-out infinite;
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.hero__title {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 300;
  max-width: 14ch;
  margin: 0 auto 22px;
}

.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
}

.hero__sub {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 42ch;
  margin: 0 auto;
}

/* ---------- meta strip ---------- */
.meta {
  border-top: 1px solid var(--rule);
  padding: 28px 0 64px;
}

.meta dl {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin: 0;
}

.meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Desktop "spec strip": spread the three items across the row.
   On mobile the dl collapses to one column and we re-center
   everything in the responsive block below. */
@media (min-width: 641px) {
  .meta div:nth-child(2) {
    align-items: center;
    text-align: center;
  }

  .meta div:nth-child(3) {
    align-items: flex-end;
    text-align: right;
  }
}

.meta dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  font-weight: 500;
}

.meta dd {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 15px;
  color: var(--ink);
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--rule);
  width: 100%;
}

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 32px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.foot__note em {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--ink-soft);
}

.foot__links a,
.foot__note a {
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.foot__links a:hover,
.foot__note a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- legal pages ---------- */
.legal {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 32px 96px;
}

.legal__head {
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  font-weight: 500;
  margin: 0;
}

.legal h1 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.legal__meta {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0;
}

.legal__body {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.legal__body h2 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 48px 0 12px;
}

.legal__body h3 {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink);
  letter-spacing: 0;
  margin: 24px 0 8px;
}

.legal__body p,
.legal__body ul {
  margin: 0 0 16px;
}

.legal__body ul {
  padding-left: 22px;
}

.legal__body li {
  margin-bottom: 8px;
}

.legal__body strong {
  color: var(--ink);
  font-weight: 500;
}

.legal__body em {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--ink);
}

.legal__body a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}

.legal__body a:hover {
  border-bottom-color: var(--ink);
}

.legal__back {
  margin: 64px 0 0;
  font-size: 13.5px;
}

.legal__back a {
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.legal__back a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- generic content page ---------- */
.page {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 32px 96px;
}

.page__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 56px;
  max-width: 36ch;
}

.page__title {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}

.page__sub {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 48ch;
  line-height: 1.65;
}

/* ---------- games catalog ---------- */
.catalog {
  border-top: 1px solid var(--rule);
}

.catalog__item {
  display: grid;
  grid-template-columns: minmax(0, 220px) 1fr;
  gap: 48px;
  align-items: start;
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
}

.catalog__art {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper-soft);
  box-shadow: 0 1px 0 var(--rule);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.catalog__art:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px -12px rgba(26, 26, 26, 0.25);
}

.catalog__art img {
  width: 100%;
  height: auto;
  display: block;
}

.catalog__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.catalog__title {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
}

.catalog__title a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}

.catalog__title a:hover {
  border-bottom-color: var(--ink);
}

.catalog__sub {
  color: var(--ink-soft);
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 17px;
}

.catalog__desc {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
  max-width: 52ch;
}

.catalog__desc em {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--ink);
}

.catalog__meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 6px;
}

.catalog__meta a {
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.catalog__meta a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- game detail page ---------- */
.game {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 32px 96px;
}

.game__head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 56px;
}

.game__head .eyebrow a {
  color: var(--ink-faint);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.game__head .eyebrow a:hover {
  color: var(--ink-soft);
  border-bottom-color: var(--ink-soft);
}

.game__head .eyebrow span {
  margin: 0 8px;
  color: var(--ink-faint);
}

.game__title {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(44px, 7vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}

.game__tagline {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--ink-soft);
  max-width: 36ch;
  line-height: 1.4;
}

.game__art {
  margin: 32px 0 8px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper-soft);
  box-shadow: 0 1px 0 var(--rule);
}

.game__art img {
  width: 100%;
  height: auto;
  display: block;
}

.game__shot {
  margin: 18px 0 28px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-soft);
  box-shadow: 0 1px 0 var(--rule);
}

.game__shot img {
  width: 100%;
  height: auto;
  display: block;
}

.game__cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

/* Google's badge PNG bakes its required 1/4-height clear space into the
   asset (file 646x250, visible button 564x168 — button is 67.2% of file
   height). Apple's SVG ships as the bare button with no clear space.
   To make the visible buttons match in height without cropping or
   modifying either asset, render Google ~1.49x the height of Apple. */
.badge__img {
  display: block;
  width: auto;
}

.badge--google .badge__img {
  height: 74px;
}

.badge--apple .badge__img {
  height: 50px;
}

a.badge:hover .badge__img {
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

.game__body {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.7;
  border-top: 1px solid var(--rule);
  padding-top: 40px;
}

.game__body .lead {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 32px;
  max-width: 52ch;
}

.game__body h2 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
}

.game__body h3 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: 0;
  margin: 28px 0 8px;
}

.game__body p {
  margin: 0 0 16px;
  max-width: 60ch;
}

.game__body em {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--ink);
}

.game__body a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}

.game__body a:hover {
  border-bottom-color: var(--ink);
}

.game__spec {
  border-top: 1px solid var(--rule);
  margin-top: 56px;
  padding-top: 28px;
}

.game__spec dl {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin: 0;
}

.game__spec div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (min-width: 641px) {
  .game__spec div:nth-child(2) {
    align-items: center;
    text-align: center;
  }

  .game__spec div:nth-child(3) {
    align-items: flex-end;
    text-align: right;
  }
}

.game__spec dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  font-weight: 500;
}

.game__spec dd {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 15px;
  color: var(--ink);
}

.game__back {
  margin: 56px 0 0;
  font-size: 13.5px;
}

.game__back a {
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.game__back a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .nav,
  main,
  .foot {
    padding-left: 22px;
    padding-right: 22px;
  }

  .hero {
    padding: 48px 0 72px;
  }

  .ship {
    margin-bottom: 40px;
  }

  .meta dl {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .meta div {
    align-items: center;
    text-align: center;
  }

  .foot {
    flex-direction: column;
    text-align: center;
  }

  .nav__link {
    font-size: 12.5px;
  }

  .legal {
    padding: 40px 22px 72px;
  }

  .nav__links {
    gap: 16px;
  }

  .page,
  .game {
    padding: 40px 22px 72px;
  }

  .catalog__item {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 0;
  }

  .catalog__art {
    max-width: 320px;
  }

  .game__spec dl {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .game__spec div {
    align-items: center;
    text-align: center;
  }

  .badge--google .badge__img {
    height: 60px;
  }

  .badge--apple .badge__img {
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ship img {
    animation: none;
  }
}
