/* Deusaster demo page.
   Layout: painted art bands edge to edge; words on the game's own dark stone plates; calls to action on the
   main menu's paint brushes. One dark look, like the game at night: no light theme. */

@font-face {
  font-family: "Bree Serif";
  src: url("fonts/BreeSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-Variable.ttf") format("truetype");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* colour */
  --night: #121614;        /* page ground: the stone plate's green-black, deeper */
  --stone: #23292a;        /* flat stone, where the plate picture is not used */
  --parchment: #ecdfc2;    /* running text */
  --dust: #b9ad94;         /* quieter text */
  --gold: #f4b43c;         /* the wordmark's gold, for headings */
  --ember: #e4642b;        /* fire, focus and the Elder's words */
  --ink: #2b1a0e;          /* text on the cream brush */
  --rim: rgba(0, 0, 0, .55);
  /* type */
  --display: "Bree Serif", "Rockwell", "Georgia", serif;
  --body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --step-0: clamp(1rem, .96rem + .2vw, 1.125rem);
  --step-1: clamp(1.15rem, 1.05rem + .5vw, 1.4rem);
  --step-2: clamp(1.6rem, 1.2rem + 1.8vw, 2.6rem);
  --step-3: clamp(1.25rem, .9rem + 1.6vw, 2.1rem);
  /* space */
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --section: clamp(3.5rem, 2rem + 6vw, 7.5rem);
  --max: 1360px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--parchment);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); }
a:hover { color: #ffd27a; }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; border-radius: 4px; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.12; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
figure { margin: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--gold); color: var(--ink); padding: .5em 1em; border-radius: 6px; font-weight: 800;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * 16px);
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}

/* ---------- the stone plate (the game's koyu-tas-panel) ---------- */
.plate {
  border: 26px solid transparent;
  border-image: url("img/ui/stone.webp") 52 fill / 26px stretch;
  padding: .6rem .9rem;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .45));
}
.copy h2 {
  color: var(--gold);
  font-size: var(--step-2);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .6);
  padding-bottom: .55em;
  margin-bottom: .7em;
  background: url("img/ui/divider.webp") left bottom / min(100%, 22rem) 6px no-repeat;
}

.points { list-style: none; margin: 0; padding: 0; display: grid; gap: .8em; }
.points li { position: relative; padding-left: 1.5em; }
.points li::before {
  content: "";
  position: absolute; left: .15em; top: .55em;
  width: .5em; height: .5em;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .5);
}

/* ---------- media frames ---------- */
.frame {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0d0c;
  box-shadow: 0 0 0 2px #0a0c0b, 0 0 0 3px rgba(244, 180, 60, .28), 0 22px 44px rgba(0, 0, 0, .55);
  aspect-ratio: 16 / 9;
  max-width: 100%;
}
.frame > img, .frame > video { width: 100%; height: 100%; object-fit: cover; }

/* the play/pause control every looping video gets from site.js */
.vid-toggle {
  position: absolute; right: 10px; bottom: 10px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid rgba(244, 180, 60, .7);
  background: rgba(14, 16, 15, .72);
  color: var(--parchment);
  display: grid; place-items: center;
  cursor: pointer;
  opacity: .0;
  transition: opacity .2s;
}
.frame:hover .vid-toggle, .vid-toggle:focus-visible, .vid-toggle[aria-pressed="false"] { opacity: 1; }
.vid-toggle svg { width: 16px; height: 16px; fill: currentColor; }
@media (hover: none) { .vid-toggle { opacity: .85; } }

