/* Ash Games. Dark page with a green tint, one big art banner, tabs, three-across cards, thin rules with a dot. */

@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("/fonts/mplus-rounded-1c-extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e1413;
  --panel: #141c1a;
  --line: #24312c;
  --edge: rgba(111, 169, 138, 0.3);   /* thin outline around pictures */
  --fg: #f2f5f1;
  --sage: #6fa98a;                     /* quiet headings, links, the dot */
  --soft: #8fa79b;                     /* body text */
  --wide: 1066px;
  --display: "M PLUS Rounded 1c", ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--soft);
  font: 16px/1.75 var(--text);
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3 { margin: 0; color: var(--fg); font-family: var(--display); font-weight: 800; line-height: 1.12; letter-spacing: 0.01em; }

p { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 20; padding: 10px 16px; background: var(--fg); color: var(--bg); border-radius: 999px; font-weight: 700; }
.skip:focus { left: 12px; }

:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; border-radius: 4px; }

.wrap { max-width: calc(var(--wide) + 40px); margin: 0 auto; padding: 0 20px; }

/* ---------- top ---------- */

.top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; justify-self: start; }
.brand img { width: 34px; filter: invert(1); }
.brand span { color: var(--fg); font: 800 19px/1 var(--display); }

.top nav { display: flex; gap: 44px; }
.top nav a { color: #b3c1ba; font: 800 15px/1 var(--display); letter-spacing: 0.03em; text-decoration: none; }
.top nav a:hover { color: var(--fg); }

.pill {
  justify-self: end;
  padding: 10px 18px 9px;
  border: 1.5px solid var(--fg);
  border-radius: 999px;
  color: var(--fg);
  font: 800 13px/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.pill:hover { background: var(--fg); color: var(--bg); }

/* ---------- stage (banner) ---------- */

.stage {
  position: relative;
  isolation: isolate;
  margin-top: 6px;
  aspect-ratio: 2.1 / 1;
  overflow: hidden;
  border-radius: 22px;
  background: var(--panel);
}

.slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.7s ease; }
.slide.is-on { opacity: 1; pointer-events: auto; }
.slide > img { width: 100%; height: 100%; object-fit: cover; }

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(9, 13, 12, 0.92) 0%, rgba(9, 13, 12, 0.6) 26%, rgba(9, 13, 12, 0) 60%),
    linear-gradient(to right, rgba(9, 13, 12, 0.4), rgba(9, 13, 12, 0) 55%);
}
.slide.intro::after { background: radial-gradient(ellipse 62% 86% at 50% 52%, rgba(9, 13, 12, 0.9) 0%, rgba(9, 13, 12, 0.66) 55%, rgba(9, 13, 12, 0.34) 100%); pointer-events: none; }

.cap { position: absolute; z-index: 2; left: 44px; right: 44px; bottom: 38px; }
.cap h2 { font-size: clamp(34px, 5vw, 54px); }
.cap p { margin-top: 8px; color: var(--fg); font-size: 19px; letter-spacing: 0.03em; }
.cap .kick, .center .kick { margin: 0 0 10px; color: #d7e4dc; }
.cap .go { margin-top: 20px; }

.kick { color: var(--sage); font-size: 12px; font-weight: 700; line-height: 1.4; letter-spacing: 0.16em; text-transform: uppercase; }

.go { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); font: 800 18px/1.2 var(--display); text-decoration: none; }
.go svg, .more svg { width: 22px; height: 22px; flex: none; transition: transform 0.2s ease; }
.go:hover svg, .more:hover svg { transform: translateX(5px); }

/* the first slide: five slices of key art behind the logo */
.mosaic { position: absolute; inset: 0 -8%; display: flex; gap: 4px; transform: skewX(-9deg); background: var(--bg); }
.mosaic span { flex: 1; overflow: hidden; cursor: pointer; transition: flex 0.45s ease; }
.mosaic span:hover { flex: 1.5; }
.mosaic i { display: block; width: 100%; height: 100%; background-size: cover; background-position: center; transform: skewX(9deg) scale(1.35); }

