/* ===================================================================
   NxTreasury Public Pages Design System
   Matches React homepage: Inter font, navy/emerald/blue palette
   NO Tailwind CDN, NO Bootstrap — standalone vanilla CSS
   =================================================================== */

/* --- Google Fonts (Inter + JetBrains Mono) ----------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Design Tokens ----------------------------------------------- */
:root {
  --nx-navy:          #0A192F;
  --nx-blue:          #0066FF;
  --nx-blue-hover:    #0052CC;
  --nx-emerald:       #00FF88;
  --nx-emerald-dim:   #00CC6A;
  --nx-bg:            #FAFAFA;
  --nx-white:         #FFFFFF;
  --nx-text-primary:  #0F172A;
  --nx-text-muted:    #64748B;
  --nx-text-light:    #94A3B8;
  --nx-border:        #E2E8F0;
  --nx-font-ui:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nx-font-mono:     'JetBrains Mono', monospace;
}

/* --- Reset / Base ------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--nx-font-ui);
  background-color: var(--nx-bg);
  color: var(--nx-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: var(--nx-emerald); border-radius: 2px; }

/* --- Typography --------------------------------------------------- */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--nx-navy);
  line-height: 1.2;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--nx-navy);
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--nx-navy);
  margin: 0 0 0.5rem;
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--nx-text-primary);
  margin: 0 0 1rem;
}

a {
  color: var(--nx-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Layout Utilities --------------------------------------------- */
.nx-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nx-content {
  padding-top: 80px;        /* below fixed navbar */
  min-height: calc(100vh - 200px);
}

.nx-section {
  padding: 64px 0;
}

/* --- Navbar ------------------------------------------------------- */
.nx-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nx-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.nx-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nx-navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.nx-navbar-logo:hover {
  text-decoration: none;
}

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

.nx-nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nx-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--nx-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

.nx-nav-link:hover {
  color: var(--nx-navy);
  text-decoration: none;
}

.nx-nav-link.active {
  color: var(--nx-navy);
  font-weight: 600;
}

.nx-btn-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--nx-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nx-btn-text:hover {
  color: var(--nx-navy);
  text-decoration: none;
}

.nx-btn-primary {
  display: inline-block;
  background: var(--nx-blue);
  color: var(--nx-white);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--nx-font-ui);
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
}

.nx-btn-primary:hover {
  background: var(--nx-blue-hover);
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.4);
  text-decoration: none;
  color: var(--nx-white);
}

/* Mobile hamburger */
.nx-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nx-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--nx-navy);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile nav (revealed when .nx-navbar has class "open") */
.nx-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--nx-border);
  padding: 16px 24px;
}

.nx-navbar.open .nx-mobile-menu {
  display: flex;
}

.nx-mobile-link {
  font-size: 14px;
  color: var(--nx-text-muted);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--nx-border);
  transition: color 0.2s;
}

.nx-mobile-link:hover {
  color: var(--nx-blue);
  text-decoration: none;
}

/* Responsive: hamburger visible, desktop nav hidden */
@media (max-width: 768px) {
  .nx-nav-links,
  .nx-nav-auth {
    display: none;
  }

  .nx-hamburger {
    display: flex;
  }
}

/* --- Footer ------------------------------------------------------- */
.nx-footer {
  background: var(--nx-navy);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 24px;
}

.nx-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.nx-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nx-footer-tagline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin: 0;
}

.nx-footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nx-footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nx-footer-links a:hover {
  color: var(--nx-emerald);
  text-decoration: none;
}

.nx-footer-heading {
  font-size: 11px;
  font-family: var(--nx-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 12px;
  font-weight: 500;
}

.nx-footer-copyright {
  font-size: 11px;
  font-family: var(--nx-font-mono);
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
}

@media (max-width: 768px) {
  .nx-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .nx-footer-brand {
    grid-column: 1 / -1;
  }
}

/* --- Cards -------------------------------------------------------- */
.nx-card {
  background: var(--nx-white);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 2rem;
}

/* --- Page Title --------------------------------------------------- */
.nx-page-title {
  text-align: center;
  padding: 48px 0 32px;
}

.nx-page-title h1 {
  margin: 0;
}

/* --- Form Styles -------------------------------------------------- */
.nx-form-group {
  margin-bottom: 20px;
}

.nx-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--nx-navy);
  margin-bottom: 6px;
}

.nx-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: var(--nx-font-ui);
  color: var(--nx-text-primary);
  background: var(--nx-white);
  border: 1px solid var(--nx-border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nx-input:focus {
  border-color: var(--nx-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.nx-input::placeholder {
  color: var(--nx-text-light);
}

.nx-btn-submit {
  display: block;
  width: 100%;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--nx-font-ui);
  color: var(--nx-white);
  background: var(--nx-blue);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
}

.nx-btn-submit:hover {
  background: var(--nx-blue-hover);
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.4);
}

/* Alert / flash messages */
.nx-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.nx-alert-error {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.nx-alert-success {
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

.nx-alert-info {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}
