@font-face {
  font-family: "Shacklecut";
  src: url("fonts/Shacklecut-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #120E18;
  --bg-deep: #0D0A12;
  --panel: rgba(18, 14, 24, 0.86);
  --panel-2: rgba(23, 18, 31, 0.82);
  --line: #3A2E1E;
  --line-gold: #7A6234;
  --gold: #D9A441;
  --gold-hi: #F4D58D;
  --text: #EDE6D6;
  --text-2: #CFC6D8;
  --text-3: #A99FB4;
  --title: #F7F0E0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Alegreya Sans", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: #E2B252; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--bg-deep); padding: 8px 14px; }

.display { font-family: "Shacklecut", serif; font-weight: 400; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.page { position: relative; z-index: 1; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); background: rgba(13, 10, 18, 0.86); position: relative; z-index: 2; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 30px; height: 30px; image-rendering: pixelated; }
.brand span { font-family: "Shacklecut", serif; font-size: 22px; letter-spacing: 0.06em; }
.nav-links { display: flex; flex-wrap: wrap; gap: 28px; font-size: 17px; font-weight: 500; }
.nav-links a { text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--title); }
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); position: relative; z-index: 1; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; font-size: 15px; color: var(--text-3); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { text-decoration: none; }

/* Type */
.eyebrow { font-size: 15px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
h2.section-title { margin: 0; font-family: "Shacklecut", serif; font-weight: 400; font-size: 44px; line-height: 1.1; color: var(--title); }
h2.sub-title { margin: 0; font-family: "Shacklecut", serif; font-weight: 400; font-size: 32px; color: var(--title); }
.muted { color: var(--text-2); }
p { margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 12px 28px; text-decoration: none; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 16px; border: 1px solid var(--line-gold); color: var(--text); background: rgba(13, 10, 18, 0.6); }
.btn:hover { color: var(--title); border-color: var(--gold); }
.btn-gold { background: var(--gold); color: #1A1206; border-color: var(--gold-hi); }
.btn-gold:hover { background: var(--gold-hi); color: #1A1206; }
.badge { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border: 1px solid var(--line-gold); background: rgba(13, 10, 18, 0.7); font-weight: 700; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; }

/* Home hero */
.studio-hero { background: radial-gradient(ellipse at 50% 0%, rgba(42, 31, 58, 0.75) 0%, rgba(18, 14, 24, 0) 70%); border-bottom: 1px solid var(--line); }
.studio-hero .wrap { padding-top: 128px; padding-bottom: 120px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.ornament { display: flex; align-items: center; gap: 16px; }
.ornament i { width: 72px; height: 1px; background: var(--line-gold); display: block; }
.ornament b { width: 22px; height: 22px; border: 2px solid var(--gold); transform: rotate(45deg); display: block; }
.studio-hero h1 { margin: 0; font-family: "Shacklecut", serif; font-weight: 400; font-size: clamp(32px, 8.6vw, 104px); line-height: 1.02; letter-spacing: 0.05em; color: var(--title); }
.studio-hero p { max-width: 620px; font-size: 22px; color: var(--text-2); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 10px; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 56px; align-items: start; padding-top: 96px; padding-bottom: 96px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }

.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel-2); }
.band .wrap { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 32px; }

.game-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); text-decoration: none; color: var(--text); border: 1px solid var(--line-gold); background: var(--bg); overflow: hidden; }
.game-card > img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; display: block; }
.game-card .body { padding: 40px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.game-card .meta { font-size: 14px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); }
.game-card .name { font-family: "Shacklecut", serif; font-size: 48px; line-height: 1; letter-spacing: 0.04em; color: var(--title); }
.game-card .more { color: var(--gold); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 16px; }
.game-card:hover { border-color: var(--gold); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; padding-top: 72px; padding-bottom: 72px; }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 24px; border: 1px solid var(--line); background: var(--panel); }
.stat .num { font-family: "Shacklecut", serif; font-size: 40px; color: var(--gold); line-height: 1; }
.stat .foot { display: flex; flex-direction: column; gap: 8px; }
.stat .label { font-weight: 700; color: var(--title); }
.stat .line { color: var(--text-2); font-size: 16px; }

