/*
Theme Name: Publimenu Stack
Description: Estudio de automatización y digital — diseño "red de nodos"
Version: 3.5
Text Domain: publimenu-stack
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg:        #0A0A12;
    --bg-raised: #131320;
    --bg-card:   #16162A;
    --line:      rgba(255,255,255,0.09);

    --lime:  #C6FF3D;
    --cyan:  #29E7FF;
    --pink:  #FF3DA6;

    --text:  #F4F4FA;
    --muted: #A9A9C6;

    --display: 'Space Grotesk', sans-serif;
    --body: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: #0A0A12 !important; }
body {
    font-family: var(--body);
    background: var(--bg) !important;
    color: var(--text) !important;
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.eyebrow {
    font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--lime);
    display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }

/* ---------- Header ---------- */
.site-header {
    background: rgba(10,10,18,0.85); backdrop-filter: blur(10px);
    padding: 20px 0; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo-img { height: 34px; width: auto; display: block; }
.site-header nav { display: flex; align-items: center; gap: 30px; }
.site-header nav a {
    text-decoration: none; font-family: var(--mono); font-size: 0.82rem;
    color: var(--muted); transition: color 0.2s ease; position: relative;
}
.site-header nav a:hover { color: var(--text); }
.lang-switch { border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px !important; color: var(--text) !important; }

.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span { width: 100%; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 100px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.hero h1 {
    font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.9rem);
    line-height: 1.04; letter-spacing: -0.02em; margin-top: 16px;
}
.hero h1 .accent { color: var(--lime); }
.hero h1 .accent-2 { color: var(--cyan); }
.hero p.lede { font-size: 1.12rem; color: var(--muted); max-width: 460px; margin-top: 22px; }
.hero-actions { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }

.btn {
    font-family: var(--mono); font-weight: 500; font-size: 0.85rem; letter-spacing: 0.02em;
    padding: 14px 26px; border-radius: 6px; text-decoration: none; cursor: pointer;
    border: 1px solid transparent; display: inline-flex; align-items: center; gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--lime); color: #0A0A12; }
.btn-solid:hover { box-shadow: 0 8px 24px rgba(198,255,61,0.35); }
.btn-outline { border-color: var(--line); color: var(--text); }
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Red de nodos (SVG) ---------- */
.node-viz { width: 100%; height: auto; }
.node-viz .link {
    fill: none; stroke-width: 1.6; stroke-dasharray: 6 6;
    animation: dash-flow 3.2s linear infinite;
}
.node-viz .link.c-lime { stroke: var(--lime); opacity: 0.55; }
.node-viz .link.c-cyan { stroke: var(--cyan); opacity: 0.55; }
.node-viz .link.c-pink { stroke: var(--pink); opacity: 0.55; }
@keyframes dash-flow { to { stroke-dashoffset: -60; } }
.node-viz .node-dot { fill: var(--bg-card); stroke: var(--line); stroke-width: 1.5; }
.node-viz .node-core { fill: var(--lime); }
.node-viz .node-label {
    font-family: var(--mono); font-size: 10px; fill: var(--muted); letter-spacing: 0.03em;
}
.node-viz .node-core-label { fill: #0A0A12; font-weight: 600; font-size: 11px; }
.node-viz .pulse { fill: var(--lime); opacity: 0; animation: pulse-ping 3.2s ease-out infinite; }
.node-viz .pulse.delay1 { animation-delay: 0.6s; }
.node-viz .pulse.delay2 { animation-delay: 1.3s; }
@keyframes pulse-ping {
    0% { opacity: 0.9; r: 3; }
    70% { opacity: 0; r: 16; }
    100% { opacity: 0; r: 16; }
}

/* ---------- Servicios: "El stack" ---------- */
.stack { padding: 100px 0; border-top: 1px solid var(--line); }
.stack-head { max-width: 560px; margin-bottom: 56px; }
.stack-head h2 {
    font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    margin-top: 12px; letter-spacing: -0.01em;
}
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.stack-card {
    background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
    padding: 32px 28px; position: relative; overflow: hidden;
    opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease;
}
.stack-card.in-view { opacity: 1; transform: translateY(0); }
.stack-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.stack-card.c-lime::before { background: var(--lime); }
.stack-card.c-cyan::before { background: var(--cyan); }
.stack-card.c-pink::before { background: var(--pink); }

.stack-tag {
    font-family: var(--mono); font-size: 0.76rem; display: inline-block;
    padding: 4px 10px; border-radius: 5px; margin-bottom: 18px;
}
.c-lime .stack-tag { background: rgba(198,255,61,0.12); color: var(--lime); }
.c-cyan .stack-tag { background: rgba(41,231,255,0.12); color: var(--cyan); }
.c-pink .stack-tag { background: rgba(255,61,166,0.12); color: var(--pink); }

.stack-card h3 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; margin-bottom: 10px; }
.stack-card p { color: var(--muted); font-size: 0.96rem; }
.stack-actions { display: flex; align-items: center; gap: 20px; margin-top: 22px; flex-wrap: wrap; }
.stack-cta {
    margin-top: 0; display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--mono); font-size: 0.82rem; text-decoration: none; color: var(--text);
    background: none; border: none; cursor: pointer; padding: 0;
    transition: gap 0.2s ease, color 0.2s ease;
}
.stack-cta:hover { gap: 10px; }
.c-lime .stack-cta:hover { color: var(--lime); }
.c-cyan .stack-cta:hover { color: var(--cyan); }
.c-pink .stack-cta:hover { color: var(--pink); }
.stack-cta-demo { color: var(--muted); }
.stack-cta-demo:hover { color: var(--text); }

