/* ==========================================================================
   NightSoft Corporate Website Design System
   Modern Dark Mode, Glassmorphism, Clean Silicon Valley Tech Aesthetics
   ========================================================================== */

:root {
  --bg-main: #090a0f;
  --bg-surface: #0e1017;
  --bg-card: rgba(22, 25, 34, 0.7);
  --bg-card-hover: rgba(28, 32, 45, 0.85);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(125, 126, 255, 0.35);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --accent-pink: #ec4899;
  --accent-purple: #a855f7;
  --accent-cyan: #06b6d4;
  
  --grad-brand: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --max-w: 1200px;
  --nav-h: 72px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  color-scheme: dark;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Backdrops */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.glow-1 {
  top: -100px;
  left: 20%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
}

.glow-2 {
  top: 40%;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
}

.bg-grid-overlay {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 1;
}

/* Layout */
.container {
  width: min(var(--max-w), 100% - 48px);
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.narrow {
  width: min(780px, 100% - 48px);
}

.section {
  padding: 100px 0;
}

.section-darker {
  background: linear-gradient(180deg, rgba(14, 16, 23, 0.5) 0%, rgba(9, 10, 15, 0.8) 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Typography & Headings */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

p {
  color: var(--text-secondary);
}

.gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}

.section-kicker {
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(32px, 3.8vw, 44px);
  margin-bottom: 18px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
}

/* Navigation */
.header {
  position: sticky;
  top: 0;
  height: var(--nav-h);
  background: rgba(9, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max-w), 100% - 48px);
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.brand-dot {
  color: var(--accent-pink);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: var(--transition);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
}

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-glass {
  background: rgba(22, 25, 34, 0.6);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(30, 34, 48, 0.8);
  border-color: var(--border-hover);
}

.btn-block {
  width: 100%;
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* Hero Section */
.hero-section {
  padding: 90px 0 80px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.badge-wrapper {
  margin-bottom: 24px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: #a5b4fc;
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 10px #6366f1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: clamp(38px, 5.5vw, 68px);
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}

.hero-description {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* Metrics Strip */
.metrics-strip {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  margin-top: 40px;
}

.metric-card {
  text-align: center;
}

.metric-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.metric-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}

.metric-divider {
  width: 1px;
  height: 40px;
  background: var(--border-subtle);
}

/* Cards & Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  transition: var(--transition);
  position: relative;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.card-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #818cf8;
}

.card-icon {
  width: 26px;
  height: 26px;
}

.card-title {
  font-size: 20px;
  margin-bottom: 12px;
}

.card-text {
  font-size: 15px;
  line-height: 1.6;
}

.card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-pink);
  background: rgba(236, 72, 153, 0.12);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.tech-spec {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Product Spotlight */
.product-spotlight {
  background: linear-gradient(145deg, rgba(30, 35, 52, 0.8) 0%, rgba(18, 20, 29, 0.85) 100%);
  border: 1px solid rgba(125, 126, 255, 0.25);
  border-radius: 24px;
  padding: 44px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.spotlight-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--grad-brand);
  color: #fff;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}

.spotlight-badge-teal {
  background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
}

.product-spotlight-teal {
  background: linear-gradient(145deg, rgba(16, 36, 44, 0.8) 0%, rgba(12, 22, 28, 0.85) 100%);
  border-color: rgba(6, 182, 212, 0.28);
}

.btn-teal {
  background: linear-gradient(135deg, #06b6d4 0%, #059669 100%);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.35);
}

.btn-teal:hover {
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.5);
}

.spotlight-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.app-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.app-icon {
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.app-title {
  font-size: 28px;
}

.app-tagline {
  font-size: 15px;
  color: var(--text-secondary);
}

.spotlight-description {
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
}

.spotlight-cta-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Mockup & Code Preview */
.device-mockup {
  background: #090a10;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.7);
}

.mockup-header {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.mockup-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.mockup-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.mockup-body {
  padding: 24px;
}

.code-preview pre {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  overflow-x: auto;
}

.token-comment { color: #64748b; font-style: italic; }
.token-keyword { color: #c084fc; font-weight: 600; }
.token-string { color: #38bdf8; }

.feature-checklist {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 8px;
}

.check-item {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-mark {
  color: #34d399;
  font-weight: 700;
}

/* Technology Grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tech-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}

.tech-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.tech-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.tech-card h4 {
  font-size: 17px;
  margin-bottom: 10px;
}

.tech-card p {
  font-size: 14px;
  line-height: 1.6;
}

/* Research Steps */
.research-container {
  display: grid;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.research-block {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  align-items: flex-start;
  transition: var(--transition);
}

.research-block:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.research-step {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.research-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.research-info p {
  font-size: 15px;
  line-height: 1.65;
}

/* Company Info Card */
.company-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 40px;
  max-width: 860px;
  margin: 0 auto;
}

.company-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.info-value {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

/* Contact Box */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 44px;
  backdrop-filter: blur(20px);
}

.contact-form {
  display: grid;
  gap: 20px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(9, 10, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.direct-contact {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.direct-contact p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.direct-email-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #818cf8;
  text-decoration: none;
  font-size: 16px;
  transition: var(--transition);
}

.direct-email-link:hover {
  color: #c7d2fe;
  text-decoration: underline;
}

.form-feedback {
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}

.form-feedback.success {
  color: #34d399;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 72px 0 40px;
  background: var(--bg-main);
  position: relative;
  z-index: 2;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 16px 0 24px;
  line-height: 1.6;
}

.copyright {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links-col h5 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.footer-links-col ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.footer-links-col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-links-col a:hover {
  color: #fff;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr; }
  .spotlight-content { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(9, 10, 15, 0.98);
    border-bottom: 1px solid var(--border-subtle);
    padding: 24px;
    gap: 18px;
  }
  .mobile-toggle { display: block; }
  .grid-2 { grid-template-columns: 1fr; }
  .metrics-strip { flex-direction: column; gap: 20px; }
  .metric-divider { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .company-info-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; gap: 36px; }
}

/* Language Picker Details Dropdown */
.nav-lang, .footer-lang {
  position: relative;
  font-size: 14px;
}

.nav-lang summary, .footer-lang summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
  user-select: none;
}

.nav-lang summary::-webkit-details-marker,
.footer-lang summary::-webkit-details-marker {
  display: none;
}

.nav-lang summary:hover,
.nav-lang[open] summary,
.footer-lang summary:hover,
.footer-lang[open] summary {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: max-content;
  max-width: 380px;
  max-height: 420px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 10px;
  background: rgba(18, 20, 29, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  list-style: none;
  z-index: 1000;
  margin: 0;
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

.footer-lang {
  margin: 16px 0;
}

.footer-lang .lang-dropdown {
  bottom: calc(100% + 10px);
  top: auto;
  left: 0;
  right: auto;
}

.lang-dropdown li a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  transition: var(--transition);
}

.lang-dropdown li a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.lang-dropdown li a[aria-current="true"] {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 768px) {
  .lang-dropdown {
    position: fixed;
    top: 70px;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    max-height: 60vh;
    grid-template-columns: 1fr 1fr;
  }
}

