:root {
  --cream: #efeee7;
  --paper: #f9f6ef;
  --paper-soft: #f3e9e2;
  --ink: #172a41;
  --muted: #68706f;
  --blue: #244f86;
  --pink: #d88aa4;
  --blush: #ecc0ce;
  --line: rgba(23, 42, 65, .15);
  --shadow: 0 24px 70px rgba(23, 42, 65, .12);
}

@font-face {
  font-family: "Mega Sans";
  src: url("./assets/fonts/mega-sans.otf") format("opentype");
}

@font-face {
  font-family: "Conthrax";
  src: url("./assets/fonts/conthrax-sb.ttf") format("truetype");
  font-weight: 700;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--cream);
}

body::selection {
  background: var(--blue);
  color: white;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.site-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(23, 42, 65, .1);
  background: rgba(239, 238, 231, .88);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
}

.brand-token {
  width: 34px;
  aspect-ratio: 1;
  border-radius: 999px;
}

.brand-word { width: 170px; }

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
}

.top-nav a {
  color: rgba(23, 42, 65, .74);
  text-decoration: none;
  font-size: 13px;
  font-weight: 760;
}

.top-nav a:hover { color: var(--ink); }

main { overflow: hidden; }

.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(320px, .74fr) minmax(420px, 1.26fr);
  align-items: end;
  gap: clamp(34px, 6vw, 92px);
  padding: clamp(42px, 6vw, 84px) clamp(20px, 5vw, 72px) clamp(34px, 5vw, 58px);
}

.hero-copy {
  align-self: center;
  padding-bottom: clamp(10px, 5vw, 62px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  font-weight: 850;
}

h1 {
  max-width: 560px;
  font-size: clamp(42px, 5vw, 76px);
  line-height: .95;
}

h2 {
  font-size: clamp(28px, 3.3vw, 52px);
  line-height: 1;
}

p,
li {
  color: rgba(23, 42, 65, .76);
  font-size: clamp(16px, 1.25vw, 20px);
  font-weight: 520;
  line-height: 1.42;
}

.hero-intro {
  max-width: 540px;
  margin: 22px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  min-height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .54);
  color: var(--ink);
  padding: 0 22px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 780;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(23, 42, 65, .07);
}

.button-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.hero-product-wrap {
  position: relative;
  margin: 0;
}

.hero-product-wrap::before {
  content: "";
  position: absolute;
  inset: 8% -4% -5% 12%;
  z-index: -1;
  border-radius: 28px;
  background: var(--pink);
}

.hero-product {
  width: 100%;
  max-height: min(620px, 68vh);
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.rule-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.rule-rail article {
  min-height: 210px;
  display: grid;
  align-content: end;
  padding: clamp(26px, 4vw, 54px);
  border-right: 1px solid var(--line);
}

.rule-rail article:last-child { border-right: 0; }
.rule-rail span {
  color: var(--pink);
  font-weight: 950;
  margin-bottom: 18px;
}

.rule-rail h2 {
  max-width: 340px;
  font-size: clamp(24px, 2.5vw, 36px);
}

.rule-rail p {
  max-width: 360px;
  margin-bottom: 0;
}

.inside,
.downloads,
.kickstarter {
  display: grid;
  grid-template-columns: minmax(300px, .85fr) minmax(360px, 1.15fr);
  align-items: center;
  gap: clamp(34px, 7vw, 110px);
  padding: clamp(48px, 6vw, 86px) clamp(20px, 5vw, 72px);
}

.inside {
  background: var(--cream);
}

.inside-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  justify-items: center;
  gap: 14px;
}

.inside-grid img,
.inside-note,
.leaflet-pair a,
.translated-leaflet {
  border: 1px solid rgba(23, 42, 65, .1);
  border-radius: 22px;
  background: rgba(255, 255, 255, .52);
  box-shadow: 0 18px 45px rgba(23, 42, 65, .08);
}

.inside-grid img {
  width: min(100%, 170px);
  height: auto;
  background: transparent;
}

.inside-note {
  display: grid;
  align-content: end;
  padding: 22px;
}

.inside-note strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
}

.inside-note p {
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 520;
}

