:root {
  --bg: #030705;
  --bg-2: #07110b;
  --panel: rgba(9, 18, 12, 0.88);
  --panel-soft: rgba(16, 32, 21, 0.74);
  --cream: #f0e7d2;
  --cream-soft: #d9c9a8;
  --gold: #c99739;
  --gold-dark: #8f6222;
  --gold-soft: rgba(201, 151, 57, 0.45);
  --line: rgba(201, 151, 57, 0.36);
  --shadow: rgba(0, 0, 0, 0.55);
  --side-width: clamp(210px, 19vw, 320px);
  --max-content: 1500px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 50% 0%, rgba(32, 58, 38, 0.42), transparent 46rem),
    linear-gradient(90deg, #020403 0%, #07110b 52%, #030705 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 28px 28px;
  mix-blend-mode: overlay;
  opacity: 0.18;
  z-index: 20;
}

a {
  color: inherit;
}

.site-header {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: var(--side-width) minmax(0, var(--max-content));
  align-items: center;
  min-height: 84px;
  padding: 0 clamp(24px, 4vw, 64px) 0 0;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 5, 0.78);
  backdrop-filter: blur(3px);
}

.brand {
  grid-column: 2;
  justify-self: start;
  text-decoration: none;
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.075em;
  font-size: clamp(1.5rem, 2.4vw, 2.35rem);
  font-weight: 700;
  text-shadow: 0 2px 0 var(--shadow);
}

.site-nav {
  grid-column: 2;
  justify-self: end;
  display: flex;
  gap: clamp(18px, 2.6vw, 36px);
  align-items: center;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--cream-soft);
  font-size: 1.05rem;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--gold);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -13px;
  height: 2px;
  background: var(--gold);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 36px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0,0,0,0.24);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--cream);
}

.page-shell {
  position: relative;
  display: grid;
  grid-template-columns: var(--side-width) minmax(0, 1fr);
  min-height: calc(100vh - 84px - 76px);
  overflow: hidden;
}

.page-shell::after {
  content: "";
  position: fixed;
  right: 0;
  top: 84px;
  bottom: 76px;
  width: clamp(230px, 20vw, 360px);
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(3,7,5,0.98) 0%, rgba(3,7,5,0.45) 42%, rgba(3,7,5,0.12) 100%),
    linear-gradient(180deg, rgba(3,7,5,0.12) 0%, rgba(3,7,5,0.42) 76%, rgba(3,7,5,0.98) 100%),
    url("assets/ruins-sidebar.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.42;
  filter: saturate(0.95) contrast(1.02);
  z-index: 0;
}

.side-art {
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - 84px);
  min-height: 760px;
  background-image:
    linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(3,7,5,0.2) 62%, rgba(3,7,5,0.96) 100%),
    linear-gradient(180deg, rgba(3,7,5,0) 0%, rgba(3,7,5,0.08) 70%, rgba(3,7,5,0.95) 100%),
    url("assets/jack-sidebar.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  box-shadow: inset -54px 0 70px rgba(3,7,5,0.96);
  z-index: 1;
}

.content-wrap {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max-content));
  padding: clamp(42px, 5.2vw, 84px) clamp(28px, 3.4vw, 54px) 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(650px, 1fr) minmax(285px, 340px);
  gap: clamp(72px, 7vw, 140px);
  align-items: start;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

.hero-title {
  max-width: 920px;
  margin: 0;
  font-size: clamp(4.1rem, 6.3vw, 6.55rem);
  line-height: 0.93;
  letter-spacing: -0.035em;
  color: var(--cream);
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.32), 0 0 22px rgba(255,255,255,0.08);
}

.hero-title span {
  display: block;
  white-space: nowrap;
}

.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.rule-short {
  width: min(420px, 80%);
  margin: 26px 0 22px;
}

.rule-card {
  width: 70%;
  margin: 12px auto 14px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}

.rule-wide {
  width: 100%;
  margin: 0 0 28px;
  background: linear-gradient(90deg, var(--gold-soft), transparent);
}

.hero-text,
.section-intro,
.game-card p,
.feature-card p {
  color: var(--cream-soft);
  line-height: 1.58;
}

.hero-text {
  max-width: 700px;
  margin: 0;
  font-size: clamp(1.08rem, 1.8vw, 1.25rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 22px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 190px;
  padding: 15px 28px;
  border: 1px solid var(--gold-soft);
  border-radius: 4px;
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255,255,255,0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(255,255,255,0.12);
}

.button-gold {
  color: #190f04;
  background: linear-gradient(180deg, #d8aa53, #a87525);
}

.button-dark {
  color: var(--cream);
  background: rgba(4, 8, 6, 0.72);
}

.feature-card {
  position: relative;
  padding: clamp(24px, 2.6vw, 32px);
  border: 1px solid var(--gold-soft);
  background:
    linear-gradient(180deg, rgba(20,39,25,0.72), rgba(5,9,7,0.92)),
    radial-gradient(circle at 50% 0%, rgba(201,151,57,0.16), transparent 55%);
  box-shadow: 0 22px 52px rgba(0,0,0,0.38), inset 0 0 0 1px rgba(201,151,57,0.08);
  text-align: center;
}

.feature-card::before,
.game-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201,151,57,0.2);
  pointer-events: none;
}

