/* =============================================================
   INSULAR WEB · hoja de estilos
   Oscura, futurista. Todo el color vive en los tokens de :root.
   ============================================================= */

/* Regla de oro: que [hidden] gane siempre a display:flex/grid. */
[hidden] { display: none !important; }

:root {
  /* Fondos */
  --bg:        #04060d;
  --bg-2:      #070b15;
  --bg-3:      #0b1120;
  --glass:     rgba(16, 24, 44, .55);
  --glass-2:   rgba(20, 30, 56, .38);

  /* Tinta */
  --ink:       #e9eefc;
  --ink-soft:  #b9c4de;
  --muted:     #7f8db0;

  /* Acentos */
  --cy:        #3ee6ff;
  --vi:        #7b61ff;
  --mg:        #ff4ecd;
  --ok:        #25d366;

  /* Líneas y sombras */
  --line:      rgba(126, 160, 255, .14);
  --line-2:    rgba(126, 160, 255, .28);
  --shadow:    0 30px 80px rgba(0, 0, 0, .55);
  --glow-cy:   0 0 40px rgba(62, 230, 255, .35);

  --grad:      linear-gradient(115deg, #3ee6ff 0%, #7b61ff 52%, #ff4ecd 100%);
  --grad-soft: linear-gradient(115deg, rgba(62,230,255,.16), rgba(123,97,255,.16) 55%, rgba(255,78,205,.14));

  /* Tipografía */
  --f-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --f-text:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;

  /* Métrica */
  --wrap:      1200px;
  --r:         18px;
  --r-lg:      26px;
  --nav-h:     74px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;             /* solo en html: body rompe position:sticky */
  scroll-padding-top: calc(var(--nav-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

::selection { background: rgba(123, 97, 255, .45); color: #fff; }

/* Scrollbar propia */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #05070e; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(#1d2c52, #14203c);
  border-radius: 20px;
  border: 2px solid #05070e;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(#2b4180, #1b2c56); }

/* ============================ LAYOUT ============================ */

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

section { position: relative; padding: clamp(76px, 10vw, 132px) 0; }

.sec-head { max-width: 780px; margin-bottom: clamp(38px, 5vw, 60px); }
.sec-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--f-mono);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cy);
  padding: 7px 14px;
  border: 1px solid rgba(62, 230, 255, .28);
  border-radius: 999px;
  background: rgba(62, 230, 255, .06);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cy); box-shadow: 0 0 10px var(--cy);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; margin: 0 0 18px; }
h2 { font-size: clamp(30px, 4.4vw, 52px); }
h3 { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.25; }

.lead { color: var(--ink-soft); font-size: clamp(15.5px, 1.5vw, 18px); margin: 0; }
.muted { color: var(--muted); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ============================ BOTONES ============================ */

.btn {
  --btn-bg: transparent;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--btn-bg);
  font-family: var(--f-display); font-weight: 600; font-size: 15px;
  letter-spacing: .01em;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, border-color .25s, background .25s, color .25s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:focus-visible { outline: 2px solid var(--cy); outline-offset: 3px; }

.btn-primary {
  border-color: transparent;
  background: var(--grad);
  color: #04060d;
  box-shadow: 0 14px 34px rgba(62, 230, 255, .22), 0 4px 14px rgba(123, 97, 255, .22);
}
.btn-primary:hover { box-shadow: 0 20px 48px rgba(62, 230, 255, .36), 0 6px 20px rgba(123, 97, 255, .3); }
/* Barrido de luz */
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .75s cubic-bezier(.2,.7,.3,1);
}
.btn-primary:hover::after { transform: translateX(120%); }

.btn-ghost { background: rgba(255,255,255,.02); color: var(--ink); }
.btn-ghost:hover { border-color: var(--cy); background: rgba(62,230,255,.07); color: #fff; }

.btn-wsp { background: var(--ok); border-color: transparent; color: #052e16; }
.btn-wsp:hover { background: #2ee878; box-shadow: 0 16px 40px rgba(37, 211, 102, .3); }
.btn-wsp svg { fill: currentColor; }

.btn-lg { padding: 17px 32px; font-size: 16px; }
.btn-sm { padding: 10px 18px; font-size: 13.5px; }

/* ============================ PRELOADER ============================ */

#loader {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  background: var(--bg);
  transition: opacity .6s ease, visibility .6s;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
#loader .mark { width: 62px; height: 62px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .85 } 50% { transform: scale(1.09); opacity: 1 } }
.load-bar { width: 190px; height: 2px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 0%; background: var(--grad); transition: width .25s ease; }
.load-txt { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .3em; color: var(--muted); text-transform: uppercase; }

/* ============================ FONDO ============================ */

#fx {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: .85;
}
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(126,160,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126,160,255,.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
}
.bg-aurora {
  position: fixed; z-index: 0; pointer-events: none;
  width: 60vw; height: 60vw; max-width: 900px; max-height: 900px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}
.bg-aurora.a1 { top: -22vw; left: -12vw; background: radial-gradient(circle, rgba(62,230,255,.32), transparent 68%); }
.bg-aurora.a2 { top: 34vh;  right: -18vw; background: radial-gradient(circle, rgba(123,97,255,.30), transparent 68%); }
.bg-aurora.a3 { bottom: -20vw; left: 22vw; background: radial-gradient(circle, rgba(255,78,205,.16), transparent 68%); }

/* El halo que sigue al puntero */
#spot {
  position: fixed; z-index: 0; pointer-events: none;
  width: 620px; height: 620px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(62,230,255,.10), transparent 62%);
  opacity: 0; transition: opacity .5s;
}

main, footer, .site-header { position: relative; z-index: 1; }

/* ============================ CURSOR ============================ */

.cur, .cur-ring { position: fixed; top: 0; left: 0; z-index: 998; pointer-events: none; border-radius: 50%; opacity: 0; }
.cur { width: 7px; height: 7px; background: var(--cy); box-shadow: 0 0 12px var(--cy); }
.cur-ring {
  width: 40px; height: 40px;
  border: 1px solid rgba(62,230,255,.5);
  transition: width .25s, height .25s, border-color .25s, background .25s;
}
.cur-ring.on { width: 66px; height: 66px; background: rgba(62,230,255,.09); border-color: var(--cy); }
body.cursor-on .cur, body.cursor-on .cur-ring { opacity: 1; }
@media (hover: hover) and (pointer: fine) { body.cursor-on, body.cursor-on a, body.cursor-on button { cursor: none; } }

/* ============================ PROGRESO ============================ */

.progress {
  position: fixed; top: 0; left: 0; z-index: 60;
  height: 2px; width: 0%;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(62,230,255,.7);
}

/* ============================ HEADER ============================ */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s, height .35s;
}
.site-header.stuck {
  background: rgba(4, 6, 13, .96);
  border-bottom-color: var(--line);
  height: 64px;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.brand { display: flex; align-items: center; gap: 11px; position: relative; z-index: 2; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand b { font-family: var(--f-display); font-size: 18.5px; font-weight: 700; letter-spacing: -.01em; display: block; line-height: 1; }
.brand > span { display: block; line-height: 1.25; }
.brand > span > span { display: block; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .3em; color: var(--muted); text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative;
  padding: 9px 14px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  transition: color .2s, background .2s;
}
.nav a::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.7,.3,1);
}
.nav a:hover { color: #fff; }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: #fff; }

.nav-cta { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.nav-cta-mob { display: none; }

.burger {
  display: none;
  width: 44px; height: 44px; border-radius: 13px;
  border: 1px solid var(--line-2); background: var(--glass);
  align-items: center; justify-content: center; cursor: pointer;
}
.burger i { display: block; width: 18px; height: 1.6px; background: var(--ink); position: relative; transition: background .2s; }
.burger i::before, .burger i::after { content: ''; position: absolute; left: 0; width: 18px; height: 1.6px; background: var(--ink); transition: transform .3s; }
.burger i::before { top: -6px; } .burger i::after { top: 6px; }
.burger.open i { background: transparent; }
.burger.open i::before { transform: translateY(6px) rotate(45deg); }
.burger.open i::after  { transform: translateY(-6px) rotate(-45deg); }

/* ============================ HERO ============================ */

.hero {
  min-height: 100svh;
  display: grid; align-items: center;
  /* Los anillos de .orbits giran: al rotarlos su caja envolvente se agranda
     (un cuadrado rotado mide lado × √2) y ensanchaba el documento — en el
     teléfono eso hacía que Chrome alejara el zoom y quedara una franja muerta
     a la derecha. Se recorta acá; `clip` no crea contenedor de scroll. */
  overflow: hidden;
  overflow: clip;
  padding-top: calc(var(--nav-h) + 34px);
  padding-bottom: 44px;
  text-align: center;
}
.hero-inner { position: relative; }

.hero h1 {
  font-size: clamp(38px, 6.6vw, 80px);
  letter-spacing: -.035em;
  margin: 0 0 18px;
}
.hero h1 .line { display: block; }
.hero p.lead { max-width: 660px; margin: 0 auto 26px; font-size: clamp(16px, 1.7vw, 19px); }

.rotator {
  display: inline-flex; align-items: center;
  min-height: 1.1em;
  font-family: var(--f-mono);
  font-size: clamp(13px, 1.6vw, 16px);
  letter-spacing: .02em;
  color: var(--cy);
  margin-bottom: 18px;
}
.rotator::before { content: '>'; color: var(--vi); margin-right: 10px; }
.rotator i { font-style: normal; }
.rotator::after {
  content: ''; width: 9px; height: 1.15em; margin-left: 4px;
  background: var(--cy); animation: caret 1s steps(2) infinite;
}
@keyframes caret { 0%,49% { opacity: 1 } 50%,100% { opacity: 0 } }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 40px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 820px; margin: 0 auto; }
.stat {
  padding: 20px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass-2);
  transition: border-color .3s, transform .3s, background .3s;
}
.stat:hover { border-color: var(--line-2); transform: translateY(-4px); background: var(--glass); }
.stat b { display: block; font-family: var(--f-display); font-size: clamp(26px, 3.4vw, 38px); line-height: 1; margin-bottom: 7px; }
.stat span { font-size: 12px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }

