/* Binary Helix studio page (https://binaryhelix.dev/). Studio-only: the
   game pages under /hfy/ use /style.css, which this file does not touch.
   Fonts are self-hosted (SIL Open Font License, see fonts/README.txt). */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url(fonts/bricolage-grotesque-latin.woff2) format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url(fonts/inter-latin.woff2) format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #07090c;
  --bg-2: #0b0e13;
  --surface: #10141a;
  --surface-2: #161b23;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.17);
  --text: #eef1f4;
  --muted: #a9b2bd;
  --faint: #8691a0;
  --link: #ffc56b;
  --btn: #ffb547;
  --btn-ink: #1b1204;
  --rn: #c4adff;
  --hfy: #6fe3cf;
  --head-bg: rgba(7, 9, 12, 0.78);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 20px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f5f3ef;
    --bg-2: #ece8e1;
    --surface: #ffffff;
    --surface-2: #f6f4f0;
    --line: rgba(20, 24, 32, 0.10);
    --line-2: rgba(20, 24, 32, 0.20);
    --text: #14181e;
    --muted: #46505d;
    --faint: #5b6572;
    --link: #9a4d00;
    --rn: #6142c9;
    --hfy: #0c6f64;
    --head-bg: rgba(245, 243, 239, 0.82);
    --shadow: 0 30px 60px -36px rgba(30, 30, 40, 0.35);
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--btn); outline-offset: 3px; border-radius: 6px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--btn); color: var(--btn-ink); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

.eyebrow {
  font: 600 0.78rem/1.2 var(--body); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 14px;
}

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--head-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font: 700 1.08rem/1 var(--display); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark path { fill: none; stroke: var(--btn); stroke-width: 2.4; stroke-linecap: round; }
.brand-mark .rung { stroke: var(--text); stroke-width: 2; opacity: 0.55; }
.nav { display: flex; gap: clamp(12px, 2.4vw, 30px); }
.nav a { color: var(--muted); font-size: 0.92rem; font-weight: 500; padding: 8px 0; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(560px, 84svh, 860px);
  display: flex; align-items: flex-end;
  color: #fff; background: #08070c;
}
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { z-index: -2; }
.hero-art img { object-fit: cover; object-position: 62% 30%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 5, 10, 0.92) 0%, rgba(6, 5, 10, 0.72) 34%, rgba(6, 5, 10, 0.15) 66%, rgba(6, 5, 10, 0) 100%),
    linear-gradient(0deg, rgba(6, 5, 10, 0.95) 0%, rgba(6, 5, 10, 0) 45%);
}
.hero-copy { width: 100%; padding-top: 120px; padding-bottom: clamp(56px, 9vh, 96px); }
.hero .eyebrow { color: rgba(255, 255, 255, 0.72); }
.hero h1 { font-size: clamp(2.7rem, 7vw, 6rem); max-width: 11.5ch; font-weight: 700; letter-spacing: -0.025em; line-height: 0.96; }
.hero-lead { max-width: 44ch; margin: 22px 0 30px; font-size: clamp(1.04rem, 1.4vw, 1.2rem); color: rgba(255, 255, 255, 0.84); }
.art-label {
  position: absolute; right: var(--gutter); bottom: 18px; margin: 0;
  font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62);
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px;
  padding: 0 20px; border-radius: 999px; font: 600 0.95rem/1 var(--body);
  border: 1px solid transparent; transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { background: #ffc66e; }
.btn-ghost { color: var(--text); border-color: var(--line-2); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.06); }
.hero .btn-ghost:hover { border-color: #fff; }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding-top: clamp(40px, 6vw, 72px); }
.sec-head { margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head h2, .ay h2, .contact h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }

/* Lead games */
.leads { display: grid; gap: clamp(20px, 2.4vw, 32px); }
@media (min-width: 960px) { .leads { grid-template-columns: 1fr 1fr; } }
.lead {
  --game: var(--rn);
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow);
}
.lead-hfy { --game: var(--hfy); }
.lead::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--game); z-index: 2; }
.media { position: relative; margin: 0; aspect-ratio: 16 / 9; background: #000; }
.media video { width: 100%; height: 100%; object-fit: cover; }
.media.playing video { object-fit: contain; }
.play {
  position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(10, 10, 14, 0.55); border: 1px solid rgba(255, 255, 255, 0.5); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.play[hidden] { display: none; }
.play svg { width: 34px; height: 34px; fill: currentColor; margin-left: 4px; }
.media:hover .play, .play:focus-visible { transform: scale(1.07); background: rgba(10, 10, 14, 0.75); }
.media-tag {
  position: absolute; left: 14px; top: 14px; margin: 0; padding: 5px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  pointer-events: none;
}
.media.playing .media-tag { display: none; }
.lead-body { display: flex; flex-direction: column; flex: 1; padding: clamp(22px, 3vw, 38px); }
.lead-body > .actions { margin-top: auto; padding-top: 8px; }
.chip {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; margin: 0 0 18px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; color: var(--muted);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--game, var(--btn)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--game, var(--btn)) 25%, transparent); }
.lead h3 { font-size: clamp(2.1rem, 3.6vw, 2.9rem); letter-spacing: -0.03em; }
.lead h3 small { display: block; margin-top: 8px; font: 600 0.78rem/1.2 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.tagline { margin: 12px 0 14px; font: 600 clamp(1.2rem, 1.8vw, 1.45rem)/1.25 var(--display); color: var(--game); letter-spacing: -0.01em; }
.lead p { color: var(--muted); }
.lead .tagline { color: var(--game); }

.verbs { list-style: none; padding: 0; margin: 6px 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.verbs li {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  padding: 12px 12px 10px; font: 700 1.06rem/1.1 var(--display); color: var(--text);
}
.verbs span { display: block; margin-bottom: 8px; font: 600 0.7rem/1 var(--body); letter-spacing: 0.12em; color: var(--game); }
.stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0 0 22px; padding: 18px 0; border-block: 1px solid var(--line); }
.stat strong { font: 700 clamp(2rem, 3.4vw, 2.7rem)/1 var(--display); letter-spacing: -0.03em; color: var(--text); }
.stat span { color: var(--muted); font-size: 1rem; }

.points { list-style: none; margin: 4px 0 22px; padding: 0; display: grid; gap: 10px; }
.points li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.97rem; line-height: 1.5; }
.points li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px; border-radius: 2px; background: var(--game); transform: rotate(45deg); }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 22px; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #000; }
.status { margin: 0 0 22px; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 0.93rem; }
.status dt { font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.72rem; color: var(--faint); padding-top: 0.25em; }
.status dd { margin: 0; color: var(--text); }