.feature-logo {
  display: block;
  width: min(205px, 74%);
  margin: 0 auto 22px;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,0.4));
}

.feature-card h2 {
  margin: 0;
  font-size: clamp(1.9rem, 2.8vw, 2.45rem);
  line-height: 1.05;
}

.feature-card p {
  max-width: 300px;
  margin: 0 auto 24px;
  font-size: 1.05rem;
}

.feature-button {
  width: min(100%, 280px);
}

.featured-line {
  margin-top: clamp(64px, 8vw, 96px);
}

.featured-line h2 {
  margin: 0 0 10px;
  font-size: clamp(2.7rem, 4.8vw, 4.1rem);
  line-height: 1;
}

.section-intro {
  max-width: 760px;
  margin: 0;
  font-size: 1.1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 255px;
  padding: 30px 28px 26px;
  border: 1px solid var(--gold-soft);
  background:
    linear-gradient(180deg, rgba(14, 28, 18, 0.9), rgba(7, 13, 9, 0.92));
  text-align: center;
  box-shadow: 0 16px 32px rgba(0,0,0,0.25);
}

.game-card-development {
  background:
    radial-gradient(circle at 50% 0%, rgba(201,151,57,0.16), transparent 58%),
    linear-gradient(180deg, rgba(18, 36, 23, 0.94), rgba(7, 13, 9, 0.94));
}

.status-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  padding: 5px 9px;
  border: 1px solid rgba(201,151,57,0.4);
  border-radius: 999px;
  background: rgba(3,7,5,0.72);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-icon {
  color: rgba(201,151,57,0.72);
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 10px;
}

.card-kicker {
  margin: 0 0 10px;
  color: var(--gold) !important;
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2 !important;
  text-transform: uppercase;
}

.game-card h3 {
  margin: 0 auto 14px;
  max-width: 310px;
  color: var(--cream);
  font-size: clamp(1.28rem, 1.65vw, 1.62rem);
  line-height: 1.08;
}

.game-card p:not(.card-kicker) {
  margin: 0;
  font-size: 0.98rem;
}

.card-link {
  display: inline-flex;
  justify-content: center;
  gap: 8px;
  margin: auto auto 0;
  padding-top: 18px;
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.card-link:hover {
  color: var(--cream);
}

.site-footer {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px clamp(24px, 4vw, 64px);
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 5, 0.88);
  color: var(--cream-soft);
}

.site-footer p {
  margin: 0;
  font-size: 1rem;
}

.site-footer p:last-child {
  text-align: right;
}

.footer-mark {
  color: var(--gold);
  font-size: 2rem;
  line-height: 1;
}

@media (max-width: 1240px) {
  :root {
    --side-width: 225px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(275px, 320px);
    gap: 54px;
  }

  .hero-title {
    font-size: clamp(3.65rem, 6vw, 5.25rem);
  }
}

@media (max-width: 1120px) {
  :root {
    --side-width: 240px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 28px;
  }

  .brand,
  .site-nav {
    grid-column: auto;
  }

  .page-shell {
    grid-template-columns: 1fr;
  }

  .page-shell::after {
    display: none;
  }

  .side-art {
    position: absolute;
    inset: 84px auto auto 0;
    width: 320px;
    height: 760px;
    min-height: 0;
    opacity: 0.44;
    z-index: 0;
  }

  .content-wrap {
    position: relative;
    z-index: 1;
    margin-left: 110px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(3.9rem, 8vw, 6rem);
  }

  .feature-card {
    max-width: 460px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: auto;
    padding: 20px 22px;
  }

  .brand {
    font-size: 1.45rem;
  }

  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    justify-self: stretch;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-top: 18px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a.active::after {
    bottom: -5px;
  }

  .side-art {
    inset: 78px 0 auto 0;
    width: 100%;
    height: 580px;
    background-position: left top;
    opacity: 0.28;
    box-shadow: inset 0 -120px 90px var(--bg), inset -120px 0 100px var(--bg);
  }

  .content-wrap {
    margin-left: 0;
    padding: 46px 22px 46px;
  }

  .hero-title {
    font-size: clamp(2.85rem, 13vw, 5.1rem);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer p:last-child {
    text-align: center;
  }
}

@media (max-width: 520px) {
  .button {
    width: 100%;
  }

  .hero-title {
    font-size: clamp(2.45rem, 12vw, 3.4rem);
  }

  .feature-card {
    padding: 24px 20px;
  }

  .feature-logo {
    width: min(220px, 76%);
  }
}


/* Subpages */
.subpage-shell {
  position: relative;
  min-height: calc(100vh - 84px - 76px);
  padding: clamp(46px, 6vw, 88px) clamp(24px, 5vw, 70px) 76px;
  overflow: hidden;
}

.subpage-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3,7,5,0.9), rgba(3,7,5,0.62), rgba(3,7,5,0.92)),
    radial-gradient(circle at 82% 18%, rgba(201,151,57,0.16), transparent 28rem);
  z-index: 0;
}