/* Anillos orbitales detrás del titular */
.orbits { position: absolute; top: 44%; left: 50%; transform: translate(-50%,-50%); z-index: -1; pointer-events: none; width: min(120vw, 1000px); aspect-ratio: 1; opacity: .5; }
.orbits i {
  position: absolute; inset: 0; margin: auto;
  border-radius: 50%;
  border: 1px solid rgba(126,160,255,.13);
}
.orbits i:nth-child(1) { width: 42%; height: 42%; animation: spin 26s linear infinite; border-top-color: rgba(62,230,255,.6); }
.orbits i:nth-child(2) { width: 68%; height: 68%; animation: spin 40s linear infinite reverse; border-left-color: rgba(123,97,255,.5); }
.orbits i:nth-child(3) { width: 96%; height: 96%; animation: spin 60s linear infinite; border-bottom-color: rgba(255,78,205,.35); }
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .3em; color: var(--muted); text-transform: uppercase;
}
.scroll-cue u { display: block; width: 1px; height: 42px; background: linear-gradient(var(--cy), transparent); }

/* ============================ MARQUEE ============================ */

.band { border-block: 1px solid var(--line); background: rgba(6,10,20,.6); padding: 17px 0; overflow: hidden; }
.marquee { display: flex; gap: 0; width: max-content; animation: slide 42s linear infinite; }
.band:hover .marquee { animation-play-state: paused; }
.marquee span {
  display: inline-flex; align-items: center; gap: 26px;
  padding-right: 26px;
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(14px, 1.5vw, 17px); letter-spacing: .02em;
  color: var(--ink-soft); white-space: nowrap;
}
.marquee span::after { content: '◆'; color: var(--vi); font-size: 9px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ============================ TARJETAS GENÉRICAS ============================ */

.card-glass {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--glass-2);
  overflow: hidden;
  transition: border-color .35s, transform .35s cubic-bezier(.2,.7,.3,1), background .35s;
}
.card-glass::before {
  content: ''; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(62,230,255,.10), transparent 65%);
  transition: opacity .35s; pointer-events: none;
}
.card-glass:hover { border-color: var(--line-2); transform: translateY(-6px); background: var(--glass); }
.card-glass:hover::before { opacity: 1; }

