/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #0b0b0f;
  --bg-elevated: #121218;
  --surface: #17171f;
  --surface-hover: #1d1d27;
  --border: #26262f;
  --border-soft: #1d1d25;
  --text: #f2f0eb;
  --text-muted: #8c8c96;
  --text-faint: #56565f;
  --accent: #e8a33d;
  --accent-dim: #a97a35;
  --accent-soft: rgba(232, 163, 61, 0.12);
  --indigo: #6e7bff;
  --indigo-soft: rgba(110, 123, 255, 0.12);
  --teal: #4fd1c5;
  --violet: #9b8cff;
  --pink: #d94f8c;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --max-w: 1180px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 11, 15, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.logo-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); }
  50% { box-shadow: 0 0 0 6px transparent; }
}
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 14px;
  color: var(--text-muted);
}
.nav-links a { transition: color 0.2s ease; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -20px;
  height: 1px;
  background: var(--accent);
}
.nav-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 100px;
  color: var(--text);
  transition: all 0.2s ease;
}
.nav-cta:hover { border-color: var(--accent); background: var(--accent-soft); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px; height: 38px;
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ==========================================================================
   Eyebrow / ticker
   ========================================================================== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 14px; height: 1px;
  background: var(--accent);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 100px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #16110a;
}
.btn-primary:hover { background: #f3b358; transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text-muted); background: var(--surface); }

/* ==========================================================================
   Status dot (signature element)
   ========================================================================== */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }
.status.live .status-dot { background: var(--accent); animation: pulse-dot 2.2s ease-in-out infinite; }
.status.live { color: var(--accent-dim); }
.status.dev .status-dot { background: var(--indigo); }
.status.dev { color: var(--indigo); }
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,163,61,0.5); }
  70% { box-shadow: 0 0 0 5px rgba(232,163,61,0); }
}

/* ==========================================================================
   App icon tile
   ========================================================================== */
.icon-tile {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: rgba(0,0,0,0.75);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.icon-tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(255,255,255,0.35), transparent 55%);
}
.icon-tile span { position: relative; z-index: 1; }

/* palette rotation for icon tiles by category */
.icon-games { background: linear-gradient(135deg, #ffd27a, #e8834a); }
.icon-utility { background: linear-gradient(135deg, #8fa8ff, #4a5be8); color: #0b0b18; }
.icon-wellness { background: linear-gradient(135deg, #7fe0d3, #2f9e91); color: #04211d; }
.icon-social { background: linear-gradient(135deg, #ff9ac0, #d94f8c); color: #29050f; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 140px;
  padding: 48px 0 60px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--text); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 780px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  .nav-links-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-soft);
    padding: 20px 28px 26px;
    gap: 18px;
    font-size: 15px;
  }
}
