/* =========================================================
   NMFT STUDIO — SITE.CSS
   Base compartida entre index.html y todo /blog/.
   Extraído 1:1 del sistema visual del home (tokens, header,
   cosmos, botones, footer, reveal-on-scroll) para que el
   blog se sienta parte del mismo sitio, no un anexo.
   ========================================================= */

/* ================= VARIABLES & RESET ================= */
:root {
  --bg: #05070a;
  --bg-alt: #0d1116;
  --panel: rgba(11, 15, 19, 0.82);
  --panel-solid: #0b0f13;
  --ink: #edeef0;
  --muted: #939ba5;
  --gold: #c9a15c;
  --teal: #3fa7a0;
  --fluor: #ff4fa0;
  --fluor-dim: rgba(255, 79, 160, 0.14);
  --line: rgba(237, 238, 240, 0.10);
  --line-strong: rgba(237, 238, 240, 0.22);

  /* Acentos nuevos, solo para taxonomía del blog.
     Misma saturación/luminosidad que gold/teal/fluor
     para no romper la paleta original. */
  --sky: #4fb0ff;
  --sky-dim: rgba(79, 176, 255, 0.14);
  --violet: #8b7cf6;
  --violet-dim: rgba(139, 124, 246, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: 'Inter', sans-serif; line-height: 1.5; overflow-x: hidden; }
::selection { background: var(--fluor); color: #05070a; }

h1, h2, h3 { font-family: 'Unbounded', sans-serif; letter-spacing: -0.01em; font-weight: 700; line-height: 1.12; }
.mono { font-family: 'JetBrains Mono', monospace; }
.upper { text-transform: uppercase; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}
.eyebrow .blip { width: 6px; height: 6px; border-radius: 50%; background: var(--fluor); box-shadow: 0 0 0 4px var(--fluor-dim); }

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

section { position: relative; z-index: 1; padding: 100px clamp(20px, 6vw, 64px); border-top: 1px solid var(--line); }
section:first-of-type { border-top: none; }

.wrap { max-width: 1120px; margin: 0 auto; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1rem; max-width: 52ch; }

/* ================= BOTONES ================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px;
  border: 1px solid var(--gold); color: var(--gold);
  font-family: 'JetBrains Mono', monospace; font-size: 0.76rem; letter-spacing: 0.04em;
  text-transform: uppercase; border-radius: 2px; transition: all .2s ease; white-space: nowrap;
  cursor: pointer; background: transparent;
}
.btn:hover { background: var(--gold); color: #05070a; }
.btn.solid { background: var(--gold); color: #05070a; }
.btn.solid:hover { background: transparent; color: var(--gold); }
.btn.fluor { border-color: var(--fluor); color: var(--fluor); }
.btn.fluor:hover { background: var(--fluor); color: #05070a; }

/* ================= HEADER ================= */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding: 0 clamp(20px, 5vw, 56px);
  background: linear-gradient(to bottom, rgba(5,7,10,0.92), rgba(5,7,10,0.6) 70%, transparent);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.logo { font-family: 'Unbounded', sans-serif; font-weight: 900; font-size: 1.05rem; display: flex; align-items: center; gap: 9px; }
.logo .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(201,161,92,0.15); }
.header-nav { display: flex; align-items: center; gap: 26px; }
.header-links { display: flex; gap: 22px; font-family: 'JetBrains Mono', monospace; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.header-links a { transition: color .2s ease; }
.header-links a:hover, .header-links a.active { color: var(--ink); }
@media(max-width: 768px){ .header-links { display: none; } }

/* ================= COSMOS BACKGROUND ================= */
.cosmos { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.stars span { position: absolute; width: 2px; height: 2px; background: #fff; border-radius: 50%; opacity: .5; animation: twinkle linear infinite; }
@keyframes twinkle { 0%, 100% { opacity: .12; } 50% { opacity: .75; } }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .14; }
.glow.g1 { width: 520px; height: 520px; top: -160px; right: -160px; background: var(--teal); }
.glow.g2 { width: 420px; height: 420px; bottom: 8%; left: -140px; background: var(--fluor); opacity: .06; }

/* ================= FOOTER ================= */
footer { padding: 40px clamp(20px, 5vw, 56px); border-top: 1px solid var(--line); font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img {
  width: 34px; height: 34px; border-radius: 50%;
  filter: drop-shadow(0 0 6px rgba(255,79,160,0.35)) drop-shadow(0 0 10px rgba(139,124,246,0.25));
  transition: filter .3s ease, transform .3s ease;
}
.footer-brand:hover img { transform: scale(1.08) rotate(-4deg); filter: drop-shadow(0 0 10px rgba(255,79,160,0.55)) drop-shadow(0 0 16px rgba(139,124,246,0.4)); }
.footer-address { opacity: 0.75; }
.footer-address a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ================= REVEAL ON SCROLL ================= */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(0.16, 1, 0.3, 1), transform .6s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .stars span { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================= HERO COLOR WASH (Discord-style) ================= */
.hero-wash {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 90% 55% at 50% -20%,
    rgba(139, 124, 246, 0.8) 0%,
    rgba(139, 124, 246, 0.4) 25%,
    rgba(139, 124, 246, 0.12) 50%,
    transparent 75%);
  transition: opacity .5s ease;
}
.hero-wash.faded { opacity: 0; }

/* ================= NAV DROPDOWN (Consultoría) ================= */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.nav-caret {
  font-size: 0.65em;
  opacity: 0.6;
  transition: transform .2s ease, opacity .2s ease;
  display: inline-block;
}
.nav-dropdown:hover .nav-caret,
.nav-dropdown:focus-within .nav-caret {
  transform: rotate(180deg);
  opacity: 1;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  min-width: 190px;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  z-index: 300;
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 6px;
  background: var(--line-strong);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.nav-dropdown-menu::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 5px;
  background: var(--panel-solid);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px 18px;
  transition: color .15s ease, background .15s ease;
  white-space: nowrap;
}
.nav-dropdown-menu a:first-child {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.nav-dropdown-menu a:hover { color: var(--ink); background: rgba(255,255,255,0.03); }
