/* ================================
   JOLY APE — styles
   Palette: #FFF700 (yellow), #232323 (dark), #FFFFFF (white)
   ================================ */

:root {
  --yellow: #FFF700;
  --dark: #1a1a1a;
  --dark-2: #232323;
  --dark-3: #0f0f0f;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.6);
  --muted-2: rgba(255, 255, 255, 0.4);
  --muted-3: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --max-width: 1200px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--dark);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ================================
   NAV
   ================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(255, 247, 0, 0.15);
  position: sticky;
  top: 0;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--yellow);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ================================
   HERO
   ================================ */
.hero {
  padding: 100px 40px 80px;
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-label,
.section-label {
  font-size: 11px;
  color: var(--yellow);
  letter-spacing: 3px;
  margin-bottom: 20px;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(36px, 7vw, 80px);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

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

.hero-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--yellow);
  color: var(--dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 247, 0, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat-num {
  font-size: 36px;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 2px;
  margin-top: 8px;
}

/* ================================
   SECTIONS
   ================================ */
.section {
  padding: 80px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-dark {
  background: var(--dark-2);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.section-dark .section-head,
.section-dark .grid-steam {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 40px;
  padding-right: 40px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: -0.5px;
}

.section-meta {
  font-size: 13px;
  color: var(--muted-2);
}

/* ================================
   STEAM CARDS
   ================================ */
.grid-steam {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.steam-card {
  background: var(--dark);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--muted-3);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.steam-card:hover {
  transform: translateY(-4px);
  border-color: var(--yellow);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.steam-cover {
  aspect-ratio: 460 / 215;
  overflow: hidden;
  border-bottom: 2px solid var(--yellow);
  background: var(--dark-2);
}

.steam-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.steam-card:hover .steam-cover img {
  transform: scale(1.05);
}

.steam-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tag {
  font-size: 10px;
  background: var(--muted-3);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.tag-yellow {
  background: rgba(255, 247, 0, 0.15);
  color: var(--yellow);
}

.game-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.game-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--muted-3);
}

.game-meta {
  font-size: 11px;
  color: var(--muted-2);
}

.game-link {
  font-size: 12px;
  color: var(--yellow);
  font-weight: 700;
  letter-spacing: 1px;
}

/* ================================
   MOBILE GRID
   ================================ */
.grid-mobile {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mobile-card {
  background: var(--dark-2);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--muted-3);
  transition: all 0.2s;
  position: relative;
}

.mobile-card:hover {
  border-color: var(--yellow);
  transform: translateY(-2px);
}

.mobile-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  margin-bottom: 14px;
  object-fit: cover;
}

.mobile-icon-fallback {
  width: 56px;
  height: 56px;
  background: var(--yellow);
  border-radius: 12px;
  margin-bottom: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-weight: 700;
  font-size: 18px;
}

.mobile-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.mobile-genre {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.5px;
}

/* ================================
   ABOUT
   ================================ */
.about {
  background: var(--yellow);
  color: var(--dark);
  padding: 80px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 100%;
}

.about-content {
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
}

.about-label {
  color: var(--dark) !important;
  opacity: 0.7;
}

.about-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.about-text {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.8;
  max-width: 480px;
}

.about-mark {
  font-size: clamp(80px, 12vw, 140px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -6px;
}

/* ================================
   FOOTER
   ================================ */
.footer {
  background: var(--dark-3);
  padding: 40px;
  border-top: 1px solid rgba(255, 247, 0, 0.15);
}

.footer-main {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.footer-sub {
  font-size: 12px;
  color: var(--muted-2);
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--yellow);
}

/* ================================
   RESPONSIVE — TABLET
   ================================ */
@media (max-width: 900px) {
  .nav {
    padding: 16px 24px;
  }

  .hero {
    padding: 60px 24px;
  }

  .section,
  .section-dark .section-head,
  .section-dark .grid-steam {
    padding-left: 24px;
    padding-right: 24px;
  }

  .section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .about {
    padding: 60px 24px;
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    margin: 0 auto;
  }

  .footer {
    padding: 32px 24px;
  }

  .stats {
    gap: 40px;
  }
}

/* ================================
   RESPONSIVE — MOBILE
   ================================ */
@media (max-width: 640px) {
  .nav {
    padding: 14px 20px;
    position: relative;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 50px 20px 60px;
  }

  .hero-sub {
    font-size: 15px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .stats {
    gap: 32px;
    margin-top: 48px;
    padding-top: 36px;
  }

  .stat-num {
    font-size: 28px;
  }

  .section,
  .section-dark .section-head,
  .section-dark .grid-steam {
    padding-left: 20px;
    padding-right: 20px;
  }

  .section {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .section-title {
    font-size: 26px;
  }

  .grid-steam {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .mobile-card {
    padding: 16px;
  }

  .mobile-icon,
  .mobile-icon-fallback {
    width: 48px;
    height: 48px;
  }

  .about {
    padding: 50px 20px;
  }

  .footer-main {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .grid-mobile {
    grid-template-columns: 1fr;
  }
}
