/* bigoathgames.com: the game's own look (parchment panels, ink outlines, gold Lilita titles) */

@font-face {
  font-family: "Lilita One";
  src: url("fonts/lilita-one-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #2b2019;
  --paper: #f3e6c8;
  --paper-hi: #f8eed4;
  --paper-lo: #e3cd9c;
  --wood: #7a4e2d;
  --wood-2: #5c3820;
  --wood-3: #3e2513;
  --gold: #ffd23f;
  --gold-2: #e0a92a;
  --night: #1d1a16;
  --night-2: #28211b;
  --cream: #fff8e6;
  --dim: #cdbb9a;
  --muted: #6e5a45;
  --orange: #f08a4b;
  --wrap: min(1120px, 100% - 32px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font: 600 1.0625rem/1.6 "Nunito", system-ui, sans-serif;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  border-radius: 8px;
}
.skip:focus {
  top: 12px;
}

/* ------------------------------------------------------------------ type */

.title,
h2,
h3 {
  font-family: "Lilita One", sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0;
}

/* gold with a thick ink outline, like the game's logo */
.outlined {
  color: var(--gold);
  -webkit-text-stroke: 0.1em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.1em 0 rgba(0, 0, 0, 0.45);
}

h2 {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  text-wrap: balance;
}
h2.outlined {
  -webkit-text-stroke-width: 0.12em;
}

.lead {
  font-size: clamp(1.06rem, 1.6vw, 1.2rem);
  max-width: 62ch;
  text-wrap: pretty;
}

.kicker {
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0.55rem 1.4rem 0.65rem;
  border: 3px solid var(--ink);
  border-radius: 14px;
  font: 400 1.3rem/1 "Lilita One", sans-serif;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--cream);
  background: linear-gradient(#c98b4e, #9a5f2f);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.25), 0 4px 0 var(--ink);
  text-shadow: 0 2px 0 rgba(43, 32, 25, 0.8);
  transition: transform 0.06s, filter 0.12s, box-shadow 0.06s;
  cursor: pointer;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn:active {
  transform: translateY(3px);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 1px 0 var(--ink);
}
.btn.gold {
  background: linear-gradient(#ffd85a, #e09a1f);
  color: #4a2a0c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* a store chip that isn't a link yet */
.soon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 0.35rem 1.1rem;
  border: 2px dashed rgba(255, 248, 230, 0.55);
  border-radius: 14px;
  background: rgba(29, 26, 22, 0.55);
  line-height: 1.15;
  text-align: left;
}
.soon small {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.soon b {
  font: 400 1.2rem "Lilita One", sans-serif;
  letter-spacing: 0.03em;
}

/* ------------------------------------------------------------------ header */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 14px;
}
.brand {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font: 400 1.3rem "Lilita One", sans-serif;
  letter-spacing: 0.03em;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 2px solid var(--ink);
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav a {
  padding: 0.5rem 0.75rem;
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  border-radius: 10px;
}
.nav a:hover {
  color: var(--gold);
}
.nav .btn {
  white-space: nowrap;
  min-height: 42px;
  padding: 0.4rem 1rem 0.5rem;
  font-size: 1.05rem;
  margin-left: 0.5rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.nav .btn:hover {
  color: #4a2a0c;
}

/* ------------------------------------------------------------------ sprites */

/* an idle animation strip, one frame showing at a time */
.sprite {
  display: block;
  overflow: hidden;
  aspect-ratio: 191 / 190;
  height: 120px;
}
.sprite img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  animation: idle 1s steps(12) infinite;
}
@keyframes idle {
  to {
    transform: translateX(-100%);
  }
}
.sprite.boss img {
  animation-timing-function: steps(10);
}
.sprite.boss-thornheart { aspect-ratio: 164 / 215; }
.sprite.boss-orc-warlord { aspect-ratio: 272 / 213; }
.sprite.boss-djinn { aspect-ratio: 179 / 213; }
.sprite.boss-mire-banshee { aspect-ratio: 177 / 213; }
.sprite.boss-crimson-lich { aspect-ratio: 216 / 213; }
.sprite.boss-forest-troll { aspect-ratio: 298 / 215; }
.flip {
  transform: scaleX(-1);
}
/* a soft shadow where they stand */
.unit {
  position: relative;
  display: inline-block;
}
.unit::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -2%;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.45), transparent);
}
.unit .sprite {
  position: relative;
}
/* out of step with each other, so the party doesn't breathe in unison */
.d1 img { animation-delay: -0.17s; }
.d2 img { animation-delay: -0.42s; }
.d3 img { animation-delay: -0.66s; }
.d4 img { animation-delay: -0.83s; }

@media (prefers-reduced-motion: reduce) {
  .sprite img {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  min-height: clamp(600px, 94svh, 880px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 0 clamp(170px, 22vw, 240px);
  background: var(--night) url("img/bg/greenwood-1920.webp") center bottom / cover no-repeat;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(18, 14, 10, 0.62), rgba(18, 14, 10, 0.18) 26%, rgba(18, 14, 10, 0) 55%),
    linear-gradient(to bottom, transparent 82%, var(--night));
}
.hero .kicker {
  color: var(--cream);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.9);
}
.hero .title {
  font-size: clamp(3.1rem, 14.5vw, 8.6rem);
  line-height: 0.95;
}
.hero .tagline {
  margin: 0.9rem auto 1.6rem;
  max-width: 34ch;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.4;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.95);
  text-wrap: balance;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}
.party {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(18px, 3.5vw, 44px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0px, 1.2vw, 18px);
  pointer-events: none;
}
.party .sprite {
  height: clamp(86px, 11.5vw, 140px);
}
.party .sprite.boss {
  height: clamp(132px, 17vw, 210px);
}
.party .troll {
  margin-left: clamp(4px, 3vw, 44px);
}

/* ------------------------------------------------------------------ sections */

section {
  padding: clamp(64px, 9vw, 112px) 0;
}
.section-head {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 52px);
}
.section-head .lead {
  margin: 1rem auto 0;
  color: var(--dim);
}

