/* Boldfinger Games: the studio site.
   The page is the black the intro video plays on. Stone (the logo's carved letters) for type, and red only for
   things you press. Each game brings its own colours inside its own card. */

@font-face { font-family: 'Titan One'; src: url('/fonts/titan-one-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fonts/barlow-semi-condensed-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fonts/barlow-semi-condensed-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fonts/barlow-semi-condensed-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --void: #000000;
  --stone: #ece0d2;        /* the face of the logo's letters */
  --stone-text: #e4d9ca;   /* body copy on black */
  --grit: #a39788;         /* quieter copy on black */
  --red: #f62e2d;          /* the button */
  --red-deep: #9e1016;
  --gutter: clamp(20px, 5vw, 56px);
  --wide: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--stone-text);
  font-family: 'Barlow Semi Condensed', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 500;
  font-size: 19px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 6px; }
p { margin: 0 0 1em; max-width: 62ch; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--stone); color: #000; font-weight: 700; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---- carved headings: the logo's stone, with its depth ---- */
.carved {
  margin: 0 0 clamp(28px, 4vw, 48px);
  font-family: 'Titan One', 'Barlow Semi Condensed', sans-serif;
  font-weight: 400;
  font-size: clamp(46px, 7.4vw, 92px);
  line-height: 0.95;
  letter-spacing: 0.005em;
  color: var(--stone);
  text-shadow:
    0 -1px 0 #fff8ee,
    0 3px 0 #cdbca8,
    0 5px 0 #b19a85,
    0 7px 0 #917c69,
    0 9px 0 #6e5d4e,
    0 18px 24px rgba(0, 0, 0, 0.8);
}
/* (site.js sets each letter a little off true, like the logo's hand-cut letters) */
.carved .ch { display: inline-block; transform: translateY(var(--y, 0)) rotate(var(--r, 0deg)); }

/* ---- the hero: the smash ---- */
.hero {
  min-height: 94svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5svh var(--gutter) 7svh;
  text-align: center;
}
.hero { --stage-w: min(92vw, 680px, calc(70svh * 4 / 3)); }
.stage {
  position: relative;
  width: var(--stage-w);
  margin-bottom: calc(var(--stage-w) * -0.1); /* (the video's frame has black below the logo) */
  aspect-ratio: 720 / 540;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 24px;
  container-type: inline-size;
  -webkit-tap-highlight-color: transparent;
}
.stage:focus-visible { outline-offset: 2px; }
.stage > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-still { object-fit: contain; }
.stage-video { object-fit: contain; background: var(--void); }
html.js .stage-still { opacity: 0; }
html:not(.js) .stage-video, .is-code .stage-video, .is-still .stage-video { display: none; }
html.js .is-still .stage-still { opacity: 1; }

/* the same smash in code (from the app's launch screen): the clean logo is pressed and shakes, then the cracked one
   lands with a jolt, stone chips fly out of the button and dust puffs */
.code-intro { display: none; }
.is-code .code-intro { display: block; }
.code-intro > * { position: absolute; }
.code-intro img { max-width: none; pointer-events: none; }
.ci-clean { left: 9.722%; top: 17.222%; width: 79.444%; height: 68.889%; }
.ci-broken { left: 10.278%; top: 4.074%; width: 78.75%; height: 81.481%; opacity: 0; }
.is-code.go .ci-clean { animation: bfpress 0.6s 0.4s ease-out both, bfhide 0.1s 1s forwards; }
.is-code.go .ci-broken { animation: bfshow 0.1s 1s forwards, bfjolt 0.55s 1s ease-out both; }
@keyframes bfpress {
  0% { transform: none; }
  22% { transform: translateY(2.5%) scale(0.99, 0.965); }
  42% { transform: translate(-1.2%, 1%) rotate(-1.2deg); }
  58% { transform: translate(1.2%, 0.5%) rotate(1deg); }
  74% { transform: translate(-0.8%, 0) rotate(-0.6deg); }
  88% { transform: translate(0.4%, 0) rotate(0.3deg); }
  100% { transform: translateY(1.5%) scale(0.995, 0.98); }
}
@keyframes bfhide { to { opacity: 0; } }
@keyframes bfshow { to { opacity: 1; } }
@keyframes bfjolt { 0% { transform: scale(1.045) translateY(1%); } 25% { transform: translate(-1%, 0) rotate(-0.8deg); } 50% { transform: translate(0.8%, 0) rotate(0.5deg); } 75% { transform: translate(-0.3%, 0); } 100% { transform: none; } }
/* chip sizes and distances are the app's, measured on a 440-wide stage, so they scale with this one (cqw) */
.ci-chips { left: 46.5% !important; top: 31.5% !important; width: 0 !important; height: 0 !important; }
.ci-chip {
  position: absolute;
  left: calc(-6 * 100cqw / 440);
  top: calc(-5 * 100cqw / 440);
  width: calc(var(--w) * 100cqw / 440);
  height: calc(var(--h) * 100cqw / 440);
  opacity: 0;
  background: linear-gradient(160deg, #f4ece0, #cdbfa9 60%, #a8977f);
  clip-path: polygon(10% 0, 100% 18%, 86% 100%, 0 76%);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6));
}
.is-code.go .ci-chip { animation: bfchip 1.25s calc(1s + var(--d, 0s)) cubic-bezier(0.15, 0.7, 0.35, 1) forwards; }
@keyframes bfchip {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(0.6); }
  55% { opacity: 1; transform: translate(calc(var(--dx) * 100cqw / 440), calc(var(--dy) * 100cqw / 440)) rotate(var(--rot)) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--dx) * 1.15 * 100cqw / 440), calc((var(--dy) + 46) * 100cqw / 440)) rotate(calc(var(--rot) * 1.6)) scale(1); }
}
.ci-dust { left: 46.5% !important; top: 31.5% !important; width: 70% !important; height: auto !important; aspect-ratio: 1.6; margin: -22% 0 0 -35%; opacity: 0; background: radial-gradient(closest-side, rgba(220, 205, 185, 0.55), rgba(160, 145, 130, 0.25) 55%, transparent); filter: blur(4px); }
.is-code.go .ci-dust { animation: bfdust 1.5s 1s ease-out forwards; }
@keyframes bfdust { 0% { opacity: 0.9; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.5); } }