.rules-section {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  gap: clamp(34px, 7vw, 120px);
  padding: clamp(48px, 6vw, 86px) clamp(20px, 5vw, 72px);
  background: var(--paper);
}

.section-head {
  position: sticky;
  top: 100px;
  align-self: start;
}

.steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-top: 1px solid var(--line);
}

.steps li {
  display: grid;
  grid-template-columns: 80px minmax(160px, .52fr) minmax(220px, 1fr);
  gap: 20px;
  align-items: baseline;
  margin: 0;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--pink);
  font-size: 13px;
  font-weight: 950;
}

.steps strong {
  color: var(--ink);
  font-size: 18px;
}

.steps span {
  color: rgba(23, 42, 65, .68);
}

.play-callout,
.buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: clamp(20px, 4vw, 56px);
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 30px;
  background: var(--blue);
  box-shadow: var(--shadow);
}

.play-callout h2,
.play-callout p,
.play-callout .eyebrow,
.buy p {
  color: white;
}

.play-callout p,
.buy p {
  margin-bottom: 0;
}

.downloads { background: var(--cream); }

.language-tool {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 28px;
}

.language-tool label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  color: var(--ink);
  padding: 0 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}

.leaflet-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.leaflet-pair a {
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
}

.leaflet-pair img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.leaflet-pair span {
  display: block;
  padding: 14px 16px 18px;
  font-size: 14px;
  font-weight: 950;
}

.leaflet-section {
  padding: 0 clamp(20px, 5vw, 72px) clamp(48px, 6vw, 86px);
  background: var(--cream);
}

.translated-leaflet {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px);
}

.leaflet-title {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.leaflet-title img {
  width: 58px;
  border-radius: 999px;
}

.translated-leaflet ol {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
  padding-left: 22px;
}

.translated-leaflet li {
  font-size: 17px;
}

.kickstarter {
  background: var(--paper);
}

.launch {
  justify-self: end;
  width: min(100%, 420px);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--pink);
  box-shadow: var(--shadow);
}

.launch span {
  color: rgba(23,42,65,.66);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.launch strong {
  color: var(--ink);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.buy {
  margin-top: 0;
  background: var(--ink);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  color: rgba(23,42,65,.7);
  font-size: 13px;
  font-weight: 900;
}

.site-footer img {
  width: 32px;
  border-radius: 999px;
}

/* Play page wrapper only. The actual game is separate and untouched. */
.play-page {
  min-height: 100svh;
  background: var(--cream);
}

.game-page-main {
  min-height: calc(100svh - 74px);
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px clamp(14px, 3vw, 40px) 30px;
}

.game-shell-copy {
  align-self: start;
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.56);
}

.game-shell-copy h1 {
  font-size: clamp(34px, 4vw, 58px);
}

.game-shell-copy p {
  margin-bottom: 0;
}

.game-shell {
  min-height: 76svh;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
}

.game-shell iframe {
  width: 100%;
  height: 100%;
  min-height: 76svh;
  display: block;
  border: 0;
}

@media (max-width: 980px) {
  .site-top {
    position: relative;
    flex-wrap: wrap;
    padding: 14px 18px;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .hero,
  .inside,
  .rules-section,
  .downloads,
  .kickstarter {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  h1 {
    max-width: 720px;
    font-size: clamp(38px, 10vw, 64px);
  }

  .hero-product {
    min-height: 0;
    max-height: none;
  }

  .rule-rail {
    grid-template-columns: 1fr;
  }

  .rule-rail article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .inside-grid {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
  }

  .inside-grid img {
    width: min(100%, 170px);
  }

  .section-head {
    position: static;
  }

  .steps li {
    grid-template-columns: 42px 1fr;
  }

  .steps span {
    grid-column: 2;
  }

  .play-callout,
  .buy {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-tool {
    grid-template-columns: 1fr;
  }

  .leaflet-pair {
    grid-template-columns: 1fr;
  }

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

  .game-shell-copy {
    position: static;
  }
}

@media (max-width: 560px) {
  .brand-lockup span { font-size: 15px; }
  .brand-token { width: 30px; }

  .hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .inside-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .inside-grid img {
    width: 100%;
  }

  .inside-note {
    grid-column: 1 / -1;
  }
}
