/* ==========================================================================
   loveofmagic.net, site styles
   No dependencies, no build step. Edit and deploy.
   ========================================================================== */

:root {
  --bg:        #0a0a0c;
  --bg-2:      #101014;
  --panel:     #16161c;
  --line:      #26262f;
  --ink:       #ece9e4;
  --ink-dim:   #a09c96;
  --ink-faint: #6d6a66;
  --gold:      #d9b45b;
  --gold-dim:  #9d8442;
  --red:       #c0344a;

  --wrap: 1180px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: #f0cd7d; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: #000; padding: 12px 20px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

.vh {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- type ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.12;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }

.eyebrow {
  font: 500 0.72rem/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 1.1rem;
}

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-dim); max-width: 62ch; }
.muted { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }

p { margin: 0 0 1.05em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex; align-items: center; gap: 28px;
  min-height: 64px;
}

.brand {
  font: 600 0.84rem/1 var(--sans);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { color: #fff; }

.nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  font: 500 0.82rem/1 var(--sans);
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}
.nav a:hover { color: var(--gold); }
.nav a[aria-current="page"] { color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel);
  color: var(--ink);
  font: 500 0.86rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.btn:hover { background: #1e1e26; border-color: var(--gold-dim); color: #fff; }
.btn:active { transform: translateY(1px); }

.btn--gold { background: var(--gold); border-color: var(--gold); color: #14100a; font-weight: 600; }
.btn--gold:hover { background: #e8c470; border-color: #e8c470; color: #000; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- home hero ---------- */

.hero {
  position: relative;
  padding: clamp(72px, 12vh, 150px) 0 clamp(56px, 8vh, 92px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -20% -10% auto -10%; height: 130%;
  background:
    radial-gradient(48% 55% at 22% 18%, rgba(217,180,91,0.13), transparent 70%),
    radial-gradient(42% 50% at 82% 8%, rgba(192,52,74,0.10), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; text-align: center; }
.hero h1 { margin-inline: auto; max-width: 22ch; }
.hero .lede { margin-inline: auto; max-width: 64ch; }

/* section heading that acts as a tagline above a blurb */
.tagline {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  max-width: 26ch;
  margin: 0 auto 0.75em;
  text-align: center;
}

/* ---------- franchise cards ---------- */

.games { padding: 8px 0 clamp(72px, 10vh, 120px); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color 160ms ease, transform 160ms ease;
  isolation: isolate;
}
.card:hover { border-color: var(--gold-dim); transform: translateY(-2px); }

/* the 16:9 art carries its own title lockup, so the card never crops it and
   the text sits underneath rather than on top of it */
.card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(.2,.7,.3,1);
}
.card:hover .card__media img { transform: scale(1.03); }

.card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.card__title {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.15;
  color: #fff;
  margin: 0;
}
.card__line {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-dim);
  margin: 0;
  max-width: 40ch;
}
.card__meta {
  font: 500 0.68rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 3px;
}

/* ---------- page hero (sub-pages) ---------- */

.page-hero {
  position: relative;
  /* height, not aspect-ratio: max-height on a box with an aspect ratio also
     constrains its width, which leaves a gap down the right of the page. */
  height: clamp(420px, 34vw, 860px);
  display: flex; align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.page-hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

/* the 2560×1100 banners put the subject right and leave the left dark, so this
   is only a grade, not a rescue */
.page-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 2%, rgba(10,10,12,0.78) 42%, rgba(10,10,12,0.10) 100%),
    linear-gradient(to right, rgba(10,10,12,0.86) 0%, rgba(10,10,12,0.46) 30%, rgba(10,10,12,0) 58%);
}
.page-hero .wrap { position: relative; z-index: 2; padding-bottom: clamp(32px, 5vh, 56px); padding-top: 120px; }
.page-hero h1 { margin-bottom: 0.35em; text-shadow: 0 2px 30px rgba(0,0,0,0.75); }

.meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.meta-chips li {
  font: 500 0.72rem/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  background: rgba(16,16,20,0.7);
  padding: 7px 11px;
  border-radius: 2px;
}

/* ---------- sections ---------- */

.section { padding: clamp(56px, 9vh, 104px) 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section--tight { padding: clamp(40px, 6vh, 64px) 0; }
.section--panel { background: var(--bg-2); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.prose p { color: #cfcac3; }
.prose h3 { margin-top: 1.6em; color: var(--ink); }
.prose ul { color: #cfcac3; padding-left: 1.2em; margin: 0 0 1.05em; }
.prose li { margin-bottom: 0.35em; }

/* ---------- trailer ---------- */

.trailer {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000 center/cover no-repeat;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  overflow: hidden;
  width: 100%;
}
.trailer video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.trailer__note {
  position: relative; z-index: 2;
  text-align: center;
  padding: 24px;
  color: var(--ink-dim);
  font-size: 0.85rem;
}
.trailer__note strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 6px; }

.trailer-list {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 8px 22px; margin-top: 18px;
}
.trailer-list__label {
  font: 600 0.7rem/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.trailer-list a { font-size: 0.85rem; }

/* buttons that swap the video above them */
.trailer-btn {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 2px 0;
  font: 500 0.85rem/1.3 var(--sans);
  color: var(--ink-dim);
  cursor: pointer;
}
.trailer-btn:hover { color: var(--gold); }
.trailer-btn.is-active { color: var(--ink); border-bottom-color: var(--gold-dim); }

/* ---------- steam buy widgets ---------- */

.buy-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 646px));
  justify-content: center;
  justify-items: center;
}
.buy { width: 100%; max-width: 646px; }
.buy__label {
  font: 600 0.7rem/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 10px;
  max-width: none;
}
.buy iframe {
  display: block;
  width: 100%;
  max-width: 646px;
  height: 190px;
  border: 0;
  margin-inline: auto;
}
.section--center { text-align: center; }

/* ---------- feature list ---------- */

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.feature-list li {
  color: #cfcac3;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}
.feature-list strong { color: var(--ink); font-weight: 600; }

/* plain bullets with a small gold marker */
.bullet-list { list-style: none; margin: 1.4em 0 0; padding: 0; display: grid; gap: 14px; }
.bullet-list li { position: relative; padding-left: 22px; color: #cfcac3; }
.bullet-list li::before {
  content: "";
  position: absolute; left: 2px; top: 0.62em;
  width: 6px; height: 6px;
  background: var(--gold-dim);
  transform: rotate(45deg);
}

/* ---------- screenshots ---------- */

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shots img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border: 1px solid var(--line);
  background: var(--panel);
}

/* ---------- book / release list ---------- */

.books { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.book {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 580px;
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
  background: var(--bg);
  padding: 26px clamp(18px, 3vw, 34px);
}
.book__year { font: 500 0.74rem/1 var(--sans); letter-spacing: 0.18em; color: var(--gold-dim); }
.book__title { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 6px; }
.book__desc { margin: 0; font-size: 0.92rem; color: var(--ink-dim); max-width: 52ch; }
.book .buy iframe { width: 100%; }

/* ---------- footer ---------- */

.site-foot { padding: clamp(48px, 7vh, 76px) 0 56px; background: var(--bg-2); border-top: 1px solid var(--line); }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 64px);
}
.foot-h {
  font: 600 0.7rem/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 16px;
}
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-list a { color: var(--ink-dim); font-size: 0.92rem; }
.foot-list a:hover { color: var(--gold); }
.foot-legal {
  margin-top: clamp(40px, 6vh, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between;
}

/* ---------- wallpaper gallery ---------- */

.wall-grid {
  column-width: 240px;
  column-gap: 14px;
}
.wall-grid a {
  position: relative;
  display: block;
  margin-bottom: 14px;
  break-inside: avoid;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 140ms ease;
}
.wall-grid a:hover { border-color: var(--gold-dim); }
.wall-grid img { width: 100%; height: auto; }

/* original size badge */
.wall-tag {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 4px 7px;
  border-radius: 2px;
  background: rgba(6, 6, 8, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cfcac3;
  font: 500 0.63rem/1 var(--sans);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
}
.wall-grid a:hover .wall-tag,
.wall-grid a:focus-visible .wall-tag { opacity: 1; }

.wall-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 8px 24px; margin-bottom: clamp(24px, 4vh, 40px);
}
.wall-head .back {
  font: 500 0.8rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.wall-head .back:hover { color: var(--gold); }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .book { grid-template-columns: 1fr; gap: 14px; }
  .book__desc { max-width: 68ch; }
}

@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
  .card { aspect-ratio: 16 / 10; }
  .split { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .site-head .wrap { min-height: 56px; gap: 14px; }
  .nav { gap: 14px; }
  .nav a { font-size: 0.76rem; }
  .shots { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .page-hero { min-height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .card:hover img { transform: none; }
}
