/* ==========================================================================
   GAMEFOWL TPS
   A dark, cinematic shell: fixed left rail, slim top bar, parallax stage.
   Nothing here is borrowed from a template. Every measurement is deliberate.
   ========================================================================== */

:root {
  /* Ink. Near-black with a cool cast, so photography sits warm against it. */
  --void:    #07090B;
  --pitch:   #0C0F13;
  --carbon:  #12161B;
  --iron:    #1A2027;
  --steel:   #262E38;
  --ash:     #3A4552;
  --smoke:   #6B7887;
  --fog:     #9FADBC;
  --bone:    #DDE4EB;
  --chalk:   #F4F7FA;

  /* Signal. One colour, used sparingly, so it always means "act here". */
  --volt:      #C8F03C;
  --volt-dim:  #9BBE24;
  --volt-glow: rgba(200, 240, 60, .22);

  /* Support */
  --sky:     #4DA3F0;
  --ember:   #FF6B3D;
  --good:    #35D08A;
  --bad:     #FF5566;

  --rail:      248px;
  --rail-thin: 76px;
  --topbar:    98px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --r-xs: 4px;
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

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

body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.02;
  color: var(--chalk);
}

::selection { background: var(--volt); color: var(--void); }

:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.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;
}

/* Numerals in prices and counts must never jitter as they update live. */
.tabular { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   THE RAIL
   Every link in the site lives here. It never scrolls away.
   ========================================================================== */

.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail);
  z-index: 80;
  background: linear-gradient(180deg, var(--pitch), var(--void));
  border-right: 1px solid var(--iron);
  display: flex;
  flex-direction: column;
  padding: 18px 0 0;
}

.rail-mark {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px 22px;
  border-bottom: 1px solid var(--iron);
  margin-bottom: 6px;
}
.rail-mark svg { width: 34px; height: 34px; flex-shrink: 0; }
.rail-mark .wordmark {
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .16em;
  color: var(--chalk);
  line-height: 1;
}
.rail-mark .wordmark b { color: var(--volt); font-weight: 900; }
.rail-mark .tag {
  display: block;
  font-size: 8.5px;
  letter-spacing: .3em;
  color: var(--bone);
  margin-top: 5px;
  font-weight: 700;
}

.rail-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--steel) transparent;
}
.rail-scroll::-webkit-scrollbar { width: 5px; }
.rail-scroll::-webkit-scrollbar-thumb { background: var(--steel); border-radius: 3px; }

.rail-group { margin-bottom: 22px; }
.rail-label {
  padding: 0 20px 9px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .26em;
  color: var(--bone);
  text-transform: uppercase;
}

.rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--chalk);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.005em;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.rail-link svg { width: 17px; height: 17px; opacity: .85; flex-shrink: 0; transition: opacity .18s; }
.rail-link:hover { color: var(--volt); background: rgba(200, 240, 60, .06); }
.rail-link:hover svg { opacity: 1; }

/* the active marker is a bar that slides, not a filled block */
.rail-link::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 2px; height: 0;
  background: var(--volt);
  transform: translateY(-50%);
  transition: height .26s var(--ease);
}
.rail-link.is-active { color: var(--volt); background: rgba(200, 240, 60, .07); }
.rail-link.is-active::before { height: 22px; }
.rail-link.is-active svg { opacity: 1; color: var(--volt); }

.rail-count {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--chalk);
  background: var(--carbon);
  border: 1px solid var(--iron);
  padding: 1px 7px;
  border-radius: 999px;
}

/* the cart lives in the rail, not floating in a corner */
.rail-cart {
  margin: 4px 14px 0;
  padding: 13px 15px;
  background: var(--carbon);
  border: 1px solid var(--iron);
  border-radius: var(--r);
  cursor: pointer;
  text-align: left;
  width: calc(100% - 28px);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.rail-cart:hover { border-color: var(--ash); background: var(--iron); }
.rail-cart.has-items { border-color: var(--volt-dim); background: rgba(200, 240, 60, .06); }
.rail-cart .rc-top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; font-weight: 800; letter-spacing: .2em;
  color: var(--chalk); text-transform: uppercase;
}
.rail-cart.has-items .rc-top { color: var(--volt); }
.rail-cart .rc-amount {
  font-size: 19px; font-weight: 800; color: var(--chalk);
  margin-top: 5px; letter-spacing: -.03em;
}
.rail-cart .rc-sub { font-size: 11px; color: var(--bone); margin-top: 1px; }

