:root {
  --bone: #ececec;
  --dim: rgba(236, 236, 236, .68);
  --faint: rgba(236, 236, 236, .14);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --col: min(40rem, 86vw);
}

* { box-sizing: border-box; }
html { background: #000; color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #000; color: var(--bone);
  font-family: var(--serif); font-weight: 500; font-size: 1.25rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }
::selection { background: var(--bone); color: #000; }

.caps {
  font-size: .8rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--dim);
}
.links { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.links a { transition: color .5s ease; }
.links a:hover, .links a:focus-visible { color: var(--bone); }
:focus-visible { outline: 1px solid var(--dim); outline-offset: 4px; }

/* ── the summit ─────────────────────────────────────────────── */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 32rem; overflow: hidden; }
.hero-art { position: absolute; inset: 0; display: block; will-change: transform, opacity; }
.hero-art img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 11% 55%;
  opacity: 0; transition: opacity 2.6s ease;
  /* quieter: darker overall, and everything but the ensō, the pine and its cliff sinks into the night */
  filter: brightness(.86) contrast(1.08);
  -webkit-mask-image: radial-gradient(ellipse 44% 72% at 25% 40%, #000 46%, transparent 100%);
          mask-image: radial-gradient(ellipse 44% 72% at 25% 40%, #000 46%, transparent 100%);
}
.hero-art img.ready { opacity: 1; }
/* the painting dissolves into the page: no edge, no rectangle */
.hero::after {
  content: ''; position: absolute; inset: auto 0 0; height: 34%;
  background: linear-gradient(to bottom, transparent, #000 92%);
  pointer-events: none;
}
.hero-copy { position: absolute; z-index: 2; left: 61vw; top: 38%; will-change: transform, opacity; }
.hero-copy > * { opacity: 0; filter: blur(6px); transition: opacity 2.2s ease, filter 2.2s ease; }
.hero-copy > :nth-child(1) { transition-delay: .9s; }
.hero-copy > :nth-child(2) { transition-delay: 1.5s; }
.hero-copy > :nth-child(3) { transition-delay: 1.8s; }
.hero-copy.ready > * { opacity: 1; filter: blur(0); }
.hero h1 {
  font-weight: 300; font-size: clamp(2.6rem, 4.4vw, 4.9rem); line-height: 1;
  letter-spacing: .005em; margin-bottom: 1.15rem;
}
.hero .caps { margin-bottom: .55rem; }

/* ── research ───────────────────────────────────────────────── */
main { position: relative; z-index: 3; }
.label {
  font-weight: 300; font-size: clamp(3rem, 5.4vw, 4.75rem); line-height: 1; letter-spacing: .005em;
  color: var(--bone); margin-bottom: 4.5rem;
}
.research { width: var(--col); margin: 0 auto; padding: 18vh 0 0; }
.paper { margin-bottom: 4.2rem; }
.venue { margin-bottom: .9rem; }
.paper h3 {
  font-weight: 400; font-size: clamp(2.1rem, 3vw, 2.85rem); line-height: 1.1; margin-bottom: .75rem;
}
.paper h3 a { transition: opacity .5s ease; }
.paper h3 a:hover { opacity: .72; }
.line { color: rgba(236, 236, 236, .88); max-width: 34em; }
.follow {
  margin-top: .9rem; font-style: italic; font-weight: 500; color: var(--dim);
  font-size: 1.12rem; max-width: 34em;
}
.follow .caps { font-style: normal; margin-right: .9em; font-size: .7rem; }
.paper .links { margin-top: 1.2rem; }
.earlier {
  padding-top: 2.4rem; border-top: 1px solid var(--faint);
  color: var(--dim); font-size: 1.12rem; line-height: 1.7;
}
.earlier .caps { margin-right: .9em; font-size: .7rem; }
.earlier a { color: rgba(236, 236, 236, .9); border-bottom: 1px solid var(--faint); transition: border-color .5s ease, color .5s ease; }
.earlier a:hover { color: var(--bone); border-color: var(--dim); }

/* ── play ───────────────────────────────────────────────────── */
.play { padding: 30vh 0 0; text-align: center; }
.play .label { margin-bottom: 2rem; }
.stage {
  --stone: min(19rem, 64vw);
  position: relative; margin: 0 auto; width: min(47rem, 94vw);
  height: calc(var(--stone) + 3rem);
}
.stone {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: var(--stone); height: var(--stone); translate: -50% -50%;
  padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.stone canvas { display: block; width: 100%; height: 100%; transition: filter .8s ease; }
.stone:hover canvas, .stone:focus-visible canvas { filter: brightness(1.12); }
.stone:focus-visible { outline: none; }
.stone::after {
  content: 'Blackjack · Hold’em'; position: absolute; left: 50%; top: calc(100% + 1.6rem); translate: -50% 0;
  white-space: nowrap; font-size: .7rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--dim); opacity: 0; transition: opacity .8s ease;
}
.stone:hover::after, .stone:focus-visible::after { opacity: 1; }
@media (hover: none) { .stone::after { opacity: .7; } }
.stone.spent { pointer-events: none; }
.stone.spent::after { opacity: 0; }

.games { text-align: left; }
.games.opening { position: absolute; left: 0; top: 0; width: 100%; }
.games .game-tab { font-family: var(--serif); font-size: .8rem; padding-inline: 2.2rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.games .bj-table, .games .pk-table { background: none; }
.games .game-tab-indicator { height: 1px; }
.games .game-tab { font-size-adjust: none; }

/* ── the end ────────────────────────────────────────────────── */
/* a quiet last line, as the old site had it: the name on the left, the quote on the right */
.end {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .6rem 2rem;
  width: min(72rem, 86vw); margin: 24vh auto 0; padding: 1.8rem 0 2.6rem;
  border-top: 1px solid var(--faint);
  font-size: 1.02rem; color: rgba(236, 236, 236, .5);
}
.quote { font-style: italic; text-align: right; margin-left: auto; }
.quote span { font-style: normal; }

/* things arrive out of the dark as you reach them */
.emerge { opacity: 0; filter: blur(8px); translate: 0 .8rem; transition: opacity 1.6s ease, filter 1.6s ease, translate 1.6s cubic-bezier(.2, .7, .2, 1); }
.emerge.in { opacity: 1; filter: blur(0); translate: 0 0; }

@media (max-aspect-ratio: 4/5) {
  .hero-art img { object-position: 45% 0%;
    -webkit-mask-image: radial-gradient(ellipse 95% 55% at 50% 30%, #000 45%, transparent 100%);
            mask-image: radial-gradient(ellipse 95% 55% at 50% 30%, #000 45%, transparent 100%); }
  .hero::after { height: 22%; }
  .hero-copy { left: 8vw; right: 8vw; top: auto; bottom: 10svh; }
  .hero h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .hero .links { gap: .4rem 1.1rem; letter-spacing: .18em; }
}
@media (max-width: 600px) {
  .research { padding-top: 12vh; }
  .label { margin-bottom: 3.2rem; }
  .end { margin-top: 22vh; }
  .quote { text-align: left; margin-left: 0; }
  .play { padding-top: 20vh; }
}
@media (prefers-reduced-motion: reduce) {
  .emerge { opacity: 1; filter: none; translate: none; transition: none; }
  .hero-art img, .hero-copy > * { transition: none; }
}
