/* =========================================================
   BITFOOTS — recreation stylesheet
   ========================================================= */

:root {
  /* palette */
  --bg: #0d0f16;
  --bg-soft: #12141d;
  --sky-top: #262c42;
  --sky-bottom: #4c5670;
  --mountain-back: #3b4360;
  --mountain-front: #2c3350;
  --forest-back: #232a42;
  --forest-front: #171b2b;

  --gold: #e5ab45;
  --gold-dim: #c9973c;
  --gold-soft: rgba(229, 171, 69, 0.55);

  --ink-1: #eef0f6;
  /* brightest text */
  --ink-2: #9aa3bd;
  /* body copy */
  --ink-3: #6c7591;
  /* eyebrows / muted */
  --ink-4: #454d68;
  /* footer wordmark */

  --line: rgba(154, 163, 189, 0.25);
  --panel: #14161f;
  --panel-border: #2b3049;

  --font-display: 'Silkscreen', 'Courier New', monospace;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;

  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--gold-soft);
  color: #14161f;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.section {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 110px 40px;
}

.eyebrow {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--ink-3);
  margin: 0 0 22px;
}

.heading {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--gold);
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.18;
  margin: 0 0 40px;
  max-width: 720px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d9cdb8;
  font-size: 17px;
  font-style: italic;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, opacity .2s ease;
}

.link-arrow i {
  font-style: normal;
  transition: transform .2s ease;
}

.link-arrow:hover {
  border-color: currentColor;
}

.link-arrow:hover i {
  transform: translateX(4px);
}

/* =========================================================
   AMBIENT FIREFLIES (global overlay)
   ========================================================= */
.fireflies {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.firefly {
  position: absolute;
  display: flex;
  gap: 6px;
  opacity: .55;
  animation: firefly-pulse 4s ease-in-out infinite;
}

.firefly i {
  width: 6px;
  height: 6px;
  background: var(--gold);
  box-shadow: 0 0 6px 1px rgba(229, 171, 69, .8);
  border: 1px solid rgba(0, 0, 0, .35);
}

@keyframes firefly-pulse {

  0%,
  100% {
    opacity: .15;
  }

  50% {
    opacity: .75;
  }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.hero__sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 500px at 50% 0%, #333c58 0%, transparent 60%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 62%, var(--forest-back) 100%);
  z-index: 0;
}

.hero__terrain {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* object-fit + object-position keep the footage filling the hero without
     the crop looking overly zoomed in, regardless of the source aspect ratio */
  object-fit: cover;
  object-position: center 65%;
}

.hero__video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(13, 15, 22, .35) 0%,
      rgba(13, 15, 22, .15) 30%,
      rgba(13, 15, 22, .55) 78%,
      rgba(13, 15, 22, .9) 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px 40px;
  text-align: center;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.wordmark img {
  display: block;
  height: clamp(100px, 10vw, 120px);
  width: 400px;
  object-fit: contain;
  object-position: center;
}

.wordmark__img {
  display: block;
  height: clamp(50px, 7vw, 70px);
  width: 350px;
  object-fit: contain;
  object-position: center;
}

/* footer wordmark: same artwork, muted down to match the reference footer tone */
.wordmark--muted .wordmark__img {
  height: clamp(30px, 4vw, 40px);
  filter: grayscale(1) brightness(0.72) opacity(0.85);
}

.x-link {
  margin-top: 18px;
  font-size: 20px;
  color: var(--ink-2);
  opacity: .85;
  transition: opacity .2s ease, color .2s ease;
}

.x-link:hover {
  opacity: 1;
  color: var(--ink-1);
}

.x-link--muted {
  color: var(--ink-4);
  margin-top: 14px;
}

.hero__buttons {
  display: flex;
  gap: 18px;
  margin-top: 64px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 34px;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13.5px;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--gold);
  color: #1a1508;
}

.btn--primary:hover {
  background: #f0ba5c;
}

.btn--outline {
  background: rgba(13, 15, 22, .55);
  color: var(--ink-1);
  border-color: var(--gold);
}

.btn--outline:hover {
  background: rgba(229, 171, 69, .12);
  color: var(--gold);
}

.scroll-cue {
  margin-top: auto;
  padding-top: 56px;
  font-size: 20px;
  color: var(--ink-2);
  animation: cue-bounce 2.2s ease-in-out infinite;
}

@keyframes cue-bounce {

  0%,
  100% {
    transform: translateY(0);
    opacity: .6;
  }

  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}

/* =========================================================
   PROSE SECTIONS (Prologue)
   ========================================================= */
.prologue {
  background: var(--forest-front);
}