.subpage-content {
  position: relative;
  z-index: 1;
  width: min(100%, 1220px);
  margin: 0 auto;
}

.page-title {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.page-lead {
  max-width: 820px;
  margin: 24px 0 0;
  color: var(--cream-soft);
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  line-height: 1.6;
}

.subpage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.subpage-card {
  position: relative;
  padding: 30px 28px;
  border: 1px solid var(--gold-soft);
  background: linear-gradient(180deg, rgba(14, 28, 18, 0.92), rgba(7, 13, 9, 0.94));
  box-shadow: 0 16px 32px rgba(0,0,0,0.25);
}

.subpage-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201,151,57,0.2);
  pointer-events: none;
}

.subpage-card h2,
.subpage-card h3 {
  margin: 0 0 14px;
  color: var(--cream);
  line-height: 1.1;
}

.subpage-card p {
  color: var(--cream-soft);
  line-height: 1.58;
}

.subpage-card .button-row {
  margin-top: 22px;
}

@media (max-width: 820px) {
  .subpage-grid { grid-template-columns: 1fr; }
}

/* Games page product cards with cover art */
.product-grid {
  grid-template-columns: 1fr;
  gap: 28px;
}

.product-card {
  display: grid;
  grid-template-columns: minmax(210px, 290px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  overflow: hidden;
  padding: 24px;
}

.product-card::before {
  z-index: 0;
}

.product-cover-wrap,
.product-copy {
  position: relative;
  z-index: 1;
}

.product-cover-wrap {
  align-self: start;
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(201,151,57,0.36);
  background:
    radial-gradient(circle at 50% 0%, rgba(201,151,57,0.18), transparent 52%),
    rgba(3,7,5,0.55);
  box-shadow: 0 18px 30px rgba(0,0,0,0.34);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.product-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.product-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.product-copy h2 {
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  letter-spacing: -0.035em;
}

.product-copy p {
  max-width: 760px;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
}


#jade-harbor .product-cover {
  transform: scale(1.16);
  transform-origin: center center;
}

#jade-harbor .product-cover-wrap {
  overflow: hidden;
}

.button-disabled {
  cursor: default;
  opacity: 0.78;
}

.button-disabled:hover {
  transform: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255,255,255,0.08);
}

@media (min-width: 1180px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card {
    grid-template-columns: minmax(175px, 235px) minmax(0, 1fr);
  }

  .product-cover-wrap {
    aspect-ratio: 2 / 3;
  }

  .product-copy h2 {
    font-size: clamp(1.75rem, 2.4vw, 2.45rem);
  }
}

@media (max-width: 760px) {
  .product-card {
    grid-template-columns: 1fr;
  }

  .product-cover-wrap {
    max-width: 320px;
    aspect-ratio: 2 / 3;
  }
}


/* Downloads page map pack */
.map-download-section {
  margin-top: 38px;
}

.map-download-header {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.map-download-header .button-row {
  margin-top: 0;
}

.map-download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.map-card {
  position: relative;
  border: 1px solid var(--gold-soft);
  background: linear-gradient(180deg, rgba(14, 28, 18, 0.92), rgba(7, 13, 9, 0.94));
  box-shadow: 0 14px 28px rgba(0,0,0,0.24);
  overflow: hidden;
}

.map-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201,151,57,0.18);
  pointer-events: none;
  z-index: 2;
}

.map-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 1px solid rgba(201,151,57,0.25);
}

.map-card-body {
  position: relative;
  z-index: 3;
  padding: 18px;
}

.map-card h3 {
  margin: 0 0 8px;
  color: var(--cream);
  line-height: 1.08;
}

.map-card p {
  margin: 0 0 16px;
  color: var(--cream-soft);
  line-height: 1.45;
}

.map-card .card-link {
  margin: 0;
  padding-top: 0;
  justify-content: flex-start;
}

@media (max-width: 1020px) {
  .map-download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .map-download-grid {
    grid-template-columns: 1fr;
  }
}
