/* Fonts are hosted here, not loaded from Google, so visitors' IPs never go to a third party.
   Latin and Latin Extended only; licences in fonts/. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/bricolage-800-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/bricolage-800-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ground: #000000;
  --surface: #141418;
  --surface-2: #1C1C22;
  --line: #2A2A31;
  --text: #F6F3EA;
  --muted: #A8A7B5;
  --sun: #FFC531;
  --dashed: #4D4C57;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--text); }
a:hover { color: var(--sun); }
/* Keyboard focus is always visible, in the studio yellow. */
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

h1, h2 {
  font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
}
h3 { margin: 0; font-size: 20px; line-height: 1.3; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
.wrap.narrow { max-width: 760px; }

/* Header and nav */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.site-header .home { display: flex; padding: 8px 0; }
.site-header .home img { height: 32px; width: auto; display: block; }
.landing .site-header { justify-content: flex-end; border-bottom: 0; padding-top: 20px; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border-radius: 999px;
}
.nav a.current { background: var(--sun); color: #000000; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  padding: 24px 0;
}
.crumbs a { color: var(--muted); }

/* Landing */

.landing { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.landing main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.landing h1 { display: flex; justify-content: center; width: 100%; }
.landing h1 img, .landing h1 .logo { width: min(68vw, 820px); height: auto; display: block; }
/* The logo's intro copies Bucky Run's studio splash (godot/scripts/splash.gd): it pops in
   (0.45 s), the eyes glance back at the visitor (0.18 s), hold, look ahead again, then blink
   (0.07 s shut, 0.1 s open). 1.18 s in all. logo-eyes.js adds idle blinks and glances after.
   Only with the "anim" class, which reduced motion never gets. Glance offset: StudioLogo's
   (-0.55, 0.12) eye radii; a shut eye keeps 6% (StudioLogo.SHUT). */
.landing .logo .eye { transform-box: fill-box; transform-origin: center; }
.anim .landing .logo {
  animation: logo-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both, logo-fade 0.27s linear both;
}
.anim .landing .logo .look { animation: logo-intro-look 1.18s both; }
.anim .landing .logo .eye { animation: logo-intro-eye 1.18s both; }
.anim .landing .logo.idle .look, .anim .landing .logo.idle .eye { animation: none; }
.anim .landing .logo.glance .look { animation: logo-glance 0.48s both; }
.anim .landing .logo.blink .eye { animation: logo-blink 0.25s both; }

@keyframes logo-pop { from { transform: scale(0.88); } to { transform: scale(1); } }
@keyframes logo-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes logo-intro-look {
  0%, 38.1% { transform: translate(0, 0); animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1); }
  53.4%, 63.6% { transform: translate(-25.5px, 5.6px); animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1); }
  78.8%, 100% { transform: translate(0, 0); }
}
@keyframes logo-intro-eye {
  0%, 85.6% { transform: scaleY(1); }
  91.5% { transform: scaleY(0.06); }
  100% { transform: scaleY(1); }
}
@keyframes logo-glance {
  0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1); }
  37.5%, 62.5% { transform: translate(-25.5px, 5.6px); animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1); }
  100% { transform: translate(0, 0); }
}
@keyframes logo-blink {
  0%, 32% { transform: scaleY(1); }
  60% { transform: scaleY(0.06); }
  100% { transform: scaleY(1); }
}

/* Shared blocks */

.page { padding-bottom: 80px; }
.page > .wrap { display: flex; flex-direction: column; gap: 72px; }
.page-title { font-size: clamp(40px, 6vw, 56px); padding-top: 32px; }

.tag {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  background: var(--sun);
  color: #000000;
  border-radius: 999px;
  padding: 6px 14px;
}