/* ---------- buttons on the menu's brushes ---------- */
.cta { display: flex; flex-wrap: wrap; gap: .9rem 1.2rem; justify-content: center; align-items: center; }
.btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 3.6rem;
  padding: .55rem 2.4rem .65rem 2rem;
  font-family: var(--display);
  font-size: clamp(1.15rem, 1rem + .55vw, 1.55rem);
  text-decoration: none;
  white-space: nowrap;
  background: center / 100% 100% no-repeat;
  transition: transform .15s ease, filter .15s ease;
}
.btn-cream { background-image: url("img/ui/brush-cream.webp"); color: var(--ink); min-width: 15rem; }
.btn-red { background-image: url("img/ui/brush-red.webp"); color: #fff3df; min-width: 15rem; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
a.btn:hover { transform: translateY(-2px) rotate(-.6deg); filter: brightness(1.08); }
a.btn-cream:hover { color: var(--ink); }
a.btn-red:hover { color: #fff3df; }
.btn.is-soon { filter: grayscale(.55) brightness(.72); cursor: default; padding-bottom: 1.15rem; }
.btn.is-soon::after {
  content: "coming soon";
  position: absolute; left: 0; right: .4rem; bottom: .28rem;
  text-align: center;
  font-family: var(--body);
  font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  opacity: .85;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: min(56.25vw, calc(100svh - 24px));
  min-height: 600px;
  max-height: 1180px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
}
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art img { object-fit: cover; object-position: 50% 100%; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(18, 22, 20, 0) 45%, rgba(18, 22, 20, .55) 72%, var(--night) 100%),
    linear-gradient(to bottom, rgba(18, 22, 20, .35), rgba(18, 22, 20, 0) 14%);
}
.hero-copy {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: clamp(.5rem, 1.2vw, 1rem);
  padding: 0 var(--gutter-r) clamp(1.6rem, 3.5vw, 3rem) var(--gutter);
  text-align: center;
}
.wordmark img {
  width: min(700px, 88vw);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .7)) drop-shadow(0 0 30px rgba(10, 6, 4, .6));
}
.slogan {
  font-family: var(--display);
  font-size: var(--step-3);
  color: var(--parchment);
  text-shadow: 0 2px 2px rgba(0, 0, 0, .9), 0 0 18px rgba(0, 0, 0, .8);
  margin-bottom: .4rem;
}
.platform {
  font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dust);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9);
}

/* Below 1200 px the foot's wrappers dissolve, so the name, slogan, buttons and platform line stack in one column. */
.hero-foot, .hero-words { display: contents; }
.hero-copy .cta { order: 1; }
.hero-copy .platform { order: 2; }

@media (prefers-reduced-motion: no-preference) {
  .wordmark img { animation: drop .7s cubic-bezier(.2, .8, .2, 1) both; }
  .slogan, .hero-copy .cta, .platform { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
  .slogan { animation-delay: .12s; }
  .hero-copy .cta { animation-delay: .22s; }
  .platform { animation-delay: .3s; }
}

/* Wide screens: the whole key art at its own proportions, the name on the bare slab at its foot (as the Steam main
   capsule places it), the slogan and the buttons on the darkened rocks under the slab. */
@media (min-width: 1200px) {
  .hero { height: auto; min-height: 0; max-height: none; aspect-ratio: 1672 / 941; display: block; }
  .hero::after {
    background:
      linear-gradient(to bottom, rgba(18, 22, 20, 0) 88%, rgba(18, 22, 20, .72) 96%, rgba(18, 22, 20, .9) 100%),
      linear-gradient(to bottom, rgba(18, 22, 20, .3), rgba(18, 22, 20, 0) 10%);
  }
  .hero-copy { position: absolute; inset: 0; display: block; padding: 0; }
  .wordmark { position: absolute; left: 54.5%; top: 81.5%; width: 41%; transform: translate(-50%, -50%); }
  .wordmark img { width: 100%; }
  .hero-foot {
    position: absolute; left: 0; right: 0; bottom: 1.1%;
    display: flex; justify-content: center; align-items: center; gap: clamp(1.5rem, 3vw, 3.5rem);
    padding-inline: var(--gutter) var(--gutter-r);
  }
  .hero-words { display: grid; gap: .1rem; text-align: right; }
  .slogan { margin: 0; font-size: clamp(1.15rem, .55rem + .8vw, 1.75rem); }
  .platform { font-size: .72rem; }
  .hero-copy .cta { flex-wrap: nowrap; gap: .8rem; }
  .hero .btn { min-height: clamp(2.9rem, 1.6rem + 1.5vw, 3.6rem); min-width: 13rem; font-size: clamp(1.05rem, .7rem + .45vw, 1.4rem); padding-block: .4rem .5rem; }
  .hero .btn.is-soon { padding-bottom: .95rem; }
  .hero .btn.is-soon::after { bottom: .18rem; font-size: .6rem; }
}
@keyframes rise { from { opacity: .001; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drop {
  0% { opacity: .001; transform: translateY(-30px) scale(1.04); }
  70% { opacity: 1; transform: translateY(3px) scale(1); }
  100% { opacity: 1; transform: none; }
}

/* ---------- intro: short description beside the trailer ---------- */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 5rem) var(--section);
}
.lead {
  font-size: clamp(1.15rem, 1rem + .75vw, 1.55rem);
  line-height: 1.55;
  font-weight: 600;
  max-width: 34ch;
}
.trailer figcaption, .trailer-yt + figcaption {
  position: absolute; left: 12px; top: 10px;
  font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--parchment);
  background: rgba(14, 16, 15, .7);
  padding: .2em .7em; border-radius: 4px;
}
.trailer-yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-facade { position: absolute; inset: 0; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; background: center / cover no-repeat; }
.yt-facade span {
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(14, 16, 15, .78); border: 3px solid var(--gold);
  display: grid; place-items: center;
}
.yt-facade svg { width: 30px; height: 30px; fill: var(--gold); margin-left: 5px; }