/* once it has settled: a ring round the button, twice, so people know they can press it */
.stage-ring {
  left: 46.5% !important; top: 31.5% !important;
  width: 17% !important; height: auto !important; aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 2px solid var(--red);
  opacity: 0;
  pointer-events: none;
}
.hero.settled.first .stage-ring { animation: ring 1.4s 0.5s ease-out 2; }
@keyframes ring { 0% { opacity: 0.85; transform: scale(0.9); } 100% { opacity: 0; transform: scale(1.7); } }

.tagline {
  margin: clamp(10px, 2.4svh, 24px) auto 6px;
  font-weight: 600;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.25;
  color: var(--stone);
  max-width: 34ch;
  text-wrap: balance;
}
.hint { margin: 0 auto; font-size: 16px; color: var(--grit); }
.tagline, .hint { position: relative; z-index: 1; } /* (over the bottom of the video's frame) */
html.js .tagline, html.js .hint { opacity: 0; transform: translateY(8px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .hero.settled .tagline { opacity: 1; transform: none; }
html.js .hero.settled .hint { opacity: 1; transform: none; transition-delay: 0.25s; }
html.js .hero.replaying .hint { opacity: 0; transition-delay: 0s; }
html.js .is-still ~ .hint { display: none; }

/* ---- our games ---- */
.games, .studio { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.games { padding-top: clamp(24px, 6vw, 72px); }

/* Pay to Win's card: the game's own world (its loading screen's background and gold rim) */
.ptw {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(26px, 4.6vw, 64px);
  border-radius: 32px;
  overflow: hidden;
  color: #e9defc;
  background:
    radial-gradient(60% 50% at 78% 50%, rgba(255, 59, 212, 0.22), transparent 70%),
    radial-gradient(90% 40% at 50% 0%, rgba(255, 59, 212, 0.18), transparent 70%),
    radial-gradient(70% 50% at 0% 70%, rgba(123, 44, 255, 0.2), transparent 70%),
    radial-gradient(70% 40% at 100% 100%, rgba(53, 230, 255, 0.1), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 1.2px) 0 0 / 9px 9px,
    linear-gradient(180deg, #1b0840, #0e0424 60%, #0a031a);
  box-shadow: inset 0 0 0 2px rgba(255, 210, 90, 0.6), 0 0 0 1px #000, 0 34px 90px rgba(123, 44, 255, 0.22);
}
.game-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 14px; }
.game-title { flex: 1 1 250px; min-width: 0; margin: 0; }
.game-title img { width: min(100%, 440px); height: auto; margin-left: -1.5%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.pixelpicked-badge { display: block; max-width: 100%; }
.pixelpicked-badge img { height: auto; }
.game-lede { font-weight: 700; font-size: clamp(22px, 2.3vw, 28px); line-height: 1.2; color: #fff; max-width: 34ch; margin-bottom: 14px; text-wrap: balance; }
.game-copy p { font-size: 18.5px; }
.game-points { list-style: none; margin: 20px 0 30px; padding: 0; display: grid; gap: 10px; font-size: 18.5px; line-height: 1.35; }
.game-points li { position: relative; padding-left: 28px; max-width: 46ch; }
.game-points li::before {
  content: '';
  position: absolute; left: 0; top: 0.3em;
  width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6b8, #ffd23a 45%, #f08c00);
  box-shadow: 0 0 10px rgba(255, 186, 50, 0.5), inset 0 -1px 2px rgba(120, 50, 0, 0.5);
}
.game-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.status-pill {
  display: inline-block;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 999px;
  border: 2px solid #ffd23a;
  color: #ffd23a;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
  box-shadow: 0 0 16px rgba(255, 186, 50, 0.25), inset 0 0 12px rgba(255, 186, 50, 0.12);
}
.status-pill:hover, .status-pill:focus-visible { background: #ffd23a; color: #251534; }
.status-note { font-size: 16px; color: #bfaee6; }
.game-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 26px; font-size: 17px; font-weight: 600; }
.game-links a { color: #fff; }
.game-links a:hover { color: #ffd23a; }
.ptw :focus-visible { outline-color: #ffd23a; }

.phones { position: relative; aspect-ratio: 10 / 10; }
.phone {
  position: absolute;
  left: 50%; top: 50%;
  width: 46%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 22px;
  border: 5px solid #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 22px 44px rgba(0, 0, 0, 0.6);
}
.phone-c { z-index: 3; transform: translate(-50%, -50%); }
.phone-l { z-index: 1; transform: translate(-112%, -46%) rotate(-8deg); }
.phone-r { z-index: 2; transform: translate(12%, -46%) rotate(8deg); }

/* ---- who we are ---- */
.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 72px);
  align-items: start;
  padding-top: clamp(90px, 12vw, 170px);
  padding-bottom: clamp(90px, 12vw, 160px);
}
.studio .carved { margin: 0; }
.studio-body { padding-top: clamp(4px, 1.4vw, 18px); }
.studio-body p { font-size: 20px; }

/* the email: a red arcade button you press */
.press {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  color: var(--stone);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(19px, 2vw, 22px);
  border-radius: 999px;
}
.press-cap {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #ff9b90 0 10%, var(--red) 42%, #c41a1c 78%, var(--red-deep));
  box-shadow: 0 6px 0 #6d0a0e, 0 8px 12px rgba(0, 0, 0, 0.7), inset 0 -3px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.07s ease, box-shadow 0.07s ease;
}
.press:hover { color: #fff; }
.press:hover .press-label { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.press:active .press-cap { transform: translateY(5px); box-shadow: 0 1px 0 #6d0a0e, 0 2px 4px rgba(0, 0, 0, 0.7), inset 0 -2px 4px rgba(0, 0, 0, 0.25); }
.press:focus-visible { outline-offset: 6px; }

/* ---- footer ---- */
.foot {
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--wide);
  margin: 0 auto;
  padding: 26px 0 max(26px, env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  border-top: 1px solid #2b2722;
  font-size: 16px;
  color: var(--grit);
}
.foot p { margin: 0; }

/* ---- the other pages (privacy, 404) ---- */
.page { max-width: calc(820px + 2 * var(--gutter)); margin: 0 auto; padding: clamp(28px, 6vw, 64px) var(--gutter) clamp(70px, 10vw, 120px); }
.page .carved { font-size: clamp(40px, 6vw, 68px); margin-bottom: 18px; }
.page-home { display: inline-block; margin-bottom: clamp(36px, 6vw, 64px); }
.page-home img { width: 150px; height: auto; }
.page h2 { margin: 1.6em 0 0.4em; font-size: 24px; font-weight: 700; color: var(--stone); line-height: 1.25; }
.page .updated { color: var(--grit); font-size: 17px; }

/* ---- narrow screens ---- */
@media (max-width: 860px) {
  .ptw { grid-template-columns: 1fr; }
  .phones { order: -1; width: min(100%, 520px); aspect-ratio: 10 / 7.4; margin: -4px auto 0; }
  .phone { width: 36%; border-width: 4px; border-radius: 16px; }
  .studio { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  body { font-size: 18px; }
  .ptw { border-radius: 24px; }
  .game-copy p, .game-points { font-size: 17.5px; }
  .studio-body p { font-size: 18.5px; }
  .press-label { font-size: 18px; }
}

/* ---- reduced motion: the cracked logo, still ---- */
@media (prefers-reduced-motion: reduce) {
  html.js .tagline, html.js .hint { transition: none; }
  .hero.settled.first .stage-ring { animation: none; }
  .stage { cursor: default; }
}