/* ============================ SERVICIOS ============================ */

.grid-serv { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.serv { padding: 30px 26px 28px; }
.serv .ico {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-content: center;
  background: var(--grad-soft);
  border: 1px solid var(--line-2);
  margin-bottom: 20px;
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.serv:hover .ico { transform: translateY(-3px) rotate(-6deg) scale(1.06); }
.serv .ico svg { width: 24px; height: 24px; stroke: var(--cy); fill: none; stroke-width: 1.6; }
.serv h3 { margin-bottom: 10px; }
.serv p { margin: 0; color: var(--muted); font-size: 15px; }
.serv .num {
  position: absolute; top: 20px; right: 24px;
  font-family: var(--f-mono); font-size: 12px; color: rgba(126,160,255,.3);
}

/* ============================ PROYECTOS ============================ */

.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 34px; }
.chip {
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .25s, color .25s, background .25s, transform .2s;
}
.chip:hover { border-color: var(--line-2); color: #fff; transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #04060d; font-weight: 600; }
.chip small { font-family: var(--f-mono); opacity: .6; margin-left: 6px; }

.grid-proj { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px; }

.proj {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(18,26,48,.6), rgba(8,12,22,.6));
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: border-color .35s, box-shadow .45s, transform .2s ease-out, opacity .4s, scale .4s;
}
.proj:hover { border-color: rgba(62,230,255,.42); box-shadow: 0 26px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(62,230,255,.14), 0 0 60px rgba(62,230,255,.10); }
.proj:focus-visible { outline: 2px solid var(--cy); outline-offset: 3px; }
.proj.hide { display: none; }
.proj.filtering { opacity: 0; scale: .96; }

/* Barra tipo navegador */
.proj-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(6,10,20,.7);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #22304f; display: block; }
.dots i:nth-child(1) { background: #ff5f57; opacity: .55; }
.dots i:nth-child(2) { background: #febc2e; opacity: .55; }
.dots i:nth-child(3) { background: #28c840; opacity: .55; }
.proj-url {
  flex: 1; min-width: 0;
  font-family: var(--f-mono); font-size: 11.5px; color: var(--muted);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .3s, border-color .3s;
}
.proj:hover .proj-url { color: var(--cy); border-color: rgba(62,230,255,.3); }

.proj-shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #070b15; }
.proj-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform .8s cubic-bezier(.2,.7,.3,1), filter .5s;
  filter: saturate(.9) brightness(.88);
}
.proj:hover .proj-shot img { transform: scale(1.07); filter: saturate(1.05) brightness(1); }
.proj-shot::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(4,6,13,.86) 100%);
  pointer-events: none;
}
/* Líneas de escaneo */
.scan {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: repeating-linear-gradient(180deg, rgba(62,230,255,.05) 0 1px, transparent 1px 4px);
  transition: opacity .4s;
}
.proj:hover .scan { opacity: 1; }

.proj-go {
  position: absolute; z-index: 3; right: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 17px; border-radius: 999px;
  background: var(--grad); color: #04060d;
  font-family: var(--f-display); font-weight: 700; font-size: 13px;
  opacity: 0; transform: translateY(12px);
  transition: opacity .35s, transform .35s cubic-bezier(.2,.7,.3,1);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.proj:hover .proj-go, .proj:focus-visible .proj-go { opacity: 1; transform: translateY(0); }
.proj-go svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; }

.proj-eye {
  position: absolute; z-index: 3; left: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px;
  background: rgba(6,10,20,.82);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  opacity: 0; transform: translateY(12px);
  transition: opacity .35s .05s, transform .35s .05s cubic-bezier(.2,.7,.3,1), border-color .25s, background .25s;
}
.proj:hover .proj-eye { opacity: 1; transform: translateY(0); }
.proj-eye:hover { border-color: var(--cy); background: rgba(62,230,255,.12); }
.proj-eye svg { width: 15px; height: 15px; stroke: var(--cy); fill: none; stroke-width: 1.7; }

.proj-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; gap: 12px; }
.proj-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.proj-top h3 { margin: 0; }
.proj-idx { font-family: var(--f-mono); font-size: 11.5px; color: rgba(126,160,255,.45); flex: none; }
.proj-body p { margin: 0; font-size: 14.6px; color: var(--muted); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags b {
  font-family: var(--f-mono); font-weight: 500; font-size: 11px;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 6px;
  color: var(--ink-soft);
  background: rgba(126,160,255,.07);
  border: 1px solid var(--line);
}
.proj-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.proj-cat { font-size: 12.5px; color: var(--muted); }
.proj-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ok); }
.proj-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: blink 2.4s ease-in-out infinite; }
.proj-live.off { color: var(--muted); }
.proj-live.off::before { background: var(--muted); box-shadow: none; animation: none; }

