/* The showcase on belomancer.com (issue #223), in the style of the design bible (epic #435): "the oracle's table",
   indigo felt, engraved brass, vellum and wax at night. Buttons and panels are the painted kit of the apps (K1, K2),
   stretched with border-image as Express does. Fonts and the power colours come from the brand kit's tokens
   (assets/brand/tokens/tokens.css, copied at build time); the colours of the bible are below. */
@import url("./tokens.css");
@import url("./fonts/fonts.css");

:root {
  --gutter: 16px;
  --night: #07101d;
  --indigo: #1f3156;
  --gold: #e8c872;
  --gold-light: #f6e2a6;
  --brass: #b8964c;
  --brass-line: rgb(201 162 78 / 0.28);
  --vellum: #f4ecd6;
  --vellum-text: #d9ceb2;
  --vellum-quiet: #c9bea2;
  --ink: #16202b;
  --wide: 1120px;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--night);
}
body {
  /* a block of its own, so the first margin inside never moves the floating bar */
  display: flow-root;
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--night);
  color: var(--vellum-text);
  font-family: var(--bm-font-body);
  font-size: 17px;
  line-height: 1.55;
}
:lang(ar) {
  font-family: var(--bm-font-arabic);
}
h1,
h2,
h3 {
  font-family: var(--bm-font-display);
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--vellum);
}
h2 {
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 800;
}
h3 {
  font-size: 22px;
  font-weight: 700;
}
:lang(ar) :is(h1, h2, h3) {
  font-family: var(--bm-font-arabic);
  font-weight: 700;
  line-height: 1.4;
}
p {
  margin: 0 0 12px;
}
a {
  color: var(--gold);
}
a:hover {
  color: var(--gold-light);
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.quiet {
  color: var(--vellum-quiet);
}
.small {
  font-size: 15px;
}
.lead {
  font-size: 19px;
  max-width: 720px;
  margin-bottom: 24px;
}

/* The bar floats over the key art */
.bar,
main,
footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .symbol {
  width: 52px;
  height: 52px;
}
.brand .wordmark {
  height: 30px;
  width: auto;
}
@media (max-width: 480px) {
  /* one row on a phone: the painted title says the name just below */
  .brand :is(.wordmark, .name) {
    display: none;
  }
}
/* the home page shows the painted title large, just below */
.bar.home .wordmark {
  display: none;
}
.brand .name {
  font-family: var(--bm-font-arabic);
  font-size: 26px;
  font-weight: 600;
  color: var(--vellum);
}
.bar nav {
  display: flex;
  gap: 4px;
}
.bar nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--bm-touch-min);
  padding: 0 12px;
  border-radius: var(--bm-radius-pill);
  color: var(--vellum-quiet);
  text-decoration: none;
}
.bar nav a[aria-current="page"] {
  color: var(--night);
  background: var(--vellum);
}

section {
  margin: 72px 0;
}
.hero + section {
  margin-top: 32px;
}
section > h2 {
  text-align: center;
}
section > h2 + .lead,
section > h2 + .quiet {
  margin-inline: auto;
  text-align: center;
}
section > h2::after {
  /* the brass rule under a title, with its centre gem */
  content: "";
  display: block;
  width: 160px;
  height: 10px;
  margin: 14px auto 0;
  background:
    radial-gradient(circle, var(--gold) 0 3px, transparent 3.5px) center / 10px 10px no-repeat,
    linear-gradient(var(--brass), var(--brass)) center / 100% 1px no-repeat;
}

/* Hero: the key art, the title and the buttons on its empty sky, never on a player (bible § 5.1). On a phone A4
   (portrait) sits on top and the text on the sky under the table; on a computer A3 (landscape) fills the width and
   the text sits on the sky at its left. */
.hero {
  position: relative;
  margin: 0 calc(50% - 50vw);
  padding: 0 var(--gutter) 32px;
}
.hero picture {
  display: block;
}
.hero-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.hero-text {
  position: relative;
  max-width: 520px;
  margin: -24vw auto 0;
  text-align: center;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(40px, 9vw, 64px);
  font-weight: 800;
}
.hero .title {
  display: block;
  width: min(460px, 100%);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.6));
}
.tagline {
  font-family: var(--bm-font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--vellum);
  margin-bottom: 12px;
}
.hero .lead {
  font-size: 18px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}
