/* RESET */
:root {
  --bg:          #0f1117;
  --surface-0:   #181b23;
  --surface-1:   #1d212b;
  --accent:      #4da3ff;
  --accent-dim:  rgba(77, 163, 255, 0.08);
  --text-hi:     #ffffff;
  --text-md:     #bdbdbd;
  --text-lo:     #666666;
  --border-sub:  var(--border-sub);
  --border-base: rgba(255,255,255,.09);
  --border-hi:   rgba(255,255,255,.15);
  --font-display:'Syne', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16,1,0.3,1);
  --transition: 0.28s var(--ease-out);
  --radius-sm: 4px;
}

html[data-theme="light"] {
  --bg:          #f5f3ef;
  --surface-0:   #faf9f7;
  --surface-1:   #eeecea;
  --surface-2:   #e4e2de;
  --accent:      #2563eb;
  --accent-dim:  rgba(37,99,235,.08);
  --text-hi:     #1a1814;
  --text-md:     #5a5650;
  --text-lo:     #a09c98;
  --border-sub:  rgba(0,0,0,.05);
  --border-base: rgba(0,0,0,.09);
  --border-hi:   rgba(0,0,0,.15);
}


*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
    overflow-x: hidden;
    max-width: 100%;
}

body{
    font-family: 'Inter', -apple-system, sans-serif;
    background:var(--bg);
    color:var(--text-hi);
    line-height:1.7;
}

/* NAVBAR */

.navbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:25px 8%;
    background:var(--bg);
    backdrop-filter:blur(12px);
    position:sticky;
    top:0;
    z-index:1000;
    border-bottom:1px solid var(--border-sub);
}

.logo{
    font-size:1.8rem;
    font-weight:700;
    color:var(--text-hi);
}

.nav-links{
    display:flex;
    gap:30px;
}

.nav-links a{
    text-decoration:none;
    color:var(--text-md);
    transition:.3s;
}

.nav-links a:hover{
    color:var(--text-hi);
}

.nav-links a[data-i18n-es="Hablemos"]{
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: transparent;
    transition: background .28s var(--ease-out), color .28s var(--ease-out), transform .28s var(--ease-out);
}

.nav-links a[data-i18n-es="Hablemos"]:hover{
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

/* HERO */

.hero{
    min-height:70vh;
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:80px 8%;
}

.hero-content{
    max-width:900px;
}

.tag{
    display:inline-block;
    padding:10px 20px;
    border:1px solid var(--border-base);
    border-radius:30px;
    margin-bottom:25px;
    color:var(--accent);
    background:var(--accent-dim);
}

.hero h1{
    font-size:4rem;
    line-height:1.1;
    margin-bottom:25px;
}

.hero p{
    font-size:1.2rem;
    color:var(--text-md);
}

/* SECTIONS */

section{
    padding:100px 8%;
}

section h2{
    text-align:center;
    font-size:2.7rem;
    margin-bottom:40px;
}

.section-text{
    max-width:900px;
    margin:auto;
    text-align:center;
    color:var(--text-md);
    font-size:1.1rem;
}

/* CARDS — estilo "unit" (mismo lenguaje que index.html) */

.cards{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:1px;
    background:var(--border-sub);
    border:1px solid var(--border-sub);
    border-radius:14px;
    overflow:hidden;
    margin-top:50px;
}

.card{
    position:relative;
    background:var(--surface-0);
    padding:2.25rem 2rem 1.75rem;
    transition:background .28s var(--ease-out);
    overflow:hidden;
}

.card::before{
    content:'';
    position:absolute; top:0; left:0; right:0; height:1px;
    background:linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    opacity:0; transform:scaleX(0);
    transition:opacity .28s var(--ease-out), transform .28s var(--ease-out);
}

.card:hover{
    background:var(--surface-1);
}

.card:hover::before{
    opacity:1; transform:scaleX(1);
}

.card-index{
    display:block;
    font-size:.65rem; font-weight:600; letter-spacing:.08em;
    color:var(--text-lo);
    margin-bottom:1.5rem;
}

.card-icon{
    width:42px; height:42px;
    border-radius:10px;
    background:var(--accent-dim);
    display:flex; align-items:center; justify-content:center;
    margin-bottom:1.5rem;
}

.card-icon svg{
    width:20px; height:20px;
    stroke:var(--accent); fill:none;
    stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;
}

.card h3{
    margin-bottom:.6rem;
    color:var(--text-hi);
    font-family:var(--font-display);
    font-size:1.05rem;
    font-weight:700;
}

.card p{
    color:var(--text-md);
    font-size:.88rem;
}

/* SOLUCIONES — mismo lenguaje que index.html .unit */

.solution-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:1px;
    background:var(--border-sub);
    border:1px solid var(--border-sub);
    border-radius:14px;
    overflow:hidden;
    margin-top:50px;
}

.solution{
    position:relative;
    background:var(--surface-0);
    padding:2.5rem 2rem 2rem;
    text-align:left;
    transition:background .28s var(--ease-out);
    display:flex; flex-direction:column;
}

.solution::before{
    content:'';
    position:absolute; top:0; left:0; right:0; height:1px;
    background:linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    opacity:0; transform:scaleX(0);
    transition:opacity .28s var(--ease-out), transform .28s var(--ease-out);
}

.solution:hover{
    background:var(--surface-1);
}

.solution:hover::before{
    opacity:1; transform:scaleX(1);
}

.solution-index{
    font-size:.65rem; font-weight:600; letter-spacing:.08em;
    color:var(--text-lo);
    margin-bottom:1.5rem;
    display:block;
}