/* ============================ VISOR (MODAL) ============================ */

.viewer {
  position: fixed; inset: 0; z-index: 200;
  display: grid; grid-template-rows: auto 1fr;
  background: #04060d;
  opacity: 0; transition: opacity .35s;
}
.viewer.on { opacity: 1; }
.viewer-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px clamp(14px, 3vw, 26px);
  border-bottom: 1px solid var(--line);
  background: rgba(6,10,20,.9);
  flex-wrap: wrap;
}
.viewer-title { font-family: var(--f-display); font-weight: 700; font-size: 16px; margin-right: 4px; }
.viewer-url {
  font-family: var(--f-mono); font-size: 12px; color: var(--cy);
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid rgba(62,230,255,.25); background: rgba(62,230,255,.06);
  max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.viewer-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.seg { display: flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.seg button { padding: 8px 15px; background: transparent; border: 0; font-size: 13px; color: var(--muted); cursor: pointer; transition: background .25s, color .25s; }
.seg button[aria-pressed="true"] { background: var(--grad); color: #04060d; font-weight: 600; }
.viewer-close {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
  display: grid; place-content: center; cursor: pointer;
  transition: border-color .25s, background .25s, transform .25s;
}
.viewer-close:hover { border-color: var(--mg); background: rgba(255,78,205,.12); transform: rotate(90deg); }
.viewer-close svg { width: 17px; height: 17px; stroke: var(--ink); stroke-width: 2; fill: none; }

.viewer-stage { position: relative; padding: clamp(10px, 2vw, 22px); overflow: auto; display: grid; place-items: center; }
.frame {
  width: 100%; height: 100%;
  max-width: 100%;
  border: 1px solid var(--line-2); border-radius: 14px;
  background: #05070e; overflow: hidden;
  box-shadow: var(--shadow);
  transition: width .4s cubic-bezier(.2,.7,.3,1), height .4s;
}
.frame.mobile { width: 390px; height: min(844px, 100%); border-radius: 30px; }
.frame iframe { width: 100%; height: 100%; border: 0; }
.frame-note {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-size: 12.5px; color: var(--muted); background: rgba(6,10,20,.86);
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line);
}

/* ============================ PROCESO ============================ */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 30px 24px 26px; }
.step .dot {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-content: center; margin-bottom: 18px;
  font-family: var(--f-mono); font-size: 14px; font-weight: 600; color: var(--cy);
  border: 1px solid rgba(62,230,255,.35); background: rgba(62,230,255,.07);
  box-shadow: 0 0 0 6px rgba(62,230,255,.045);
}
.step h3 { font-size: 18.5px; margin-bottom: 9px; }
.step p { margin: 0; font-size: 14.6px; color: var(--muted); }
.step::after {
  content: ''; position: absolute; top: 52px; right: -12px; width: 24px; height: 1px;
  background: linear-gradient(90deg, rgba(62,230,255,.5), transparent);
}
.step:last-child::after { display: none; }

/* ============================ CONTACTO ============================ */

.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: start; }

