/* Postbox 12 landing page (site/landing.html). The game's colours and type; one bold thing: the call to action
   (Join the Discord) sits on a pale dispatch slip with a postmark,
   pinned on the wet night of the key art. No web fonts, no inline styles, nothing from other origins. */
:root {
  --bg: #0f151a;
  --bg-2: #121a20;
  --panel: #151e25;
  --line: #2a3a45;
  --text: #d8e4ea;
  --text-dim: #9fb2bd;
  --cyan: #5fd4e6;
  --cyan-dim: #2f8494;
  /* the slip */
  --paper: #dfe4dd;
  --paper-2: #d2d9d1;
  --ink: #121b21;
  --ink-dim: #3c4c55;
  --stamp: #1a6573;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.55 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #a6efff; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 10; background: var(--cyan); color: var(--ink); padding: 10px 14px; font-weight: 700; }
.skip:focus { top: 8px; }

/* ---------------------------------------------------------------- top bar */
.bar { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px;
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 14px var(--gutter); }
.bar__logo img { width: 150px; height: auto; }
.bar__status { font: 0.75rem/1.3 var(--mono); color: var(--text); background: rgb(15 21 26 / 0.72); border: 1px solid var(--line);
  padding: 6px 10px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.bar__dot { width: 8px; height: 8px; background: var(--cyan); box-shadow: 0 0 0 3px rgb(95 212 230 / 0.18); flex: none; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; isolation: isolate; margin-top: -112px; padding-top: 112px; overflow: hidden; }
.hero__art { position: absolute; inset: 0 0 auto 0; width: 100%; height: 520px; object-fit: cover; object-position: 88% 50%; z-index: -2; opacity: 0.75; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 521px; z-index: -1;
  background: linear-gradient(180deg, rgb(15 21 26 / 0.55) 0%, rgb(15 21 26 / 0.7) 45%, var(--bg) 100%); }
.hero__inner { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 20px var(--gutter) 24px; display: grid; gap: 28px; }
.hero__copy { position: relative; }
.hero__stencil { display: none; position: absolute; left: -0.04em; bottom: calc(100% - 0.12em); z-index: -1; white-space: nowrap; font: 700 9rem/1 var(--mono); letter-spacing: -0.02em;
  color: transparent; -webkit-text-stroke: 1px rgb(95 212 230 / 0.16); pointer-events: none; user-select: none; }
.hero__title { font: 700 clamp(2.4rem, 10.5vw, 5.25rem)/0.98 var(--mono); letter-spacing: -0.035em; color: #eef6f9; text-wrap: balance; }
.hero__title span { display: block; }
.hero__title span + span { color: var(--cyan); }
.hero__pitch { margin-top: 18px; max-width: 34em; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem); line-height: 1.55; color: var(--text); }

/* ---------------------------------------------------------------- the slip (the call to action) */
.slip { position: relative; color: var(--ink); background: var(--paper);
  background-image: repeating-linear-gradient(180deg, transparent 0 31px, rgb(18 27 33 / 0.06) 31px 32px);
  padding: 22px 20px 20px; box-shadow: 0 1px 0 rgb(255 255 255 / 0.4) inset, 0 18px 40px -12px rgb(0 0 0 / 0.7);
  border-top: 2px dashed rgb(18 27 33 / 0.35); scroll-margin-top: 16px; }
.slip::after { /* the postmark */
  content: "П/Я 12"; position: absolute; top: 12px; right: 12px; width: 76px; height: 76px; display: grid; place-items: center;
  font: 700 0.875rem/1 var(--mono); color: var(--stamp); border: 2px solid var(--stamp); border-radius: 50%;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--stamp); transform: rotate(-14deg); opacity: 0.85; pointer-events: none; }
.slip__head { padding-right: 88px; min-height: 60px; }
.slip__title { font: 700 1.375rem/1.2 var(--mono); letter-spacing: -0.01em; text-wrap: balance; }
.slip__sub { margin-top: 10px; font-size: 1rem; line-height: 1.5; color: var(--ink-dim); max-width: 26em; }
.slip__send { display: block; margin-top: 20px; min-height: 54px; padding: 15px 18px; text-align: center; text-decoration: none;
  font: 700 1.125rem/1.2 var(--mono); color: #eef9fb; background: var(--ink); box-shadow: 4px 4px 0 var(--stamp); transition: transform 120ms ease, box-shadow 120ms ease; }
.slip__send:hover { color: #fff; background: #1d2a32; }
.slip__send:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--stamp); }
.slip__send:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; }
.slip__alt { margin-top: 14px; font: 600 0.9375rem/1.2 var(--mono); }
.slip__alt a { display: inline-block; padding: 8px 0; color: var(--stamp); }
.slip__alt a:hover { color: var(--ink); }
.slip__alt a:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; }

/* ---------------------------------------------------------------- sections */
.beats, .dice, .founder { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 56px var(--gutter); }
.beats { padding-top: 40px; }
.sect__title { font: 700 clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem)/1.15 var(--mono); letter-spacing: -0.02em; }
.beats__list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 32px; counter-reset: beat; }
.beat { counter-increment: beat; }
.beat__art { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); background: var(--panel); }
.beat__title { margin-top: 14px; display: flex; align-items: baseline; gap: 10px; font: 700 1.25rem/1.2 var(--mono); }
.beat__title::before { content: counter(beat); flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px;
  font-size: 0.875rem; color: var(--bg); background: var(--cyan); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); transform: translateY(4px); }
