/* ============================================================
   Borough Buddies — Shared Stylesheet
   Design: NYC-gritty + cartoony
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Nunito:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:         #0B0B16;
  --bg-card:    #181825;
  --bg-tile:    #111120;
  --orange:     #FF6319;
  --yellow:     #F7D200;
  --green:      #00933C;
  --red:        #EE352E;
  --blue:       #0039A6;
  --purple:     #6D28D9;
  --text:       #F0F0F5;
  --text-muted: #8888AA;
  --border:     rgba(255, 255, 255, 0.07);
  --radius-sm:  8px;
  --radius:     16px;
  --radius-lg:  24px;
  --shadow:     0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 32px rgba(255, 99, 25, 0.25);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Base ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, .display {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }

p { color: var(--text-muted); line-height: 1.75; }

/* ── Subway Tile Texture ─────────────────────────────────────── */
.tile-bg {
  background-color: var(--bg-tile);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 22, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--orange);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-cta {
  background: var(--orange) !important;
  color: white !important;
  padding: 8px 18px !important;
}

.nav-cta:hover {
  background: #ff7a38 !important;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 4px 20px rgba(255, 99, 25, 0.45);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(255, 99, 25, 0.55); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }

.btn-store {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  gap: 12px;
  padding: 12px 24px;
}

.btn-store .store-icon { font-size: 1.5rem; }

.btn-store .store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.btn-store .store-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.btn-store .store-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.btn-store:hover {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
}

/* ── Rarity Badges ───────────────────────────────────────────── */
.rarity {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.rarity-common   { background: rgba(107,114,128,0.2); color: #9CA3AF; }
.rarity-uncommon { background: rgba(16,185,129,0.2);  color: #34D399; }
.rarity-rare     { background: rgba(99,102,241,0.2);  color: #A5B4FC; }
.rarity-legendary { background: rgba(245,158,11,0.2); color: #FCD34D; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(255, 99, 25, 0.3);
  transform: translateY(-3px);
}

/* ── Layout Helpers ──────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 99, 25, 0.12);
  border: 1px solid rgba(255, 99, 25, 0.2);
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.section-header {
  margin-bottom: 56px;
}

.section-header h2 { margin-bottom: 12px; }

.section-header p {
  font-size: 1.1rem;
  max-width: 560px;
}

.section-header.centered {
  text-align: center;
}

.section-header.centered p { margin: 0 auto; }

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

/* ── Buddy Card ────────────────────────────────────────────── */
.buddy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.buddy-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.3);
}

.buddy-emoji {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}

.buddy-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.buddy-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.buddy-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.buddy-xp {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--yellow);
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--bg-tile);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-links-group h4 {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-links-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-group a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.82rem;
}

.footer-legal-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-legal-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

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

/* ── Legal / Prose Pages ─────────────────────────────────────── */
.legal-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}

.legal-hero .section-label { margin-bottom: 16px; }
.legal-hero h1 { margin-bottom: 12px; }
.legal-hero p { font-size: 1rem; }

.legal-content {
  padding: 64px 0 96px;
}

.legal-content .container {
  max-width: 760px;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.legal-content h3 {
  font-size: 1.05rem;
  margin: 28px 0 10px;
  color: var(--text);
}

.legal-content p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.legal-content ul, .legal-content ol {
  margin: 12px 0 20px 24px;
  color: var(--text-muted);
}

.legal-content li { margin-bottom: 8px; line-height: 1.65; }

.legal-content a {
  color: var(--orange);
  text-decoration: underline;
}

.legal-content a:hover { color: #ff7a38; }

.legal-callout {
  background: rgba(255, 99, 25, 0.08);
  border: 1px solid rgba(255, 99, 25, 0.2);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 24px 0;
}

.legal-callout p { color: var(--text); margin: 0; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .footer-top { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  h1 { font-size: 2rem; }
  .btn { padding: 12px 22px; font-size: 0.95rem; }
}