.contact-side { padding: 34px 30px; position: sticky; top: calc(var(--nav-h) + 20px); }
.contact-side h2 { font-size: clamp(27px, 3.2vw, 40px); }
.contact-side p { color: var(--ink-soft); margin: 0 0 26px; }
.ways { display: grid; gap: 12px; margin-bottom: 26px; }
.way {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 17px; border-radius: 16px;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  transition: border-color .25s, transform .25s, background .25s;
}
.way:hover { border-color: var(--line-2); transform: translateX(4px); background: rgba(255,255,255,.04); }
.way .ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-content: center; flex: none; border: 1px solid var(--line); }
.way .ico svg { width: 20px; height: 20px; }
.way.wsp .ico { background: rgba(37,211,102,.12); border-color: rgba(37,211,102,.32); }
.way.wsp .ico svg { fill: var(--ok); }
.way.mail .ico { background: rgba(123,97,255,.12); border-color: rgba(123,97,255,.32); }
.way.mail .ico svg { stroke: var(--vi); fill: none; stroke-width: 1.6; }
.way b { display: block; font-family: var(--f-display); font-size: 15px; line-height: 1.3; }
.way small { color: var(--muted); font-size: 12.8px; }
.way .pref { margin-left: auto; font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ok); border: 1px solid rgba(37,211,102,.3); border-radius: 999px; padding: 3px 9px; flex: none; }

