/* Nex Tools - Global Styles */
/* Dark mystical theme - matching NEX Instagram brand */

:root {
  --bg-primary: #08080C;
  --bg-secondary: #0A080E;
  --bg-tertiary: #0F0D15;
  --bg-card: #12101A;
  --bg-card-hover: #151320;
  --bg-input: #151320;
  --bg-darkest: #050507;
  --purple-deep: #2D1B69;
  --purple-mid: #4A2D8A;
  --purple-light: #6B4DAB;
  --gold: #FFD700;
  --gold-soft: #FFECB3;
  --gold-glow: rgba(255,215,0,0.15);
  --white: #FFFFFF;
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255,255,255,0.85);
  --text-muted: rgba(255,255,255,0.6);
  --text-faint: rgba(255,255,255,0.4);
  --border-subtle: rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.12);
  --border-gold: rgba(255,215,0,0.3);
  --success: #28A745;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-gold: 0 4px 24px rgba(255,215,0,0.08);
  --shadow-purple: 0 4px 24px rgba(107,77,171,0.12);
  --max-width: 1100px;
  --transition: 0.2s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 { font-family: 'Poppins', 'Inter', sans-serif; line-height: 1.3; font-weight: 700; color: var(--white); }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-soft); }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3rem 0; background: var(--bg-primary); }
.section-alt { background: var(--bg-tertiary); }

/* Header */
.site-header {
  background: var(--bg-darkest);
  color: var(--white);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  text-decoration: none;
}
.logo span { color: var(--white); }
.nav { display: flex; gap: 1.5rem; align-items: center; }
.nav a { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.nav a:hover { color: var(--gold); }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-darkest);
    flex-direction: column;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav.open { display: flex; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0A0A0F 0%, #1A1A2E 50%, #0A0A0F 100%);
  color: var(--white);
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--white); }
.hero p { font-size: 1.15rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 2rem; }
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-gold {
  background: var(--gold);
  color: #08080C;
}
.btn-gold:hover {
  background: #e6c200;
  color: #08080C;
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(255,215,0,0.35);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}
.btn-outline:hover {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 16px rgba(255,215,0,0.15);
}
.btn-purple {
  background: var(--purple-mid);
  color: var(--white);
}
.btn-purple:hover {
  background: var(--purple-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-purple);
}
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border-subtle);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
  border-color: var(--border-gold);
}
.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.5rem; color: var(--white); }
.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }

/* Calculator specific */
.calc-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
}
.calc-input-group {
  margin-bottom: 1.5rem;
}
.calc-input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}
.calc-input-group input,
.calc-input-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color var(--transition);
  font-family: inherit;
  background: var(--bg-input);
  color: var(--text-primary);
}
.calc-input-group input:focus,
.calc-input-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
}
.calc-input-group input::placeholder {
  color: var(--text-faint);
}
.calc-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--gold), #e6c200);
  color: #08080C;
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(255,215,0,0.3);
}

/* Result */
.result-box {
  display: none;
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255,215,0,0.03), rgba(107,77,171,0.05));
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  text-align: center;
}
.result-box.visible { display: block; animation: fadeIn 0.4s ease; }
.result-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--gold);
  font-family: 'Poppins', sans-serif;
}
.result-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-soft);
  margin: 0.5rem 0;
}
.result-description {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* CTA Box (affiliate + gumroad) */
.cta-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(255,215,0,0.05), rgba(255,215,0,0.02));
  border-radius: var(--radius);
  border: 2px solid var(--border-gold);
  text-align: center;
}
.cta-box h4 {
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.cta-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Blog */
.blog-list { list-style: none; }
.blog-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.blog-item:last-child { border-bottom: none; }
.blog-item h3 a { color: var(--white); }
.blog-item h3 a:hover { color: var(--gold); }
.blog-meta { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.25rem; }
.blog-excerpt { color: var(--text-muted); margin-top: 0.5rem; }
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(107,77,171,0.15);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--purple-light);
  font-weight: 500;
}

/* Breadcrumb */
.breadcrumb {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { margin: 0 0.5rem; opacity: 0.5; }

/* Article meta */
.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* FAQ items */
.faq-item { margin-bottom: 1.5rem; }
.faq-item h3 { color: var(--gold-soft); margin-bottom: 0.5rem; }

/* Related articles */
.related-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border-subtle); }
.related-section h2 { margin-bottom: 1.5rem; }
.read-more { font-weight: 600; font-size: 0.9rem; }

/* Article layout */
.article-content {
  max-width: 750px;
  margin: 0 auto;
}
.article-content h1 { margin-bottom: 0.5rem; color: var(--white); }
.article-content h2 { margin-top: 2rem; color: var(--white); }
.article-content ul, .article-content ol {
  margin: 1rem 0 1rem 1.5rem;
  color: var(--text-secondary);
}
.article-content li { margin-bottom: 0.5rem; color: var(--text-secondary); }
.article-content a { color: var(--gold); }
.article-content a:hover { color: var(--gold-soft); }
.article-content blockquote {
  border-left: 4px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.article-content table th {
  background: var(--bg-card);
  color: var(--gold);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-gold);
}
.article-content table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.article-content table tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}
.article-content table tr:hover td {
  background: rgba(255,215,0,0.03);
}

/* Footer */
.site-footer {
  background: var(--bg-darkest);
  color: var(--text-muted);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.9rem;
  border-top: 1px solid var(--border-subtle);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { color: var(--gold); margin-bottom: 0.75rem; font-size: 1rem; }
.footer-col a { color: var(--text-muted); display: block; margin-bottom: 0.4rem; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { text-align: center; border-top: 1px solid var(--border-subtle); padding-top: 1.5rem; }

/* Email capture popup */
.email-popup-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.email-popup-overlay.visible { display: flex; }
.email-popup {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 450px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  border: 1px solid var(--border-subtle);
}
.email-popup-close {
  position: absolute;
  top: 0.75rem; right: 1rem;
  background: none; border: none;
  font-size: 1.5rem; cursor: pointer;
  color: var(--text-muted);
}
.email-popup-close:hover { color: var(--white); }
.email-popup h3 { margin-bottom: 0.5rem; color: var(--gold); }
.email-popup p { color: var(--text-secondary); }
.email-popup input[type="email"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  margin: 1rem 0;
  background: var(--bg-input);
  color: var(--text-primary);
}
.email-popup input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
}
.email-popup input[type="email"]::placeholder {
  color: var(--text-faint);
}

/* Utilities */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-purple { color: var(--purple-light); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: 1rem; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Print */
@media print {
  .site-header, .site-footer, .cta-box, .email-popup-overlay { display: none; }
  body { background: white; color: black; }
}
