/* Dooma temporary page. Palette from the Dooma brand (board navy #0a1720 / #0f2431,
   edge cyan #5cc8d8, chalk #e6f1f0, the logo's question-mark gold); artwork: the
   approved loading background and logo. Typeface: Shabnam, as in the game. No scripts. */
@font-face {
  font-family: "Shabnam";
  src: url("/assets/Shabnam.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Shabnam";
  src: url("/assets/Shabnam-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #0a1720;
  --navy-2: #0f2431;
  --cyan: #5cc8d8;
  --cyan-soft: rgba(92, 200, 216, 0.28);
  --chalk: #e6f1f0;
  --chalk-dim: rgba(230, 241, 240, 0.74);
  --gold: #ffc83d;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--navy); }

body {
  margin: 0;
  min-height: 100svh;
  color: var(--chalk);
  font-family: "Shabnam", Tahoma, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
  /* The board: a faint cell grid under a cyan glow. */
  background:
    radial-gradient(60% 45% at 50% 18%, rgba(46, 140, 220, 0.22), rgba(10, 23, 32, 0) 70%),
    linear-gradient(rgba(92, 200, 216, 0.05) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(92, 200, 216, 0.05) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--navy);
}

.stage {
  min-height: 100svh;
  display: grid;
  grid-template-areas: "board" "copy" "studio";
  justify-items: center;
  gap: 24px;
  padding:
    max(20px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.board {
  grid-area: board;
  position: relative;
  margin: 0;
  width: min(100%, 30rem);
  aspect-ratio: 5 / 4;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--cyan-soft);
  box-shadow: 0 0 0 6px rgba(15, 36, 49, 0.9), 0 0 60px rgba(46, 140, 220, 0.25), 0 30px 70px rgba(0, 0, 0, 0.5);
  background: #020812;
}
.field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
}
.logo {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 72%;
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
}

.copy {
  grid-area: copy;
  width: min(100%, 36rem);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 2px 13px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cyan);
  border: 1px solid rgba(92, 200, 216, 0.45);
  border-radius: 8px;
  background: rgba(92, 200, 216, 0.08);
}
.cell {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(92, 200, 216, 0.8);
  transform: rotate(45deg);
}

h1 {
  margin: 0.5em 0 0.35em;
  font-size: clamp(27px, 6vw, 42px);
  font-weight: 700;
  line-height: 1.45;
}
.lead {
  margin: 0 0 1.1em;
  font-size: clamp(16.5px, 2.4vw, 18.5px);
  color: var(--chalk);
}

/* Three moves of a match, drawn as cells of the board. */
.moves {
  list-style: none;
  margin: 0 0 1.2em;
  padding: 0;
  display: grid;
  gap: 8px;
}
.moves li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(15, 36, 49, 0.9), rgba(10, 23, 32, 0.9));
  border: 1px solid rgba(92, 200, 216, 0.18);
  border-radius: 12px;
}
.glyph {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: #cfeef4;
  background: rgba(92, 200, 216, 0.1);
  border: 1px solid rgba(92, 200, 216, 0.35);
}
.moves li:first-child .glyph { color: var(--gold); border-color: rgba(255, 200, 61, 0.45); background: rgba(255, 200, 61, 0.08); }

.note {
  margin: 0;
  font-size: 15px;
  color: var(--chalk-dim);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 6px 18px;
  margin: 20px 0;
  padding: 14px 0;
  border-block: 1px solid var(--cyan-soft);
}
.facts dt { font-size: 12.5px; color: var(--cyan); }
.facts dd { margin: 0; font-weight: 700; }

.more {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--chalk);
  font-weight: 700;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(92, 200, 216, 0.55);
  background: rgba(92, 200, 216, 0.1);
  transition: background 0.2s, border-color 0.2s;
}
.more::after { content: "←"; color: var(--cyan); }
[dir="ltr"] .more::after { content: "→"; }
.more:hover { background: rgba(92, 200, 216, 0.2); border-color: var(--cyan); }

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.en {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(92, 200, 216, 0.18);
  font-size: 15px;
  line-height: 1.7;
}
.en h2 { margin: 0.6em 0 0.3em; font-size: clamp(20px, 3.4vw, 24px); font-weight: 700; }
.en p:not(.status) { margin: 0 0 1.1em; color: var(--chalk-dim); }

.studio { grid-area: studio; }
.studio a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--chalk-dim);
  font-size: 13px;
  text-decoration: none;
}
.studio a:hover { color: var(--chalk); }
.studio img { width: 24px; height: 24px; opacity: 0.85; }

/* Wide screens: the board beside the text. */
@media (min-width: 960px) {
  .stage {
    grid-template-areas: "copy board" "studio studio";
    grid-template-columns: minmax(0, 36rem) minmax(0, 30rem);
    grid-template-rows: 1fr auto;
    justify-content: center;
    align-items: center;
    column-gap: clamp(40px, 6vw, 96px);
  }
  .board { aspect-ratio: 4 / 5; }
  .field { object-position: 50% 8%; }
  .logo { inset: 34% auto auto 50%; width: 78%; }
}

/* Short landscape phones: a wide, low board so the text starts on the first screen. */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 959px) {
  .board { width: min(100%, 34rem); aspect-ratio: 16 / 7; }
  .field { object-position: 50% 18%; }
  .logo { width: 34%; }
}

@media (prefers-reduced-motion: reduce) {
  .more { transition: none; }
}
