/* ============================================================
   styles.css — Estilos globales de NEXUS Studio
   Incluye: reset, variables, tipografía, botones, nav,
            footer, cursor, marquee, utilidades, mobile global
   ============================================================ */


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

a, button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

img, video, iframe, svg {
  max-width: 100%;
  display: block;
}

p, li, h1, h2, h3, h4 {
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}


/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:           #070810;
  --surface:      #0d0f1e;
  --surface2:     #13162a;
  --border:       rgba(255, 255, 255, 0.07);
  --accent:       #4f6ef7;
  --accent2:      #a78bfa;
  --accent3:      #22d3ee;
  --text:         #eef0ff;
  --muted:        #7a7f9a;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-pill:  50px;
}


/* ── HTML & Body ───────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  background:   var(--bg);
  color:        var(--text);
  font-family:  var(--font-body);
  font-size:    16px;
  line-height:  1.6;
  overflow-x:   hidden;
  cursor:       none;
}


/* ── Noise overlay ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 9990;
}


/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar        { width: 4px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--accent); border-radius: 2px; }


/* ── Custom Cursor ─────────────────────────────────────────── */
#cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s, background .2s;
  mix-blend-mode: screen;
}

#cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(79, 110, 247, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: all .15s ease;
}

body:has(a:hover) #cursor,
body:has(button:hover) #cursor {
  width: 20px;
  height: 20px;
  background: var(--accent2);
}

body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring {
  width: 52px;
  height: 52px;
  border-color: var(--accent2);
}


/* ── Tipografía global ─────────────────────────────────────── */
h2 {
  font-family:    var(--font-display);
  font-size:      clamp(1.9rem, 5.5vw, 3.5rem);
  font-weight:    800;
  letter-spacing: -0.03em;
  line-height:    1.1;
  margin-bottom:  1.5rem;
}

.grad {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── Section base ──────────────────────────────────────────── */
section {
  padding: 7rem max(4vw, 1rem);
}

.section-label {
  display:        inline-flex;
  align-items:    center;
  gap:            .5rem;
  font-size:      .75rem;
  font-weight:    700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--accent);
  margin-bottom:  1.2rem;
}

.section-label::before {
  content:    '';
  width:      20px;
  height:     2px;
  background: var(--accent);
}

.section-intro {
  font-size:   1.1rem;
  color:       var(--muted);
  max-width:   560px;
  font-weight: 300;
}


/* ── Botones ───────────────────────────────────────────────── */
.btn-primary {
  background:      var(--accent);
  color:           #fff;
  padding:         .9rem 2.2rem;
  border-radius:   var(--radius-pill);
  font-size:       1rem;
  font-weight:     600;
  font-family:     var(--font-body);
  text-decoration: none;
  border:          none;
  cursor:          pointer;
  display:         inline-block;
  transition:      background .25s, transform .25s, box-shadow .25s;
  box-shadow:      0 0 40px rgba(79, 110, 247, 0.35);
}

.btn-primary:hover {
  background:  #6b86f9;
  transform:   translateY(-2px);
  box-shadow:  0 0 60px rgba(79, 110, 247, 0.5);
}

.btn-ghost {
  background:      transparent;
  color:           var(--text);
  padding:         .9rem 2.2rem;
  border-radius:   var(--radius-pill);
  font-size:       1rem;
  font-weight:     500;
  font-family:     var(--font-body);
  text-decoration: none;
  border:          1px solid var(--border);
  cursor:          pointer;
  display:         inline-block;
  transition:      border-color .25s, background .25s, transform .25s;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background:   rgba(255, 255, 255, 0.04);
  transform:    translateY(-2px);
}


/* ── Scroll reveal ─────────────────────────────────────────── */
.reveal {
  opacity:    0;
  transform:  translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity:   1;
  transform: translateY(0);
}


/* ── Animaciones compartidas ───────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

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


/* ── Navigation ────────────────────────────────────────────── */
nav {
  position:   fixed;
  top: 0; left: 0; right: 0;
  z-index:    1000;
  display:    flex;
  align-items: center;
  justify-content: space-between;
  padding:    1.5rem 5vw;
  background: rgba(7, 8, 16, 0);
  transition: background .4s, backdrop-filter .4s;
}