@media (min-width: 760px) {
  .hero {
    display: flex;
    align-items: center;
    height: max(560px, min(100svh, 56.25vw));
    padding: 64px 0 0;
  }
  .hero picture {
    position: absolute;
    inset: 0;
  }
  .hero-art {
    height: 100%;
    aspect-ratio: auto;
    object-position: 100% 50%;
    mask-image: linear-gradient(to bottom, #000 80%, transparent);
  }
  .hero-text {
    /* on the sky, the left of the painting, whatever the language's direction */
    margin: 0 auto 0 max(24px, 4vw);
    width: min(33vw, 460px);
    text-align: start;
  }
  .hero .title {
    margin: 0;
  }
  .actions {
    justify-content: flex-start;
  }
}

/* Buttons: the painted kit (K1), as in Express. The ends stay whole and only the middle stretches; the centre gem
   is its own layer, taller than the body as in the painting. */
.btn {
  --h: var(--bm-button-height);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--h);
  padding: 0 34px;
  font-family: var(--bm-font-display);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  color: var(--vellum);
  border: 0 solid transparent;
  border-image: url("./kit/button-night.webp") 50% 62 fill / 50% calc(var(--h) * 0.53) stretch;
  background: none;
  filter: drop-shadow(0 3px 5px rgb(0 0 0 / 0.45));
  cursor: pointer;
}
:lang(ar) .btn {
  font-family: var(--bm-font-arabic);
}
.btn::after {
  content: "";
  position: absolute;
  inset: -15% 0;
  background: url("./kit/gem-night.webp") center / auto 100% no-repeat;
  pointer-events: none;
}
.btn:hover {
  color: var(--vellum);
  border-image-source: url("./kit/button-night-hover.webp");
}
.btn:active {
  border-image-source: url("./kit/button-night-pressed.webp");
}
.btn.gold {
  --h: 58px;
  font-size: 19px;
  color: #1c1306;
  border-image-source: url("./kit/button-gold.webp");
}
.btn.gold::after {
  background-image: url("./kit/gem-gold.webp");
}
.btn.gold:hover {
  border-image-source: url("./kit/button-gold-hover.webp");
}
.btn.gold:active {
  border-image-source: url("./kit/button-gold-pressed.webp");
}
.btn.gold:disabled {
  border-image-source: url("./kit/button-gold-disabled.webp");
  cursor: default;
}

/* Panels: the painted night card (K2), its jewelled corners whole */
.grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 680px) {
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 880px) {
  .grid.three {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.panel {
  border: 0 solid transparent;
  border-image: url("./kit/panel.webp") 60 fill / 22px stretch;
  padding: 28px;
}
.panel.strong {
  border-image-source: url("./kit/panel-strong.webp");
}
.grid .panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.grid .panel p {
  flex: 1;
}
.panel h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.choices .panel {
  align-items: center;
  text-align: center;
}
.choices .panel h3 {
  justify-content: center;
}
.emblem {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 10px;
}
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--bm-radius-pill);
  font-family: var(--bm-font-body);
  font-size: 14px;
  font-weight: 700;
  color: #0d2a22;
  background: #7fe3cf;
}
.badge.soon {
  color: #2a1d10;
  background: var(--gold);
}

/* The four families on the oracle table (T1) */
.oracle {
  position: relative;
  margin-inline: calc(50% - 50vw);
  padding: 72px calc(50vw - 50% + var(--gutter));
  background:
    linear-gradient(var(--night), rgb(7 16 29 / 0.55) 18%, rgb(7 16 29 / 0.55) 82%, var(--night)),
    url("./art/table.webp") center / cover no-repeat;
}
.families {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--wide);
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.families li {
  text-align: center;
  padding: 22px 18px;
  border-radius: 16px;
  background: rgb(7 16 29 / 0.72);
  border: 1px solid var(--brass-line);
}
.families img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgb(0 0 0 / 0.5));
}
.families h3 {
  margin: 10px 0 4px;
}
.families .effects {
  font-weight: 700;
  margin-bottom: 6px;
}
.information .effects {
  color: var(--bm-family-information);
}
.detection .effects {
  color: var(--bm-family-detection);
}
.counter .effects {
  color: var(--bm-family-counter-text);
}
.masking .effects {
  color: var(--bm-family-masking);
}

