/* ============================================================
   arcade. — style.css
   bycracus arcade hub + shared game styles
   ============================================================ */

:root {
  --bg:           #0a0a0a;
  --bg-elevated:  #111111;
  --bg-subtle:    #161616;
  --text:         #f0ede8;
  --text-muted:   #6a6a6a;
  --accent:       #c9a96e;
  --accent-hover: #dbb97e;
  --border:       #1f1f1f;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;

  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);

  --container:    1120px;
  --gutter:       clamp(20px, 5vw, 80px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; cursor: none; }
button { cursor: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Cursor — crosshair --- */
.cursor {
  position: fixed;
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              background 0.3s, border-radius 0.35s var(--ease-out), opacity 0.3s;
  opacity: 0;
  will-change: transform, left, top;
}

.cursor::before,
.cursor::after {
  content: '';
  position: absolute;
  background: var(--text);
  transition: opacity 0.25s;
}

.cursor::before {
  width: 1px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.cursor::after {
  width: 100%;
  height: 1px;
  top: 50%;
  transform: translateY(-50%);
}

.cursor.active {
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%) rotate(45deg);
}

.cursor.hover-card {
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%);
}

.cursor.hover-card::before,
.cursor.hover-card::after {
  opacity: 0;
}

.cursor-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.25s;
}

.cursor.hover-card .cursor-label {
  opacity: 1;
}

/* --- Grain --- */
.grain {
  position: fixed;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  z-index: 10000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 150px 150px;
  contain: strict;
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--gutter);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s var(--ease-out);
}

.nav.scrolled {
  padding-top: 16px;
  padding-bottom: 16px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 0.3s;
}

.nav-logo:hover { color: var(--accent); }

.dot { color: var(--accent); }

.nav-credit {
  font-size: 13px;
  color: var(--text-muted);
}

.nav-credit a {
  color: var(--accent);
  transition: opacity 0.3s;
}

.nav-credit a:hover { opacity: 0.7; }

/* --- Hero --- */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: clamp(120px, 15vw, 200px) 0 clamp(60px, 8vw, 100px);
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  right: -10%;
  top: -30%;
  width: 50%;
  height: 80%;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.08) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  border-radius: 50%;
}

.hero-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
}

/* --- Game Cards --- */
.games {
  padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 10vw, 160px);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.game-card {
  position: relative;
  padding: 40px 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.4s, background 0.4s, transform 0.4s var(--ease-out);
}

.game-card:hover {
  border-color: #2a2a2a;
  background: var(--bg-subtle);
  transform: translateY(-6px);
}

.game-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(201, 169, 110, 0.08);
  color: var(--accent);
  margin-bottom: 24px;
}

.game-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.game-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.game-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.game-tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
}

.game-play {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.3s var(--ease-out);
}

.game-card:hover .game-play {
  gap: 10px;
}

/* --- Footer --- */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner a {
  color: var(--accent);
  transition: opacity 0.3s;
}

.footer-inner a:hover { opacity: 0.7; }

/* --- Reveals --- */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body { cursor: auto; }
  a, button { cursor: auto; }
  .cursor { display: none; }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .game-card {
    padding: 28px 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 400px) {
  :root {
    --gutter: 16px;
  }
}