.beat p { margin-top: 8px; color: var(--text-dim); max-width: 34em; }

.dice { display: grid; gap: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dice__tray { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; justify-items: center; }
.dice__tray img { width: 72px; height: 72px; filter: drop-shadow(0 8px 10px rgb(0 0 0 / 0.55)); }
.dice__tray img:nth-child(odd) { transform: rotate(-9deg) translateY(4px); }
.dice__tray img:nth-child(3n) { transform: rotate(12deg); }
.dice__title { font: 700 clamp(1.5rem, 1.1rem + 2vw, 2.5rem)/1.12 var(--mono); letter-spacing: -0.02em; text-wrap: balance; }
.dice__copy p { margin-top: 12px; color: var(--text-dim); max-width: 34em; }

.founder { display: grid; gap: 24px; align-items: center; }
.founder__art { width: 100%; max-height: 360px; object-fit: cover; object-position: 50% 62%; border: 1px solid var(--line); }
.founder__title { font: 700 clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem)/1.15 var(--mono); letter-spacing: -0.02em; text-wrap: balance; }
.founder__copy p { margin-top: 12px; color: var(--text-dim); max-width: 32em; }

.outro { position: relative; isolation: isolate; min-height: 300px; display: grid; place-items: center; overflow: hidden; }
.outro__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0.8; }
.outro::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg) 0%, rgb(15 21 26 / 0.2) 35%, rgb(15 21 26 / 0.2) 65%, var(--bg) 100%); }
.outro__body { padding: 48px var(--gutter); display: grid; justify-items: center; gap: 28px; }
.outro__join { display: inline-block; min-height: 54px; padding: 15px 22px; font: 700 1.125rem/1.2 var(--mono); text-decoration: none; color: var(--ink); background: var(--cyan);
  box-shadow: 4px 4px 0 var(--stamp); }
.outro__join:hover { color: var(--ink); background: #a6efff; }
.outro__line { text-align: center; font: 700 clamp(1.75rem, 1rem + 4vw, 3.5rem)/1.05 var(--mono); letter-spacing: -0.03em; color: #eef6f9;
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.8); }
.outro__line span { display: block; }
.outro__line span + span { color: var(--cyan); }

/* ---------------------------------------------------------------- footer */
.foot { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 32px var(--gutter) 40px; display: grid; gap: 16px; border-top: 1px solid var(--line); }
.foot__logo { width: 120px; height: auto; }
.foot__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot__links a { display: inline-block; padding: 10px 0; font: 0.9375rem/1.2 var(--mono); }
.foot__note { color: var(--text-dim); font-size: 0.875rem; }

/* ---------------------------------------------------------------- wider screens */
@media (min-width: 560px) {
  .dice__tray { grid-template-columns: repeat(8, 1fr); }
}
@media (min-width: 900px) {
  .bar__logo img { width: 194px; }
  .hero { margin-top: -84px; padding-top: 84px; }
  .hero__art { height: 100%; opacity: 0.9; object-position: 50% 40%; }
  .hero::before { height: auto; inset: 0; }
  .hero::before { background: linear-gradient(90deg, rgb(15 21 26 / 0.9) 0%, rgb(15 21 26 / 0.62) 45%, rgb(15 21 26 / 0.1) 100%),
    linear-gradient(180deg, rgb(15 21 26 / 0.4) 0%, transparent 25%, transparent 70%, var(--bg) 100%); }
  .hero__inner { grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.85fr); align-items: center; gap: 56px; padding-top: 72px; padding-bottom: 72px; min-height: 560px; }
  .hero__stencil { display: block; }
  .beats { padding-top: 56px; }
  .slip { padding: 28px 28px 24px; transform: rotate(1.2deg); }
  .beats__list { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .dice { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; padding-top: 64px; padding-bottom: 64px; }
  .dice__tray img { width: 88px; height: 88px; }
  .dice__tray { grid-template-columns: repeat(4, 1fr); }
  .founder { grid-template-columns: 280px minmax(0, 1fr); gap: 48px; }
  .founder__art { max-height: 380px; }
  .outro { min-height: 440px; }
  .foot { grid-template-columns: auto 1fr; align-items: center; }
  .foot__links { justify-content: flex-end; }
  .foot__note { grid-column: 1 / -1; }
}
@media (min-width: 900px) and (max-height: 700px) {
  .hero__inner { min-height: 0; padding-top: 32px; padding-bottom: 56px; }
}

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

/* ---------------------------------------------------------------- 404 page (release-landing) */
.lost { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 48px var(--gutter) 96px; }
.lost__code { font: 700 clamp(5rem, 24vw, 12rem)/1 var(--mono); color: transparent; -webkit-text-stroke: 1px rgb(95 212 230 / 0.35); letter-spacing: -0.04em; }
.lost__title { margin-top: 8px; font: 700 clamp(1.75rem, 1.2rem + 2vw, 2.75rem)/1.1 var(--mono); letter-spacing: -0.02em; }
.lost__text { margin-top: 12px; color: var(--text-dim); max-width: 32em; }
.lost__home { display: inline-block; margin-top: 24px; padding-left: 22px; padding-right: 22px; background: var(--cyan); color: var(--ink); }
.lost__home:hover { background: #a6efff; color: var(--ink); }
