/* ── FUENTE ETNA LOCAL ────────────────────────────── */
@font-face {
    font-family: 'Etna';
    src: url('../fonts/ETNA-typeface-font.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* =====================================================
   KABALA LABS — CSS v7
   ===================================================== */

:root {
    --bg:      #07070e;
    --surface: #0e0e16;
    --border:  rgba(255,255,255,0.07);
    --border2: rgba(255,255,255,0.13);
    --text:    #f0f0f5;
    --muted:   #9090a8;
    --blue:    #00d2ff;
    --pink:    #ff2896;
    --font-d:  'Space Grotesk', sans-serif;
    --font-b:  'Inter', sans-serif;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-b);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

/* ── CURSOR PERSONALIZADO ─────────────────────────── */
#cursor-dot {
    position: fixed;
    width: 5px; height: 5px;
    background: var(--blue);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: background 0.2s, transform 0.1s;
}

#cursor-ring {
    position: fixed;
    width: 28px; height: 28px;
    border: 1px solid rgba(0,210,255,0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease,
                border-color 0.3s ease, opacity 0.3s ease;
}

#cursor-ring.is-hovering {
    width: 44px; height: 44px;
    border-color: rgba(0,210,255,0.7);
}

#cursor-ring.is-link {
    width: 50px; height: 50px;
    border-color: rgba(255,40,150,0.6);
    background: rgba(255,40,150,0.04);
}

@media (hover: none) {
    #cursor-dot, #cursor-ring { display: none; }
    body { cursor: auto; }
}

/* ── LOADER ───────────────────────────────────────── */
#loader {
    position: fixed; inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
}
.loader-bar-wrap { width: 180px; height: 1px; background: rgba(255,255,255,0.07); overflow: hidden; }
.loader-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--blue), var(--pink)); transition: width 0.12s ease; }
#loader-pct { font-family: var(--font-d); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.25em; color: var(--muted); }

/* ── CANVAS ───────────────────────────────────────── */
#particle-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }

/* ── NAV ──────────────────────────────────────────── */
#nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.5rem 5%;
    opacity: 0;
    transition: background 0.4s, border-color 0.4s;
}
#nav.scrolled {
    background: rgba(7,7,14,0.90);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-logo { font-family: var(--font-d); font-weight: 700; font-size: 0.88rem; letter-spacing: 0.18em; color: var(--text); text-decoration: none; }
.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { font-size: 0.82rem; color: var(--muted); text-decoration: none; letter-spacing: 0.05em; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-github { display: flex; align-items: center; color: var(--muted) !important; }
.nav-github:hover { color: var(--text) !important; }
.nav-github svg { width: 17px; height: 17px; fill: currentColor; }

/* ── MAIN ─────────────────────────────────────────── */
#main-content { position: relative; z-index: 2; opacity: 0; }

/* ── HERO ─────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding: 8rem 5% 5rem;
    position: relative;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.logo-wrap { width: 320px; height: 320px; margin-bottom: -5.5rem; }
#kabala-logo {
    width: 100%; height: 100%; object-fit: contain;
    opacity: 0;
    mix-blend-mode: lighten;
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.18)) drop-shadow(0 0 4px rgba(255,255,255,0.10));
}
.hero-title {
    font-family: 'Etna', 'Space Grotesk', sans-serif;
    font-size: clamp(5rem, 8vw, 8rem);
    font-weight: 400; letter-spacing: -0.015em; line-height: 1.0;
    color: #08b7c0;
    display: flex; gap: 0.2em; overflow: hidden;
}
.title-word { display: inline-block; transform: translateY(110%); opacity: 0; }
.hero-sub {
    font-family: var(--font-d);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    color: var(--text); font-weight: 400; letter-spacing: 0.01em;
    opacity: 0; transform: translateY(10px);
    text-shadow: 0 0 60px rgba(0,210,255,0.25);
}
.hero-code-line {
    font-family: 'Courier New', monospace;
    font-size: 0.72rem; color: var(--blue); opacity: 0; letter-spacing: 0.08em; height: 1.4em;
}
.hero-code-line::after { content:'▊'; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity:0; } }

/* Número decorativo */
.hero-deco {
    position: absolute;
    bottom: 6rem; right: 5%;
    text-align: right;
    opacity: 0;
}
.hero-deco-num {
    display: block;
    font-family: var(--font-d);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    color: rgba(0,210,255,0.06);
    letter-spacing: -0.04em;
    line-height: 1;
}
.hero-deco-label {
    display: block;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(144,144,168,0.35);
    margin-top: 0.3rem;
}

.scroll-hint {
    position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.7rem; opacity: 0;
}
.scroll-hint span { font-size: 0.6rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); }
.scroll-line { width: 1px; height: 44px; background: linear-gradient(to bottom, var(--muted), transparent); animation: scrollPulse 2.2s ease-in-out infinite; }
@keyframes scrollPulse { 0%,100%{ transform:scaleY(1); opacity:0.35; } 50%{ transform:scaleY(0.55); opacity:0.9; } }

