/* ===== NUMEROS BINARIOS - Shared Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,500;0,9..40,700;1,9..40,300&display=swap');

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

:root {
  --bg:        #0a0e1a;
  --bg2:       #111827;
  --bg3:       #1a2235;
  --accent:    #00e5a0;
  --accent2:   #0af;
  --text:      #e8edf5;
  --muted:     #7a8ba3;
  --border:    rgba(0,229,160,0.15);
  --border2:   rgba(0,170,255,0.15);
  --card-bg:   rgba(255,255,255,0.03);
  --font-mono: 'Space Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
  --radius:    12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background grid pattern ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,160,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,160,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Glow orbs ── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}
.orb-1 { width: 600px; height: 600px; background: var(--accent); top: -200px; right: -100px; }
.orb-2 { width: 500px; height: 500px; background: var(--accent2); bottom: -150px; left: -100px; }

/* ── Layout ── */
.site-wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / Nav ── */
.site-header {
  padding: 28px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 700;
  color: #0a0e1a;
  letter-spacing: -1px;
  flex-shrink: 0;
}

.logo-text {
  display: flex; flex-direction: column;
  line-height: 1.1;
}
.logo-text strong {
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.logo-text span {
  font-size: 11px; color: var(--muted); letter-spacing: 2px; text-transform: uppercase;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--muted); opacity: 0.5; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 64px 0 48px;
}
.hero-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0,229,160,0.08);
  border: 1px solid rgba(0,229,160,0.2);
  border-radius: 40px; padding: 5px 16px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 16px;
}
.hero h1 .highlight {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px; color: var(--muted); max-width: 580px; margin: 0 auto 36px;
}

/* ── Converter cards ── */
.converters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 600px) { .converters { grid-template-columns: 1fr; } }

.converter-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  backdrop-filter: blur(10px);
  transition: border-color .3s, transform .3s;
}
.converter-card:hover { border-color: rgba(0,229,160,0.35); transform: translateY(-2px); }
.converter-card.blue-card { border-color: var(--border2); }
.converter-card.blue-card:hover { border-color: rgba(0,170,255,0.35); }

.converter-card h2 {
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}
.converter-card.blue-card h2 { color: var(--accent2); }

.input-group { display: flex; flex-direction: column; gap: 12px; }
.nb-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 18px; color: #fff;
  outline: none;
  transition: border-color .2s;
}
.nb-input:focus { border-color: var(--accent); }
.blue-card .nb-input:focus { border-color: var(--accent2); }
.nb-input::placeholder { color: var(--muted); font-size: 14px; }

.nb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
  border: none; cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #00c87a);
  color: #0a0e1a;
}
.nb-btn:hover { opacity: 0.9; transform: scale(1.02); }
.nb-btn.blue { background: linear-gradient(135deg, var(--accent2), #0080cc); color: #fff; }

/* ── Result display ── */
.result-box {
  background: rgba(0,229,160,0.06);
  border: 1px solid rgba(0,229,160,0.2);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  margin: 32px 0;
}
.result-box.blue-result {
  background: rgba(0,170,255,0.06);
  border-color: rgba(0,170,255,0.2);
}
.result-label {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
  font-family: var(--font-mono);
}
.result-number {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -2px;
  word-break: break-all;
  line-height: 1.1;
}
.result-box.blue-result .result-number { color: var(--accent2); }
.result-desc {
  font-size: 15px; color: var(--muted); margin-top: 12px;
}
.result-desc strong { color: var(--text); }

/* ── Info section ── */
.info-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 32px 0;
}
.info-section h2 {
  font-family: var(--font-mono);
  font-size: 18px; color: var(--accent);
  margin-bottom: 16px; letter-spacing: -0.5px;
}
.info-section p { color: var(--muted); margin-bottom: 12px; }
.info-section p:last-child { margin-bottom: 0; }
.info-section strong { color: var(--text); }

/* ── Steps (conversion explanation) ── */
.steps { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.step {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px; padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.05);
}
.step-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: rgba(0,229,160,0.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent); font-weight: 700;
}
.step p { font-size: 14px; color: var(--muted); margin: 0; }
.step p strong { color: var(--text); }

/* ── Navigation links (prev/next) ── */
.nav-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin: 32px 0;
}
@media (max-width: 500px) { .nav-links { grid-template-columns: 1fr; } }

.nav-col h3 {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}

.nav-link {
  display: block;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all .2s;
  margin-bottom: 6px;
}
.nav-link:hover {
  background: rgba(0,229,160,0.07);
  border-color: rgba(0,229,160,0.2);
}

/* ── Quick links grid ── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.quick-link {
  display: block; text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px; color: var(--accent);
  transition: all .2s;
  text-align: center;
}
.quick-link:hover {
  background: rgba(0,229,160,0.07);
  border-color: rgba(0,229,160,0.3);
  transform: translateY(-1px);
}
.quick-link.blue { color: var(--accent2); border-color: var(--border2); }
.quick-link.blue:hover { background: rgba(0,170,255,0.07); border-color: rgba(0,170,255,0.3); }

/* ── Ad slots ── */
.ad-slot {
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.ad-slot-banner { width: 100%; min-height: 90px; margin: 24px 0; }
.ad-slot-box { width: 100%; max-width: 336px; min-height: 280px; margin: 0 auto 24px; }
.ad-slot-rect { width: 100%; max-width: 300px; min-height: 250px; margin: 0 auto; }

/* ── Section title ── */
.section-title {
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ── Footer ── */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--muted);
  font-family: var(--font-mono);
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* ── Bit visualization ── */
.bits-display {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center; margin: 20px 0;
}
.bit {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 18px; font-weight: 700;
  transition: all .3s;
}
.bit-1 { background: rgba(0,229,160,0.2); color: var(--accent); border: 1px solid rgba(0,229,160,0.4); }
.bit-0 { background: rgba(255,255,255,0.03); color: var(--muted); border: 1px solid rgba(255,255,255,0.08); }

/* ── Validation ── */
.field-error { color: #ff6b6b; font-size: 12px; margin-top: 4px; display: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-header { padding: 16px 0 0; }
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 1.8rem; }
  .info-section { padding: 20px; }
  .result-box { padding: 24px 16px; }
}