/* the parchment panel the game uses for every menu */
.parchment {
  color: var(--ink);
  background: linear-gradient(var(--paper-hi), var(--paper-lo));
  border: 4px solid var(--ink);
  border-radius: 24px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.55), inset 0 -5px 0 rgba(122, 78, 45, 0.18), 0 8px 0 var(--ink);
}

/* how it plays */
.play {
  padding-top: clamp(40px, 6vw, 72px);
}
.play .parchment {
  padding: clamp(28px, 5vw, 64px) clamp(18px, 5vw, 64px);
}
.play .section-head .lead {
  color: var(--muted);
}
.play h2 {
  color: var(--ink);
}
.feature {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(20px, 4vw, 52px);
  align-items: center;
}
.feature + .feature {
  margin-top: clamp(40px, 6vw, 72px);
}
/* the screenshot alternates sides, and always gets the wider column */
.feature:nth-child(odd of .feature) {
  grid-template-columns: 1fr 1.3fr;
}
.feature:nth-child(odd of .feature) .shot-frame {
  order: 2;
}
.shot-frame {
  display: block;
  margin: 0;
  border: 4px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 0 var(--ink);
  background: var(--night);
  line-height: 0;
}
.shot-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.feature h3 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  color: var(--wood-2);
  margin-bottom: 0.6rem;
}
.feature p {
  margin: 0;
  max-width: 44ch;
}
.feature .tag {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 0.15rem 0.7rem 0.2rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* heroes */
.heroes {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(240, 138, 75, 0.14), transparent 60%),
    linear-gradient(var(--wood-3), #24160c);
  border-block: 4px solid var(--ink);
}
.roster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px 16px;
  text-align: center;
  background: linear-gradient(#6a4226, #4a2c18);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.14), 0 5px 0 var(--ink);
}
.hero-card .sprite {
  height: clamp(96px, 11vw, 124px);
}
.hero-card h3 {
  margin-top: 8px;
  font-size: 1.4rem;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}
.hero-card .role {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero-card .paths {
  margin-top: 6px;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--dim);
}
.oath-note {
  margin: clamp(28px, 4vw, 40px) auto 0;
  max-width: 60ch;
  text-align: center;
  color: var(--dim);
}
.oath-note b {
  color: var(--cream);
}

/* lands */
.lands-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.land {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.land-art {
  position: relative;
  aspect-ratio: 16 / 10;
  border-bottom: 4px solid var(--ink);
  overflow: hidden;
  background: var(--night-2);
}
.land-art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.land-art .unit {
  position: absolute;
  right: 9%;
  bottom: 5%;
}
.land-art .sprite {
  height: clamp(110px, 13vw, 150px);
}
.land-num {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: radial-gradient(circle at 35% 30%, #ffc48a, var(--orange) 55%, #c4612a);
  font: 400 1.5rem "Lilita One", sans-serif;
  color: var(--cream);
  -webkit-text-stroke: 0.14em var(--ink);
  paint-order: stroke fill;
  box-shadow: 0 3px 0 var(--ink);
}
.land-body {
  padding: 18px 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.land h3 {
  font-size: 1.65rem;
  color: var(--wood-2);
}
.land p {
  margin: 0.4rem 0 0.9rem;
  font-size: 0.98rem;
}
.land .boss-name {
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--muted);
}
.land .boss-name b {
  color: #a3341f;
}

/* screenshots */
.shots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.shots a {
  display: block;
  text-decoration: none;
}
.shots .shot-frame {
  transition: transform 0.15s;
}
.shots a:hover .shot-frame {
  transform: translateY(-3px);
}
.shots .cap {
  margin: 10px 0 0;
  font-weight: 800;
  color: var(--dim);
}

/* beta */
.beta {
  padding-top: 8px;
}
.beta .parchment {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: clamp(12px, 3vw, 36px);
  padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 48px);
}
.beta-copy {
  text-align: center;
  align-self: center;
}
.beta h2 {
  color: var(--ink);
}
.beta .lead {
  margin: 1rem auto 1.5rem;
  color: var(--ink);
}
.beta .fine {
  margin: 1rem auto 0;
  max-width: 52ch;
  font-size: 0.92rem;
  color: var(--muted);
}
.beta .sprite {
  height: clamp(110px, 12vw, 150px);
}

/* footer */
.foot {
  padding: 28px 0 36px;
  background: #15120f;
  border-top: 4px solid var(--ink);
  color: var(--dim);
  font-size: 0.95rem;
}
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.foot a {
  font-weight: 800;
  text-decoration: none;
}
.foot a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* lightbox */
.lightbox {
  width: min(96vw, 1600px);
  max-width: none;
  max-height: 96vh;
  padding: 0;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: var(--night);
  overflow: visible;
}
.lightbox::backdrop {
  background: rgba(10, 8, 6, 0.86);
}
.lightbox img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(96vh - 8px);
  object-fit: contain;
  border-radius: 12px;
}
.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(#ffd85a, #e09a1f);
  color: #4a2a0c;
  font: 400 1.5rem/1 "Lilita One", sans-serif;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}
.lightbox .close {
  top: -18px;
  right: -14px;
}
.lightbox .prev,
.lightbox .next {
  top: 50%;
  translate: 0 -50%;
}
.lightbox .prev {
  left: -14px;
}
.lightbox .next {
  right: -14px;
}

/* ------------------------------------------------------------------ plain pages (privacy, 404) */

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.page main {
  flex: 1;
  padding: clamp(32px, 6vw, 64px) 0 72px;
}
.page .top {
  position: static;
  background: var(--wood-3);
  border-bottom: 4px solid var(--ink);
}
.doc {
  width: min(760px, 100% - 32px);
  margin-inline: auto;
  padding: clamp(24px, 5vw, 52px) clamp(18px, 5vw, 56px);
}
.doc h1 {
  margin: 0 0 0.3rem;
  font: 400 clamp(2rem, 5vw, 2.8rem)/1.1 "Lilita One", sans-serif;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.doc h2 {
  margin: 1.8rem 0 0.4rem;
  font-size: 1.45rem;
  color: var(--wood-2);
}
.doc p,
.doc li {
  max-width: 64ch;
}
.doc ul {
  padding-left: 1.2em;
}
.doc li {
  margin: 0.4em 0;
}
.doc .date {
  color: var(--muted);
  margin-top: 0;
}
.doc a {
  color: #8a4a12;
  font-weight: 800;
}
.lost {
  text-align: center;
}
.lost .unit {
  margin: 0 auto 8px;
}
.lost .sprite {
  height: 130px;
}

/* ------------------------------------------------------------------ smaller screens */

@media (max-width: 1000px) {
  .hero {
    background-image: url("img/bg/greenwood-960.webp");
  }
  .lands-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .nav a:not(.btn) {
    display: none;
  }
  .feature,
  .feature:nth-child(odd of .feature) {
    grid-template-columns: 1fr;
  }
  .feature:nth-child(odd of .feature) .shot-frame {
    order: 0;
  }
  .shots {
    grid-template-columns: 1fr;
  }
  .beta .parchment {
    grid-template-columns: 1fr;
  }
  .beta .unit {
    display: none;
  }
  /* three heroes and the troll fit a phone */
  .party .unit:nth-child(n + 4):not(.troll) {
    display: none;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 0;
    padding: 112px 0 150px;
  }
  .party {
    gap: 2px;
  }
  .party .sprite {
    height: 74px;
  }
  .party .sprite.boss {
    height: 112px;
  }
  .lands-grid {
    grid-template-columns: 1fr;
  }
  .roster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .brand span {
    font-size: 1.1rem;
  }
  .lightbox .prev,
  .lightbox .next {
    top: auto;
    bottom: -60px;
    translate: none;
  }
  .lightbox .prev {
    left: calc(50% - 60px);
  }
  .lightbox .next {
    right: calc(50% - 60px);
  }
}

/* small phones: the hero's own beta button is right there, so the header keeps just the name */
@media (max-width: 420px) {
  .top .nav .btn {
    display: none;
  }
  .hero .tagline {
    font-size: 1.05rem;
  }
}

@media (max-width: 360px) {
  .hero-card {
    padding: 12px 6px 14px;
  }
  .hero-card .sprite {
    height: 76px;
  }
  .hero-card h3 {
    font-size: 1.2rem;
  }
  .hero-card .role {
    font-size: 0.74rem;
    letter-spacing: 0.02em;
  }
}
