/* ═══════════════════════════════════════════════════════
   NarakaStudio — Master CSS v1.0
   Base compartida para TODAS las plantillas N1
   ═══════════════════════════════════════════════════════ */

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

/* ── CSS Variables (overrideable por cada plantilla) ──── */
:root {
    --color-bg: #0a0a0a;
    --color-bg-alt: #121212;
    --color-surface: #1a1a1a;
    --color-border: rgba(255,255,255,0.08);
    --color-text: #e0e0e0;
    --color-text-muted: #8b949e;
    --color-accent: #6366f1;
    --color-accent-glow: rgba(99,102,241,0.4);
    --color-whatsapp: #25d366;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Montserrat', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Roboto Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 25px 50px rgba(0,0,0,0.6);

    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Typography ───────────────────────────────────────── */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--color-accent) 80%, white);
}

/* ── Container ────────────────────────────────────────── */
.nk-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Scroll Reveal Animations ─────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* ── Navbar Base ──────────────────────────────────────── */
.nk-navbar {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-base);
}

.nk-navbar.scrolled {
    padding: 12px 0;
    background: rgba(10,10,10,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--color-border);
}

.nk-navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nk-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.nk-nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    list-style: none;
}

.nk-nav-links a {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.nk-nav-links a:hover {
    color: var(--color-accent);
}

/* Mobile menu button */
.nk-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

/* Mobile menu */
.nk-mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10,10,10,0.96);
    backdrop-filter: blur(20px);
    padding: 16px 24px 24px;
    border-top: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
}

.nk-mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nk-mobile-menu a {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

/* ── Buttons ──────────────────────────────────────────── */
.nk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.nk-btn-primary {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--color-accent-glow);
}

.nk-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--color-accent-glow);
}

.nk-btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.2);
}

.nk-btn-outline:hover {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.05);
}

.nk-btn-whatsapp {
    background: var(--color-whatsapp);
    color: #fff;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
}

.nk-btn-whatsapp:hover {
    background: #1da851;
    box-shadow: 0 8px 30px rgba(37,211,102,0.5);
    transform: translateY(-2px);
}

/* ── Glass Card ───────────────────────────────────────── */
.nk-glass {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.nk-glass:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ── Section base ─────────────────────────────────────── */
.nk-section {
    padding: 96px 0;
    position: relative;
}

.nk-section-header {
    text-align: center;
    margin-bottom: 64px;
}

.nk-section-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    display: block;
}

.nk-section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 16px;
}

.nk-section-divider {
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 24px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 12px var(--color-accent-glow);
}

/* ── WhatsApp Float Button ────────────────────────────── */
.nk-whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    background: var(--color-whatsapp);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(37,211,102,0.4);
    z-index: 9999;
    transition: all var(--transition-base);
    animation: nk-pulse-wpp 2s infinite;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.nk-whatsapp-float:hover {
    transform: scale(1.1) rotate(-8deg);
    box-shadow: 0 8px 24px rgba(37,211,102,0.6);
}

.nk-whatsapp-float svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

@keyframes nk-pulse-wpp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ── Footer Obligatorio NarakaStudio ──────────────────── */
.nk-footer {
    background: #000;
    padding: 48px 0 24px;
    border-top: 1px solid var(--color-border);
    position: relative;
}

.nk-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.nk-footer-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
}

.nk-footer-text {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.nk-footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.nk-footer-socials a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.nk-footer-socials a:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

.nk-footer-bottom {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nk-footer-copyright {
    color: rgba(255,255,255,0.25);
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

/* Link discreto a NarakaStudio — OBLIGATORIO en toda plantilla N1 */
.nk-footer-credit {
    color: rgba(255,255,255,0.15);
    font-size: 0.65rem;
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nk-footer-credit:hover {
    color: rgba(255,255,255,0.4);
}

/* ── Utility: Counter Animation ───────────────────────── */
.nk-counter {
    font-family: var(--font-heading);
    font-weight: 900;
}

/* ── Utility: Progress Bar ────────────────────────────── */
.nk-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.nk-progress-bar {
    height: 100%;
    width: 0;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
    .nk-nav-links { display: none; }
    .nk-menu-btn { display: block; }

    .nk-section { padding: 64px 0; }
    .nk-section-title { font-size: clamp(1.6rem, 6vw, 2.4rem); }

    .nk-footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .nk-whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 20px;
        right: 20px;
    }

    .nk-whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .nk-container { padding: 0 16px; }
}

/* ── JS Init Script (inline at bottom of HTML) ────────── */
/*
  Incluir en cada plantilla:

  <script>
  document.addEventListener('DOMContentLoaded', () => {
    // Navbar scroll
    const nav = document.querySelector('.nk-navbar');
    if (nav) {
      window.addEventListener('scroll', () => {
        nav.classList.toggle('scrolled', window.scrollY > 50);
      });
    }

    // Mobile menu
    const btn = document.querySelector('.nk-menu-btn');
    const menu = document.querySelector('.nk-mobile-menu');
    if (btn && menu) {
      btn.addEventListener('click', () => menu.classList.toggle('open'));
      menu.querySelectorAll('a').forEach(a =>
        a.addEventListener('click', () => menu.classList.remove('open'))
      );
    }

    // Scroll reveal
    const obs = new IntersectionObserver((entries) => {
      entries.forEach(e => {
        if (e.isIntersecting) {
          e.target.classList.add('active');
          obs.unobserve(e.target);
        }
      });
    }, { threshold: 0.08 });

    document.querySelectorAll('.reveal,.reveal-left,.reveal-right')
      .forEach(el => obs.observe(el));

    // Footer year
    const y = document.getElementById('nk-year');
    if (y) y.textContent = new Date().getFullYear();
  });
  </script>
*/
