/*
 * DNDADA.com — Master Stylesheet
 * All pages share this file. No page has its own body/html/font/color CSS.
 */

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

:root {
  /* Colors */
  --bg:          #0a0a0f;
  --surface:     #12121a;
  --surface2:    #1a1a26;
  --border:      #2a2a3a;
  --accent:      #6c63ff;
  --accent2:     #a78bfa;
  --accent-tld:  #10b981;
  --accent-tld2: #6ee7b7;
  --text:        #e8e8f0;
  --muted:       #6b6b80;
  --success:     #10b981;
  --error:       #ef4444;

  /* Spacing & shape */
  --radius:      12px;
  --radius-lg:   20px;

  /* Layout — single source of truth */
  --content-width: 900px;
  --nav-height:    68px;
  --footer-height: 56px;
}

/* ── Base ── */
html {
  overflow-y: scroll; /* always reserve scrollbar — prevents layout shift */
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Ambient glow — fixed so it never repaints on navigation ── */
body::before {
  content: '';
  position: fixed;
  top: -15%; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 700px;
  background: radial-gradient(circle, rgba(108,99,255,0.09) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

/* ─────────────────────────────────────────────────────────────────
   HEADER — full width bar, content constrained to --content-width
───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-brand {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent2);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--accent2); background: rgba(108,99,255,0.1); }

.nav-links .nav-cta {
  margin-left: 8px;
  padding: 7px 16px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
}

.nav-links .nav-cta:hover { opacity: 0.9; background: linear-gradient(135deg, var(--accent), #8b5cf6) !important; }

/* ─────────────────────────────────────────────────────────────────
   FOOTER — full width bar, content constrained to --content-width
───────────────────────────────────────────────────────────────── */
.site-footer {
  width: 100%;
  height: var(--footer-height);
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.7);
  flex-shrink: 0;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.site-footer .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ─────────────────────────────────────────────────────────────────
   PAGE WRAPPER — fills space between header and footer
───────────────────────────────────────────────────────────────── */
.page-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--nav-height) - var(--footer-height));
}

/* For scroll pages — top aligned */
.page-wrap.scroll {
  justify-content: flex-start;
  padding: 40px 24px 60px;
}

/* Content width constraint */
.content-wrap {
  width: 100%;
  max-width: var(--content-width);
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* ── Two column layout ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
}

.col-left {
  background: linear-gradient(160deg, #1a1040 0%, #0f0a2e 60%, #16103a 100%);
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
}

.col-left::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

.col-right { padding: 44px 40px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--accent2);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--accent); background: rgba(108,99,255,0.06); }

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Forms ── */
.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 11px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 96px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field-locked {
  background: var(--surface) !important;
  color: var(--muted) !important;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── Alert messages ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }

/* ── Badge ── */
.badge {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent2);
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: 100px;
  padding: 4px 12px;
}

/* ── Stat block ── */
.stat {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

.stat-label {
  font-size: 10px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.stat-value { font-size: 13px; font-weight: 600; color: var(--text); }

/* ── Responsive ── */
@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; }
  .col-left { padding: 28px 22px; }
  .col-left::after { display: none; }
  .col-right { padding: 28px 22px; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links .nav-cta { display: none; }
  .footer-links { display: none; }
}

@media (max-width: 480px) {
  .page-wrap { padding: 24px 16px; }
  .page-wrap.scroll { padding: 24px 16px 48px; }
  .nav-links a:not(.nav-cta) { display: none; }
}