nav.scrolled {
  background:      rgba(7, 8, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom:   1px solid var(--border);
}

.logo {
  font-family:     var(--font-display);
  font-size:       1.35rem;
  font-weight:     800;
  letter-spacing:  -0.02em;
  color:           var(--text);
  text-decoration: none;
}

.logo span { color: var(--accent); }

nav ul {
  list-style:  none;
  display:     flex;
  gap:         2.5rem;
  align-items: center;
}

nav ul a {
  font-size:      .875rem;
  font-weight:    500;
  color:          var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition:     color .2s;
}

nav ul a:hover { color: var(--text); }

.nav-cta {
  background:    var(--accent) !important;
  color:         #fff !important;
  padding:       .55rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size:     .875rem !important;
  font-weight:   600 !important;
  transition:    background .2s, transform .2s !important;
}

.nav-cta:hover {
  background: #6b86f9 !important;
  transform:  translateY(-1px);
}

.menu-toggle {
  display:         none;
  flex-direction:  column;
  gap:             5px;
  cursor:          pointer;
}

.menu-toggle span {
  width:         24px;
  height:        2px;
  background:    var(--text);
  border-radius: 2px;
  transition:    .3s;
}


/* ── Marquee ───────────────────────────────────────────────── */
.marquee-section {
  padding:       2rem 0;
  border-top:    1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow:      hidden;
}

.marquee-track {
  display:   flex;
  gap:       3rem;
  width:     max-content;
  animation: marquee 28s linear infinite;
}

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

.marquee-item {
  display:        flex;
  align-items:    center;
  gap:            .6rem;
  font-size:      .8rem;
  font-weight:    600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          var(--muted);
  white-space:    nowrap;
  padding:        0 2rem;
}

.marquee-item::before {
  content:   '◆';
  font-size: .5rem;
  color:     var(--accent);
}


/* ── Footer ────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding:    3rem max(5vw, 1.5rem);
  display:    grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap:        3rem;
}

.footer-brand .logo {
  display:       block;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size:   .85rem;
  color:       var(--muted);
  line-height: 1.7;
}

.footer-col h4 {
  font-size:      .78rem;
  font-weight:    700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--muted);
  margin-bottom:  1.2rem;
}

.footer-col ul {
  list-style:     none;
  display:        flex;
  flex-direction: column;
  gap:            .7rem;
}

.footer-col ul a {
  font-size:       .88rem;
  color:           var(--muted);
  text-decoration: none;
  transition:      color .2s;
}

.footer-col ul a:hover { color: var(--text); }

.footer-bottom {
  border-top:      1px solid var(--border);
  padding:         1.5rem max(5vw, 1.5rem);
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  font-size:       .8rem;
  color:           var(--muted);
  flex-wrap:       wrap;
  gap:             1rem;
}

.social-links { display: flex; gap: 1rem; }

.social-links a {
  width:           34px;
  height:          34px;
  border-radius:   var(--radius-sm);
  border:          1px solid var(--border);
  display:         flex;
  align-items:     center;
  justify-content: center;
  color:           var(--muted);
  text-decoration: none;
  font-size:       .85rem;
  transition:      border-color .2s, color .2s, background .2s;
}

.social-links a:hover {
  border-color: rgba(79, 110, 247, 0.4);
  color:        var(--accent);
  background:   rgba(79, 110, 247, 0.06);
}


/* ── Floating Mobile CTA ───────────────────────────────────── */
#mobile-cta {
  display:   none;
  position:  fixed;
  bottom:    1.2rem;
  left:      50%;
  transform: translateX(-50%);
  z-index:   200;
  width:     calc(100% - 3rem);
  max-width: 380px;
}

#mobile-cta a {
  display:         block;
  text-align:      center;
  background:      var(--accent);
  color:           #fff;
  font-family:     var(--font-body);
  font-size:       .95rem;
  font-weight:     700;
  padding:         1rem 2rem;
  border-radius:   var(--radius-pill);
  text-decoration: none;
  box-shadow:      0 8px 30px rgba(79, 110, 247, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
  letter-spacing:  0.01em;
  transition:      background .2s, transform .2s;
}

#mobile-cta a:active { transform: scale(0.97); }


/* ════════════════════════════════════════
   RESPONSIVE GLOBAL — Tablet (≤900px)
════════════════════════════════════════ */
@media (max-width: 900px) {

  /* Cursor desactivado en táctil */
  body    { cursor: auto; }
  #cursor, #cursor-ring { display: none; }

  /* Nav */
  nav { padding: 1.1rem 5vw; }

  nav ul { display: none; }

  nav ul.open {
    display:         flex;
    flex-direction:  column;
    position:        fixed;
    top:             0;
    left:            0;
    right:           0;
    bottom:          0;
    background:      rgba(7, 8, 16, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    justify-content: center;
    align-items:     center;
    gap:             2rem;
    z-index:         999;
    overflow-y:      auto;
  }

  nav ul.open a { font-size: 1.3rem; }

  .menu-toggle { display: flex; z-index: 1000; position: relative; }

  /* Sections */
  section { padding: 5rem 6vw; }

  /* Botones full width cuando están apilados */
  .hero-actions { flex-direction: column; align-items: center; width: 100%; }
  .hero-actions a { width: 100%; max-width: 340px; text-align: center; }

  /* Footer */
  footer { grid-template-columns: 1fr 1fr; gap: 2.5rem; padding: 3rem 6vw; }

  /* Floating CTA visible */
  #mobile-cta { display: block; }
}


/* ════════════════════════════════════════
   RESPONSIVE GLOBAL — Móvil (≤480px)
════════════════════════════════════════ */
@media (max-width: 480px) {

  section { padding: 4rem 5vw; }

  nav { padding: 1rem 5vw; }
  .logo { font-size: 1.2rem; }

  h2 { font-size: clamp(1.8rem, 8vw, 2.6rem); }

  .section-label { font-size: .7rem; }
  .section-intro { font-size: 1rem; }

  .btn-primary,
  .btn-ghost { padding: .85rem 1.6rem; font-size: .95rem; }

  .marquee-item { font-size: .72rem; padding: 0 1rem; }

  footer        { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 5vw; }
  .footer-bottom {
    flex-direction: column;
    text-align:     center;
    gap:            1rem;
    padding:        1.5rem 5vw;
  }
  .social-links { justify-content: center; }
}
