/* ============================================================
   SovNode AI — style.css
   ============================================================ */

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

:root {
  --bg:        #080c14;
  --bg-card:   #0b1020;
  --bg-darker: #040608;
  --border:    rgba(255,255,255,.08);
  --border-md: rgba(255,255,255,.12);
  --primary:   #00e5ff;
  --primary-dim: rgba(0,229,255,.15);
  --primary-border: rgba(0,229,255,.35);
  --danger:    #ef4444;
  --danger-dim: rgba(239,68,68,.12);
  --danger-border: rgba(239,68,68,.3);
  --text:      #f0f4ff;
  --muted:     #6b7a99;
  --muted-light: #8a97b5;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --radius:    2px;
  --transition: .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: .04em; }

p { color: var(--muted-light); line-height: 1.75; }

.primary-text { color: var(--primary); }
.gradient-text {
  background: linear-gradient(90deg, var(--primary), #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-center { text-align: center; }

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 6rem 0; border-top: 1px solid var(--border); position: relative; }
.bg-card { background: var(--bg-card); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.w-full { width: 100%; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #04080f;
  border-color: var(--primary);
}
.btn-primary:hover { background: #33ecff; box-shadow: 0 0 24px rgba(0,229,255,.35); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-md);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-sm { padding: .55rem 1rem; font-size: .75rem; }
.btn-lg { padding: 1rem 2rem; font-size: .85rem; }

/* ---- Navbar ---- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(8,12,20,.85);
  backdrop-filter: blur(16px);
  border-color: var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.logo-icon {
  position: relative;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-border);
  background: var(--primary-dim);
  color: var(--primary);
  transition: all var(--transition);
}
.logo:hover .logo-icon { border-color: var(--primary); background: rgba(0,229,255,.2); }
.logo-corner {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--primary);
}
.logo-corner.tl { top: 0; left: 0; }
.logo-corner.br { bottom: 0; right: 0; }
.logo-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .2em;
  color: var(--text);
}
.logo-text em { font-style: normal; color: var(--primary); }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
  width: 36px; height: 36px;
}
.mobile-menu-btn span {
  display: block;
  width: 100%; height: 2px;
  background: var(--text);
  transition: all .3s;
}
.mobile-menu-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  background: rgba(8,12,20,.98);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}
.mobile-nav.open { display: flex; }
.mobile-link {
  display: block;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .8rem 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.mobile-link:hover { color: var(--text); }
.mobile-nav .btn { margin-top: 1rem; width: fit-content; }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 72px;
  overflow: hidden;
  text-align: center;
}
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0,0,0,.03) 2px,
    rgba(0,0,0,.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}
.radial-fade {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg) 70%);
  pointer-events: none;
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding: 0 1.5rem;
}
.hero h1 { margin-bottom: 1.5rem; }
.hero-sub {
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem .9rem;
  margin-bottom: 2rem;
  border: 1px solid var(--primary-border);
  background: var(--primary-dim);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--primary);
  text-transform: uppercase;
}
.status-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: .3; }
}
.terminal-readout {
  position: absolute;
  bottom: 2rem; left: 2rem;
  font-family: var(--font-mono);
  font-size: .65rem;
  color: rgba(107,122,153,.45);
  text-align: left;
  z-index: 3;
  line-height: 1.8;
}
.terminal-readout .primary-text { color: rgba(0,229,255,.5); }

/* ---- Reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Section Headers ---- */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { margin-bottom: 1.25rem; }
.section-divider {
  width: 80px; height: 3px;
  background: var(--primary);
  margin: 0 auto;
}

/* ---- Tag ---- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .9rem;
  margin-bottom: 1rem;
  border: 1px solid var(--primary-border);
  background: var(--primary-dim);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--primary);
  text-transform: uppercase;
}

/* ---- Panels (Sovereignty) ---- */
.sovereignty .section-header { margin-bottom: 4rem; }

.panel {
  position: relative;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
  overflow: hidden;
}
.panel-top-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.primary-line { background: linear-gradient(90deg, transparent, var(--primary), transparent); }
.danger-line  { background: linear-gradient(90deg, transparent, var(--danger), transparent); }

.panel-danger  { border-color: var(--danger-border); }
.panel-danger:hover  { border-color: rgba(239,68,68,.6); }
.panel-primary { border-color: var(--primary-border); }
.panel-primary:hover { border-color: var(--primary); box-shadow: 0 0 30px rgba(0,229,255,.08); }

.panel-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.panel-icon {
  padding: .75rem;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.icon-danger  { background: var(--danger-dim); border-color: var(--danger-border); color: var(--danger); }
.icon-primary { background: var(--primary-dim); border-color: var(--primary-border); color: var(--primary); }
.panel h3 { font-size: 1rem; letter-spacing: .1em; color: var(--text); }
.panel p  { margin-bottom: 1.5rem; }

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.check-list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--muted-light);
}
.panel-primary .check-list li { color: var(--text); }
.x-mark     { color: var(--danger);  font-size: 1.1rem; flex-shrink: 0; }
.check-mark { color: var(--primary); font-size: 1.1rem; flex-shrink: 0; }

/* ---- Engine / Tabs ---- */
.engine { overflow: hidden; }
.engine-glow {
  position: absolute;
  right: -200px; top: 50%;
  transform: translateY(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,229,255,.04) 0%, transparent 70%);
  pointer-events: none;
}
.engine-intro { max-width: 65%; margin-bottom: 3.5rem; }
.engine-intro h2 { margin-bottom: 1rem; }
.engine-intro p { font-size: 1.05rem; }

.tabs-container {
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
}
.tabs-nav {
  width: 33%;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.tab-btn {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  text-align: left;
  color: var(--muted);
  transition: all var(--transition);
}
.tab-btn svg { flex-shrink: 0; margin-top: 2px; }
.tab-btn:hover { background: rgba(255,255,255,.03); color: var(--text); }
.tab-btn.active {
  background: rgba(255,255,255,.05);
  border-left-color: var(--primary);
  color: var(--text);
}
.tab-btn.active svg { color: var(--primary); }
.tab-title {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .25rem;
}
.tab-sub {
  font-family: var(--font-mono);
  font-size: .7rem;
  opacity: .6;
}

.tab-content { flex: 1; padding: 3rem; display: flex; align-items: center; min-height: 280px; }
.tab-pane { display: none; animation: fadeIn .3s ease; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
.tab-pane h3 { font-size: 1.5rem; color: var(--text); margin-bottom: 1rem; }
.tab-pane p  { margin-bottom: 1.5rem; }

.code-block {
  font-family: var(--font-mono);
  font-size: .8rem;
  padding: 1rem 1.25rem;
  background: #000;
  border: 1px solid var(--border);
  color: rgba(0,229,255,.7);
  line-height: 2;
}
.code-block .muted { color: rgba(240,244,255,.3); }
.code-block .green { color: #22c55e; }

/* ---- Features ---- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Terminal mockup */
.terminal-mockup {
  border: 1px solid var(--border);
  background: #03050a;
  padding: 1rem;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.dot {
  width: 10px; height: 10px;
  background: var(--muted);
  opacity: .5;
}
.terminal-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--muted);
  margin-left: .5rem;
}
.terminal-body { font-family: var(--font-mono); font-size: .8rem; line-height: 1.7; }
.t-line { margin-bottom: .75rem; }
.t-answer {
  padding: .75rem 1rem;
  border-left: 2px solid var(--primary);
  background: var(--primary-dim);
  color: var(--text);
  margin: .75rem 0;
  line-height: 1.7;
}

/* Feature list */
.feature-list { display: flex; flex-direction: column; gap: 2.5rem; }
.feature-item { display: flex; gap: 1.25rem; }
.feature-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-border);
  background: var(--primary-dim);
  color: var(--primary);
  margin-top: .2rem;
}
.feature-item h3 { color: var(--text); margin-bottom: .5rem; font-size: 1.05rem; }

/* ---- Compliance ---- */
.compliance { background: #030408; }
.compliance-label {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.compliance-sub {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-size: .95rem;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.badge-item {
  padding: 1rem 2rem;
  border: 1px solid rgba(255,255,255,.1);
  background: var(--bg);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  opacity: .6;
  filter: grayscale(1);
  min-width: 160px;
  text-align: center;
  transition: all var(--transition);
}
.badge-item:hover {
  opacity: 1;
  filter: grayscale(0);
  border-color: var(--primary-border);
}

/* ---- Pilot ---- */
.pilot { text-align: center; }
.pilot-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(0,229,255,.04) 0%, transparent 60%);
  pointer-events: none;
}
.pilot h2 { margin-bottom: 1.5rem; }
.pilot-sub {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* ---- Footer ---- */
.footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 3rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}
.disclaimer {
  font-size: .72rem;
  line-height: 1.6;
  color: rgba(107,122,153,.5);
  max-width: 720px;
}
.copyright {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ---- Modals ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4,8,15,.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.open { display: flex; animation: overlayIn .2s ease; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  width: 100%;
  max-width: 520px;
  animation: modalIn .25s ease;
  overflow: hidden;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-16px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h4 {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .2em;
  color: var(--text);
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 1.5rem; }

/* Form elements */
.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .5rem;
}
input[type="text"],
input[type="email"],
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-md);
  padding: .7rem 1rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .85rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0,229,255,.12);
}
select { cursor: pointer; }

