/* ============================================
   HERO - JAVIER FERRANDO PÉREZ
   base rem = 10px (Ghost 62.5%)
   ============================================ */

.jf-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #070b14;
    overflow: hidden;
}
#neural-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}
.jf-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 3rem;
    max-width: 1000px;
    width: 100%;
}
.jf-hero-eyebrow {
    font-size: 1.3rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #00d4ff;
    margin: 0 0 2.5rem;
    opacity: 0;
    animation: jf-fade-up 0.6s ease 0.3s forwards;
}

/* ---- NAME ---- */
.jf-hero-name {
    margin: 0 0 2.5rem;
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.08em;
}

/* JAVIER - outline enorme */
.jf-name-first {
    font-size: clamp(6rem, 18vw, 14rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 2px #ffffff;
    position: relative;
    opacity: 0;
    animation: jf-fade-up 0.7s ease 0.5s forwards;
    line-height: 1;
}
.jf-name-first::before,
.jf-name-first::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; right: 0;
    pointer-events: none;
}
.jf-name-first::before {
    -webkit-text-stroke: 2px #00d4ff;
    color: transparent;
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
    animation: jf-glitch-1 6s infinite steps(1) 3s;
    opacity: 0;
}
.jf-name-first::after {
    -webkit-text-stroke: 2px #ff006e;
    color: transparent;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    animation: jf-glitch-2 6s infinite steps(1) 3s;
    opacity: 0;
}

/* FERRANDO PÉREZ - sólido */
.jf-name-last {
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
    position: relative;
    opacity: 0;
    animation: jf-fade-up 0.7s ease 0.7s forwards;
    line-height: 1;
}
.jf-name-last::before,
.jf-name-last::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; right: 0;
    pointer-events: none;
}
.jf-name-last::before {
    color: #00d4ff;
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
    animation: jf-glitch-1 6s infinite steps(1) 3.1s;
    opacity: 0;
}
.jf-name-last::after {
    color: #ff006e;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    animation: jf-glitch-2 6s infinite steps(1) 3.1s;
    opacity: 0;
}

@keyframes jf-glitch-1 {
    0%,88%,100% { transform: translateX(0); opacity: 0; }
    89%  { transform: translateX(-5px); opacity: 1; }
    90%  { transform: translateX(5px);  opacity: 0; }
    91%  { transform: translateX(-3px); opacity: 1; }
    92%  { transform: translateX(0);    opacity: 0; }
}
@keyframes jf-glitch-2 {
    0%,88%,100% { transform: translateX(0); opacity: 0; }
    89%  { transform: translateX(5px);  opacity: 1; }
    90%  { transform: translateX(-5px); opacity: 0; }
    91%  { transform: translateX(3px);  opacity: 1; }
    92%  { transform: translateX(0);    opacity: 0; }
}

/* ---- TYPEWRITER ---- */
.jf-hero-typed-wrap {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #00d4ff;
    font-family: "Courier New", monospace;
    letter-spacing: 0.06em;
    min-height: 4rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: jf-fade-up 0.6s ease 0.9s forwards;
}
.jf-cursor {
    animation: jf-blink 0.8s step-end infinite;
    color: #00d4ff;
}
@keyframes jf-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ---- KEYWORDS ---- */
.jf-hero-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
    margin-bottom: 4rem;
}
.jf-kw {
    padding: 0.9rem 1.8rem;
    border: 1px solid rgba(0,212,255,0.4);
    color: rgba(255,255,255,0.85);
    font-size: 1.35rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(0,212,255,0.04);
    opacity: 0;
    animation: jf-fade-up 0.5s ease forwards;
    cursor: default;
}
.jf-kw:nth-child(1) { animation: jf-fade-up .5s ease 1.1s  forwards, kw-cyan    3s ease-in-out 2.5s infinite; }
.jf-kw:nth-child(2) { animation: jf-fade-up .5s ease 1.25s forwards, kw-magenta 4s ease-in-out 2.8s infinite; }
.jf-kw:nth-child(3) { animation: jf-fade-up .5s ease 1.4s  forwards, kw-flash   5s ease        3.2s infinite; }
.jf-kw:nth-child(4) { animation: jf-fade-up .5s ease 1.55s forwards, kw-sweep   4.5s ease-in-out 3.5s infinite; }
.jf-kw:nth-child(5) { animation: jf-fade-up .5s ease 1.7s  forwards, kw-shake   6s ease        2.2s infinite; }
.jf-kw:nth-child(6) { animation: jf-fade-up .5s ease 1.85s forwards, kw-green   5s ease-in-out 3s   infinite; }