/* The store screenshots: a strip that scrolls on a phone, five phones in a row on a computer */
.shots {
  list-style: none;
  margin: 0;
  padding: 4px 0 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.shots li {
  scroll-snap-align: center;
}
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 4px solid #1b2333;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.5);
}

.features,
.promises {
  margin: 24px 0 0;
  padding-inline-start: 22px;
}
.features li,
.promises li {
  margin-bottom: 6px;
}
.features li::marker,
.promises li::marker {
  color: var(--gold);
}

.beta {
  max-width: 720px;
  margin-inline: auto;
}
.beta form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--vellum);
}
.beta .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.beta input {
  flex: 1 1 240px;
  min-height: var(--bm-button-height);
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid var(--brass);
  background: rgb(0 0 0 / 0.3);
  color: var(--vellum);
  font: inherit;
}
.beta [role="status"] {
  min-height: 1.5em;
  margin: 12px 0 0;
}
.beta .ok {
  color: #7fe3cf;
}
.beta .error {
  color: #ff8a80;
}

/* The full game: its screenshot beside the text */
.full {
  display: grid;
  gap: 24px;
  align-items: center;
}
.full-shot {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgb(201 162 78 / 0.45);
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.5);
}
@media (min-width: 880px) {
  .full {
    grid-template-columns: 3fr 2fr;
  }
}

/* The promises on a vellum page (K2) */
.vellum {
  max-width: 720px;
  margin-inline: auto;
  padding: 36px 40px;
  border: 0 solid transparent;
  border-image: url("./kit/paper.webp") 60 fill / 24px stretch;
  color: var(--ink);
}
.vellum h2 {
  color: var(--ink);
}
.vellum h2::after {
  background:
    radial-gradient(circle, #8f6a14 0 3px, transparent 3.5px) center / 10px 10px no-repeat,
    linear-gradient(#8f6a14, #8f6a14) center / 100% 1px no-repeat;
}
.vellum .promises {
  font-size: 18px;
}
.vellum .promises li::marker {
  color: #8f6a14;
}

.legal {
  max-width: 720px;
  margin: 110px 0 56px;
}
.legal h1 {
  font-size: clamp(32px, 6vw, 44px);
}
.legal h2 {
  font-size: 22px;
  margin-top: 32px;
  text-align: start;
}
.legal h2::after {
  content: none;
}
.legal ul {
  padding-inline-start: 20px;
  margin: 0 0 12px;
}
.legal li {
  margin-bottom: 6px;
}

footer {
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--brass-line);
  text-align: center;
}

/* the page without a bar: the 404 */
body > main.hero {
  margin: 0 auto;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* The waiting page: the key art under the bar, then the text on the night below it, never over the painting. */
.waiting {
  margin: 0 calc(50% - 50vw) 32px;
  padding-top: 72px;
}
.waiting-art {
  display: block;
  width: 100%;
  height: auto;
  /* 4:3 cut of the 16:9 painting, pushed to its right edge: the heroine (at 63% of the full width) lands in the middle */
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 100% 50%;
  mask-image: linear-gradient(to bottom, #000 88%, transparent);
}
@media (min-width: 760px) {
  .waiting {
    margin-inline: 0;
  }
  .waiting-art {
    /* centred in the page's column (no 100vw: it counts the scrollbar) */
    width: min(100%, 880px);
    margin: 0 auto;
    mask-image:
      linear-gradient(to bottom, #000 88%, transparent),
      linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    mask-composite: intersect;
  }
}
.waiting-text {
  max-width: 620px;
  margin: 8px auto 0;
  padding: 0 var(--gutter);
  text-align: center;
}
.waiting-text .title {
  display: block;
  width: min(460px, 100%);
  height: auto;
  margin: 0 auto 12px;
}