/* ── SHARED ───────────────────────────────────────── */
.eyebrow { font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--blue); margin-bottom: 1.6rem; }
.eyebrow--pink { color: var(--pink); }
.section-title { font-family: var(--font-d); font-size: clamp(2rem, 4.5vw, 3.6rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 4rem; }
.container { max-width: 1200px; }
.reveal-up { opacity:0; transform:translateY(40px); }

/* ── MANIFESTO ────────────────────────────────────── */
.manifesto { padding: 20vh 5%; display: flex; align-items: center; }
.manifesto-headline { font-family: var(--font-d); font-size: clamp(1.9rem, 4.5vw, 3.8rem); font-weight: 600; line-height: 1.15; letter-spacing: -0.025em; margin-bottom: 2.5rem; max-width: 900px; }
.manifesto-body { font-size: clamp(0.95rem, 1.4vw, 1.15rem); color: var(--muted); line-height: 1.85; max-width: 580px; }

/* ── TICKER ───────────────────────────────────────── */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    background: rgba(14,14,22,0.5);
    backdrop-filter: blur(8px);
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    animation: ticker 40s linear infinite;
    width: max-content;
}

.ticker-track:hover { animation-play-state: paused; }

@keyframes ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.ticker-item {
    font-family: var(--font-d);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.06em;
    padding: 0 1.4rem;
    text-transform: uppercase;
    transition: color 0.2s;
}

.ticker-item:hover { color: var(--blue); }

.ticker-sep {
    color: rgba(0,210,255,0.3);
    font-size: 0.6rem;
    flex-shrink: 0;
}

