/* Styles for deckpeek.app — the landing page and the text pages that share it.
   Deliberately buildless: plain CSS, no framework, no external request. Each
   viewer keeps its own accent colour, so the shell stays neutral and the game
   tiles carry the colour. */

:root {
  --bg: #070b13;
  --bg-panel: #101a29;
  --bg-soft: #0d1523;
  --border: #23314a;
  --border-soft: #1a2334;
  --text: #eef4fa;
  --text-dim: #93a2b5;
  --dot: #ffffff;
  --glow-a: #0f4f4bcc;
  --glow-b: #4a2f00b3;
  --nr: #2ee8d2;
  --nr-soft: #2ee8d226;
  --nr-wash: #2ee8d21f;
  --mc: #ffb02e;
  --mc-soft: #ffb02e26;
  --mc-wash: #ffb02e1f;
  --ah: #a8c464;
  --ah-soft: #a8c46426;
  --ah-wash: #a8c4641f;
  --on-accent: #06101a;
  --shadow: 0 22px 48px -18px #000000c0;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f6fa;
    --bg-panel: #ffffff;
    --bg-soft: #eaf0f7;
    --border: #d3dde9;
    --border-soft: #e3eaf3;
    --text: #0e1721;
    --text-dim: #4f5c6b;
    --dot: #16374f;
    --glow-a: #a8e5dc99;
    --glow-b: #ffd99199;
    --nr: #068e7d;
    --nr-soft: #068e7d1f;
    --nr-wash: #068e7d17;
    --mc: #c07800;
    --mc-soft: #c078001f;
    --mc-wash: #c0780017;
    --ah: #5f7a1f;
    --ah-soft: #5f7a1f1f;
    --ah-wash: #5f7a1f17;
    --on-accent: #ffffff;
    --shadow: 0 18px 40px -18px #1b2b3a4d;
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 78% -14%, var(--glow-a), transparent 70%),
    radial-gradient(760px 460px at -8% 2%, var(--glow-b), transparent 70%);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

/* A faint dot grid, fading out downwards — texture without noise. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.055;
  mask-image: linear-gradient(180deg, #000 0%, transparent 65%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 65%);
}

main {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(36px, 8vh, 88px) max(22px, env(safe-area-inset-left)) 56px
    max(22px, env(safe-area-inset-right));
}

a {
  color: var(--nr);
}

/* ---------- Hero ---------- */
.hero__brand {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 18px);
}

.logo {
  width: clamp(46px, 8vw, 62px);
  height: clamp(46px, 8vw, 62px);
  flex-shrink: 0;
  color: var(--text-dim);
}

.wordmark {
  margin: 0;
  font-size: clamp(40px, 9vw, 66px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* Gradient stops of the mark, set here because var() in a stop-color
   presentation attribute is not reliably supported. */
.logo__stop-a {
  stop-color: var(--nr);
}

.logo__stop-b {
  stop-color: var(--mc);
}

/* "Peek" carries the same teal -> amber gradient as the mark. */
.wordmark em {
  font-style: normal;
  color: var(--nr);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .wordmark em {
    background-image: linear-gradient(100deg, var(--nr) 15%, var(--mc) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero__tag {
  margin: 22px 0 0;
  font-size: clamp(20px, 3.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.022em;
}

.hero__lede {
  margin: 12px 0 0;
  max-width: 54ch;
  font-size: clamp(15.5px, 2.1vw, 18px);
  color: var(--text-dim);
}

.hero__lede strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- The viewers ---------- */
.viewers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.viewer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(130% 150% at 100% 0%, var(--accent-wash), transparent 62%),
    var(--bg-panel);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

/* Accent bar across the top edge of each tile. */
.viewer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent 78%);
}

.viewer:hover,
.viewer:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  outline: none;
}

.viewer:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Per-game artwork, drawn here rather than taken from the games: it sits in the
   right half and fades out towards the text so nothing competes with it. */
.viewer__art {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  color: var(--accent);
  opacity: 0.3;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent 22%, #000 78%);
  -webkit-mask-image: linear-gradient(90deg, transparent 22%, #000 78%);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.viewer:hover .viewer__art {
  opacity: 0.42;
  transform: scale(1.04);
}

.viewer__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viewer__logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.viewer__name {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.018em;
}

.viewer__source {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.viewer__text {
  margin: 0;
  max-width: 32ch;
  font-size: 14.5px;
  color: var(--text-dim);
}

.viewer__host {
  align-self: flex-start;
  margin-top: auto;
  padding: 9px 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13.5px;
  font-weight: 700;
}

.viewer__host svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.viewer:hover .viewer__host svg {
  transform: translateX(3px);
}

.viewer--nr {
  --accent: var(--nr);
  --accent-soft: var(--nr-soft);
  --accent-wash: var(--nr-wash);
}

.viewer--mc {
  --accent: var(--mc);
  --accent-soft: var(--mc-soft);
  --accent-wash: var(--mc-wash);
}

.viewer--ah {
  --accent: var(--ah);
  --accent-soft: var(--ah-soft);
  --accent-wash: var(--ah-wash);
}

/* Accented parts of the inline marks. Styled here rather than via presentation
   attributes, where var() support is shakier. */
.viewer__logo .mark {
  stroke: var(--accent);
}

.viewer__logo .mark--fill,
.mark--fill {
  fill: var(--accent);
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border-soft);
  padding: 22px max(22px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  color: var(--text-dim);
  font-size: 12.5px;
  text-align: center;
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin-bottom: 10px;
  font-size: 13px;
}

.footer__sep {
  opacity: 0.5;
}

.legal {
  max-width: 78ch;
  margin: 6px auto 0;
  font-size: 11.5px;
  line-height: 1.5;
  opacity: 0.72;
}

/* ---------- Text pages (privacy) ---------- */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.back:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-title {
  margin: 0;
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.page-sub {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 14px;
}

.prose {
  max-width: 68ch;
  margin: 34px 0 0;
  font-size: 15px;
}

.prose h2 {
  margin: 32px 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.prose p,
.prose ul {
  margin: 0 0 10px;
  color: var(--text-dim);
}

.prose ul {
  padding-left: 20px;
}

.prose li {
  margin-bottom: 6px;
}

.prose dl {
  margin: 0;
  color: var(--text-dim);
}

.prose dt {
  margin-top: 10px;
  font-weight: 600;
  color: var(--text);
}

.prose dd {
  margin: 2px 0 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before {
    transition: none !important;
  }
}
