/* Dram website: what every page shares. tokens, navigation, buttons, the playing card and the phone,
   floating suits, footer. Each page adds its own stylesheet after this one. */

:root {
  color-scheme: dark;
  --bg: #07080b;
  --ink: #f3f2ee;
  --muted: #a5a7b0;
  --soft: #d6d7dc;
  --line: rgba(255, 255, 255, .12);
  --acc: 34 197 94;              /* accent as "r g b"; the script changes it per game */
  --display: 'Anton', 'Arial Narrow', Impact, sans-serif;
  --head: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;   /* long headlines and statements, in sentence case */
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- a 'skip to content' link for keyboard users, shown only when focused ---------- */
.skip { position: fixed; z-index: 60; left: 12px; top: -60px; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #0b0c10; font-weight: 800; }
.skip:focus { top: 12px; }

/* ---------- keyboard focus: always visible, in the page's colour ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .strip:focus-visible { outline: 2px solid rgb(var(--acc)); outline-offset: 3px; }

/* ---------- navigation: a pill of links on wide screens, a full-screen menu on phones ---------- */
.nav { position: fixed; z-index: 50; inset: 0 0 auto 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--pad); pointer-events: none; }
.nav > * { pointer-events: auto; }
.nav .logo { mix-blend-mode: difference; }
.nav .logo img { height: 42px; width: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 5px; border-radius: 999px; background: rgba(16, 18, 24, .62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); }
.nav li a { display: flex; align-items: center; min-height: 42px; padding: 0 17px; border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none; transition: background .2s, color .2s; }
.nav li a:hover { background: rgba(255, 255, 255, .1); }
.nav li a[aria-current="page"] { background: var(--ink); color: #0b0c10; }
.menu-btn { display: none; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(16, 18, 24, .62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink); font: 700 15px/1 var(--body); cursor: pointer; }
.menu-btn i { position: relative; width: 16px; height: 2px; background: currentColor; transition: background .2s; }
.menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; transition: transform .3s; }
.menu-btn i::before { top: -5px; } .menu-btn i::after { top: 5px; }
.menu-open .menu-btn i { background: transparent; }
.menu-open .menu-btn i::before { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-btn i::after { transform: translateY(-5px) rotate(-45deg); }
.menu { position: fixed; z-index: 45; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 100px 24px 40px; background: var(--bg); visibility: hidden; opacity: 0; transition: opacity .3s, visibility 0s .3s; }
.menu-open .menu { visibility: visible; opacity: 1; transition: opacity .3s; }
.menu a { font-family: var(--display); text-transform: uppercase; font-size: clamp(48px, 15vw, 84px); line-height: 1.02; text-decoration: none; transform: translateY(30px); opacity: 0; transition: transform .5s cubic-bezier(.2, .7, .2, 1), opacity .4s; }
.menu a[aria-current="page"] { color: rgb(var(--acc)); }
.menu-open .menu a { transform: none; opacity: 1; transition-delay: calc(var(--i) * 60ms + 80ms); }
.menu p { margin-top: 26px; color: var(--muted); font-size: 16px; }
.menu p a { font: inherit; text-transform: none; color: var(--ink); }
@media (max-width: 760px) {
  .nav ul { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (min-width: 761px) { .menu { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; min-height: 56px; padding: 0 30px; border-radius: 999px; background: rgb(var(--acc)); color: #07080b; font-weight: 800; font-size: 17px; text-decoration: none; transition: transform .2s ease; }
.btn:hover { transform: translateY(-2px) scale(1.03); }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .38); font-weight: 800; font-size: 15px; text-decoration: none; transition: border-color .2s, background .2s, color .2s; }
.store.fill { background: var(--ink); border-color: var(--ink); color: #0b0c10; }
.store:hover { border-color: rgb(var(--acc)); background: rgb(var(--acc)); color: #07080b; }

/* ---------- the pieces every scene uses: a playing card, a phone, floating suits ---------- */
.card { width: var(--cw, 220px); aspect-ratio: 5 / 7; transform-style: preserve-3d; }
.face { position: absolute; inset: 0; border-radius: 7.5% / 5.4%; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.front { background: #101218; color: #fff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .42), 0 30px 60px -18px rgba(0, 0, 0, .75), 0 8px 18px rgba(0, 0, 0, .4); }
.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.front::after { content: ""; position: absolute; inset: 3.4% 4.6%; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 5% / 3.6%; pointer-events: none; }
.pip { position: absolute; display: grid; justify-items: center; gap: .08em; font-family: var(--display); font-size: calc(var(--cw, 220px) * .15); line-height: 1; text-shadow: 0 2px 8px rgba(0, 0, 0, .65); }
.pip svg { width: .62em; height: .62em; fill: currentColor; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .6)); }
.pip.tl { left: 9%; top: 6.5%; }
.pip.br { right: 9%; bottom: 6.5%; transform: rotate(180deg); }
.sheen { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, .8) 50%, transparent 64%); background-size: 260% 100%; background-position: var(--sh, 120%) 0; mix-blend-mode: soft-light; }
.back { transform: rotateY(180deg); display: grid; place-items: center; background-color: #141722;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 14px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 14px);
  box-shadow: inset 0 0 0 6px #141722, inset 0 0 0 8px rgba(255, 255, 255, .5); }
.back img { width: 46%; opacity: .95; }

.phone { height: var(--ph, 520px); aspect-ratio: 9 / 16.6; padding: calc(var(--ph, 520px) * .016); border-radius: calc(var(--ph, 520px) * .075); background: #0c0d12; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25), 0 50px 90px -20px rgba(0, 0, 0, .85), 0 0 90px rgb(var(--acc) / .28); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--ph, 520px) * .06); }

.bits { position: absolute; inset: 0; pointer-events: none; }
.bit { position: absolute; left: 0; top: 0; will-change: transform; color: var(--ink); }
.bit svg { display: block; width: 100%; height: 100%; fill: currentColor; animation: drift var(--t, 9s) ease-in-out var(--dl, 0s) infinite alternate; }
.bit.acc { color: rgb(var(--acc)); }
@keyframes drift { from { transform: rotate(var(--r0, -12deg)) translateY(-8px); } to { transform: rotate(var(--r1, 14deg)) translateY(8px); } }

/* ---------- elements that rise into place as they come into view (the script adds .motion) ---------- */
.motion .reveal { opacity: 0; transform: translateY(46px) rotateX(-16deg); transform-origin: 50% 100%; transition: opacity .7s ease var(--d, 0s), transform .9s cubic-bezier(.2, .7, .2, 1) var(--d, 0s); }
.motion .reveal.in { opacity: 1; transform: none; }
.motion .reveal.d1 { --d: .08s; } .motion .reveal.d2 { --d: .16s; } .motion .reveal.d3 { --d: .24s; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 15px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 32px 40px; }
.flogo { height: 54px; width: auto; }
.addr { margin-top: 16px; color: var(--muted); line-height: 1.5; }
footer h4 { margin-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
footer a { display: block; padding: 5px 0; text-decoration: none; }
footer a:hover { color: rgb(var(--acc)); }
.legal { margin-top: 36px; color: var(--muted); font-size: 14px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--line); }
.socials a:hover { border-color: rgb(var(--acc)); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }

/* Dram home page: the pinned 3D scene (a deck of cards that deals out the games) and the
   sections below it. Loaded after shared.css. */

/* ---------- first section: plain version ---------- */
.scrolly { position: relative; background: var(--bg); }
.stage { position: relative; overflow: clip; padding: 120px var(--pad) 72px; }
.glow { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(to top, var(--bg), transparent 20%),
  radial-gradient(58% 56% at var(--gx, 62%) 46%, rgb(var(--acc) / .32), transparent 70%),
  radial-gradient(42% 42% at 8% 96%, rgb(var(--acc) / .14), transparent 70%); }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; z-index: 6;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

.hero { position: relative; z-index: 3; max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: clamp(14px, 2.4vh, 26px); }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: rgb(var(--acc)); }
h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .9; letter-spacing: .005em; font-size: clamp(64px, min(13.2vw, 23vh), 230px); }
h1 .l { display: block; will-change: transform; }
.motion h1 .l, .motion .hero > :not(h1) { animation: rise 1s cubic-bezier(.2, .7, .2, 1) both; }
.motion h1 .l2 { animation-delay: .08s; }
.motion h1 .l3 { animation-delay: .16s; }
.motion .hero > .lede { animation-delay: .3s; }
.motion .hero > .btn { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; translate: 0 60px; } to { opacity: 1; translate: 0 0; } }
h1 .l3 { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.lede { max-width: 32ch; font-size: clamp(17px, 1.5vw, 21px); color: var(--soft); }

.backdrop, .scene, .dots, .cue { display: none; }

.infos { position: relative; z-index: 3; max-width: 1280px; margin: 64px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px 48px; }
.info .idx { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.info .idx b { color: rgb(var(--acc)); font-weight: 800; }
.info h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .92; font-size: clamp(44px, 6.2vw, 104px); margin: 14px 0 16px; text-wrap: balance; }
.info .desc { max-width: 34ch; font-size: clamp(16px, 1.35vw, 20px); color: var(--soft); }
.info .rating { margin-top: 14px; font-size: 15px; color: var(--muted); }
.info .rating b { font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--ink); margin-right: 8px; vertical-align: -2px; }
.info .stores { margin-top: 22px; }

/* ---------- first section: the pinned stage (the script adds .motion) ---------- */
.motion .stage { position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 0; overflow: hidden; }
.motion .hero { position: absolute; inset: 0; max-width: none; justify-content: center; padding: 90px var(--pad) 40px; pointer-events: none; }
.motion .hero a { pointer-events: auto; }
.motion .backdrop { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.motion .scene { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; }

.motion .infos { position: absolute; z-index: 3; margin: 0; max-width: none; display: block; left: var(--pad); top: 0; bottom: 0; width: min(38vw, 500px); pointer-events: none; }
.motion .info { position: absolute; left: 0; right: 0; top: 50%; opacity: 0; visibility: hidden; pointer-events: auto; will-change: transform, opacity; }

.motion .dots { display: flex; flex-direction: column; gap: 10px; position: absolute; z-index: 4; right: clamp(12px, 2vw, 28px); top: 50%; transform: translateY(-50%); opacity: 0; pointer-events: none; transition: opacity .35s; }
.motion .dots.on { opacity: 1; pointer-events: auto; }
.dots button { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; opacity: .38; transition: opacity .25s, transform .25s; }
.dots button img { width: 100%; height: 100%; border-radius: 10px; }
.dots button:hover { opacity: .8; }
.dots button.on { opacity: 1; transform: scale(1.28); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgb(var(--acc)); }

.motion .cue { display: flex; flex-direction: column; align-items: center; gap: 10px; position: absolute; z-index: 4; left: 50%; bottom: 22px; transform: translateX(-50%); font-size: 12px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.cue i { width: 1.5px; height: 40px; background: linear-gradient(var(--ink), transparent); transform-origin: top; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 899px) {
  .motion .hero { justify-content: flex-start; padding-top: max(84px, 11vh); }
  h1 { font-size: clamp(52px, min(19vw, 10vh), 150px); }
  .lede { font-size: 16px; }
  .btn { min-height: 50px; padding: 0 24px; font-size: 16px; }
  .motion .infos { left: 20px; right: 20px; width: auto; top: auto; bottom: max(22px, 4vh); height: 0; }
  .motion .info { top: auto; bottom: 0; }
  .info h2 { font-size: clamp(40px, 11.5vw, 64px); margin: 8px 0 10px; }
  .info .rating { margin-top: 8px; font-size: 14px; }
  .info .rating b { font-size: 22px; }
  .info .stores { margin-top: 14px; }
  .motion .dots, .motion .cue { display: none; }
}


/* ---------- the scene: cards and one phone float in the middle of the stage ---------- */
.motion .scene { perspective: 1500px; }
.world { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.world .card { position: absolute; left: 50%; top: 50%; margin: calc(var(--cw, 220px) * -.7) 0 0 calc(var(--cw, 220px) * -.5); will-change: transform, opacity; }
.world .phone { position: absolute; left: 50%; top: 50%; margin: calc(var(--ph, 520px) * -.5) 0 0 calc(var(--ph, 520px) * -.271); -webkit-backface-visibility: hidden; backface-visibility: hidden; will-change: transform, opacity; }

.bigword { position: absolute; left: 0; right: 0; bottom: -2vh; text-align: center; white-space: nowrap; font-family: var(--display); text-transform: uppercase; font-size: min(31vh, 27vw); line-height: .82; color: transparent; -webkit-text-stroke: 1.5px rgb(var(--acc) / .55); opacity: 0; }
.bigword span { display: inline-block; will-change: transform; }

@media (max-width: 899px) {
  .motion .scene { perspective: 900px; }
  .bigword { bottom: auto; top: 34%; font-size: 30vw; }
}

/* ---------- all games ---------- */
.all { position: relative; padding: clamp(80px, 13vh, 150px) 0; }
.all .head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 40px; margin-bottom: 44px; }
.all h2, .studio h2, .finale h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .92; }
.all h2 { font-size: clamp(56px, 9vw, 150px); }
.all .head p { max-width: 30ch; color: var(--soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 56px 28px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tile-card { display: block; width: 100%; margin-bottom: 10px; container-type: inline-size; perspective: 1000px; }
.tile-card .card { --cw: 100cqw; width: 100%; }
.tile-card .tilt-in { transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.tile-card:hover .tilt-in { transform: translateY(-10px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition-duration: .12s; }
.tile-card:hover .front { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .6), 0 30px 60px -18px rgba(0, 0, 0, .75), 0 0 60px rgb(var(--c) / .55); }
.tile h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(28px, 2.4vw, 36px); line-height: 1; }
.tile p.desc { font-size: 15.5px; line-height: 1.45; color: var(--soft); }
.tile .stores { gap: 8px; margin-top: 4px; }
.tile .store { min-height: 44px; padding: 0 14px; font-size: 14px; }


/* ---------- studio ---------- */
.studio { padding: clamp(80px, 14vh, 170px) 0; border-top: 1px solid var(--line); }
.studio h2 { font-size: clamp(46px, 7.6vw, 124px); max-width: 15ch; }
.motion .studio h2 .w { opacity: .16; transition: opacity .35s; }
.motion .studio h2 .w.on { opacity: 1; }
.studio .cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 64px; margin-top: 44px; }
.studio p { flex: 1 1 320px; max-width: 46ch; font-size: 19px; color: var(--soft); }
.studio a { color: rgb(var(--acc)); text-underline-offset: 4px; }

/* ---------- finale: the win cascade ---------- */
.finale { position: relative; min-height: min(92vh, 860px); overflow: hidden; background: #0c3b27; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; text-align: center; padding: 80px var(--pad); }
.finale canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.finale .txt { position: relative; z-index: 2; mix-blend-mode: difference; color: #fff; pointer-events: none; }
.finale h2 { font-size: clamp(64px, 13vw, 220px); }
.finale .btn { position: relative; z-index: 3; background: var(--ink); box-shadow: 0 14px 30px rgba(0, 0, 0, .4); }


/* ---------- links added for the multi-page site ---------- */
.info .more { margin-top: 16px; }
.info .more a { font-weight: 700; color: var(--soft); text-underline-offset: 4px; }
.info .more a:hover { color: rgb(var(--acc)); }
.tile h3 a { text-decoration: none; }
.tile h3 a:hover { color: rgb(var(--c)); }
.studio .links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; flex: 1 1 320px; }
.studio .links a { text-decoration: none; }
.studio .links a.btn { color: #07080b; }
.studio .links a.store { color: var(--ink); }
.studio .links a.store:hover { color: #07080b; }

@media (max-width: 599px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 14px; }
  .tile h3 { font-size: clamp(22px, 6.4vw, 30px); }
  .tile p.desc { font-size: 14px; }
  .tile .stores { gap: 6px; }
  .tile .store { padding: 0 11px; font-size: 13px; }
}