/* ── SERVICIOS ────────────────────────────────────── */
.services { padding: 14vh 5%; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.service-card {
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    display: block;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(35px);
    transition: background 0.4s;
}

/* Línea de color animada en la parte superior */
.card-line {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-line--blue { background: linear-gradient(90deg, var(--blue), rgba(0,210,255,0.3)); }
.card-line--pink  { background: linear-gradient(90deg, var(--pink), rgba(255,40,150,0.3)); }
.service-card:hover .card-line { transform: scaleX(1); }
.service-card:hover { background: #0d0d1a; }

.service-card-inner {
    padding: 3rem 2.8rem;
    display: flex; flex-direction: column; gap: 1.2rem; height: 100%;
}

.service-header { display: flex; justify-content: space-between; align-items: center; }
.service-num { font-family: var(--font-d); font-size: 0.65rem; letter-spacing: 0.2em; color: rgba(255,255,255,0.12); font-weight: 600; }

.service-arrow {
    font-size: 1rem; color: var(--blue); opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card--pink .service-arrow { color: var(--pink); }
.service-card:hover .service-arrow { opacity: 1; transform: translateX(0); }

.service-icon { color: var(--blue); width: 38px; height: 38px; }
.service-icon--pink { color: var(--pink); }

.service-title {
    font-family: var(--font-d);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700; letter-spacing: -0.03em; line-height: 1.05;
    transition: color 0.3s;
}
.service-card:hover .service-title { color: var(--blue); }
.service-card--pink:hover .service-title { color: var(--pink); }

.service-desc { font-size: 0.87rem; color: rgba(240,240,245,0.55); line-height: 1.82; }

.service-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.service-list li { font-size: 0.82rem; color: rgba(240,240,245,0.45); padding-left: 1.1rem; position: relative; line-height: 1.5; }
.service-list li::before { content:'—'; position:absolute; left:0; color: var(--blue); font-size: 0.7rem; }
.service-list--pink li::before { color: var(--pink); }

.service-cta {
    margin-top: 0.5rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-d); font-size: 0.82rem; font-weight: 600;
    color: var(--blue); letter-spacing: 0.04em;
    display: flex; justify-content: space-between; align-items: center;
}
.service-cta--pink { color: var(--pink); }
.service-cta-arrow {
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.3s, transform 0.3s;
}
.service-card:hover .service-cta-arrow { opacity: 1; transform: translateX(0); }

/* ── DIVISOR DE SECCIÓN ───────────────────────────── */
.section-divider {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 5%;
    margin: 6vh 0;
    opacity: 0;
}

.divider-line {
    flex: 1;
    height: 1px;
}
.divider-line--left  { background: linear-gradient(to right,  transparent, rgba(0,210,255,0.25)); }
.divider-line--right { background: linear-gradient(to left,   transparent, rgba(0,210,255,0.25)); }

.divider-label {
    font-family: var(--font-d);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(0,210,255,0.4);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── GAJES CARD ───────────────────────────────────── */
.products { padding: 6vh 5% 14vh; }

.gajes-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(35px);
}

.gajes-left {
    background: var(--surface);
    padding: 2.8rem 2.4rem;
    display: flex; flex-direction: column; gap: 1.4rem;
    border-right: 1px solid var(--border);
}
.gajes-logo-wrap { width: 76px; height: 76px; }
.gajes-logo {
    width: 100%; height: 100%; object-fit: contain;
    filter: brightness(0.92) saturate(1.1);
    transition: filter 0.3s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.gajes-card:hover .gajes-logo { filter: brightness(1.2) saturate(1.3); transform: scale(1.06); }

.gajes-name-row { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.gajes-name { font-family: var(--font-d); font-size: 2.2rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }

.product-badge {
    display: inline-block;
    font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--blue); background: rgba(0,210,255,0.07);
    border: 1px solid rgba(0,210,255,0.15);
    padding: 0.2rem 0.55rem; border-radius: 2px; width: fit-content;
}

.gajes-tagline { font-size: 0.87rem; color: rgba(240,240,245,0.55); line-height: 1.78; flex: 1; }

.gajes-price-row { display: flex; align-items: baseline; gap: 0.6rem; }
.gajes-price { font-family: var(--font-d); font-size: 1.1rem; font-weight: 700; color: var(--text); }
.gajes-price span { font-size: 0.72rem; font-weight: 400; color: var(--muted); }
.gajes-price-sep { color: var(--border2); }

.gajes-btns { display: flex; flex-direction: column; gap: 0.6rem; }
.gajes-btn {
    display: block; text-align: center;
    background: var(--blue); color: #07070e;
    text-decoration: none; padding: 0.75rem 1.4rem; border-radius: 5px;
    font-family: var(--font-d); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
    transition: opacity 0.2s, transform 0.15s;
}
.gajes-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.gajes-btn-secondary {
    display: block; text-align: center;
    background: transparent; color: var(--muted);
    text-decoration: none; padding: 0.6rem 1.4rem; border-radius: 5px;
    border: 1px solid var(--border2);
    font-family: var(--font-d); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.04em;
    transition: color 0.2s, border-color 0.2s;
}
.gajes-btn-secondary:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }

.gajes-right { background: var(--surface); padding: 2.8rem 2.4rem; display: flex; flex-direction: column; gap: 0; }
.gajes-features { display: flex; flex-direction: column; flex: 1; }
.gajes-feature {
    display: grid; grid-template-columns: 36px 1fr; gap: 1rem;
    padding: 1.2rem 0; border-bottom: 1px solid var(--border); align-items: start;
    transition: background 0.2s;
}
.gajes-feature:last-child { border-bottom: none; }
.gajes-feature:hover { background: rgba(0,210,255,0.02); }
.gf-num { font-family: var(--font-d); font-size: 0.62rem; letter-spacing: 0.15em; color: var(--blue); padding-top: 0.15rem; }
.gf-title { font-family: var(--font-d); font-size: 0.88rem; font-weight: 600; margin-bottom: 0.3rem; }
.gf-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.65; }

.gajes-stack-wrap { border-top: 1px solid var(--border); padding-top: 1.2rem; margin-top: 0.5rem; }
.stack-toggle { background: none; border: none; color: var(--muted); font-family: var(--font-b); font-size: 0.72rem; letter-spacing: 0.08em; cursor: none; display: flex; align-items: center; gap: 0.4rem; padding: 0; transition: color 0.2s; }
.stack-toggle:hover { color: var(--blue); }
.stack-toggle .arrow { display:inline-block; transition: transform 0.3s; font-size: 0.6rem; }
.stack-toggle.open .arrow { transform: rotate(90deg); }
.stack-content { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 1rem; margin-top: 0.8rem; max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.stack-content.open { max-height: 200px; }
.stack-item { font-size: 0.7rem; color: rgba(240,240,245,0.35); letter-spacing: 0.04em; padding-left: 0.8rem; position: relative; }
.stack-item::before { content:'·'; position:absolute; left:0; color: var(--blue); }

/* ── MÉTODO ───────────────────────────────────────── */
.method { padding: 6vh 5% 14vh; }
.method-steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
.method-step { padding: 3rem 2.5rem 3rem 0; border-right: 1px solid var(--border); opacity: 0; transform: translateY(25px); }
.method-step:last-child { border-right:none; padding-right:0; }
.method-step:not(:first-child) { padding-left: 2.5rem; }
.step-num { display:block; font-family: var(--font-d); font-size: 0.65rem; letter-spacing: 0.2em; color: var(--muted); margin-bottom: 0.6rem; }
.step-label { display:block; font-family: var(--font-d); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 1.2rem; }
.method-step p { font-size: 0.85rem; color: var(--muted); line-height: 1.8; }

/* ── FOOTER ───────────────────────────────────────── */
.footer { padding: 14vh 5% 5vh; border-top: 1px solid var(--border); }
.footer-cta { margin-bottom: 6rem; }
.footer-question { font-family: var(--font-d); font-size: clamp(1.8rem, 4.5vw, 4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 1rem; }
.footer-sub { font-size: 0.95rem; color: var(--muted); line-height: 1.7; margin-bottom: 2.5rem; max-width: 480px; }
.footer-btns { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta-btn-primary {
    display: inline-block; background: var(--blue); color: #07070e;
    text-decoration: none; padding: 0.9rem 2rem; border-radius: 6px;
    font-family: var(--font-d); font-size: 0.88rem; font-weight: 700; letter-spacing: 0.06em;
    transition: opacity 0.2s, transform 0.15s;
}
.cta-btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.cta-email {
    font-family: var(--font-d); font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    font-weight: 500; color: var(--blue); text-decoration: none;
    border-bottom: 1px solid rgba(0,210,255,0.25); padding-bottom: 0.2rem;
    transition: color 0.2s, border-color 0.2s;
}
.cta-email:hover { color:#fff; border-color: rgba(255,255,255,0.3); }
.footer-bottom { display:flex; justify-content:space-between; align-items:center; }
.footer-copy { font-size: 0.78rem; color: var(--muted); }
.footer-socials { display:flex; gap: 1.8rem; align-items: center; }
.footer-socials a { font-size: 0.78rem; color: var(--muted); text-decoration: none; letter-spacing: 0.06em; transition: color 0.2s; display: flex; align-items: center; }
.footer-socials a:hover { color: var(--text); }
.footer-socials .github-icon { display:flex; align-items:center; }
.footer-socials .github-icon svg { width:16px; height:16px; fill:currentColor; }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 1024px) {
    .method-steps { grid-template-columns: repeat(2, 1fr); }
    .method-step:nth-child(2) { border-right: none; }
    .method-step:nth-child(3) { border-top: 1px solid var(--border); padding-left: 0; }
    .method-step:nth-child(4) { border-top: 1px solid var(--border); }
}

@media (max-width: 900px) {
    .services-grid { grid-template-columns: 1fr; }
    .gajes-card { grid-template-columns: 1fr; }
    .gajes-left { border-right: none; border-bottom: 1px solid var(--border); }
    .method-steps { grid-template-columns: 1fr; }
    .method-step { border-right:none; border-bottom:1px solid var(--border); padding:2.5rem 0; }
    .method-step:last-child { border-bottom:none; }
    .method-step:not(:first-child) { padding-left:0; }
    .method-step:nth-child(3) { border-top: none; }
    .nav-links { gap: 1.2rem; }
    .nav-links a { font-size: 0.75rem; }
    .footer-bottom { flex-direction:column; gap:1.5rem; align-items:flex-start; }
    .stack-content { grid-template-columns: 1fr; }
    .logo-wrap { width: 220px; height: 220px; }
    .hero { padding: 6rem 5% 4rem; }
    .hero-title { font-size: clamp(2.4rem, 11vw, 4rem); }
    .hero-sub { font-size: 1rem; padding: 0 1rem; }
    .manifesto-headline { font-size: clamp(1.5rem, 6vw, 2.4rem); }
    .manifesto-body { font-size: 0.95rem; }
    .section-title { font-size: clamp(1.6rem, 7vw, 2.4rem); margin-bottom: 3rem; }
    .footer-question { font-size: clamp(1.4rem, 7vw, 2rem); }
    .manifesto { padding: 12vh 5%; }
    .services { padding: 10vh 5%; }
    .products { padding: 4vh 5% 10vh; }
    .method { padding: 4vh 5% 10vh; }
    .footer { padding: 10vh 5% 4vh; }
    .service-card-inner { padding: 2rem 1.6rem; }
    .gajes-left, .gajes-right { padding: 2rem 1.6rem; }
    .hero-deco { display: none; }
}

@media (max-width: 480px) {
    .nav-links { display: none; }
    .hero-title { font-size: clamp(2rem, 13vw, 3rem); gap: 0.15em; }
    .hero-sub { font-size: 0.9rem; }
    .logo-wrap { width: 180px; height: 180px; }
    .footer-btns { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
    .gajes-feature { grid-template-columns: 28px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration:0.01ms !important; transition-duration:0.01ms !important; }
    .ticker-track { animation: none; }
}