@keyframes kw-cyan    { 0%,100%{border-color:rgba(0,212,255,.4);box-shadow:none;color:rgba(255,255,255,.85)}50%{border-color:#00d4ff;box-shadow:0 0 16px rgba(0,212,255,.7);color:#fff} }
@keyframes kw-magenta { 0%,100%{border-color:rgba(0,212,255,.4);color:rgba(255,255,255,.85);box-shadow:none}45%,55%{border-color:#ff006e;color:#ff006e;box-shadow:0 0 14px rgba(255,0,110,.6)} }
@keyframes kw-flash   { 0%,100%{opacity:1;border-color:rgba(0,212,255,.4)}8%{opacity:.1;border-color:#fff}14%{opacity:1;border-color:rgba(0,212,255,.4)}20%{opacity:.1;border-color:#fff}26%{opacity:1} }
@keyframes kw-sweep   { 0%,100%{background:rgba(0,212,255,.04);color:rgba(255,255,255,.85);box-shadow:none}45%,55%{background:rgba(0,212,255,.2);color:#fff;box-shadow:0 0 18px rgba(0,212,255,.4)} }
@keyframes kw-shake   { 0%,100%{transform:translateX(0);border-color:rgba(0,212,255,.4);box-shadow:none}6%{transform:translateX(-3px);border-color:#fff;box-shadow:0 0 8px rgba(255,255,255,.5)}12%{transform:translateX(3px)}18%{transform:translateX(-2px)}24%{transform:translateX(0);border-color:rgba(0,212,255,.4);box-shadow:none} }
@keyframes kw-green   { 0%,100%{border-color:rgba(0,212,255,.4);color:rgba(255,255,255,.85);box-shadow:none}50%{border-color:#00ffa0;color:#00ffa0;box-shadow:0 0 16px rgba(0,255,160,.5)} }

/* ---- CTA ---- */
.jf-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.4rem 3.2rem;
    border: 1px solid #00d4ff;
    color: #00d4ff;
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
    opacity: 0;
    animation: jf-fade-up 0.5s ease 2.2s forwards;
}
.jf-cta::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: #00d4ff;
    transition: left 0.3s ease;
    z-index: 0;
}
.jf-cta span, .jf-cta svg { position: relative; z-index: 1; }
.jf-cta:hover { color: #070b14; }
.jf-cta:hover::before { left: 0; }

/* ---- SCROLL HINT ---- */
.jf-scroll-hint {
    position: absolute;
    bottom: 3rem; left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    animation: jf-fade-up 0.5s ease 2.6s forwards;
}
.jf-scroll-mouse {
    width: 2.6rem; height: 4.2rem;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 1.3rem;
    position: relative; margin: 0 auto;
}
.jf-scroll-dot {
    width: 4px; height: 8px;
    background: #00d4ff; border-radius: 2px;
    position: absolute; top: 6px; left: 50%;
    transform: translateX(-50%);
    animation: jf-scroll-anim 1.8s ease infinite;
}
@keyframes jf-scroll-anim {
    0%   { transform: translateX(-50%) translateY(0);    opacity: 1; }
    100% { transform: translateX(-50%) translateY(1.6rem); opacity: 0; }
}
@keyframes jf-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* header oscuro en homepage */
body.jf-home #gh-head { background: #070b14 !important; }
body.jf-home.is-head-open #gh-head { background: #0d1220 !important; }

/* ---- MOBILE ---- */
@media (max-width: 767px) {
    .jf-hero-content { padding: 0 2rem; }
    .jf-hero-eyebrow { font-size: 1.2rem; letter-spacing: 0.2em; margin-bottom: 2rem; }
    .jf-hero-name { gap: 0.06em; margin-bottom: 2rem; }
    .jf-name-first { font-size: clamp(5.5rem, 20vw, 9rem); -webkit-text-stroke-width: 1.5px; letter-spacing: 0.1em; }
    .jf-name-last  { font-size: clamp(2rem, 5.5vw, 3.5rem); letter-spacing: 0.08em; }
    .jf-hero-typed-wrap { font-size: clamp(1.6rem, 4.5vw, 2.4rem); min-height: 3.5rem; margin-bottom: 2.5rem; }
    .jf-hero-keywords { gap: 1rem; margin-bottom: 3rem; }
    .jf-kw { font-size: 1.2rem; padding: 0.8rem 1.4rem; }
    .jf-cta { font-size: 1.3rem; padding: 1.2rem 2.6rem; }
    .jf-scroll-hint { bottom: 2rem; }
}
@media (max-width: 480px) {
    .jf-name-first { font-size: clamp(5rem, 22vw, 7rem); }
    .jf-name-last  { font-size: clamp(1.8rem, 5vw, 2.8rem); }
    .jf-kw { font-size: 1.1rem; padding: 0.7rem 1.2rem; }
}

/* ============================================
   FOOTER ESPECTACULAR
   ============================================ */

.jf-foot {
    background: #070b14;
    position: relative;
    padding: 6rem 0 3rem;
    overflow: hidden;
}
.jf-foot::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 300%; height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, #ff006e, #00ffa0, #00d4ff, transparent);
    animation: jf-border-slide 4s linear infinite;
}
@keyframes jf-border-slide {
    0%   { left: -100%; }
    100% { left: 0%; }
}
.jf-foot-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 4vw;
    text-align: center;
}
.jf-foot-name-wrap {
    margin-bottom: 2rem;
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.06em;
}
.jf-foot-first {
    font-size: clamp(3.5rem, 9vw, 8rem);
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255,255,255,0.5);
    text-decoration: none;
    display: block;
    transition: -webkit-text-stroke-color 0.3s;
    line-height: 1;
}
.jf-foot-first:hover { -webkit-text-stroke-color: #00d4ff; }
.jf-foot-last {
    font-size: clamp(1.6rem, 3.5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    line-height: 1;
}
.jf-foot-tagline {
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    color: rgba(0,212,255,0.8);
    letter-spacing: 0.05em;
    margin-bottom: 3rem;
    font-style: italic;
}
.jf-foot-social {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}
.jf-foot-social a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 1.3rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s, transform 0.3s;
    padding: 1rem 2rem;
    border: 1px solid rgba(255,255,255,0.1);
}
.jf-foot-social a:hover {
    color: #00d4ff;
    border-color: rgba(0,212,255,0.4);
    transform: translateY(-2px);
}
.jf-foot-social svg { flex-shrink: 0; }
.jf-foot-divider {
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.3), transparent);
    margin-bottom: 2.5rem;
}
.jf-foot-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.jf-foot-nav li, .jf-foot-nav ol, .jf-foot-nav ul { list-style: none; margin: 0; padding: 0; }
.jf-foot-nav .nav { display: flex; flex-wrap: wrap; gap: 0.5rem 3rem; }
.jf-foot-nav a {
    color: rgba(255,255,255,0.45);
    font-size: 1.4rem;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.3s;
}
.jf-foot-nav a:hover { color: #fff; }
.jf-foot-copy { font-size: 1.2rem; color: rgba(255,255,255,0.25); margin: 0; }

@media (max-width: 767px) {
    .jf-foot { padding: 4rem 0 2.5rem; }
    .jf-foot-first { font-size: clamp(3.5rem, 14vw, 6rem); -webkit-text-stroke-width: 1px; }
    .jf-foot-last  { font-size: clamp(1.5rem, 4.5vw, 2.5rem); }
    .jf-foot-tagline { font-size: 1.4rem; }
    .jf-foot-social { gap: 1.2rem; }
    .jf-foot-social a { font-size: 1.2rem; padding: 0.9rem 1.6rem; }
    .jf-foot-bottom { flex-direction: column; align-items: center; gap: 1.5rem; }
    .jf-foot-nav .nav { justify-content: center; gap: 0.5rem 2rem; }
    .jf-foot-nav a { font-size: 1.4rem; }
    .jf-foot-copy { font-size: 1.2rem; }
}


/* ============================================
   HEADER DARK - todas las paginas
   ============================================ */

#gh-head {
    background-color: #0d1220 !important;
    border-bottom: 1px solid rgba(0,212,255,0.1) !important;
}
#gh-head .gh-head-logo,
#gh-head .gh-head-logo a,
#gh-head .nav > li > a,
#gh-head .gh-head-link,
#gh-head .gh-head-description,
#gh-head .gh-search,
#gh-head .gh-social,
#gh-head .nav-more-toggle {
    color: #ffffff !important;
    opacity: 1 !important;
}
#gh-head .gh-burger::before,
#gh-head .gh-burger::after {
    background-color: #ffffff !important;
}
.is-head-open #gh-head {
    background-color: #0d1220 !important;
}

/* Home: transparente sobre el hero */
body.jf-home #gh-head {
    background-color: transparent !important;
    border-bottom-color: transparent !important;
    position: absolute !important;
    top: 0; left: 0; right: 0;
    z-index: 90;
}
body.jf-home.is-head-open #gh-head {
    background-color: #070b14 !important;
    position: fixed !important;
}


/* ============================================
   HEADER MOVIL - letras blancas en todas las paginas
   ============================================ */

/* Menu desplegado en movil */
#gh-head .gh-head-menu,
#gh-head .gh-head-menu .nav,
#gh-head .gh-head-menu .nav li a,
#gh-head .gh-head-actions,
#gh-head .gh-head-actions a,
#gh-head .gh-head-btn,
#gh-head .gh-head-members a {
    color: #ffffff !important;
}

/* Fondo del menu abierto en movil */
@media (max-width: 991px) {
    #gh-head {
        background-color: #0d1220 !important;
    }
    .is-head-open #gh-head,
    .menu-opened #gh-head {
        background-color: #070b14 !important;
    }
    #gh-head .gh-head-menu {
        background-color: #070b14 !important;
    }
    #gh-head .gh-head-menu .nav li a,
    #gh-head .gh-head-menu .nav > li > a {
        color: #ffffff !important;
        opacity: 1 !important;
    }
    #gh-head .gh-head-menu::before,
    #gh-head .gh-head-menu::after {
        background-color: rgba(0,212,255,0.2) !important;
    }
    /* Boton subscribe/account */
    #gh-head .gh-head-btn {
        background-color: #00d4ff !important;
        color: #070b14 !important;
        border-color: #00d4ff !important;
    }
}