/* ---------- Genérico: secciones tipo "Impresos" / listados ---------- */
.section-alt { padding: 90px 0; }
.section-alt .stack-head { margin-left: auto; margin-right: auto; text-align: left; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.blog-card {
    background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
    padding: 28px; transition: border-color 0.2s ease;
}
.blog-card:hover { border-color: var(--cyan); }
.blog-card .eyebrow { font-size: 0.7rem; color: var(--cyan); }
.blog-card .eyebrow::before { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.blog-card h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin: 12px 0 10px; }
.blog-card h3 a { text-decoration: none; color: var(--text); }
.blog-card p { color: var(--muted); font-size: 0.92rem; }
.blog-card .stack-cta { margin-top: 16px; }
.pager { margin-top: 40px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.pager a { color: var(--text); text-decoration: none; }

.post-content { font-size: 1.05rem; color: #D6D6E4; }
.post-content > * + * { margin-top: 20px; }
.post-content h2 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--text); margin-top: 34px; }
.post-content h3 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: var(--text); margin-top: 28px; }
.post-content a { color: var(--cyan); }
.post-content img { max-width: 100%; height: auto; border-radius: 10px; }
.post-content ul, .post-content ol { padding-left: 22px; }
.post-content blockquote { border-left: 3px solid var(--lime); padding-left: 18px; color: var(--muted); font-style: italic; }
.post-content pre {
    background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px;
    padding: 20px; overflow-x: auto; font-family: var(--mono); font-size: 0.85rem;
    line-height: 1.7; color: var(--lime);
}
.post-content code {
    font-family: var(--mono); background: var(--bg-card); padding: 2px 6px;
    border-radius: 4px; font-size: 0.88em; color: var(--cyan);
}
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-content .use-case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 28px 0; }
@media (max-width: 620px) { .post-content .use-case-grid { grid-template-columns: 1fr; } }

/* ---------- Contacto ---------- */
.contacto { padding: 100px 0; border-top: 1px solid var(--line); }
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contacto h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-top: 12px; }
.contacto p.lede { color: var(--muted); margin-top: 16px; max-width: 420px; }

#lead-form p { margin-bottom: 20px; }
#lead-form label {
    display: block; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
