/* Tycoon Universe hub. Each game card wears its own game's colours and title type. */

:root {
  --bg: #fff6e8;
  --bg-2: #ffe9cc;
  --ink: #2b2140;
  --ink-soft: #5d5370;
  --line: rgba(43, 33, 64, 0.12);
  --card: #ffffff;
  --sun: #ffc24a;
  --sea: #2aa6bf;
  --coral: #f47a5a;
  --shadow: 0 1px 2px rgba(43, 33, 64, 0.08), 0 10px 30px -12px rgba(43, 33, 64, 0.35);
  --radius: 22px;
  --ui: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14122a;
    --bg-2: #1e1a3c;
    --ink: #f6efe4;
    --ink-soft: #bdb4cf;
    --line: rgba(246, 239, 228, 0.14);
    --card: #221e42;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 34px -14px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14122a;
  --bg-2: #1e1a3c;
  --ink: #f6efe4;
  --ink-soft: #bdb4cf;
  --line: rgba(246, 239, 228, 0.14);
  --card: #221e42;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 34px -14px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 85% -10%, color-mix(in srgb, var(--sea) 22%, transparent), transparent 70%),
    radial-gradient(800px 500px at -10% 10%, color-mix(in srgb, var(--sun) 30%, transparent), transparent 70%),
    var(--bg);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
button { font: inherit; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; border-radius: 10px; }

/* ---------- Pills & chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  font-weight: 800; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.pill:hover { transform: translateY(-2px); }
.pill--ink { background: var(--ink); color: var(--bg); }
.pill--big { padding: 14px 26px; font-size: 18px; }
.pill--sun {
  background: var(--sun); color: #2b2140;
  box-shadow: 0 4px 0 #d9952a, 0 10px 24px -10px rgba(217, 149, 42, 0.8);
}
.pill--sun:hover { box-shadow: 0 6px 0 #d9952a, 0 14px 26px -10px rgba(217, 149, 42, 0.8); }
.pill--sun:active { transform: translateY(2px); box-shadow: 0 2px 0 #d9952a; }
.pill--ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), var(--shadow); }

/* ---------- Header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__name { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.brand__name b { font-weight: 900; margin-left: 3px; color: var(--coral); }
.top__nav { display: flex; align-items: center; gap: 22px; }
.top__nav a:not(.pill) { text-decoration: none; font-weight: 800; color: var(--ink-soft); }
.top__nav a:not(.pill):hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center; gap: 40px;
  padding-block: 36px 72px;
}
.kicker {
  display: inline-block; margin: 0 0 18px;
  padding: 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--sea) 16%, transparent);
  color: color-mix(in srgb, var(--sea) 60%, var(--ink));
  font-size: 14px; font-weight: 800; letter-spacing: 0.02em;
}
.hero h1 { font-size: clamp(44px, 6.4vw, 80px); font-weight: 900; letter-spacing: -0.03em; }
.hero__accent {
  background: linear-gradient(90deg, var(--coral), #f2a03d 55%, var(--sea));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { max-width: 33em; margin: 22px 0 30px; font-size: 19px; color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__deck { position: relative; aspect-ratio: 1.15; }
.postcard {
  position: absolute; width: 52%;
  padding: 8px 8px 0; border-radius: 16px;
  background: var(--pc, #fff); color: var(--pc-ink, #2b2140);
  box-shadow: 0 2px 4px rgba(43, 33, 64, 0.12), 0 22px 40px -18px rgba(43, 33, 64, 0.55);
  text-decoration: none;
  transform: rotate(var(--r)) translateY(0);
  transition: transform 0.25s cubic-bezier(.2, .8, .2, 1.2), z-index 0s;
  animation: deal 0.7s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: var(--d, 0s);
}
.postcard img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; }
.postcard span { display: block; padding: 7px 4px 9px; font-size: 15px; font-weight: 900; text-align: center; }
.postcard:hover { transform: rotate(0deg) translateY(-14px) scale(1.04); z-index: 6; }
.postcard--nightmail { --r: -9deg; --d: 0.05s; left: 0;   top: 4%;  --pc: #0d1030; --pc-ink: #ffb547; }
.postcard--pioneer   { --r: 7deg;  --d: 0.12s; right: 0;  top: 0;   --pc: #f4e7c9; --pc-ink: #6b2e1c; }
.postcard--ages      { --r: -4deg; --d: 0.19s; left: 4%;  bottom: 2%; --pc: #1b2230; --pc-ink: #e9c46a; }
.postcard--tideborn  { --r: 10deg; --d: 0.26s; right: 2%; bottom: 6%; --pc: #f7f4ec; --pc-ink: #1f8ea5; }
.postcard--paradise  { --r: -1deg; --d: 0.33s; left: 24%; top: 22%; --pc: #1f5fa0; --pc-ink: #ffcf5c; z-index: 5; width: 56%; }
.postcard--nightmail span { font-family: "Fraunces", Georgia, serif; font-style: italic; }
.postcard--pioneer span { font-family: "Rye", Georgia, serif; font-weight: 400; }
.postcard--ages span { font-family: "Cinzel", Georgia, serif; }

@keyframes deal {
  from { opacity: 0; transform: rotate(0deg) translateY(40px) scale(0.92); }
}

/* ---------- Games ---------- */
.games {
  padding-block: 72px 80px;
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.games__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.games__head h2, .promise h2 { font-size: clamp(32px, 4vw, 46px); font-weight: 900; letter-spacing: -0.02em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 0; cursor: pointer;
  padding: 9px 16px; border-radius: 999px;
  background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line);
  font-weight: 800; font-size: 15px;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.chip:hover { transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.grid__empty { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); }
.linkish { border: 0; background: none; color: var(--coral); font-weight: 900; cursor: pointer; text-decoration: underline; }

.game {
  --g-bg: #fff; --g-ink: #2b2140; --g-soft: #5d5370; --g-accent: #f47a5a; --g-accent-ink: #fff; --g-chip: rgba(0,0,0,.06);
  display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: var(--g-bg); color: var(--g-ink);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.4s ease both;
}
.game[hidden] { display: none; }
.game:hover { transform: translateY(-6px); box-shadow: 0 2px 4px rgba(43, 33, 64, 0.1), 0 26px 44px -18px rgba(43, 33, 64, 0.5); }
.game:hover .game__shot img { transform: scale(1.05); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.game__shot { display: block; overflow: hidden; aspect-ratio: 16 / 10; }
.game__shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.game__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.game__genre {
  display: flex; align-items: center; gap: 9px; margin: 0 0 12px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--g-soft);
}
.game__genre img, .game__genre svg { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.game__title { font-size: 34px; font-weight: 900; letter-spacing: -0.01em; }
.game__pitch { margin: 10px 0 14px; color: var(--g-soft); }
.game__quote {
  margin: 0 0 16px; padding: 10px 14px;
  border-left: 5px solid #6ea53a; border-radius: 4px 10px 10px 4px;
  background: #f6ecd2; color: #3a2f22;
  font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: 17px;
  transform: rotate(-1deg);
}
.game__facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.game__facts li { padding: 4px 11px; border-radius: 999px; background: var(--g-chip); font-size: 14px; font-weight: 800; }
.game__play {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  background: var(--g-accent); color: var(--g-accent-ink);
  font-weight: 900; text-decoration: none;
  transition: gap 0.15s ease, filter 0.15s ease;
}
.game__play:hover { gap: 14px; filter: brightness(1.06); }

/* Night Mail: midnight blue, lamplight gold, an italic serif */
.game--nightmail {
  --g-bg: linear-gradient(180deg, #121640, #070a1c); --g-ink: #f1efff; --g-soft: #a9add6;
  --g-accent: #ffb547; --g-accent-ink: #1a1230; --g-chip: rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, #121640, #070a1c);
}
.game--nightmail .game__title { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 700; color: #ffb547; text-shadow: 0 0 18px rgba(255, 181, 71, 0.45); }

/* Paradise Parcels: open ocean and sunshine */
.game--paradise {
  --g-ink: #fff; --g-soft: #d6ebff; --g-accent: #ffcf5c; --g-accent-ink: #1d3557; --g-chip: rgba(255, 255, 255, 0.16);
  background: linear-gradient(160deg, #1c4f8a, #2f8fc0 70%, #4fb3c9);
}
.game--paradise .game__title span { color: #ffcf5c; }
.game--paradise .game__play { box-shadow: 0 4px 0 #d9a336; }

/* Pioneer Tycoon: parchment, rust and a saloon-poster face */
.game--pioneer {
  --g-ink: #3a2416; --g-soft: #6e5442; --g-accent: #e8b34a; --g-accent-ink: #3a2416; --g-chip: rgba(165, 67, 42, 0.12);
  background: radial-gradient(120% 80% at 50% 0%, #fbf2dc, #f0dfba), #f4e7c9;
}
.game--pioneer .game__title { font-family: "Rye", Georgia, serif; font-weight: 400; color: #5a2716; font-size: 31px; }
.game--pioneer .game__play { box-shadow: inset 0 0 0 2px #b9862b, 0 3px 0 #b9862b; }

/* Tideborn: sea-foam cream, deep teal and coral */
.game--tideborn {
  --g-ink: #2e2a40; --g-soft: #5c5870; --g-accent: #f47a5a; --g-accent-ink: #fff; --g-chip: #dcefef;
  background: #f7f4ec;
}
.game--tideborn .game__title span { color: #2aa6bf; }

/* Ages of Earth: slate night, engraved gold, one dash per epoch */
.game--ages {
  --g-ink: #f2ede2; --g-soft: #b6bccb; --g-accent: #e9c46a; --g-accent-ink: #1b2230; --g-chip: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #232c3d, #1b2230);
}
.game--ages .game__title {
  font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: 32px;
  background: linear-gradient(180deg, #f6dc94, #c9973f); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.game--ages .game__title small { font-size: 0.6em; color: #aab3c5; -webkit-text-fill-color: #aab3c5; }
.game--ages .game__body { background: linear-gradient(90deg, #d8c08f 0 20%, #e09a4f 20% 40%, #b9c3d6 40% 60%, #d9765b 60% 80%, #8fb0cc 80%) top / 100% 4px no-repeat; }

/* ---------- Promise ---------- */
.promise { padding-block: 76px 64px; }
.promise h2 { margin-bottom: 30px; }
.promise__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.promise__list li {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
}
.promise__list b { font-size: 19px; font-weight: 900; }
.promise__list li span:last-child { color: var(--ink-soft); font-size: 16px; }
.promise__icon { font-size: 30px; line-height: 1; margin-bottom: 4px; }

/* ---------- Footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  padding-block: 28px 36px; border-top: 1px solid var(--line); color: var(--ink-soft);
}
.foot__brand { display: flex; flex-direction: column; }
.foot__brand b { color: var(--ink); font-weight: 900; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot nav a { text-decoration: none; font-weight: 800; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot__end { font-size: 14px; }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 12px; gap: 28px; }
  .hero__deck { max-width: 560px; width: 100%; margin-inline: auto; }
  .promise__list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .top__nav a:not(.pill) { display: none; }
  .hero__lead { font-size: 17px; }
  .pill--big { padding: 12px 20px; font-size: 17px; }
  .postcard span { font-size: 12px; padding: 5px 2px 6px; }
  .postcard { padding: 5px 5px 0; border-radius: 12px; }
  .grid { grid-template-columns: 1fr; }
  .promise__list { grid-template-columns: 1fr; }
  .games { padding-block: 52px 60px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* The empty slot: more worlds on the way */
.soon {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 300px; padding: 28px; text-align: center;
  border-radius: var(--radius); border: 3px dashed var(--line); color: var(--ink-soft);
}
.soon[hidden] { display: none; }
.soon h3 { color: var(--ink); font-size: 24px; font-weight: 900; }
.soon p { margin: 0; max-width: 18em; }
.soon__orbit { position: relative; width: 84px; height: 84px; margin-bottom: 10px; border-radius: 50%; border: 2px dashed var(--line); animation: spin 18s linear infinite; }
.soon__orbit span { position: absolute; width: 16px; height: 16px; border-radius: 50%; }
.soon__orbit span:nth-child(1) { background: var(--sun); top: -8px; left: 34px; }
.soon__orbit span:nth-child(2) { background: var(--sea); bottom: 6px; left: 0; }
.soon__orbit span:nth-child(3) { background: var(--coral); bottom: 6px; right: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .soon__orbit { animation: none; } }
