:root {
  color-scheme: dark;
  --bg: #050711;
  --panel: rgba(14, 19, 39, 0.82);
  --line: rgba(124, 234, 255, 0.22);
  --cyan: #63e6ff;
  --purple: #b66cff;
  --accent: #b66cff;
  --text: #f5f7ff;
  --muted: #aeb7d2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(84, 46, 173, 0.24), transparent 34rem),
    radial-gradient(circle at 80% 24%, rgba(38, 194, 226, 0.18), transparent 30rem),
    var(--bg);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }
img { max-width: 100%; }

.arcade-shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.arcade-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 17, 0.88);
  backdrop-filter: blur(18px);
}
.arcade-nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
/* The whole top bar is brand cyan - wordmark and every tab - matching the
   marketing site header. The Arcade uses its own approved brighter cyan
   (#63e6ff) rather than the site token, because that is this surface's
   calibrated profile; what is shared is the treatment, not the hex.

   The current tab carries three signals - the brightest cyan, a cyan fill and
   a cyan underline - so it is never distinguished by hue alone. */
.arcade-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--cyan); text-decoration: none; font-weight: 800; letter-spacing: 0.02em; transition: color 160ms ease; }
.arcade-brand:hover { color: var(--purple); }
.arcade-brand img { width: 42px; height: 42px; object-fit: contain; }
.arcade-links { display: flex; flex-wrap: wrap; gap: 6px; }

/* The profile header shipped with a .header-inner that no stylesheet defined,
   so its brand and nav stacked into two rows while every other Infin8 header
   is a single row. Same row, same height, same rhythm as .arcade-nav. */