/* Asistente de reserva */
.wizard { padding: 30px clamp(20px, 3vw, 32px) 28px; }
.wz-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.wz-steps { display: flex; align-items: center; gap: 9px; }
.wz-steps u {
  width: 30px; height: 4px; border-radius: 3px; background: rgba(126,160,255,.18); display: block;
  transition: background .35s;
}
.wz-steps u.on { background: var(--grad); }
.wz-count { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }

.wz-pane { display: none; animation: fade .4s ease both; }
.wz-pane.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

.wz-pane h3 { font-size: 20px; margin-bottom: 6px; }
.wz-pane > p { margin: 0 0 20px; color: var(--muted); font-size: 14.5px; }

.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  font-size: 14.4px; text-align: left; cursor: pointer;
  transition: border-color .25s, background .25s, transform .2s, color .25s;
}
.opt:hover { border-color: var(--line-2); transform: translateY(-2px); }
.opt u {
  width: 19px; height: 19px; border-radius: 6px; flex: none;
  border: 1.5px solid var(--line-2); display: grid; place-content: center;
  transition: background .25s, border-color .25s;
}
.opt u::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #04060d; border-bottom: 2px solid #04060d; transform: rotate(-45deg) scale(0); transition: transform .2s; }
.opt[aria-pressed="true"] { border-color: rgba(62,230,255,.45); background: rgba(62,230,255,.08); color: #fff; }
.opt[aria-pressed="true"] u { background: var(--cy); border-color: var(--cy); }
.opt[aria-pressed="true"] u::after { transform: rotate(-45deg) scale(1); }

.picker { display: grid; gap: 20px; }
.picker h4 { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 500; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot {
  padding: 10px 15px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  font-size: 13.6px; cursor: pointer; text-align: center;
  transition: border-color .25s, background .25s, transform .2s, color .25s;
}
.slot small { display: block; font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); }
.slot:hover { border-color: var(--line-2); transform: translateY(-2px); }
.slot[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #04060d; font-weight: 600; }
.slot[aria-pressed="true"] small { color: rgba(4,6,13,.7); }
.days { display: flex; flex-wrap: wrap; gap: 8px; }
.days .slot { flex: none; min-width: 78px; }

.fields { display: grid; gap: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
.field input, .field textarea {
  width: 100%; padding: 13px 16px;
  border-radius: 13px; border: 1px solid var(--line);
  background: rgba(4,6,13,.55); color: var(--ink);
  font-size: 15px;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #55628a; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--cy); background: rgba(4,6,13,.8); box-shadow: 0 0 0 4px rgba(62,230,255,.1); }
.field.bad input { border-color: #ff5f7a; box-shadow: 0 0 0 4px rgba(255,95,122,.1); }

.summary {
  margin-top: 18px; padding: 16px 18px;
  border-radius: 15px; border: 1px dashed var(--line-2);
  background: rgba(62,230,255,.04);
  font-size: 13.8px; color: var(--ink-soft);
  display: grid; gap: 6px;
}
.summary b { color: #fff; font-weight: 600; }
.summary .row { display: flex; gap: 10px; }
.summary .row span:first-child { color: var(--muted); min-width: 84px; flex: none; }

.wz-nav { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.wz-nav .btn { flex: 1; min-width: 130px; }
.wz-nav .btn-wsp { flex: 1 0 100%; }
.wz-err { color: #ff8095; font-size: 13.5px; margin: 12px 0 0; }

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

/* El pie deja aire abajo para que el botón flotante no tape «Volver arriba». */
.site-footer { border-top: 1px solid var(--line); background: rgba(4,6,13,.7); padding: 54px 0 96px; margin-top: 20px; }
.foot-top { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; margin-bottom: 36px; }
.foot-top p { max-width: 330px; color: var(--muted); font-size: 14.5px; margin: 14px 0 0; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 34px; }
.foot-col h5 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
.foot-col a { display: block; font-size: 14.4px; color: var(--ink-soft); padding: 5px 0; transition: color .2s, transform .2s; }
.foot-col a:hover { color: var(--cy); transform: translateX(3px); }
.foot-bot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot-bot .up { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; background: none; border: 0; color: var(--ink-soft); }
.foot-bot .up:hover { color: var(--cy); }

/* ============================ FLOTANTES ============================ */

.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  right: max(22px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 11px;
  padding: 14px 22px 14px 18px; border-radius: 999px;
  background: var(--ok); color: #052e16;
  font-family: var(--f-display); font-weight: 700; font-size: 15px;
  box-shadow: 0 16px 40px rgba(37,211,102,.32);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s;
}
.fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 22px 54px rgba(37,211,102,.42); }
.fab svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.fab::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid var(--ok); animation: ring 2.6s ease-out infinite;
}
@keyframes ring { 0% { transform: scale(1); opacity: .7 } 100% { transform: scale(1.28); opacity: 0 } }

/* ============================ REVELADO ============================ */

/* Por defecto todo se ve. El JS activa el ocultamiento en <html>. */
html.rv .reveal { opacity: 0; transform: translateY(26px); }
html.rv .reveal.in { opacity: 1; transform: none; transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
html.rv .reveal.d1.in { transition-delay: .08s } html.rv .reveal.d2.in { transition-delay: .16s }
html.rv .reveal.d3.in { transition-delay: .24s } html.rv .reveal.d4.in { transition-delay: .32s }
html.rv .reveal.d5.in { transition-delay: .4s }  html.rv .reveal.d6.in { transition-delay: .48s }

/* ============================ RESPONSIVE ============================ */

@media (max-width: 1040px) {
  .contact { grid-template-columns: 1fr; }
  .contact-side { position: static; }
}

@media (max-width: 900px) {
  .burger { display: inline-flex; }
  .nav {
    position: fixed; inset: 0 0 auto; top: 0;
    flex-direction: column; align-items: stretch; gap: 6px;
    padding: calc(var(--nav-h) + 18px) 20px 26px;
    background: #05070f;
    border-bottom: 1px solid var(--line);
    z-index: 1;
    transform: translateY(-102%);
    transition: transform .42s cubic-bezier(.2,.7,.3,1);
    max-height: 100svh; overflow-y: auto;
  }
  .nav.open { transform: none; }
  .nav a { padding: 14px 16px; border-radius: 14px; font-size: 16px; }
  .nav a::after { display: none; }
  .nav a:hover { background: rgba(255,255,255,.04); }
  .nav .nav-cta-mob { display: block; margin-top: 10px; }
  .nav .nav-cta-mob .btn { width: 100%; }
  .nav-cta > .btn { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .viewer-url { max-width: 100%; order: 3; flex: 1 0 100%; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding-top: calc(var(--nav-h) + 22px); }
  .hero-cta .btn { width: 100%; }
  .grid-proj { grid-template-columns: 1fr; }
  .fab { padding: 15px; }
  .fab span { display: none; }
  .frame.mobile { width: 100%; }
  .viewer-tools { width: 100%; margin-left: 0; justify-content: space-between; }
  .wz-nav .btn { flex: 1 0 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  html.rv .reveal { opacity: 1; transform: none; }
}
