/* Shared layout, nav, footer, and design tokens for Play Hub Bot site */

:root {
  --bg: #1e1f22;
  --bg-secondary: #2b2d31;
  --bg-tertiary: #313338;
  --surface: #2b2d31;
  --surface-raised: #383a40;
  --ink: #f2f3f5;
  --ink-muted: #b5bac1;
  --ink-faint: #949ba4;
  --line: #3f4147;
  --line-strong: #4e5058;
  --blurple: #2e5f9e;
  --blurple-dark: #1e3f5f;
  --amber: #E8B835;
  --amethyst: #9B6DFF;
  --sapphire: #3a7dbf;
  --emerald: #43B581;
  --ruby: #E74C3C;
  --steel: #95A5A6;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-lg: 0 26px 64px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(46, 95, 158, 0.08), transparent 55%);
  line-height: 1.55;
  overflow-x: hidden;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--blurple);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--sapphire);
  outline-offset: 2px;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(30, 31, 34, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  width: min(1160px, 92vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
  padding: 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
  flex-shrink: 0;
}

.brand-text {
  font-size: 0.93rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 800;
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  transition: color 160ms ease, background 160ms ease;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface-raised);
}

.nav-link:focus-visible {
  outline: 2px solid var(--sapphire);
  outline-offset: 2px;
}

.nav-link.current {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg { display: block; }

.nav-toggle:focus-visible {
  outline: 2px solid var(--sapphire);
  outline-offset: 2px;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  text-align: center;
}

.footer-brand {
  font-weight: 800;
  font-size: 0.93rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  transition: color 160ms ease;
}

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

.footer-links a:focus-visible {
  outline: 2px solid var(--sapphire);
  outline-offset: 2px;
  color: var(--ink);
}

.footer-legal {
  color: var(--ink-faint);
  font-size: 0.82rem;
  max-width: 56ch;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---- Responsive: nav and footer ---- */
@media (max-width: 768px) {
  .nav-inner {
    height: 56px;
    padding: 0 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    width: 100%;
    max-width: 100%;
  }
  .brand { gap: 8px; min-width: 0; }
  .brand-text { font-size: 0.88rem; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(30, 31, 34, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
    gap: 4px;
  }
  .nav-links.open .nav-link {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
    height: auto;
    padding: 12px 16px;
  }
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: -8px -8px -8px 0;
  }
  .footer {
    padding: 32px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .footer-brand { font-size: 0.85rem; }
  .footer-links { gap: 12px; }
  .footer-legal { padding: 0 8px; }
}

@media (max-width: 480px) {
  .nav-inner {
    padding: 0 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .brand-text { font-size: 0.82rem; letter-spacing: 0.05em; }
}