/* ---------- feature rows ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: center;
  padding-block: 0 var(--section);
}
.feature.flip > .copy { order: 2; }
.feature .copy { max-width: 36rem; }
.feature.flip .copy { justify-self: end; }
.opening { font-size: var(--step-1); line-height: 1.6; }
.media-stack { display: grid; gap: clamp(1rem, 2vw, 1.6rem); }
.media-stack .frame:nth-child(2) { width: 72%; justify-self: end; margin-top: -14%; }
.feature:not(.flip) .media-stack .frame:nth-child(2) { justify-self: start; }

.powers {
  list-style: none; margin: 1.6rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem;
}
.powers li { display: grid; justify-items: center; gap: .25rem; text-align: center; }
.powers img { width: min(72px, 100%); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.powers span { font-size: .78rem; font-weight: 800; letter-spacing: .04em; color: var(--dust); line-height: 1.2; }

/* ---------- the legend: campfire band ---------- */
.legend { padding-block: 0 var(--section); display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.legend-band {
  position: relative;
  isolation: isolate;
  min-height: clamp(520px, 41.9vw, 1000px);
  display: flex;
  align-items: center;
  padding-block: clamp(3rem, 6vw, 6rem);
}
.legend-art, .legend-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.legend-art img { object-fit: cover; object-position: 62% 40%; z-index: -2; }
.legend-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to right, rgba(18, 22, 20, .6) 0%, rgba(18, 22, 20, .15) 32%, rgba(18, 22, 20, 0) 50%),
    linear-gradient(to bottom, var(--night) 0%, rgba(18, 22, 20, 0) 14%, rgba(18, 22, 20, 0) 82%, var(--night) 100%);
}
.legend-inner { width: 100%; }
.legend-copy { max-width: 31rem; }
.legend-copy p { font-size: var(--step-1); }
q.elder {
  quotes: "\201C" "\201D";
  font-family: var(--display);
  color: var(--ember);
  font-size: 1.15em;
  white-space: nowrap;
}
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }

/* ---------- the two multiplayer modes ---------- */
.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-block: 0 var(--section);
  align-items: start;
}
.mode { display: grid; gap: 1rem; }
.mode h2 { color: var(--gold); font-size: var(--step-2); text-shadow: 0 2px 0 rgba(0, 0, 0, .6); margin-top: .4rem; }

/* ---------- gallery ---------- */
.gallery { padding-block: 0 var(--section); }
.gallery h2 {
  color: var(--gold); font-size: var(--step-2); text-align: center; margin-bottom: 1.6rem;
  padding-bottom: .55em;
  background: url("img/ui/divider.webp") center bottom / min(70%, 22rem) 6px no-repeat;
}
.shots {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.5rem, 1.2vw, 1rem);
}
.shots li:first-child { grid-column: span 2; grid-row: span 2; }
.shots button {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in;
  border-radius: 6px; overflow: hidden; background: #0b0d0c;
  box-shadow: 0 0 0 2px #0a0c0b, 0 10px 22px rgba(0, 0, 0, .45);
}
.shots img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; transition: transform .35s ease, filter .35s ease; }
.shots button:hover img { transform: scale(1.04); filter: brightness(1.08); }
.shots button:focus-visible { outline-offset: 2px; }

