@font-face {
  font-family: Pixelify;
  src: url('/assets/fonts/pixelify-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('/assets/fonts/dm-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #151e19;
  --panel: #1c2820;
  --line: #3a493e;
  --ink: #fafaf1;
  --muted: #c1ccc1;
  --accent: #d2ee88;
  --display: Pixelify, ui-monospace, monospace;
  --body: 'DM Sans', system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.55 var(--body);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .25em; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(100% - var(--gutter) * 2, 82rem); margin-inline: auto; }

.skip-link {
  position: absolute;
  z-index: 10;
  inset: .5rem auto auto .5rem;
  padding: .6rem 1rem;
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font: 700 clamp(1.5rem, 3.2vw, 2rem)/1 var(--display);
  letter-spacing: -.04em;
  text-decoration: none;
}
.wordmark img {
  margin-right: .65rem;
  border: 1px solid #486450;
  border-radius: 9px;
  background: #203c30;
}
.wordmark-label > span, h1 span { color: var(--accent); }
.header-actions, .social-links { display: flex; align-items: center; }
.header-actions { gap: 1.35rem; }
.nav-builds { font-weight: 650; text-decoration: none; }
.nav-builds:hover, .back-link:hover { color: var(--accent); }
.social-links { gap: .28rem; padding-left: .9rem; border-left: 1px solid var(--line); }
.social-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #dce5da;
}
.social-icon svg, .reel-toggle svg { display: block; fill: currentColor; }
.social-icon:hover { background: #29362d; border-color: #435447; color: var(--accent); }
.social-discord { color: #e0e4ff; background: #2b3150; border-color: #4e567b; }
.social-discord:hover { background: #384267; color: #fff; border-color: #818cb6; }

.hero { position: relative; isolation: isolate; overflow: clip; background: #273c32; border-bottom: 1px solid var(--line); }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img, .hero-reel { width: 100%; height: 100%; object-fit: cover; object-position: 64% 48%; }
.hero-reel { position: absolute; inset: 0; z-index: -2; opacity: 0; }
.has-reel .hero-reel { opacity: 1; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #101a14 0%, #101a14ed 15%, #101a14b8 38%, #101a141f 69%, #101a1400 100%), linear-gradient(0deg, #0d1914c4, transparent 33%);
}
.hero-inner { min-height: clamp(32rem, 49vw, 44rem); display: flex; align-items: center; position: relative; padding-block: 3.5rem 5rem; }
.hero-copy { width: min(100%, 40rem); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: .99; letter-spacing: -.04em; text-wrap: balance; }
.hero h1 { font-size: clamp(3.25rem, 6.5vw, 7rem); text-wrap: initial; text-shadow: 0 .045em 0 #102014; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: .65rem 1.12rem;
  font-weight: 700;
  text-decoration: none;
}
.primary { background: var(--accent); color: #1b260e; box-shadow: inset 0 -3px 0 #aec965; }
.primary:hover { background: #e2faab; }
.secondary { background: #19251de0; border-color: #6b7d6a; color: var(--ink); }
.secondary:hover { background: #334435; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; color: #e1ebdf; font-size: .875rem; }
.hero-meta a:hover { color: var(--accent); }
.project-credit { margin-top: .8rem; color: var(--muted); font-size: .875rem; text-wrap: pretty; }
.hero-scene {
  position: absolute;
  right: 0;
  bottom: 1.45rem;
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  border: 1px solid #9aa39270;
  border-radius: 6px;
  background: #151e19ed;
  font-size: .875rem;
  font-weight: 600;
}
.scene-title { padding-inline: .78rem; }
.reel-toggle {
  width: 2.55rem;
  min-height: 2.55rem;
  padding: 0;
  border: 0;
  border-left: 1px solid #87948370;
  border-radius: 0 5px 5px 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.reel-toggle:not([hidden]) { display: grid; place-items: center; }
.reel-toggle:hover { background: #334435; color: var(--accent); }
.reel-toggle .reel-pause, .reel-toggle[data-playing="true"] .reel-play { display: none; }
.reel-toggle[data-playing="true"] .reel-pause { display: block; }

.builds { padding-block: clamp(2.6rem, 5.5vw, 5rem); }
h2 { font-size: clamp(2.25rem, 4.3vw, 3.7rem); }
.build-card { display: grid; grid-template-columns: 1fr 1.25fr; margin-top: 1.65rem; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; aspect-ratio: 1.8; object-fit: cover; }
.card-copy { align-self: center; padding: clamp(1.35rem, 4vw, 3rem); }
.card-copy h3 { font-size: clamp(1.9rem, 3.8vw, 3.05rem); }
.card-copy h3 a { text-decoration: none; }
.card-copy h3 a:hover { color: var(--accent); }
.card-copy p { margin-block: .82rem 1.1rem; max-width: 28rem; color: var(--muted); }
.card-download, .back-link { font-weight: 700; }
.card-download { color: var(--accent); }
.card-download:hover { color: var(--ink); }

.detail { padding-block: 2rem 4.5rem; }
.back-link { display: inline-block; margin-bottom: 1.45rem; }
.detail-grid { display: grid; align-items: center; grid-template-columns: 1.2fr 1fr; gap: clamp(1.6rem, 4vw, 4rem); }
.detail-image { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.detail h1 { font-size: clamp(3rem, 6.2vw, 6rem); }
.build-intro { color: var(--muted); margin-top: .7rem; }
.build-intro span, .seed-info span { margin-inline: .15rem; }
.build-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .85rem; margin-top: .65rem; color: var(--accent); font-size: .9rem; }
.share-build { padding: .45rem 0; border: 0; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }
.share-status, .seed-info { color: var(--muted); }
.seed-info { margin-top: 1rem; }
.save-paths dt { color: var(--muted); font-size: .875rem; }
.install { scroll-margin-top: 1.25rem; margin-top: clamp(2.65rem, 5.9vw, 5rem); border-top: 1px solid var(--line); padding-top: 2rem; }
.install ol { padding-left: 1.4rem; margin-block: 1rem 1.15rem; }
.install li { padding: .18rem 0 .18rem .3rem; }
details { width: min(100%, 39rem); border: 1px solid var(--line); border-radius: 4px; background: var(--panel); padding: .7rem 1rem; }
summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.save-paths { display: grid; gap: .6rem; margin-top: .75rem; }
code { overflow-wrap: anywhere; }

.film-dialog { width: min(95vw, 29rem); max-height: 96dvh; padding: 0; border: 1px solid #768a73; border-radius: 7px; background: var(--bg); color: var(--ink); }
.film-dialog::backdrop { background: #080e0be8; }
.film-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem 1rem; }
.film-header h2 { font-size: 1.5rem; }
.film-header button { cursor: pointer; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: .25rem .6rem; }
.film-dialog video { width: 100%; height: min(75dvh, 48rem); background: #070c08; object-fit: contain; }

@media (max-width: 760px) {
  .hero-inner { min-height: 36rem; align-items: end; }
  .hero::before { background: linear-gradient(0deg, #131e19 0%, #131e19ed 17%, #131e198f 47%, #131e1926 72%, #131e1900 100%); }
  .hero-art img { object-position: 72% 31%; }
  .hero-reel { object-position: 61% 45%; }
  .build-card, .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .header-inner { min-height: 4rem; }
  .wordmark img { width: 38px; height: 38px; margin-right: 0; }
  .wordmark-label, .nav-builds { display: none; }
  .social-links { border-left: 0; padding-left: 0; gap: clamp(.1rem, 1.1vw, .38rem); }
  .social-icon { width: 2.32rem; height: 2.5rem; }
  .social-icon svg { width: 17px; height: 17px; }
  .hero-inner { min-height: 39rem; padding-bottom: 4.85rem; }
  .hero-art img { object-position: 50% 65%; }
  .hero h1 { font-size: clamp(2.7rem, 10.7vw, 3.8rem); }
  .actions { margin-top: 1.15rem; gap: .55rem; }
  .button { padding-inline: .8rem; }
  .hero-scene { right: auto; left: 0; bottom: 1rem; }
  .detail { padding-top: 1rem; }
  .back-link { margin-bottom: .75rem; }
  .detail-grid { gap: 1rem; }
  .detail-image { aspect-ratio: 1.8; object-fit: cover; }
  .detail h1 { font-size: clamp(2.45rem, 9.6vw, 3.5rem); }
}

@media (max-width: 360px) {
  .header-inner { gap: .6rem; }
  .social-links { gap: .13rem; }
  .social-icon { width: 2.15rem; }
}