.solution-icon{
    width:42px; height:42px;
    border-radius:10px;
    background:var(--accent-dim);
    display:flex; align-items:center; justify-content:center;
    margin-bottom:1.5rem;
}

.solution-icon svg{
    width:20px; height:20px;
    stroke:var(--accent); fill:none;
    stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;
}

.solution h3{
    margin-bottom:.6rem;
    color:var(--text-hi);
    font-family:var(--font-display);
    font-size:1.1rem;
    font-weight:700;
}

.solution p{
    color:var(--text-md);
    margin-bottom:1.5rem;
    font-size:.88rem;
    flex:1;
}

.solution a{
    display:inline-flex; align-items:center; gap:.4rem;
    font-size:.85rem; font-weight:600;
    text-decoration:none;
    color:var(--accent);
    transition:gap .25s var(--ease-out);
}

.solution a:hover{
    gap:.65rem;
}

/* CONTACTO */

.contact-form{
    max-width:700px;
    margin:50px auto 0;
    display:flex;
    flex-direction:column;
    gap:20px;
}

.contact-form input,
.contact-form textarea{
    width:100%;
    padding:18px;
    border:none;
    border-radius:12px;
    background:var(--surface-0);
    color:white;
    font-size:1rem;
}

.contact-form input:focus,
.contact-form textarea:focus{
    outline:1px solid var(--accent);
}

.contact-form button{
    padding:18px;
    border:none;
    border-radius:12px;
    background:var(--accent);
    color:white;
    font-weight:700;
    cursor:pointer;
    transition:.3s;
}

.contact-form button:hover{
    transform:translateY(-2px);
}

/* FOOTER */

footer{
    border-top:1px solid var(--border-sub);
    padding:40px;
    text-align:center;
    color:var(--text-md);
}

footer small{
    display:block;
    margin-top:10px;
    color:var(--text-lo);
}

/* RESPONSIVE */

@media(max-width:768px){

    .cards, .solution-grid{
        grid-template-columns:1fr;
    }

    .navbar{
        flex-direction:column;
        gap:20px;
    }

    .nav-links{
        flex-wrap:wrap;
        justify-content:center;
    }

    .hero h1{
        font-size:2.7rem;
    }

    .hero p{
        font-size:1rem;
    }

    section{
        padding:70px 6%;
    }

    section h2{
        font-size:2rem;
    }

}
/* ═══════════════════════════════════════════════
   CUSTOM CURSOR
═══════════════════════════════════════════════ */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, .btn-toggle { cursor: none; }

  .cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0;
    pointer-events: none; z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    will-change: transform;
  }
  .cursor-dot {
    width: 6px; height: 6px;
    background: var(--text-hi);
    transition: opacity .2s;
  }
  .cursor-ring {
    width: 32px; height: 32px;
    border: 1px solid var(--border-hi);
    transition: width .25s var(--ease-out), height .25s var(--ease-out),
                border-color .25s var(--ease-out), background .25s var(--ease-out),
                opacity .2s;
  }
  .cursor-ring.hovering {
    width: 56px; height: 56px;
    border-color: var(--accent);
    background: var(--accent-dim);
  }
  body.cursor-hidden .cursor-dot,
  body.cursor-hidden .cursor-ring { opacity: 0; }
}

/* ═══════════════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════════════ */
.reveal-up {
  opacity: 1; /* fallback visible si JS no corre */
}
.js .reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.js .reveal-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   TEXT HOVER REVEAL — letters spread apart
═══════════════════════════════════════════════ */
.reveal-text { display: inline-flex; }
.reveal-text .char {
  display: inline-block;
  transition: transform .5s var(--ease-out);
  transform: translateX(0);
}
.reveal-text:hover .char {
  transform: translateX(calc(var(--dir, 0) * 6px));
}

/* ═══════════════════════════════════════════════
   MAGNETIC BUTTONS
═══════════════════════════════════════════════ */
.magnetic {
  display: inline-flex;
  transition: transform .25s var(--ease-out);
  will-change: transform;
}

/* ═══════════════════════════════════════════════
   INTRO LOADER
═══════════════════════════════════════════════ */
.intro-loader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s var(--ease-out), visibility .6s var(--ease-out);
}
.intro-loader.hidden {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.intro-loader-logo {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em;
  color: var(--text-hi);
  opacity: 0;
  animation: loader-fade 1.1s var(--ease-out) forwards;
}
.intro-loader-logo span { color: var(--accent); }
@keyframes loader-fade {
  0%   { opacity: 0; transform: translateY(8px) scale(.96); }
  40%  { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════════
   NAV TOGGLES (lang / theme)
═══════════════════════════════════════════════ */
.nav-toggles {
  display: flex; align-items: center; gap: 0.5rem;
}
.btn-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  border: 1px solid var(--border-sub);
  color: var(--text-md);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
  cursor: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.btn-toggle:hover {
  color: var(--text-hi);
  border-color: var(--border-hi);
}
.btn-toggle svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
html[data-theme="light"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun  { display: block; }
html:not([data-theme="light"]) .icon-sun  { display: none; }
html:not([data-theme="light"]) .icon-moon { display: block; }

@media (max-width: 768px) {
  .nav-toggles { display: none; }
}

/* ── EFECTO SHARLEE ── */
.logo-sharlee { display: inline-flex; align-items: center; }
.logo-char {
  display: inline-block;
  transition: transform 0.55s cubic-bezier(0.16,1,0.3,1), opacity 0.45s cubic-bezier(0.16,1,0.3,1), color 0.3s;
  will-change: transform;
}
.logo:hover .logo-char {
  transform: translate(var(--sx,0px), var(--sy,0px)) rotate(var(--sr,0deg));
  opacity: 0.15;
  color: var(--accent);
}