.arcade-header .header-inner {
  display: flex;
  flex-wrap: wrap;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* One selector for both Arcade headers. The home page puts its links in
   nav.arcade-links; the profile page puts them in nav.arcade-nav - and on both
   the brand anchor sits outside the <nav>, so this can never repaint it. */
.arcade-header nav.arcade-nav { min-height: 0; justify-content: flex-end; gap: 6px; }

.arcade-header nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--cyan);
  text-decoration: none;
  font-weight: 700;
  transition: color 160ms ease, background-color 160ms ease;
}
.arcade-header nav a:hover { color: #a7f8ff; background: rgba(99, 230, 255, 0.12); }
.arcade-header nav a[aria-current="page"] { color: #c8fbff; background: rgba(99, 230, 255, 0.16); }
.arcade-header nav a[aria-current="page"]::after {
  position: absolute;
  right: 12px;
  bottom: 3px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  content: "";
}

/* --------------------------------------------------------------------------
   Game cards as live windows

   assets/infin8-effects.css loads after this file, so its generic
   .nebula-panel rule would otherwise hand the card a 16px radius and
   display:block. Restating the card's own geometry here keeps the shared
   effect without letting it redesign the card.
   -------------------------------------------------------------------------- */
.game-card.nebula-panel {
  --nebula-radius: 24px;
  --nebula-width: 1px;
  display: flex;
  transform: perspective(1200px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1), border-color 320ms ease, box-shadow 480ms ease;
}

/* The card clips, so the ring bloom is drawn inside it rather than haloing out. */
.game-card .nebula-ring::after { inset: 0; opacity: 0.5; }

.game-card:hover, .game-card:focus-within {
  border-color: rgba(124, 234, 255, 0.5);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4), 0 0 50px rgba(182, 108, 255, 0.16);
}

@media (max-width: 760px) {
  .game-card.nebula-panel { --nebula-radius: 18px; transform: none; }
}

/* The hero is a banner, not a landing page: keep it tight so the game cards
   are the first thing a visitor actually scrolls to. */
.arcade-hero { padding: 40px 0 24px; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 34px; align-items: center; }
.kicker { color: var(--accent); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
h1 { margin-top: 10px; font-size: clamp(2.5rem, 6vw, 4.6rem); letter-spacing: -0.055em; }
h1 span, .gradient-copy { color: transparent; background: linear-gradient(90deg, var(--cyan), var(--purple)); background-clip: text; }
.lede { max-width: 680px; margin: 16px 0 0; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.12rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.arcade-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.04); text-decoration: none; font-weight: 800; }
.arcade-button.primary { color: #071019; border-color: transparent; background: linear-gradient(90deg, var(--cyan), #a7f8ff); box-shadow: 0 14px 50px rgba(99,230,255,0.2); }
.arcade-button:hover { transform: translateY(-2px); }

/* A single stroked lemniscate, not two rotated ellipses: the mark has to be a
   real infinity symbol because it is the brand. */
.infinity-stage { position: relative; min-height: 340px; display: grid; place-items: center; }
.infinity-mark { width: min(560px, 100%); height: auto; overflow: visible; }
.infinity-mark path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.infinity-glow { stroke: url(#infinity-stroke); stroke-width: 26; opacity: .28; filter: blur(9px); }
.infinity-line { stroke: url(#infinity-stroke); stroke-width: 13; filter: drop-shadow(0 0 14px rgba(99,230,255,.45)) drop-shadow(0 0 26px rgba(182,108,255,.35)); }
/* A light travelling the loop, which is only possible on a continuous path. */
.infinity-tracer { stroke: #f2fbff; stroke-width: 5; stroke-dasharray: 46 660; filter: drop-shadow(0 0 10px #bff2ff); animation: infinity-travel 4.6s linear infinite; }
@keyframes infinity-travel { from { stroke-dashoffset: 706; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .infinity-tracer { animation: none; opacity: .5; } }
.board-line { position: absolute; width: 80%; height: 8px; bottom: 10%; border-radius: 999px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); box-shadow: 0 0 24px var(--cyan); }

/* Same rhythm as the main site so the arcade and the website read as one. */
.arcade-section { padding: 22px 0 52px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.section-heading h2 { margin-top: 8px; font-size: clamp(2rem, 5vw, 3.7rem); letter-spacing: -0.045em; }
.section-heading p { max-width: 600px; margin: 0; color: var(--muted); }

.game-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr); gap: 24px; }
.game-card, .leaderboard-card, .roadmap-card { border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: 0 24px 80px rgba(0,0,0,0.24); overflow: hidden; }
.game-art { min-height: 320px; position: relative; overflow: hidden; background: linear-gradient(165deg, #22184c 0%, #102b50 48%, #083238 100%); }
.game-art::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(120deg, transparent 0 36px, rgba(255,255,255,0.035) 38px 40px); }
.game-art-city { position: absolute; inset: auto 0 0; height: 46%; opacity: 0.8; background: linear-gradient(to top, #07101f, transparent), repeating-linear-gradient(90deg, #0e1830 0 50px, #17274a 51px 86px); clip-path: polygon(0 45%, 5% 45%, 5% 15%, 12% 15%, 12% 55%, 20% 55%, 20% 0, 27% 0, 27% 58%, 35% 58%, 35% 25%, 44% 25%, 44% 60%, 54% 60%, 54% 10%, 63% 10%, 63% 53%, 72% 53%, 72% 30%, 80% 30%, 80% 62%, 91% 62%, 91% 18%, 100% 18%, 100% 100%, 0 100%); }
.skater-mark { position: absolute; left: 16%; bottom: 19%; width: 135px; height: 10px; border-radius: 999px; background: var(--cyan); box-shadow: 0 0 22px var(--cyan); transform: rotate(-8deg); }
.skater-mark::before { content: ""; position: absolute; left: 42px; bottom: 13px; width: 42px; height: 76px; border-radius: 24px 24px 14px 14px; background: linear-gradient(var(--purple), var(--cyan)); transform: rotate(12deg); }
.speed-ring { position: absolute; right: 14%; top: 18%; width: 120px; aspect-ratio: 1; border: 14px solid #ffe267; border-radius: 50%; filter: drop-shadow(0 0 18px rgba(255,226,103,0.5)); }
.game-card-copy { padding: 26px; }
.game-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 16px; }
.game-meta span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.78rem; font-weight: 750; }
.game-card h3 { margin:0 0 14px; font-size: clamp(2rem, 4vw, 3.1rem); }
.lonewolf-card h3 { max-width:100%; font-size:clamp(1.4rem,2.25vw,2rem); line-height:1.02; letter-spacing:-.055em; white-space:nowrap; }
.game-card p { margin:0 0 16px; color: var(--muted); }

.leaderboard-card { padding: 24px; }
.leaderboard-card h3 { font-size: 1.5rem; }
.leaderboard-status { color: var(--muted); font-size: 0.86rem; }
.section-copy { margin: 0 0 14px; color: var(--muted); max-width: 660px; }
table { width: 100%; border-collapse: collapse; margin-top: 18px; }
th, td { padding: 12px 8px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); }
th:last-child, td:last-child { text-align: right; }
th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }

.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.roadmap-card { padding: 24px; }
.roadmap-card span { color: var(--cyan); font-weight: 850; }
.roadmap-card p { margin-bottom: 0; color: var(--muted); }

.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.player-dashboard { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(0,1.2fr); gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); }
.player-card-slot { min-width: 0; }
.quick-play-panel { padding: 8px 0; }
.quick-play-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.quick-game { min-height: 82px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; }
.quick-game strong { font-size: clamp(.76rem,1.3vw,.95rem); line-height:1.15; overflow-wrap:anywhere; }
.quick-game span { color: var(--muted); font-size: .82rem; }
.profile-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(16, 22, 47, 0.95), rgba(10, 13, 29, 0.94));
  padding: 18px;
}
.profile-body { display: grid; gap: 12px; }
.profile-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-meta-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
}
.profile-title { color: var(--accent); font-weight: 750; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.profile-name { margin: 0; font-size: 1.35rem; }
.profile-level { color: var(--text); font-weight: 850; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 0.8rem; }
.profile-bio { margin: 4px 0 0; color: var(--muted); min-height: 2.85rem; }
.profile-card-stats { margin-top: 8px; display: grid; gap: 10px; }
.profile-card-stat { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.profile-card-stat span:last-child { color: var(--text); font-weight: 780; }

.arcade-footer { padding: 26px 0 40px; color: var(--muted); border-top: 1px solid var(--line); }
.arcade-footer .arcade-shell { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

@media (max-width: 850px) {
  .arcade-hero, .game-grid { grid-template-columns: 1fr; }
  .infinity-stage { min-height: 250px; }
  .roadmap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .arcade-shell { width: min(100% - 20px, 1160px); }
  .arcade-nav { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .arcade-links { gap: 12px; font-size: 0.9rem; }
  .arcade-hero { padding-top: 54px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
}

.lonewolf-art{position:relative;background:radial-gradient(circle at 70% 25%,rgba(110,231,249,.25),transparent 25%),linear-gradient(145deg,#231044,#090713);overflow:hidden}.wolf-silhouette,.cub-silhouette,.dog-silhouette{position:absolute;display:grid;place-items:center;border:1px solid rgba(255,255,255,.25);font-weight:900;letter-spacing:.08em;box-shadow:0 0 30px rgba(192,65,239,.35)}.wolf-silhouette{left:18%;bottom:10%;width:110px;height:180px;border-radius:50% 50% 20% 20%;background:#291f44;color:#73e8ff}.cub-silhouette{left:52%;bottom:10%;width:70px;height:115px;border-radius:50% 50% 20% 20%;background:#8e477f;color:#ffe083}.dog-silhouette{right:7%;bottom:12%;width:110px;height:55px;border-radius:55% 50% 35% 35%;background:#11131d;color:#b9b9ca;font-size:10px}.game-grid{align-items:stretch}

.game-cover { min-height:0; aspect-ratio:16/9; background:#090713; }
.game-cover::before { display:none; }
.game-cover img { width:100%; height:100%; display:block; object-fit:cover; transition:transform .35s ease,filter .35s ease; }
.game-card:hover .game-cover img { transform:scale(1.025); filter:saturate(1.08) contrast(1.04); }


/* Registry-driven Arcade library + 2026-08-06 mobile layout pass */
#games-library{scroll-margin-top:86px}.game-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));align-items:stretch}.game-card{display:flex;flex-direction:column;min-width:0}.game-card-copy{display:flex;flex-direction:column;flex:1}.game-card-copy .arcade-button{margin-top:auto;align-self:flex-start}.loading-card{min-height:220px}.leaderboard-hub{padding-top:18px}.leaderboard-heading{align-items:center}.leaderboard-switcher{display:flex;gap:9px;flex-wrap:wrap;margin:0 0 14px}.game-tab{min-height:42px;padding:0 15px;border:1px solid rgba(98,231,255,.22);border-radius:999px;background:rgba(255,255,255,.035);color:var(--muted);font:inherit;font-weight:850;cursor:pointer}.game-tab.active{color:#061116;background:linear-gradient(90deg,var(--cyan),#bff7ff);border-color:transparent}.home-board{width:100%;max-width:none}.home-board-title{display:flex;align-items:flex-end;justify-content:space-between;gap:14px}.home-board-title h3{margin:.2rem 0 0}.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.home-board table{min-width:420px}
.game-tab {
  font-size: .78rem;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.game-tab:focus-visible {
  outline: 2px solid rgba(99, 230, 255, 0.4);
  outline-offset: 2px;
}
.game-tab:active {
  transform: scale(0.98);
}
.arcade-button,
.game-card a,
.leaderboard-switcher button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media(max-width:760px){.arcade-shell{width:min(100% - 18px,1180px)}.arcade-header{position:relative}.arcade-nav{min-height:62px}.arcade-brand span{font-size:.95rem}.arcade-links{width:100%;gap:14px;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px;scrollbar-width:none;font-size:.86rem}.arcade-links::-webkit-scrollbar{display:none}.arcade-links a{flex:0 0 auto}.arcade-hero{padding-top:16px;gap:14px}.arcade-hero h1{font-size:clamp(2.5rem,14vw,4.5rem)}.arcade-hero .lede{font-size:1rem}.infinity-stage{min-height:120px;order:-1}.infinity-mark{width:min(230px,62%)}.hero-actions{display:grid;grid-template-columns:1fr 1fr}.hero-actions .arcade-button:first-child{grid-column:1/-1}.arcade-button{min-height:44px;text-align:center}.arcade-section{padding-top:24px}.section-heading,.leaderboard-heading,.home-board-title{align-items:flex-start;flex-direction:column}.game-grid{grid-template-columns:1fr}.profile-grid{grid-template-columns:1fr}.game-card{border-radius:18px}.game-art{min-height:190px}.game-card-copy{padding:18px}.game-meta{gap:5px}.game-meta span{font-size:.68rem}.leaderboard-switcher{overflow-x:auto;flex-wrap:nowrap;padding-bottom:5px;scrollbar-width:none}.leaderboard-switcher::-webkit-scrollbar{display:none}.game-tab{flex:0 0 auto;min-height:48px;transition:transform 120ms ease,background-color 120ms ease,border-color 120ms ease;}.home-board{padding:16px}.roadmap-grid{grid-template-columns:1fr}.arcade-footer .arcade-shell{flex-direction:column;align-items:flex-start;padding:18px 0}}

@media (pointer: coarse) and (orientation: portrait) and (max-width: 860px) {
  .leaderboard-switcher,
  .game-grid,
  .home-board,
  .profile-grid {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .leaderboard-switcher {
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }
  .game-tab {
    min-width: 110px;
    padding-inline: 16px;
  }
  .table-scroll {
    max-height: min(40svh, 420px);
    overflow-y: auto;
  }
  #games-library {
    min-height: 0;
  }
}
@media(max-width:760px){.player-dashboard,.quick-play-grid{grid-template-columns:1fr}.quick-game{min-height:64px}}
@media(max-width:760px){.game-tab{font-size:.72rem;max-width:132px;padding-inline:11px}}
@media(max-width:420px){.hero-actions{grid-template-columns:1fr}.hero-actions .arcade-button:first-child{grid-column:auto}.infinity-stage{min-height:104px}.infinity-mark{width:min(200px,58%)}.arcade-hero{padding-top:16px}.game-art{min-height:165px}}

/* ---------------------------------------------------------------------------
   Infin8 Education band

   A separate category on the Arcade home page, not a differently-coloured card
   inside the main library. It gets a rule above it and a purple-led kicker so
   the boundary between "play" and "learn" is visible at a glance while both
   bands keep the identical card, grid and button treatment — same arcade, one
   design, two purposes.
   --------------------------------------------------------------------------- */
.education-section {
  margin-top: 8px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.education-section .kicker { color: var(--purple); }
.education-section .section-heading h2 { font-size: clamp(1.8rem, 4.2vw, 3.1rem); }
#infin8-education { scroll-margin-top: 86px; }

/* ---------------------------------------------------------------------------
   Shared brand texture

   The Infin8 nebula screened over every page, so the site and the audio plugin
   artwork share one surface. It is a fixed layer behind all content rather than
   a body background so it does not scroll, repeat, or shift as sections change
   height. `screen` lifts the dark page toward the texture's magentas without
   ever darkening text, and the low opacity keeps body copy at full contrast.
   --------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("../../assets/infin8-texture.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  mix-blend-mode: screen;
  opacity: 0.16;
}

/* Reduced transparency preferences and print both want the texture gone. */
@media (prefers-reduced-transparency: reduce) {
  body::before { opacity: 0.07; }
}
@media print {
  body::before { display: none; }
}

/* ---------------------------------------------------------------------------
   Phone tap targets

   Standalone links (footer navigation, "read more" style links, card links)
   render at their text height, which is around 23px. That is well under a
   comfortable thumb target, so on phones they get a minimum height and become
   inline-flex so the extra height is actually tappable rather than just extra
   line box. Links inside running paragraphs are deliberately left alone:
   padding them out would break the paragraph's rhythm.
   --------------------------------------------------------------------------- */
@media (max-width: 860px) and (pointer: coarse) {
  .text-link,
  .contact-link,
  .side-link,
  footer a,
  .board-footer a,
  .arcade-footer a,
  nav a,
  .arcade-links a,
  .board-header nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