/* ---------- in the demo ---------- */
.demo { padding-block: 0 var(--section); display: grid; justify-items: center; }
.demo-plate { width: min(100%, 44rem); display: grid; gap: 1.3rem; }
.demo-plate h2 { margin-bottom: 0; }
.demo-plate .cta { justify-content: flex-start; margin-top: .4rem; }

/* ---------- footer ---------- */
.footer { background: #0c0f0e; border-top: 1px solid rgba(244, 180, 60, .18); }
.footer-inner {
  padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: auto 1fr; gap: 1.2rem 2.5rem; align-items: center;
}
.footer-mark img { width: 190px; }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.social a {
  display: inline-block; padding: .45em 1em; border-radius: 999px; text-decoration: none; font-weight: 800;
  color: var(--parchment); background: var(--stone); box-shadow: inset 0 0 0 1px rgba(244, 180, 60, .25);
}
.social a span { color: var(--dust); font-weight: 600; margin-left: .3em; }
.social a:hover { box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold); }
.legal { grid-column: 1 / -1; font-size: .82rem; color: var(--dust); }

/* ---------- lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(8, 10, 9, .94); color: var(--parchment);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(8, 10, 9, .6); }
.lightbox figure {
  display: grid; gap: .8rem; justify-items: center;
  width: min(1600px, calc(100vw - 2 * 72px));
  padding-top: env(safe-area-inset-top, 0px);
}
.lightbox img {
  width: auto; max-width: 100%; max-height: calc(100vh - 120px); border-radius: 6px;
  box-shadow: 0 0 0 2px #000, 0 30px 60px rgba(0, 0, 0, .7);
}
.lightbox figcaption { font-size: .95rem; text-align: center; max-width: 60ch; padding-inline: 1rem; }
.lightbox .count { color: var(--dust); margin-left: .5em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-btn {
  position: absolute; width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(244, 180, 60, .6); background: rgba(20, 24, 22, .85); color: var(--parchment);
  font: 400 2rem/1 var(--display); display: grid; place-items: center; padding: 0 0 .15em;
}
.lb-btn:hover { border-color: var(--gold); color: var(--gold); }
.lb-prev { left: max(10px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lb-next { right: max(10px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }
.lb-close { right: max(10px, env(safe-area-inset-right, 0px)); top: calc(10px + env(safe-area-inset-top, 0px)); font-size: 1.8rem; }

/* ---------- narrower screens ---------- */
@media (max-width: 960px) {
  .intro, .feature { grid-template-columns: minmax(0, 1fr); }
  .feature.flip > .copy { order: 0; }
  .feature .copy, .feature.flip .copy { max-width: none; justify-self: stretch; }
  .lead { max-width: none; }
  .modes { grid-template-columns: minmax(0, 1fr); }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots li:first-child { grid-row: auto; }
  .legend-band { display: block; min-height: 0; padding: 0; }
  .legend-art { position: relative; display: block; height: auto; }
  .legend-art img { position: relative; height: auto; aspect-ratio: 4 / 3; object-position: 56% 30%; }
  .legend-band::after {
    bottom: auto; height: calc(100vw * .75);
    background: linear-gradient(to bottom, rgba(18, 22, 20, 0) 60%, var(--night) 100%);
  }
  .legend-inner { margin-top: -3.5rem; position: relative; }
}
@media (max-width: 600px) {
  .hero { height: min(88svh, 760px); min-height: 560px; }
  .hero-art img { object-position: 28% 100%; }
  .plate { border-width: 18px; border-image-width: 18px; padding: .4rem .5rem; }
  .btn { min-width: min(17rem, 100%); padding-inline: 1.6rem 2rem; }
  .cta { flex-direction: column; }
  .demo-plate .cta { align-items: stretch; }
  .media-stack .frame:nth-child(2) { width: 100%; margin-top: 0; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .powers span { font-size: .7rem; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .social { justify-content: flex-start; }
  .lightbox figure { width: calc(100vw - 24px); }
  .lb-prev, .lb-next { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: none; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
  .lightbox img { max-height: calc(100vh - 200px); }
}

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