.prose {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.prose p {
  margin: 0;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
}

.mark-divider {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 620px;
  margin: 72px 0 0;
}

.mark-divider__line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.foot-mark {
  position: relative;
  width: 34px;
  height: 44px;
  flex-shrink: 0;
}

.foot-mark__bars {
  position: absolute;
  top: -10px;
  left: 2px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 9px;
}

.foot-mark__bars i {
  display: block;
  width: 3px;
  background: var(--gold);
}

.foot-mark__bars i:nth-child(1) {
  height: 4px;
}

.foot-mark__bars i:nth-child(2) {
  height: 6px;
}

.foot-mark__bars i:nth-child(3) {
  height: 9px;
}

.foot-mark__body {
  position: absolute;
  top: 4px;
  left: 6px;
  width: 20px;
  height: 26px;
  background: var(--gold);
}

.foot-mark__toe {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 16px;
  height: 14px;
  background: var(--gold);
}

/* =========================================================
   COLLECTION / CAROUSEL
   ========================================================= */
.collection {
  background: var(--forest-front);
}

.carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 8px;
}

.carousel__frame {
  width: min(520px, 78vw);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #090a10;
  border: 1px solid var(--panel-border);
}

.carousel__track {
  display: flex;
  height: 100%;
  transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}

.carousel__slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090a10;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.carousel__arrow {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 22px;
  box-shadow: 0 0 14px -2px rgba(229, 171, 69, .35);
  transition: background .2s ease, color .2s ease;
}

.carousel__arrow:hover {
  background: var(--gold);
  color: #1a1508;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.carousel__dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-4);
  transition: background .2s ease, transform .2s ease;
}

.carousel__dots button.is-active {
  background: var(--gold);
  transform: scale(1.3);
}

/* =========================================================
   THE HEADS
   ========================================================= */
.heads {
  background: var(--forest-front);
  text-align: left;
}

.heads__lead {
  font-size: 20px;
  color: var(--ink-1);
  margin: 0 0 14px;
}

.heads__sub {
  font-size: 16px;
  color: var(--ink-2);
  max-width: 560px;
  margin: 0 0 18px;
  line-height: 1.7;
}

.heads__x {
  color: var(--gold);
  font-size: 16px;
  margin: 0 0 48px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.heads__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin-bottom: 44px;
}

.head-card {
  aspect-ratio: 1 / 1.15;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
  cursor: pointer;
}

.head-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
}

.head-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* =========================================================
   FAQ
   ========================================================= */
.faq {
  background: var(--bg-soft);
  text-align: center;
}

.faq__title {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-1);
  font-size: 18px;
  margin: 0 0 40px;
}

.faq__list {
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px;
  text-align: left;
  font-size: 18px;
  color: var(--ink-1);
}

.faq__question i {
  font-size: 20px;
  color: var(--ink-1);
  flex-shrink: 0;
  transition: transform .25s ease;
}

.faq__item.is-open .faq__question i {
  transform: rotate(135deg);
}

.faq__item.is-open .faq__question {
  color: var(--gold);
}

.faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}

.faq__answer p {
  overflow: hidden;
  margin: 0;
  padding: 0 4px;
  text-align: left;
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.7;
  min-height: 0;
}

.faq__item.is-open .faq__answer {
  grid-template-rows: 1fr;
}

.faq__item.is-open .faq__answer p {
  padding: 0 4px 24px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 70px 24px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.credits {
  margin: 20px 0 0;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-4);
}

/* =========================================================
   MUSIC PLAYER
   ========================================================= */
.music-player {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(13, 15, 22, .85);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(6px);
}

.music-player__icon {
  font-size: 16px;
  color: var(--gold);
  display: flex;
}

.music-player__label {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--ink-1);
}

.music-player__slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.music-player__tooltip {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-1);
  color: #14161f;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  white-space: nowrap;
}

.music-player__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--ink-1);
}

.music-player__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  height: 3px;
  background: var(--panel-border);
  outline: none;
  cursor: pointer;
}

.music-player__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--gold);
  cursor: pointer;
}

.music-player__slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  background: var(--gold);
  cursor: pointer;
}

.music-player__slider::-moz-range-progress {
  background: var(--gold);
  height: 3px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .heads__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .section {
    padding: 80px 24px;
    text-align: left;
  }

  .prologue,
  .collection {
    text-align: left;
  }

  .heading {
    font-size: 28px;
  }

  .prose p {
    font-size: 15.5px;
  }

  /* Shorten the hero on mobile so the next section peeks into view without scrolling */
  .hero {
    min-height: 78svh;
  }

  .hero__content {
    padding: 32px 20px 20px;
  }

  .wordmark__img {
    height: 36px;
  }

  .hero__buttons {
    margin-top: 24px;
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    gap: 10px;
  }

  .btn {
    width: 100%;
    padding: 13px 28px;
  }

  .scroll-cue {
    padding-top: 24px;
  }

  .carousel {
    gap: 14px;
  }

  .carousel__frame {
    width: min(420px, 70vw);
  }

  .carousel__arrow {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .heads__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .faq {
    text-align: left;
  }

  .faq__title {
    text-align: left;
  }

  .faq__question {
    font-size: 16px;
    padding: 20px 2px;
  }

  .music-player {
    padding: 8px 12px;
    gap: 8px;
  }

  .music-player__slider {
    width: 80px;
  }

  .music-player__label {
    display: none;
  }
}

@media (max-width: 460px) {
  .hero {
    min-height: 74svh;
  }

  .heads__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .carousel__frame {
    width: min(320px, 66vw);
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}