#lead-form input, #lead-form textarea {
    width: 100%; background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px;
    padding: 12px 14px; font-family: var(--body); font-size: 1rem; color: var(--text);
    outline: none; transition: border-color 0.2s ease;
}
#lead-form input:focus, #lead-form textarea:focus { border-color: var(--lime); }
#lead-form textarea { resize: vertical; }
#lead-form button {
    margin-top: 6px; width: 100%; background: var(--lime); color: #0A0A12; border: none;
    padding: 15px; border-radius: 8px; font-family: var(--mono); font-weight: 600;
    font-size: 0.9rem; letter-spacing: 0.02em; cursor: pointer; transition: box-shadow 0.2s ease;
}
#lead-form button:hover { box-shadow: 0 8px 24px rgba(198,255,61,0.3); }
#lead-status { font-family: var(--mono); font-size: 0.85rem; margin-top: 14px; color: var(--lime); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.site-footer p { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }

/* Marco de celular para demos en vivo (single-servicio.php) */
.phone-frame {
    width: 300px; max-width: 100%; margin: 0 auto;
    background: linear-gradient(160deg, #23233a, #0A0A12);
    border-radius: 32px; padding: 14px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(198,255,61,0.22);
}
.phone-frame .notch { width: 70px; height: 6px; border-radius: 3px; background: rgba(198,255,61,0.35); margin: 0 auto 10px; }
.phone-frame iframe { width: 100%; height: 560px; border: 0; border-radius: 18px; background: #fff; display: block; }

/* Miniatura clicable dentro de la tarjeta de servicio */
.stack-card { padding-top: 0; overflow: hidden; }
.stack-card-thumb {
    display: block; margin: 0 -28px 20px; aspect-ratio: 16 / 10; overflow: hidden;
}
.stack-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.stack-card-thumb:hover img { transform: scale(1.04); }
.stack-card > .stack-tag,
.stack-card > h3,
.stack-card > p,
.stack-card > .stack-actions { padding-left: 28px; padding-right: 28px; }
.stack-card > .stack-tag { margin-top: 24px; }
.stack-card > .stack-actions { padding-bottom: 28px; }
.stack-card:not(.has-thumb) > .stack-tag { margin-top: 0; }
.stack-card:not(.has-thumb) { padding-top: 32px; }

/* Banner grande en la página propia del servicio */
.servicio-hero-img {
    border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
    box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}
.servicio-hero-img.c-lime { box-shadow: 0 30px 70px rgba(198,255,61,0.12), 0 0 0 1px rgba(198,255,61,0.25); }
.servicio-hero-img.c-cyan { box-shadow: 0 30px 70px rgba(41,231,255,0.12), 0 0 0 1px rgba(41,231,255,0.25); }
.servicio-hero-img.c-pink { box-shadow: 0 30px 70px rgba(255,61,166,0.12), 0 0 0 1px rgba(255,61,166,0.25); }
.servicio-hero-img img { width: 100%; height: auto; display: block; }

/* ---------- Responsive ---------- */
/* Honeypot: oculto para humanos, "visible" para bots que no leen CSS */
.hp-field {
    position: absolute; left: -9999px; top: -9999px;
    width: 1px; height: 1px; overflow: hidden;
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .stack-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .contacto-grid { grid-template-columns: 1fr; gap: 40px; }
    .servicio-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 620px) {
    /* backdrop-filter en el header rompe position:fixed de los hijos (crea un
       "containing block" nuevo) — se desactiva en móvil para que el menú
       desplegado cubra toda la pantalla en vez de quedar aplastado en la barra. */
    .site-header { backdrop-filter: none; background: var(--bg); }

    .nav-toggle { display: flex; }
    .site-header nav {
        position: fixed; top: 73px; left: 0; right: 0; bottom: 0;
        background: var(--bg); flex-direction: column; align-items: flex-start;
        padding: 30px 28px; gap: 22px; transform: translateX(100%);
        transition: transform 0.25s ease; z-index: 49;
    }
    .site-header nav.is-open { transform: translateX(0); }
    .site-header nav a { font-size: 1.1rem; color: var(--text); }
}