.section { display: flex; flex-direction: column; gap: 20px; }
.section h2 { font-size: clamp(28px, 4vw, 36px); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card p { color: var(--muted); line-height: 1.55; }
.card > svg { color: var(--sun); }

.placeholder {
  border: 2px dashed var(--dashed);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Games */

.games { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.game-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.game-card .art { height: 220px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.game-card .art img { width: 160px; height: 160px; display: block; transition: transform 0.2s ease; }
.game-card:hover .art img { transform: scale(1.04); }
.game-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.game-card h2 { font-size: 28px; color: var(--text); }
.game-card p { color: var(--muted); }
.game-card .tag { margin-top: 8px; font-size: 13px; padding: 4px 12px; }
.next-game { min-height: 340px; flex-direction: column; gap: 8px; border-radius: 20px; }
.next-game span:last-child { font-size: 15px; text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Game page */

.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero .text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.hero h1 { font-size: clamp(48px, 7vw, 72px); line-height: 1; }
.hero .tagline { font-size: 20px; font-weight: 600; color: var(--sun); }
.hero .story { max-width: 520px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.hero .icon { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }
.hero .icon img { width: min(100%, 380px); height: auto; display: block; }

.link-card { flex-direction: row; align-items: center; gap: 16px; text-decoration: none; }
.link-card:hover { border-color: var(--sun); color: var(--text); }
.link-card .label { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.link-card .label strong { font-size: 20px; }
.link-card .label span { color: var(--muted); }
.link-card .chev { color: var(--text); }

/* Policy */

.doc-head { display: flex; align-items: center; gap: 16px; }
.doc-head img { width: 72px; height: 72px; flex: none; display: block; }
.doc-head h1 { font-size: clamp(34px, 5vw, 44px); }
.doc-head p { color: var(--muted); margin-top: 4px; }
.doc { display: flex; flex-direction: column; gap: 28px; }
.doc .summary { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; }
.doc .toc { display: flex; flex-wrap: wrap; gap: 8px; }
.doc .toc a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
}
.doc section { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.doc section h2 { font-family: "Inter", system-ui, sans-serif; font-weight: 600; font-size: 22px; line-height: 1.3; color: var(--sun); }
.doc ul { margin: 0; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--sun); }
.doc .crumbs a { color: var(--muted); }
.doc .questions { border-top: 1px solid var(--line); padding-top: 24px; }
.doc .questions h2 { color: var(--text); }

/* Contact */

.page > .wrap.contact-page { gap: 40px; }
.contact-card { gap: 14px; align-items: flex-start; }
.contact-card .address {
  font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 5vw, 36px);
  line-height: 1.15;
  color: var(--sun);
  overflow-wrap: anywhere;
  user-select: all;
}
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--sun);
  background: var(--sun);
  color: #000000;
  font: 600 16px/1 "Inter", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { color: #000000; filter: brightness(1.08); }
.button.outline { background: transparent; color: var(--text); }
.button.outline:hover { color: var(--sun); filter: none; }
.button[hidden], .button.copy[hidden] { display: none; }
/* Both labels share one grid cell, so the button keeps its width when it says "Copied!". */
.button.copy { display: inline-grid; justify-items: center; }
.button.copy .state { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 8px; }
.button.copy .done, .button.copy .fail, .button.copy.is-copied .idle, .button.copy.is-failed .idle { visibility: hidden; }
.button.copy.is-copied .done, .button.copy.is-failed .fail { visibility: visible; }
.button.copy.is-copied { background: var(--sun); color: #000000; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.card ul { margin: 0; padding-left: 22px; color: var(--muted); }
.card li { margin-bottom: 4px; }
.card p a { color: var(--sun); }

/* Bucky Run page */

.hero .status { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.hero .status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(255, 197, 49, 0.2); }
.hero .facts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); font-size: 15px; }
.hero .facts li { display: flex; align-items: center; gap: 8px; }
.hero .facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }

.showcase { margin: 0; }
.showcase img, .feature img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.features { gap: 48px; }
.feature { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; align-items: center; }
.feature.flip { grid-template-columns: 2fr 3fr; }
.feature.flip img { order: 2; }
.feature .text { display: flex; flex-direction: column; gap: 10px; }
.feature h3 { font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif; font-weight: 800; font-size: clamp(24px, 3vw, 30px); line-height: 1.1; }
.feature p { color: var(--muted); line-height: 1.6; max-width: 420px; }

.fury .intro { display: flex; flex-direction: column; gap: 12px; }
.fury .intro p { color: var(--muted); max-width: 640px; }
.fury .shots { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fury figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.fury img { width: 100%; height: auto; display: block; border-radius: 20px; border: 1px solid var(--line); }
.fury figcaption { color: var(--muted); line-height: 1.55; }
.fury figcaption strong { display: block; color: var(--text); font-size: 20px; margin-bottom: 2px; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px clamp(16px, 4vw, 48px) 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.landing .site-footer { border-top: 0; }

/* 404 */

.not-found main { flex-direction: column; gap: 24px; text-align: center; }
.not-found h1 img { width: min(60vw, 480px); }

@media (max-width: 600px) {
  .site-header { padding: 10px 8px 10px 16px; }
  .site-header .home img { height: 26px; }
  .nav a { padding: 12px; font-size: 15px; }
  .page > .wrap { gap: 48px; }
  .hero { gap: 16px; flex-direction: column-reverse; align-items: stretch; }
  .hero .text, .hero .icon { flex: none; }
  .hero .icon img { width: 220px; }
  .hero .actions { flex-direction: column; align-items: stretch; align-self: stretch; }
  .hero .status { justify-content: center; }
  .contact-actions { flex-direction: column; align-self: stretch; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 16px; }
  .feature.flip img { order: 0; }
  .features { gap: 36px; }
  .fury .shots { grid-template-columns: 1fr; gap: 28px; }
  .fury img { border-radius: 14px; }
  .showcase img, .feature img { border-radius: 14px; }
  .button { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .game-card .art img { transition: none; }
}
