/*
 * base.css — FindAGame shared styles
 * Design tokens, shared layout (navbar, footer, bottom nav), and legal page content.
 * Loaded by every page (React app via index.html, legal pages via their <head>).
 */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-condensed);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

/* Centred content wrapper for static pages */
.page-content {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem 6rem;
  font-size: 0.9375rem;
  line-height: 1.75;
}

article {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: 4px;
  padding: 2rem 2.5rem;
}
@media (max-width: 640px) {
  article { padding: 1.25rem 1rem; }
}

/* ── Design tokens ────────────────────────────────────────────── */
:root {
  --red:        #C8102E;
  --blue:       #1D428A;
  --navy:       #1E3A6E;
  --black:      #17181A;
  --gray-dark:  #333333;
  --gray:       #6C6C6C;
  --gray-mid:   #CCCCCC;
  --gray-light: #F0F0F0;
  --white:      #FFFFFF;

  --font-condensed: 'Barlow Condensed', sans-serif;
  --font-body:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Site Navbar ──────────────────────────────────────────────── */
header,
.site-header {
  background: var(--navy);
  color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 4rem;
}

/* Brand / logo link */
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  text-decoration: none;
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  line-height: 1;
}
.brand img {
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 0.25rem;
  object-fit: contain;
}
/* Optional inner <span> used by React Navbar */
.brand-name {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  line-height: 1;
}

/* Desktop nav links — hidden on mobile */
.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-link {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover { color: white; }

/* Logged-in username chip (React only) */
.nav-link-user {
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: normal;
  color: rgba(255, 255, 255, 0.5);
}

/* Sign Up CTA — used in both React and static nav */
.btn-signup {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--red);
  color: white;
  padding: 0.375rem 1rem;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s;
}
.btn-signup:hover { background: #a00d25; color: white; }

/* Logout button (React only) */
.btn-nav-logout {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--gray-dark);
  color: rgba(255, 255, 255, 0.65);
  padding: 0.375rem 1rem;
  border-radius: 0.25rem;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn-nav-logout:hover { color: white; border-color: white; }

/* ── Site Footer ──────────────────────────────────────────────── */
footer,
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  padding: 1.5rem 1rem 5rem;  /* 5rem bottom = room for mobile bottom-nav */
  margin-top: auto;
  text-align: center;
}
@media (min-width: 768px) {
  footer,
  .site-footer { padding-bottom: 1.5rem; }
}

.footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Works for both .footer-nav > a (React) and footer > nav > a (static HTML) */
.footer-nav,
footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
}

.footer-nav a,
footer nav a {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-nav a:hover,
footer nav a:hover { color: white; }

/* "current page" link in static footer */
.footer-nav a.current,
footer nav a.current {
  color: white;
  text-decoration: underline;
}

/* Give Feedback link */
.footer-nav a.feedback,
footer nav a.feedback {
  color: var(--red);
  text-decoration: none;
}
.footer-nav a.feedback:hover,
footer nav a.feedback:hover { color: #e55; }

/* Separator dots between footer links */
.footer-sep { color: var(--gray-dark); }

.copyright,
footer .copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
}

/* ── Mobile Bottom Navigation ─────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--navy);
  border-top: 1px solid var(--gray-dark);
  z-index: 50;
}
@media (max-width: 767px) {
  .bottom-nav { display: block; }
}

.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 3.5rem;
  padding: 0 0.5rem;
}

/* Matches React .bottom-nav-link and static .bottom-nav a */
.bottom-nav-link,
.bottom-nav-inner a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.15s;
}
.bottom-nav-link:hover,
.bottom-nav-inner a:hover { color: white; }

.bottom-nav-link.active { color: var(--red); }

.bottom-nav-link svg,
.bottom-nav-inner a svg {
  width: 1.25rem;
  height: 1.25rem;
}