/* one thin line, replacing the old block of a footer */
.rail-foot {
  padding: 13px 20px;
  border-top: 1px solid var(--iron);
  font-size: 10px;
  color: var(--bone);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rail-foot a { color: var(--chalk); }
.rail-foot a:hover { color: var(--volt); }

/* ==========================================================================
   TOP BAR
   Search and the mark. Nothing else is permitted here.
   ========================================================================== */

.topbar {
  position: fixed;
  top: 0; right: 0;
  left: var(--rail);
  height: var(--topbar);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  background: rgba(7, 9, 11, .72);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.topbar.is-floating {
  background: rgba(7, 9, 11, .92);
  border-bottom-color: var(--iron);
}

.topbar-logo { display: none; align-items: center; gap: 9px; flex-shrink: 0; }
.topbar-logo img { width: 62px; height: 62px; border-radius: 12px; }

.search {
  position: relative;
  flex: 1;
  max-width: 520px;
}
.search input {
  width: 100%;
  height: 40px;
  padding: 0 42px 0 40px;
  background: var(--carbon);
  border: 1px solid var(--iron);
  border-radius: 999px;
  color: var(--chalk);
  font-size: 13.5px;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.search input::placeholder { color: var(--fog); }
.search input:focus {
  outline: none;
  background: var(--iron);
  border-color: var(--volt-dim);
  box-shadow: 0 0 0 4px var(--volt-glow);
}
.search .icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--bone); pointer-events: none;
}
.search kbd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 10px;
  color: var(--bone); background: var(--iron);
  border: 1px solid var(--steel); border-radius: var(--r-xs);
  padding: 2px 5px; pointer-events: none;
}
.search input:focus ~ kbd { opacity: 0; }

/* The badge is the loudest thing in the bar on purpose. It overhangs the
   bottom edge slightly so a 132px mark can live in a 98px bar. */
.topbar-mark {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-bottom: -30px;
  transition: transform .25s var(--ease);
}
.topbar-mark:hover { transform: scale(1.04); }
.topbar-mark img {
  width: 132px; height: 132px;
  border-radius: 16px;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, .6));
}

/* ==========================================================================
   STAGE
   ========================================================================== */

.stage {
  margin-left: var(--rail);
  padding-top: var(--topbar);
  min-height: 100vh;
  position: relative;
}

.pad { padding: 44px 40px 80px; max-width: 1360px; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s var(--ease), background .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.btn-volt {
  background: var(--volt);
  color: var(--void);
  box-shadow: 0 0 0 0 var(--volt-glow);
}
.btn-volt:hover:not(:disabled) {
  background: #D8FF52;
  box-shadow: 0 0 34px var(--volt-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--chalk);
  border-color: var(--steel);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--volt-dim); color: var(--volt); }

.btn-solid {
  background: var(--iron);
  color: var(--chalk);
  border-color: var(--steel);
}
.btn-solid:hover:not(:disabled) { background: var(--steel); }

.btn-danger { background: transparent; color: var(--bad); border-color: rgba(255, 85, 102, .35); }
.btn-danger:hover:not(:disabled) { background: var(--bad); color: #fff; border-color: var(--bad); }

.btn-sm { height: 34px; padding: 0 15px; font-size: 12.5px; }
.btn-lg { height: 52px; padding: 0 30px; font-size: 15px; }
.btn-block { width: 100%; }

/* ==========================================================================
   SURFACES
   ========================================================================== */

.surface {
  background: var(--carbon);
  border: 1px solid var(--iron);
  border-radius: var(--r-lg);
}

.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--volt);
}

.dim { color: var(--bone); }
.mono { font-family: var(--mono); }

/* ==========================================================================
   RESPONSIVE
   The rail collapses to a bar across the bottom on phones, which keeps
   navigation reachable by thumb instead of hidden behind a hamburger.
   ========================================================================== */

@media (max-width: 1080px) {
  :root { --rail: 210px; }
  .pad { padding: 36px 26px 70px; }
}

@media (max-width: 860px) {
  :root { --topbar: 76px; }

  .rail {
    top: auto; bottom: 0; left: 0; right: 0;
    width: 100%; height: 62px;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border-right: 0;
    border-top: 1px solid var(--iron);
    background: rgba(12, 15, 19, .96);
    backdrop-filter: blur(20px);
  }
  .rail-mark, .rail-label, .rail-foot, .rail-count { display: none; }
  .rail-scroll {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    align-items: stretch;
  }
  .rail-group { display: flex; margin: 0; }
  .rail-link {
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    padding: 0 16px;
    font-size: 9.5px;
    letter-spacing: .04em;
    white-space: nowrap;
  }
  .rail-link::before { top: 0; left: 50%; transform: translateX(-50%); width: 0; height: 2px; }
  .rail-link.is-active::before { width: 26px; height: 2px; }
  .rail-cart {
    margin: 0; width: auto; border: 0; border-radius: 0;
    background: var(--volt); color: var(--void);
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 18px; flex-shrink: 0;
  }
  .rail-cart .rc-top { color: var(--void); font-size: 8.5px; }
  .rail-cart .rc-amount { font-size: 14px; color: var(--void); margin: 0; }
  .rail-cart .rc-sub { display: none; }

  .topbar { left: 0; height: 76px; padding: 0 14px; gap: 12px; }
  .topbar-logo { display: flex; }
  .topbar-mark { display: none; }
  .stage { margin-left: 0; padding-bottom: 62px; }
  .pad { padding: 28px 18px 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