.center { position: absolute; z-index: 2; inset: 0; display: grid; place-content: center; justify-items: center; padding: 24px; text-align: center; pointer-events: none; }
.center > * { pointer-events: auto; }
.center .logo { width: clamp(96px, 13vw, 150px); filter: invert(1); }
.center h1 { margin-top: 18px; font-size: clamp(30px, 4.6vw, 48px); }
.center p { margin-top: 12px; max-width: 31em; color: #dbe6df; font-size: 17px; }
.center .go { margin-top: 20px; }

/* ---------- rules and tabs ---------- */

.rule {
  --at: 50%;
  position: relative;
  height: 1px;
  margin: 40px 0 0;
  background: linear-gradient(to right, var(--line) calc(var(--at) - 16px), transparent calc(var(--at) - 16px), transparent calc(var(--at) + 16px), var(--line) calc(var(--at) + 16px));
}
.rule::after { content: ""; position: absolute; left: var(--at); top: -4px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #3f6e56; }

.tabs { display: flex; justify-content: space-between; gap: 30px; padding: 30px 8px; }
.tabs button {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--sage);
  font: 800 21px/1.2 var(--display);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
}
.tabs button:hover { color: #a5d3ba; }
.tabs button[aria-selected="true"] { color: var(--fg); }
.tabs button::before, .tabs button::after { content: "•"; display: inline-block; width: 1em; opacity: 0; }
.tabs button[aria-selected="true"]::before, .tabs button[aria-selected="true"]::after { opacity: 1; }
.tabs + .rule { margin-top: 0; }

/* ---------- games ---------- */

.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 68px 44px; padding: 48px 0 28px; }

.card { display: flex; flex-direction: column; scroll-margin-top: 28px; }

.shot { display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--edge); border-radius: 14px; background: var(--panel); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.card:hover .shot img { transform: scale(1.05); }

.card .kick { margin-top: 22px; }
.card h3 { margin-top: 8px; font-size: 27px; }
.desc { margin-top: 14px; }

.more { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 26px; color: var(--fg); font: 800 18px/1.2 var(--display); text-decoration: none; }
.more.off { color: var(--sage); }

.card.next .shot { display: grid; place-items: center; border-style: dashed; }
.card.next .shot img { width: 30%; height: auto; object-fit: contain; filter: invert(1); opacity: 0.9; }
.card.next:hover .shot img { transform: scale(1.08) rotate(-3deg); }

/* ---------- section heads ---------- */

.head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 40px 0 30px; }
.head h2 { font-size: clamp(30px, 4vw, 40px); }

/* ---------- gallery ---------- */

.belt { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); }
.belt + .belt { margin-top: 20px; }
.track { display: flex; gap: 20px; width: max-content; padding: 0 20px; }
.track img { height: 250px; width: auto; max-width: none; border: 1px solid var(--edge); border-radius: 14px; }
.belt.tall .track img { height: 340px; border-radius: 22px; }

.track.run { animation: belt 90s linear infinite; padding: 0; }
.belt.rev .track.run { animation-direction: reverse; }
.belt:hover .track.run { animation-play-state: paused; }
@keyframes belt { to { transform: translateX(calc(-50% - 10px)); } }

/* ---------- in motion ---------- */

.motion { padding-top: 56px; }

.phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }

figure { margin: 0; }
figcaption { margin-top: 14px; color: var(--fg); text-align: center; font: 800 17px/1.2 var(--display); }