/* Card fans and cards */
.fan { display: flex; padding: 6px 0 14px 10px; }
.fan .card { width: 64px; margin-left: -10px; }
.fan .card:nth-child(1) { transform: rotate(-8deg); }
.fan .card:nth-child(2) { transform: rotate(-3deg); }
.fan .card:nth-child(3) { transform: rotate(3deg); }
.fan .card:nth-child(4) { transform: rotate(8deg); }
.card { position: relative; aspect-ratio: 2 / 3; }
.card > img, .card .window { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.card .portrait { position: absolute; left: 7.94%; top: 1.74%; width: 84.11%; height: 84.2%; object-fit: contain; display: block; }
.card .king { position: absolute; left: 12%; top: 8%; width: 76%; height: 70%; object-fit: contain; object-position: center bottom; display: block; }
.card .window { -webkit-mask: url("img/card-background.png") center / 100% 100% no-repeat; mask: url("img/card-background.png") center / 100% 100% no-repeat; overflow: hidden; }
.card .window img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 28px 20px; padding-top: 12px; }

.contact { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.contact .mail { font-size: 24px; font-weight: 700; margin-top: 8px; }

/* Game page */
.game-hero { position: relative; overflow: hidden; min-height: 520px; display: flex; align-items: flex-end; }
.game-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.game-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, rgba(18, 14, 24, 0.6) 50%, rgba(18, 14, 24, 0.15) 100%); }
.game-hero .wrap { position: relative; z-index: 1; width: 100%; padding-bottom: 56px; display: flex; flex-direction: column; gap: 16px; }
.game-hero h1 { margin: 0; font-family: "Shacklecut", serif; font-weight: 400; font-size: clamp(44px, 8vw, 96px); line-height: 1; letter-spacing: 0.04em; color: var(--title); text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6); }
.game-hero p { max-width: 620px; font-size: 21px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.section { padding-top: 40px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 28px; }
.regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.region { padding: 20px; border: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.region .name { font-family: "Shacklecut", serif; font-size: 22px; color: var(--gold); }
.region p { color: var(--text-2); font-size: 16px; }
.facts { margin: 0; display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 14px 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; }

/* Privacy */
.legal { max-width: 760px; margin: 0 auto; padding: 80px 24px 96px; display: flex; flex-direction: column; gap: 36px; }
.legal h1 { margin: 0; font-family: "Shacklecut", serif; font-weight: 400; font-size: 52px; line-height: 1.1; color: var(--title); }
.legal section { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 28px; color: var(--text-2); }
.legal h2 { margin: 0; font-size: 24px; color: var(--gold); }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* Scrolling background on the home page */
.dev-cycle { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.dev-cycle .dust { position: absolute; left: 0; right: 0; top: 0; height: 170vh; will-change: transform; }
.dev-cycle .dust i { position: absolute; display: block; }
.dev-cycle .stage { position: absolute; width: clamp(120px, 15vw, 220px); display: flex; flex-direction: column; gap: 10px; transition: opacity 0.35s ease; will-change: transform, opacity; }
.dev-cycle .stage.left { left: 5%; align-items: flex-start; text-align: left; }
.dev-cycle .stage.right { right: 9%; align-items: flex-end; text-align: right; }
.dev-cycle .stage svg { width: 100%; height: auto; display: block; }
.dev-cycle .stage .t { font-family: "Shacklecut", serif; font-size: 20px; letter-spacing: 0.08em; }
.dev-cycle .stage .l { font-size: 15px; color: var(--text-2); }
.dev-cycle .fern { position: absolute; right: 18px; bottom: 0; width: 96px; height: 100%; }
.dev-cycle .fern i { position: absolute; display: block; width: 10px; height: 10px; transition: opacity 0.4s ease; }
.dev-cycle .loop { position: absolute; right: 24px; top: 96px; font-family: "Shacklecut", serif; font-size: 16px; letter-spacing: 0.1em; color: var(--gold); opacity: 0; transition: opacity 0.5s ease; }
.has-cycle .studio-hero, .has-cycle .band, .has-cycle .stat { backdrop-filter: none; }
@media (max-width: 760px) {
  .dev-cycle { opacity: 0.4; }
  .dev-cycle .stage .l { display: none; }
  .dev-cycle .stage .t { font-size: 15px; }
  .game-card .body { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dev-cycle * { transition: none !important; }
}

/* "Address copied" note for email links */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; transform: translate(-50%, 12px); opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; background: #1E1729; color: var(--title); border: 1px solid var(--gold); padding: 12px 20px; font-size: 16px; font-weight: 500; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
