/* RPGCortex marketing site — shared styles for index.html, privacy/ and tos/.
   Plain CSS, no build step. Fonts: Fraunces (serif, headings) + Manrope (sans, body/UI). */

:root {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #111115;
  --surface-2: #18181b;
  --text: #f8fafc;
  --dim: #94a3b8;
  --faint: #7b8794;
  --violet: #8b5cf6;
  --violet-deep: #7c3aed;
  --violet-light: #a78bfa;
  --teal: #2bb3a3;
  --danger: #f3a58f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --glow: 0 0 0 1px rgba(139, 92, 246, 0.35), 0 12px 40px -12px rgba(124, 58, 237, 0.55);
  --radius: 18px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  --nav-h: 64px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--violet-light); text-underline-offset: 3px; }
a:hover { color: #c4b5fd; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--violet-light);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--violet-deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { color: #fff; background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.24); }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1.02rem; }
.btn-sm { min-height: 38px; padding: 8px 16px; font-size: 0.88rem; }
.btn .g-badge {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  flex: none;
}
.btn .g-badge svg { width: 14px; height: 14px; }

/* ---------- Top nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--dim);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-cta { margin-left: 8px; }
.nav-menu { display: none; }

@media (max-width: 760px) {
  .nav { gap: 10px; }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .nav-menu { display: block; position: relative; }
  .nav-menu summary {
    list-style: none;
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    cursor: pointer;
    color: var(--text);
  }
  .nav-menu summary::-webkit-details-marker { display: none; }
  .nav-menu summary svg { width: 20px; height: 20px; }
  .nav-menu[open] summary { background: rgba(255, 255, 255, 0.08); }
  .nav-menu ul {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 200px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  }
  .nav-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
  }
  .nav-menu a:hover { background: rgba(255, 255, 255, 0.06); }
}
@media (max-width: 380px) {
  .brand span { font-size: 1.1rem; }
  .nav-cta { padding-left: 14px; padding-right: 14px; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
  color: var(--faint);
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--dim); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.site-footer .brand { font-size: 1.05rem; }
.site-footer .brand img { width: 26px; height: 26px; }

/* ---------- Legal pages (privacy / tos) ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px var(--gutter) 88px;
}
.legal .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  color: var(--dim);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}
.legal .back:hover { color: var(--text); }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 8px; }
.legal .updated { color: var(--faint); font-size: 0.92rem; margin-bottom: 36px; }
.legal h2 {
  font-size: 1.35rem;
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.legal p, .legal li { color: #cbd5e1; line-height: 1.75; }
.legal p { margin: 0 0 14px; }
.legal ul { padding-left: 1.2em; margin: 0 0 14px; }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--text); }