/* ============================================
   FIX: texto blanco en header - TODAS las paginas y estados
   Necesitamos alta especificidad para ganar al tema
   ============================================ */

html body #gh-head,
html body .gh-head {
    background-color: #0d1220 !important;
    border-bottom: 1px solid rgba(0,212,255,0.12) !important;
}

html body #gh-head .gh-head-logo,
html body #gh-head .gh-head-logo a,
html body #gh-head .gh-head-logo span,
html body #gh-head .gh-head-brand a,
html body #gh-head .nav li a,
html body #gh-head .nav > li > a,
html body #gh-head .gh-head-menu .nav li a,
html body #gh-head .gh-head-link,
html body #gh-head .gh-head-description,
html body #gh-head .gh-search,
html body #gh-head .gh-search svg,
html body #gh-head .gh-social a,
html body #gh-head .nav-more-toggle {
    color: #ffffff !important;
    opacity: 1 !important;
}

html body #gh-head .gh-burger::before,
html body #gh-head .gh-burger::after {
    background-color: #ffffff !important;
}

html body #gh-head img.gh-head-logo {
    filter: brightness(0) invert(1);
}

/* Menu abierto movil */
html body .is-head-open #gh-head,
html body .menu-opened #gh-head {
    background-color: #070b14 !important;
}
html body .is-head-open #gh-head .gh-head-menu,
html body .menu-opened #gh-head .gh-head-menu {
    background-color: #070b14 !important;
}
html body .is-head-open #gh-head .nav li a,
html body .menu-opened #gh-head .nav li a {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Home: transparente encima del hero */
html body.jf-home #gh-head {
    background-color: transparent !important;
    border-bottom-color: transparent !important;
    position: absolute !important;
    top: 0; left: 0; right: 0;
    z-index: 90;
}
html body.jf-home.is-head-open #gh-head,
html body.jf-home.menu-opened #gh-head {
    background-color: #070b14 !important;
    position: fixed !important;
}
