/* ═══════════════════════════════════════════════════════════════════════
   Nexus Connect — shared styles
   Design tokens, reset, layout helpers, buttons, nav, and footer used
   across every page. Page-specific styles live in each page's own
   inline <style> block.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Design tokens ─────────────────────────────────────────────────── */
:root {
  --blue:          #388DF8;
  --light-blue:    #38BDF8;
  --purple:        #7C3AED;
  --muted-purple:  #C8A8FF;
  --green:         #4FDC61;
  --red:           #F28787;
  --teal:          #14B8A6;

  --blue-50:    #EAF3FE;
  --blue-700:   #1E66D6;
  --purple-50:  #F2ECFE;
  --purple-700: #5B21B6;
  --green-700:  #1FA838;
  --red-700:    #D14B4B;

  --ink-900: #1E1E1E;
  --ink-800: #2A2A2A;
  --ink-700: #3D3D3D;
  --ink-500: #6B6B6B;
  --ink-400: #909090;
  --ink-300: #BFBFBF;
  --ink-200: #D9D9D9;
  --ink-100: #ECECEC;
  --ink-75:  #EFEFEF;
  --ink-50:  #F6F8F9;

  --surface-page:    #FFFFFF;
  --surface-card:    #FFFFFF;
  --text-heading:    #000000;
  --text-body:       #000000;
  --text-muted:      #6B6B6B;
  --text-subtle:     #909090;
  --accent:          #388DF8;
  --accent-hover:    #38BDF8;
  --secondary:       #7C3AED;
  --secondary-hover: #C8A8FF;
  --border:          #D9D9D9;
  --border-strong:   #BFBFBF;

  --gradient-brand: linear-gradient(90deg, #7C3AED 0%, #388DF8 100%);
  --gradient-spark: linear-gradient(135deg, #7C3AED 0%, #388DF8 55%, #38BDF8 100%);

  --shadow-sm: 0 2px 8px rgba(30,30,30,0.08);
  --shadow-md: 0 6px 20px rgba(30,30,30,0.10);
  --shadow-lg: 0 14px 40px rgba(30,30,30,0.12);
  --shadow-xl: 0 24px 60px rgba(30,30,30,0.16);
  --glow-spark: 0 0 24px rgba(56,189,248,0.45);

  --radius-xs:   6px;
  --radius-sm:   10px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-pill: 999px;

  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'IBM Plex Serif', Georgia, serif;

  --control-h-sm: 36px;
  --control-h-md: 44px;
  --control-h-lg: 56px;

  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-family: var(--font-serif);
  font-size: 16px;
  background: var(--surface-page);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body { margin: 0; }
a { text-decoration: none; }
button { font-family: inherit; }

/* ─── Layout helpers ─────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 32px; }

/* ─── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  line-height: 1;
  transition: background 120ms var(--ease-standard), transform 120ms var(--ease-standard), color 120ms var(--ease-standard), border-color 120ms var(--ease-standard);
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-sm { height: var(--control-h-sm); padding: 0 14px; font-size: 14px; }
.btn-md { height: var(--control-h-md); padding: 0 20px; font-size: 15px; }
.btn-lg { height: var(--control-h-lg); padding: 0 28px; font-size: 17px; }
.btn-block { width: 100%; display: flex; }
.btn-primary   { background: var(--accent);     color: var(--ink-75); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline   { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--blue-50); }
.btn-ghost-inv { background: transparent; color: #fff; }
.btn-ghost-inv:hover { background: rgba(255,255,255,0.1); }

/* ─── Input (shared contact-form fields: modal + contact page) ──────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-heading);
}
.field input.input-plain,
.field textarea.input-plain {
  width: 100%;
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text-heading);
  background: var(--surface-page);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 200ms, box-shadow 200ms;
}
.field input.input-plain { height: var(--control-h-lg); }
.field textarea.input-plain { padding-top: 12px; padding-bottom: 12px; min-height: 96px; resize: vertical; }
.field input.input-plain:focus,
.field textarea.input-plain:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,141,248,0.15); }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-status { font-family: var(--font-sans); font-size: 14px; text-align: center; min-height: 18px; }
.form-status.error   { color: #DC2626; }
.form-status.success { color: var(--green-700); }

/* ─── NAV ────────────────────────────────────────────────────────────── */
#nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink-900);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-50);
  transition: color 120ms;
}
.nav-link:hover { color: var(--light-blue); }
.nav-link[aria-current="page"] { color: var(--light-blue); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-login {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-50);
}

/* ─── Hamburger / mobile nav ─────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  border: none;
  background: transparent;
  color: var(--ink-50);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-xs);
  align-items: center;
  justify-content: center;
  transition: background 120ms;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.1); }
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--ink-900);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 12px;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-link {
  display: block;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-50);
  padding: 13px 24px;
  transition: background 120ms, color 120ms;
}
.nav-mobile-link:hover { background: rgba(255,255,255,0.06); color: var(--light-blue); }
.nav-mobile-link[aria-current="page"] { background: rgba(255,255,255,0.06); color: var(--light-blue); font-weight: 600; }
.nav-mobile-actions {
  display: flex;
  gap: 10px;
  padding: 12px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 4px;
}

/* ─── Legal/content page header (about, contact, faq, games, pricing,
       privacy, terms) ───────────────────────────────────────────────── */
#legal-header { background: var(--ink-900); padding: 60px 0; text-align: center; color: #fff; }
.legal-title { font-family: var(--font-sans); font-weight: 600; font-size: 40px; letter-spacing: -0.01em; margin-bottom: 8px; }
.legal-meta { font-family: var(--font-sans); font-size: 14px; color: var(--ink-300); }

/* Content body used by about, contact, faq, privacy, terms */
#legal-body { padding: 60px 0; flex: 1; }
.legal-container { max-width: 800px; margin: 0 auto; }

/* Legal prose blocks used by about, privacy, terms */
.legal-section { margin-bottom: 40px; }
.legal-section h2 { font-family: var(--font-sans); font-weight: 600; font-size: 22px; color: var(--text-heading); margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.legal-section p { font-family: var(--font-serif); font-size: 16px; line-height: 1.7; color: var(--ink-800); margin-bottom: 16px; }
.legal-section ul { margin-bottom: 16px; padding-left: 20px; }
.legal-section li { font-family: var(--font-serif); font-size: 16px; line-height: 1.7; color: var(--ink-800); margin-bottom: 8px; }

/* ─── FOOTER ─────────────────────────────────────────────────────────── */
#footer { background: #141414; padding: 56px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-tagline { font-family: var(--font-sans); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--light-blue); font-weight: 600; }
.footer-col-head { font-family: var(--font-sans); font-weight: 600; font-size: 14px; color: #fff; margin-bottom: 10px; }
.footer-link { display: block; font-family: var(--font-serif); font-size: 14px; color: var(--ink-300); padding: 2px 0; transition: color 120ms; }
.footer-link:hover { color: var(--light-blue); }
.footer-bottom { padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; }
.footer-copy { font-family: var(--font-serif); font-size: 13px; color: var(--ink-400); }
.footer-nl-label { font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: #fff; margin-bottom: 8px; letter-spacing: 0.03em; }
.footer-nl-row { display: flex; gap: 6px; }
.footer-nl-input { flex: 1; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); border-radius: 7px; padding: 8px 10px; font-size: 13px; color: #fff; font-family: var(--font-sans); outline: none; min-width: 0; }
.footer-nl-input::placeholder { color: var(--ink-400); }
.footer-nl-input:focus { border-color: var(--light-blue); background: rgba(255,255,255,0.1); }
.footer-nl-btn { background: var(--light-blue); border: none; border-radius: 7px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: #fff; font-family: var(--font-sans); cursor: pointer; white-space: nowrap; transition: opacity 120ms; flex-shrink: 0; }
.footer-nl-btn:hover { opacity: 0.85; }
.footer-nl-btn:disabled { opacity: 0.6; cursor: default; }
.footer-nl-msg { font-size: 12px; margin-top: 6px; min-height: 16px; line-height: 1.4; }
.footer-nl-msg.nl-success { color: #4ade80; }
.footer-nl-msg.nl-error { color: #f87171; }

/* ─── Responsive: mobile (<768px) — shared nav + footer collapse ────── */
@media (max-width: 767px) {
  .nav-links     { display: none; }
  .nav-login     { display: none; }
  .nav-hamburger { display: inline-flex; }
  #nav:has(.nav-mobile-menu.open) .nav-actions .btn-primary { display: none; }
  .legal-title   { font-size: 32px; }

  .footer-grid   { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand  { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }
  #footer { padding: 40px 0 28px; }
}