.subdomain-field {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: 1.25rem;
}
.subdomain-field input { padding-right: 7rem; }
.subdomain-suffix {
  position: absolute;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
  pointer-events: none;
}
.info-box {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
  color: var(--primary);
}
.info-box p {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.6;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }

.success-state {
  text-align: center;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.success-state h3 { font-size: 1.25rem; letter-spacing: .15em; }
.success-state p  { font-size: .9rem; }

/* ---- Blink cursor ---- */
.blink-cursor span:last-child {
  display: inline-block;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .two-col        { grid-template-columns: 1fr; }
  .features-grid  { grid-template-columns: 1fr; gap: 2.5rem; }
  .tabs-container { flex-direction: column; }
  .tabs-nav       { width: 100%; border-right: none; border-bottom: 1px solid var(--border); flex-direction: row; }
  .tab-btn        { flex: 1; border-left: none; border-bottom: 3px solid transparent; padding: 1rem; }
  .tab-btn.active { border-left: none; border-bottom-color: var(--primary); }
  .engine-intro   { max-width: 100%; }
  .footer-top     { flex-direction: column; text-align: center; }
  .footer-bottom  { flex-direction: column; text-align: center; align-items: center; }
}

@media (max-width: 720px) {
  .nav-links  { display: none; }
  #portalBtn  { display: none; }
  .mobile-menu-btn { display: flex; }
  .terminal-readout { display: none; }
  .form-row   { grid-template-columns: 1fr; }
  .footer-links { justify-content: center; gap: 1.5rem; }
}

@media (max-width: 480px) {
  .hero-ctas  { flex-direction: column; align-items: center; }
  .btn-lg     { width: 100%; justify-content: center; }
}