.phones video { width: 100%; aspect-ratio: 480 / 1040; object-fit: cover; background: #090d0c; border: 5px solid #26332e; border-radius: 30px; }

.wide { margin-top: 52px; }
.wide video { width: 100%; aspect-ratio: 1280 / 590; object-fit: cover; background: #090d0c; border: 5px solid #26332e; border-radius: 22px; }

/* ---------- about ---------- */

.about { padding-top: 56px; }
.about .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; padding: 56px 0 20px; }
.about h2 { font-size: clamp(32px, 4.4vw, 46px); }
.about p { font-size: 17px; }
.links { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 28px; }

/* ---------- foot ---------- */

.foot { padding-top: 40px; padding-bottom: 48px; }
.foot .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; padding: 44px 0 6px; }
.foot .logo { width: 132px; filter: invert(1); opacity: 0.92; }
.foot nav { display: grid; gap: 16px; align-content: start; }
.foot nav a { color: var(--sage); font: 800 15px/1.2 var(--display); letter-spacing: 0.02em; text-decoration: none; }
.foot nav a:hover { color: var(--fg); }
.fine { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 26px; color: #4f6f60; font-size: 13px; }

/* ---------- game pages (made by build.py) ---------- */

.crumb { padding: 2px 0 14px; }
.go.back { font-size: 15px; color: #b3c1ba; }
.go.back svg { width: 18px; height: 18px; transform: scaleX(-1); }
.go.back:hover { color: var(--fg); }
.go.back:hover svg { transform: scaleX(-1) translateX(4px); }

.stage.solo { margin-top: 0; }
.stage.solo h1 { font-size: clamp(38px, 6vw, 64px); }

.tabs.anchors a { color: var(--sage); font: 800 21px/1.2 var(--display); text-decoration: none; white-space: nowrap; transition: color 0.15s ease; }
.tabs.anchors a:hover { color: var(--fg); }
.tabs.anchors { justify-content: flex-start; gap: 56px; }

.over { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: center; padding: 56px 0 8px; }
.over.land { grid-template-columns: 1fr; gap: 40px; }
.say h2 { margin-bottom: 18px; font-size: clamp(32px, 4.6vw, 48px); }
.big { color: var(--fg); font-size: clamp(19px, 2.2vw, 23px); line-height: 1.6; letter-spacing: 0.015em; max-width: 34em; }
.say .desc { max-width: 40em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chips span { padding: 8px 16px 7px; border: 1px solid var(--edge); border-radius: 999px; color: var(--sage); font: 800 13px/1.2 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }

.premise { display: grid; grid-template-columns: 76px 1fr 76px; gap: 20px; align-items: center; margin-top: 36px; padding: 22px 24px; border: 1px solid var(--edge); border-radius: 18px; background: var(--panel); }
.premise img { width: 76px; }

.trailer video, .phone video, .phone img { width: 100%; height: 100%; object-fit: cover; }
.trailer.tall, .phone { aspect-ratio: 480 / 1040; overflow: hidden; background: #090d0c; border: 5px solid #26332e; border-radius: 30px; }
.trailer.wide { aspect-ratio: 1280 / 590; overflow: hidden; background: #090d0c; border: 5px solid #26332e; border-radius: 22px; }

.scenes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 44px; padding-bottom: 28px; }
.scene .phone { max-width: 290px; }
.scene .words { margin-top: 22px; }
.scene h3, .row h3 { margin-top: 8px; font-size: 24px; }
.scene .kick { font-size: 13px; }
.phone.blank { display: grid; place-items: center; border-style: dashed; border-width: 1px; border-color: var(--edge); background: var(--panel); }
.phone.blank span { color: #2f4a3d; font: 800 96px/1 var(--display); }

.scene.wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 44px; align-items: center; }
.scene.wide .words { margin-top: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 14px; padding: 24px; border: 1px solid var(--edge); border-radius: 18px; background: var(--panel); }
.tiles img { width: 100%; }
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.strip img { width: 100%; border: 1px solid var(--edge); border-radius: 14px; }

.rows { display: grid; gap: 72px; padding-bottom: 28px; }
.row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.row:nth-child(even) .pics { order: 2; }
.row .pics { display: grid; gap: 18px; }
.row figure img { width: 100%; border: 1px solid var(--edge); border-radius: 14px; }
.row figcaption { margin-top: 10px; color: var(--sage); text-align: left; font: 400 13px/1.4 var(--text); letter-spacing: 0.08em; text-transform: uppercase; }
.row h3 { margin-top: 0; }
.row .desc { margin-top: 14px; }

.extra .big { margin-bottom: 30px; }
.extra .head { padding-bottom: 20px; }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; }
.specs div { padding-top: 18px; border-top: 1px solid var(--line); }
.specs h3 { font-size: 21px; }
.specs p { margin-top: 8px; }

.figs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 14px; }
.figs img { width: 100%; border: 1px solid var(--edge); border-radius: 12px; }
.figs figcaption { margin-top: 10px; font: 400 12px/1.4 var(--text); letter-spacing: 0.04em; color: var(--soft); }

.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.facts li { position: relative; padding-left: 22px; }
.facts li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: #3f6e56; }
.row .facts { margin-top: 16px; }

.legal { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 40px 0 0; font-size: 14px; }
.legal a { color: var(--sage); text-underline-offset: 4px; }
.legal a:hover { color: var(--fg); }

.others { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding-bottom: 20px; }
.other { display: block; text-decoration: none; }
.other .more { padding-top: 16px; font-size: 17px; }
.other:hover .shot img { transform: scale(1.05); }

@media (max-width: 899px) {
  .over { grid-template-columns: 1fr; gap: 40px; }
  .trailer.tall { max-width: 300px; margin: 0 auto; }
  .scenes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 52px 28px; }
  .scene.wide, .row { grid-template-columns: 1fr; gap: 24px; }
  .row:nth-child(even) .pics { order: 0; }
  .specs { grid-template-columns: 1fr; gap: 24px; }
  .figs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .others { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs.anchors { gap: 34px; }
}

@media (max-width: 599px) {
  .scenes { grid-template-columns: 1fr; }
  .scene .phone { max-width: 260px; }
  .figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .premise { grid-template-columns: 56px 1fr; }
  .premise img { width: 56px; }
  .premise img:last-child { display: none; }
}

/* ---------- lost (404) ---------- */

.lost { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 40px 20px; text-align: center; }
.lost img { width: 150px; filter: invert(1); }
.lost p { color: var(--fg); font-size: 20px; }

/* ---------- smaller screens ---------- */

@media (max-width: 899px) {
  .top { grid-template-columns: auto 1fr auto; padding: 16px 20px; gap: 16px; }
  .top nav { justify-content: center; gap: 22px; }
  .tabs { justify-content: flex-start; overflow-x: auto; padding: 24px 0; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 52px 28px; }
  .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .about .cols { grid-template-columns: 1fr; gap: 20px; padding-top: 44px; }
  .foot .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot .logo { grid-column: 1 / -1; }
}

@media (max-width: 599px) {
  .top nav { display: none; }
  .top { grid-template-columns: 1fr auto; }
  .stage { aspect-ratio: 4 / 5; border-radius: 18px; }
  .cap { left: 24px; right: 24px; bottom: 26px; }
  .mosaic { inset: 0 -30%; }
  .games { grid-template-columns: 1fr; gap: 48px; }
  .head { flex-direction: column; gap: 6px; padding: 32px 0 24px; }
  .track img { height: 190px; }
  .belt.tall .track img { height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .shot img, .mosaic span, .go svg, .more svg { transition: none; }
  .belt { overflow-x: auto; }
}
