/* ─────────────────────────────────────────
   BASE.CSS · TrueTax
   Tokens, reset, nav, drawer, footer
   Compartido por todas las páginas
   ───────────────────────────────────────── */

/* CRITICAL — drawer oculto antes de cualquier stylesheet externo */
#nav-drawer-overlay,
#nav-drawer { display: none !important; }
#nav-drawer-overlay.open { display: block !important; }
#nav-drawer.open { display: flex !important; }


  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --bg:      #0B1120;
    --surface: #111827;
    --diag:    #161D2E;
    --text:    #F9FAFB;
    --muted:   #9CA3AF;
    --subtle:  #6B7280;
    --green:   #10B981;
    --accent:  #3B82F6;
    --line:    rgba(255,255,255,0.10);
  }
  html { scroll-behavior: smooth; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  
/* ── FONDO NEBULOSA ── */
  .bg-canvas {
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none; overflow: hidden;
  }
  .bg-orb {
    position: absolute; border-radius: 50%;
    filter: blur(120px); will-change: transform;
  }
  .orb-1 {
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(30,58,95,0.55) 0%, transparent 70%);
    top: -200px; left: -150px;
    animation: orbDrift1 18s ease-in-out infinite;
  }
  .orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(14,165,233,0.08) 0%, transparent 70%);
    top: 40vh; right: -100px;
    animation: orbDrift2 22s ease-in-out infinite;
  }
  .orb-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(59,130,246,0.10) 0%, transparent 70%);
    bottom: 20vh; left: 20%;
    animation: orbDrift3 26s ease-in-out infinite;
  }
  @keyframes orbDrift1 {
    0%,100% { transform: translate(0,0) scale(1); }
    50%      { transform: translate(80px, 60px) scale(1.08); }
  }
  @keyframes orbDrift2 {
    0%,100% { transform: translate(0,0) scale(1); }
    50%      { transform: translate(-60px, 80px) scale(0.92); }
  }
  @keyframes orbDrift3 {
    0%,100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(40px,-40px) scale(1.05); }
    66%      { transform: translate(-30px, 30px) scale(0.97); }
  }
  .bg-canvas::after {
    content: '';
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.4;
  }

  
/* ── NAV FLOTANTE ── */
  nav {
    position: fixed; top: 20px; left: 20px; z-index: 202;
  }
  .nav-open {
    display: flex; align-items: center; gap: 0.75rem;
  }
  .nav-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #3B82F6;
    flex-shrink: 0;
  }
  .nav-brand {
    display: flex; align-items: center; gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.85); text-decoration: none;
    transition: color 0.2s;
  }
  .nav-brand:hover { color: #fff; }
  .nav-burger {
    display: flex; flex-direction: column; justify-content: center;
    align-items: center; gap: 5px;
    width: 28px; height: 28px;
    background: none; border: none; cursor: pointer; padding: 0;
    flex-shrink: 0;
  }
  .nav-burger span {
    display: block; width: 18px; height: 1.5px;
    background: rgba(255,255,255,0.9);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s;
    transform-origin: center;
  }
  .nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  
/* ── DRAWER ── */
  #nav-drawer-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55); z-index: 200;
    opacity: 0;
    transition: opacity 0.25s;
  }
  #nav-drawer-overlay.open {
    display: block !important;
    opacity: 1;
  }

  #nav-drawer {
    display: none;
    position: fixed; top: 0; left: 0;
    width: min(320px, 80vw); height: 100%;
    background: #111827; z-index: 201;
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
  }
  #nav-drawer.open {
    display: flex !important;
    transform: translateX(0);
  }

  @media (max-width: 767px) { #nav-drawer { width: 100%; } }

  .drawer-group      { margin-bottom: 1.75rem; }
  .drawer-group-label {
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: rgba(255,255,255,0.3);
    margin-bottom: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
  }
  .drawer-link {
    display: block; font-size: 0.85rem; font-weight: 500;
    color: rgba(255,255,255,0.6); text-decoration: none;
    padding: 0.45rem 0; transition: color 0.2s;
  }
  .drawer-link:hover { color: #fff; }
  .drawer-divider {
    height: 1px; background: rgba(255,255,255,0.07);
    margin-bottom: 1.75rem;
  }

  .page {
    position: relative; z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 64px 24px 64px;
    min-height: 100vh;
  }

  
/* ── FOOTER ── */
  .site-footer {
    position: relative; z-index: 1;
    background: #0D1421;
    border-top: 1px solid var(--line);
  }
  .footer-inner {
    max-width: 680px;
    margin: 0 auto;
    padding: 56px 24px 40px;
    display: flex; flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-top-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    cursor: pointer;
    color: var(--muted);
    margin-bottom: 36px;
    transition: border-color 0.2s, color 0.2s;
    text-decoration: none;
  }
  .footer-top-btn:hover { border-color: var(--accent); color: var(--accent); }
  .footer-top-btn svg { width: 16px; height: 16px; }
  .footer-logo {
    display: flex; flex-direction: column;
    align-items: center; gap: 6px;
    margin-bottom: 32px;
  }
  .footer-logo-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text);
  }
  .footer-logo-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--accent);
  }
  .footer-socials {
    display: flex; gap: 12px;
    margin-bottom: 32px;
  }
  .footer-social-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    color: rgba(255,255,255,0.55);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
  }
  .footer-social-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(59,130,246,0.06);
  }
  .footer-social-btn svg { width: 17px; height: 17px; fill: currentColor; display: block; }
  .footer-contact {
    display: flex; flex-direction: column;
    gap: 12px; margin-bottom: 32px;
    align-items: center;
  }
  .footer-contact-item {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; font-size: 14px;
    color: rgba(255,255,255,0.60);
    text-decoration: none; transition: color 0.2s; line-height: 1.4;
    text-align: center;
  }
  .footer-contact-item.multiline {
    align-items: center;
    text-align: center;
    justify-content: center;
    max-width: 300px;
  }
  .footer-contact-item.multiline svg {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 3px;
  }
  a.footer-contact-item:hover { color: var(--text); }
  .footer-contact-item svg {
    width: 15px; height: 15px; flex-shrink: 0;
    stroke: rgba(255,255,255,0.40);
    transition: stroke 0.2s;
  }
  a.footer-contact-item:hover svg { stroke: var(--accent); }
  .footer-divider {
    width: 100%; height: 1px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 24px;
  }
  .footer-copy {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.50);
    line-height: 1.7;
    margin-bottom: 6px;
  }
  .footer-credits {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; letter-spacing: 0.06em;
    color: rgba(255,255,255,0.35);
    line-height: 1.6;
    text-align: center;
  }

  @media (min-width: 768px) {
    .footer-inner { padding: 64px 40px 48px; }
  }

  @media (min-width: 768px) {
    .footer-inner { padding: 64px 40px 48px; }
  }