/* Google Play */
.store-grid { display: grid; gap: clamp(16px, 2vw, 24px); }
@media (min-width: 720px) { .store-grid { grid-template-columns: repeat(3, 1fr); } }
.store { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.store img { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; background: #000; }
.store-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.store h3 { font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.store p { color: var(--muted); font-size: 0.95rem; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: auto 0 0; font-weight: 600; font-size: 0.93rem; }
.links a::after { content: " \2192"; }

/* Asset Yard */
.band { background: var(--bg-2); border-block: 1px solid var(--line); position: relative; overflow: hidden; }
.band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 85% 20%, #000 0%, transparent 60%); mask-image: radial-gradient(ellipse at 85% 20%, #000 0%, transparent 60%);
}
.ay { position: relative; display: grid; gap: clamp(32px, 5vw, 72px); }
@media (min-width: 960px) { .ay { grid-template-columns: 1.15fr 0.85fr; align-items: start; } }
.ay-lead { margin: 16px 0 18px; font: 600 clamp(1.3rem, 2.2vw, 1.75rem)/1.2 var(--display); letter-spacing: -0.015em; }
.ay-copy > p:not(.eyebrow):not(.ay-lead) { color: var(--muted); max-width: 60ch; }
.kinds { list-style: none; padding: 0; margin: 8px 0 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.kinds li { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 0.86rem; font-weight: 500; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 14px; }
.panel p { color: var(--muted); font-size: 0.95rem; }
.panel .links { margin-top: 4px; }
.demos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.demos a, .more a {
  display: block; height: 100%; padding: 18px 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.demos a:hover, .more a:hover { text-decoration: none; border-color: var(--line-2); transform: translateY(-2px); }
.demos strong, .more strong { display: block; font: 700 1.15rem/1.2 var(--display); margin-bottom: 4px; }
.demos strong::after, .more strong::after { content: " \2197"; color: var(--link); font-weight: 600; }
.demos span, .more a > span:last-child { display: block; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

/* More */
.more { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .more { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .more { grid-template-columns: repeat(3, 1fr); } }
.more .kind { display: block; margin-bottom: 10px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

/* Contact */
.contact { border-top: 1px solid var(--line); }
.contact h2 { max-width: 16ch; }
.mail {
  display: inline-block; margin: clamp(22px, 3vw, 36px) 0 22px; max-width: 100%;
  font: 700 clamp(1.6rem, 5.4vw, 4rem)/1.05 var(--display); letter-spacing: -0.03em;
  color: var(--text); overflow-wrap: anywhere;
  background: linear-gradient(var(--btn), var(--btn)) 0 100% / 100% 3px no-repeat; padding-bottom: 8px;
}
.mail:hover { text-decoration: none; color: var(--link); }
.who { color: var(--muted); }
.who strong { color: var(--text); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 0.86rem; color: var(--faint); }
.foot-row { display: flex; flex-wrap: wrap; gap: 10px 32px; justify-content: space-between; }
.foot-row p { margin: 0; }
.foot-links a { color: var(--muted); margin-left: 10px; }
.foot-links a:hover { color: var(--text); }
.foot-note { flex-basis: 100%; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .head-row { min-height: 56px; }
  .nav { gap: 14px; }
  .nav a { font-size: 0.86rem; }
  .hero { min-height: 82svh; }
  .hero::before {
    background: linear-gradient(0deg, rgba(6, 5, 10, 0.96) 0%, rgba(6, 5, 10, 0.82) 42%, rgba(6, 5, 10, 0.2) 75%, rgba(6, 5, 10, 0.1) 100%);
  }
  .hero-art img { object-position: 30% 30%; }
  .art-label { top: 14px; bottom: auto; right: 16px; }
  .verbs { gap: 6px; }
  .verbs li { padding: 10px 8px 8px; font-size: 0.98rem; }
  .shots { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .foot-links a { margin-left: 0; margin-right: 10px; }
  .foot-links { display: flex; flex-wrap: wrap; gap: 4px 0; }
  .foot-links a:first-of-type { margin-left: 8px; }
}
@media (max-width: 400px) {
  .brand-word { display: none; }
}

/* Strips of stills inside the lead cards */
figure.shots { margin: 0 0 22px; }
.shots figcaption { grid-column: 1 / -1; margin-top: 2px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
