/* ════════════════════════════════════════════════════════════
   vipersitoh · estilo terminal, elegante y animado
   ════════════════════════════════════════════════════════════ */
:root {
	--bg: #05070b;
	--bg-2: #0a0f17;
	--panel: rgba(13, 19, 29, .72);
	--panel-solid: #0d131d;
	--line: rgba(140, 255, 210, .12);
	--line-2: rgba(255, 255, 255, .08);
	--text: #e7eef6;
	--muted: #8d9bad;
	--dim: #5b6779;
	--acc: #4dffb5;
	--acc-2: #7c6cff;
	--acc-3: #ffb547;
	--danger: #ff6b81;
	--radius: 16px;
	--wrap: 1200px;
	--f-head: 'Space Grotesk', system-ui, sans-serif;
	--f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	--ease: cubic-bezier(.2, .8, .2, 1);
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--bg); color: var(--text);
	font: 400 17px/1.65 var(--f-body);
	-webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--acc); color: #001a0e; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--acc); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 16px; }
code, pre, .mono { font-family: var(--f-mono); }
.muted { color: var(--muted); }
.ic { flex: none; }

/* ─── Fondo: lluvia de glifos, grilla, brillo que sigue al cursor, scanlines ─── */
#matrix { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -3; opacity: .22; pointer-events: none; }
.bg-grid {
	position: fixed; inset: 0; z-index: -2; pointer-events: none;
	background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
	opacity: .35;
}
.bg-glow {
	position: fixed; inset: 0; z-index: -1; pointer-events: none;
	background: radial-gradient(600px circle at var(--mx, 70%) var(--my, 20%), rgba(77, 255, 181, .07), transparent 60%),
		radial-gradient(900px circle at 10% 90%, rgba(124, 108, 255, .08), transparent 60%);
}
.scan {
	position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .035;
	background: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px);
}

/* ─── Cabecera ─── */
.site-header {
	position: sticky; top: 0; z-index: 40;
	backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
	background: rgba(5, 7, 11, .62); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(5, 7, 11, .82); }
.hdr { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-weight: 600; }
.brand-mark { color: var(--acc); font-size: 15px; letter-spacing: -.02em; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(77, 255, 181, .05); }
.brand-name { font-size: 14px; }
.brand-name .dim { color: var(--muted); }
.caret { animation: blink 1s steps(1) infinite; color: var(--acc); }
@keyframes blink { 50% { opacity: 0; } }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { font-size: 14px; color: var(--muted); padding: 8px 10px; border-radius: 8px; transition: color .2s, background .2s; }
.nav a:hover, .nav a.on { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav .num { font-family: var(--f-mono); color: var(--acc); font-size: 12px; margin-right: 4px; }
.hdr-right { display: flex; align-items: center; gap: 12px; }
.langs { display: flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; font: 600 12px var(--f-mono); }
.langs a { padding: 5px 8px; border-radius: 7px; color: var(--muted); transition: .2s; }
.langs a:hover { color: var(--text); }
.langs a.on { background: var(--acc); color: #00160b; }
.menu-btn { display: none; padding: 8px; border-radius: 10px; border: 1px solid var(--line-2); }

/* ─── Botones ─── */
.btn {
	--bc: var(--acc);
	display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 12px;
	font: 600 15px/1 var(--f-body); letter-spacing: .01em; white-space: nowrap;
	transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s, border-color .25s;
	position: relative; isolation: isolate;
}
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 10px; }
.btn-primary { background: var(--acc); color: #00180c; box-shadow: 0 0 0 1px rgba(77, 255, 181, .4), 0 10px 40px -10px rgba(77, 255, 181, .6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--acc), 0 14px 50px -8px rgba(77, 255, 181, .8); }
.btn-ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--text); }
.btn-ghost:hover { border-color: var(--acc); color: var(--acc); transform: translateY(-2px); }
.btn-link { color: var(--muted); padding-inline: 6px; }
.btn-link:hover { color: var(--acc); }
.case .btn-primary, .proj .btn-primary { background: var(--acc); }

/* ─── Hero ─── */
.hero { position: relative; min-height: calc(100svh - 68px); display: flex; flex-direction: column; justify-content: center; padding: 60px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 500 13px var(--f-mono); color: var(--acc); padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; background: rgba(77, 255, 181, .04); margin: 0 0 28px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 0 rgba(77, 255, 181, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(77, 255, 181, 0); } 100% { box-shadow: 0 0 0 0 rgba(77, 255, 181, 0); } }
.hero-name { font: 700 clamp(56px, 9vw, 128px)/.92 var(--f-head); letter-spacing: -.045em; margin: 0 0 24px; display: flex; flex-direction: column; }
.hero-name .g2 { color: transparent; -webkit-text-stroke: 1.5px rgba(231, 238, 246, .85); }
.hero-role { font: 500 clamp(18px, 2.2vw, 24px) var(--f-mono); color: var(--text); margin: 0 0 18px; min-height: 1.6em; }
.hero-role .prompt { color: var(--acc); }
.hero-role .typed { background: linear-gradient(90deg, var(--acc), #a8ffdc 60%, var(--acc-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { color: var(--muted); font-size: 18.5px; max-width: 580px; margin: 0 0 36px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Efecto glitch */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.glitch::before { color: var(--acc); transform: translate(-2px, 0); clip-path: inset(0 0 60% 0); }
.glitch::after { color: var(--acc-2); transform: translate(2px, 0); clip-path: inset(55% 0 0 0); }
.glitch.on::before, .glitch.on::after, .glitch:hover::before, .glitch:hover::after { opacity: .85; animation: glitch .35s steps(2) 2; }
.hero-name .g2::before, .hero-name .g2::after { -webkit-text-stroke: 0; }
@keyframes glitch {
	0% { clip-path: inset(10% 0 70% 0); transform: translate(-4px, 1px); }
	33% { clip-path: inset(60% 0 10% 0); transform: translate(4px, -1px); }
	66% { clip-path: inset(30% 0 40% 0); transform: translate(-2px, 2px); }
	100% { clip-path: inset(80% 0 5% 0); transform: translate(2px, 0); }
}

/* Ventana de terminal */
.term { background: rgba(8, 12, 19, .86); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .02) inset, 0 0 80px -30px rgba(77, 255, 181, .25); overflow: hidden; backdrop-filter: blur(10px); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font: 12px var(--f-mono); color: var(--dim); }
.term-body { padding: 22px 22px 26px; font: 14px/1.7 var(--f-mono); min-height: 330px; }
.term-body .cmd { margin: 0; color: var(--acc); }
.term-body .out { margin: 2px 0 14px; color: #c8d3df; white-space: pre-wrap; font: inherit; }
.term-body .cursor { display: inline-block; width: 9px; height: 1.1em; vertical-align: -3px; background: var(--acc); animation: blink 1s steps(1) infinite; }

/* Cinta de tecnologías */
.marquee { margin-top: 72px; border-block: 1px solid var(--line-2); overflow: hidden; padding: 16px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 22px; width: max-content; animation: marquee 50s linear infinite; font: 500 14px var(--f-mono); color: var(--muted); }
.marquee-track b { color: var(--acc); font-weight: 400; opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }
.scroll-hint { position: absolute; right: max(16px, calc((100vw - var(--wrap)) / 2)); bottom: 110px; display: flex; flex-direction: column; align-items: center; gap: 10px; font: 11px var(--f-mono); color: var(--dim); writing-mode: vertical-rl; }
.scroll-hint i { width: 1px; height: 60px; background: linear-gradient(var(--acc), transparent); animation: drop 2s var(--ease) infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ─── Secciones ─── */
.sec { padding: 120px 0; position: relative; }
.sec-head { max-width: 760px; margin-bottom: 56px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-kicker { font: 500 13px var(--f-mono); color: var(--acc); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; }
.sec-kicker::before { content: '// '; color: var(--dim); }
.sec-title { font: 700 clamp(34px, 4.6vw, 58px)/1.04 var(--f-head); letter-spacing: -.035em; margin: 0 0 18px; }
.sec-title.big { font-size: clamp(40px, 6vw, 76px); }
.sec-lead { color: var(--muted); font-size: 19px; margin: 0; }
.side-title { font: 600 13px var(--f-mono); color: var(--acc); text-transform: uppercase; letter-spacing: .08em; margin: 40px 0 16px; }

/* Perfil */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 72px; align-items: center; }
.about-copy > p { color: #c3cdd8; margin: 0 0 16px; }
.hud { position: relative; border-radius: 22px; padding: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(77, 255, 181, .08), rgba(124, 108, 255, .06)); }
.hud img { border-radius: 14px; filter: saturate(1.05) contrast(1.03); aspect-ratio: 1; object-fit: cover; width: 100%; }
.hud-c { position: absolute; width: 26px; height: 26px; border: 2px solid var(--acc); }
.hud-c.tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.hud-c.tr { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.hud-c.bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.hud-c.br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.hud-tag { position: absolute; left: 28px; bottom: 28px; font: 600 11px var(--f-mono); color: var(--acc); background: rgba(0, 0, 0, .65); padding: 5px 9px; border-radius: 6px; border: 1px solid var(--line); }
.hud-scan { position: absolute; left: 14px; right: 14px; top: 14px; height: 2px; background: linear-gradient(90deg, transparent, var(--acc), transparent); box-shadow: 0 0 18px var(--acc); animation: hudscan 4s var(--ease) infinite; opacity: .7; }
@keyframes hudscan { 0%, 100% { top: 14px; } 50% { top: calc(100% - 16px); } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 36px 0 0; }
.stat { border: 1px solid var(--line-2); border-radius: 14px; padding: 18px 16px; background: var(--panel); }
.stat dt { font: 700 38px/1 var(--f-head); color: var(--acc); letter-spacing: -.03em; }
.stat dd { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.4; }

/* Tarjetas con brillo que sigue al cursor */
.card { position: relative; border-radius: var(--radius); padding: 28px; background: var(--panel); border: 1px solid var(--line-2); overflow: hidden; transition: transform .35s var(--ease), border-color .3s; }
.card.glow::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: radial-gradient(300px circle at var(--x, 50%) var(--y, 0%), var(--acc), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; }
.card.glow::after { content: ''; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--x, 50%) var(--y, 0%), rgba(77, 255, 181, .06), transparent 50%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card.glow:hover::before, .card.glow:hover::after { opacity: 1; }
.card:hover { transform: translateY(-4px); }
.card h3 { font: 600 21px/1.25 var(--f-head); margin: 0 0 14px; letter-spacing: -.01em; }
.card p { color: var(--muted); margin: 0; font-size: 15.5px; }
.card-ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; color: var(--acc); background: rgba(77, 255, 181, .07); border: 1px solid var(--line); margin-bottom: 20px; }
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 500 12.5px var(--f-mono); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .025); color: #c8d3df; }
.chips.small li { font-size: 12px; padding: 5px 9px; }

/* Proyectos */
.proj { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; margin-bottom: 140px; }
.proj:last-child { margin-bottom: 0; }
.proj.flip .proj-visual { order: 2; }
.proj-visual { position: relative; }
.browser { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel-solid); box-shadow: 0 50px 120px -50px rgba(0, 0, 0, .95), 0 0 120px -60px var(--acc); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #111925; border-bottom: 1px solid var(--line-2); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2b3646; }
.browser-bar span { margin: 0 auto; font: 11.5px var(--f-mono); color: var(--muted); background: rgba(255, 255, 255, .04); padding: 4px 16px; border-radius: 6px; }
.slides { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.04); transition: opacity 1s var(--ease), transform 6s linear; }
.slides img.on { opacity: 1; transform: scale(1); }
.phone { display: block; border-radius: 30px; padding: 7px; background: #0b0f16; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9); overflow: hidden; }
.phone img { border-radius: 24px; width: 100%; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; }
.phone-float { position: absolute; width: 26%; right: -4%; bottom: -12%; transform: rotate(4deg); animation: float 6s ease-in-out infinite; }
.proj.flip .phone-float { right: auto; left: -4%; transform: rotate(-4deg); }
@keyframes float { 50% { translate: 0 -12px; } }
.phones-fan { display: flex; justify-content: center; align-items: center; padding: 30px 0; }
.phones-fan .phone { width: 34%; margin: 0 -3%; transition: transform .5s var(--ease); }
.phones-fan .phone:nth-child(1) { transform: rotate(-9deg) translateY(30px); }
.phones-fan .phone:nth-child(2) { z-index: 2; transform: scale(1.08); box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .95), 0 0 100px -40px var(--acc); }
.phones-fan .phone:nth-child(3) { transform: rotate(9deg) translateY(30px); }
.proj:hover .phones-fan .phone:nth-child(1) { transform: rotate(-13deg) translate(-20px, 26px); }
.proj:hover .phones-fan .phone:nth-child(3) { transform: rotate(13deg) translate(20px, 26px); }
.proj-tag { font: 500 13px var(--f-mono); color: var(--acc); margin: 0 0 14px; }
.proj-tag .idx { color: var(--dim); margin-right: 6px; }
.proj-title { font: 700 clamp(36px, 4.5vw, 56px)/1 var(--f-head); letter-spacing: -.04em; margin: 0 0 14px; }
.proj-title a { background: linear-gradient(90deg, var(--text), var(--text)) no-repeat 0 100% / 0 3px; transition: background-size .4s var(--ease); }
.proj-title a:hover { background-size: 100% 3px; background-image: linear-gradient(90deg, var(--acc), var(--acc)); }
.proj-tagline { font-size: 20px; color: var(--text); margin: 0 0 14px; line-height: 1.45; }
.proj-copy .muted { font-size: 15.5px; margin: 0 0 22px; }
.proj-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; align-items: center; }

/* Método: pipeline estilo CI */
.pipeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; position: relative; }
.pipeline::before { content: ''; position: absolute; top: 19px; left: 20px; right: 20px; height: 2px; background: var(--line-2); }
.pipeline::after { content: ''; position: absolute; top: 19px; left: 20px; height: 2px; width: 0; background: linear-gradient(90deg, var(--acc), var(--acc-2)); box-shadow: 0 0 14px var(--acc); transition: width 2.2s var(--ease); }
.pipeline.in::after { width: calc(100% - 40px); }
.stage { position: relative; padding-top: 56px; }
.stage-dot { position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--line); color: transparent; transition: .4s var(--ease) calc(var(--d) + 300ms); z-index: 1; }
.pipeline.in .stage-dot { border-color: var(--acc); color: var(--acc); box-shadow: 0 0 20px -2px rgba(77, 255, 181, .6); }
.stage-job { font-size: 11.5px; color: var(--dim); }
.stage-job .ok { color: var(--acc); }
.stage h3 { font: 600 22px var(--f-head); margin: 6px 0 8px; }
.stage p { color: var(--muted); font-size: 15px; margin: 0; }

/* Trayectoria */
.exp-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; }
.timeline { list-style: none; padding: 0; margin: 40px 0 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 40px 30px; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--acc); box-shadow: 0 0 12px var(--acc); }
.timeline time { font: 500 13px var(--f-mono); color: var(--acc); }
.timeline h3 { font: 600 22px/1.3 var(--f-head); margin: 6px 0 4px; }
.timeline .org { color: var(--text); opacity: .8; margin: 0 0 8px; font-size: 15px; }
.timeline p { color: var(--muted); margin: 0; font-size: 15.5px; }
.clients { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.clients li { padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 2px; transition: border-color .3s, transform .3s var(--ease); }
.clients li:hover { border-color: var(--line); transform: translateX(4px); }
.clients strong { font-size: 14.5px; font-weight: 600; }
.clients span { font: 12px var(--f-mono); color: var(--acc); }
.edu { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.edu li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; font-size: 15px; color: #c8d3df; }
.edu code { color: var(--acc); font-size: 12.5px; padding-top: 3px; }
.edu em { color: var(--muted); font-style: normal; }

.gov-box { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 28px; margin-top: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, rgba(77, 255, 181, .07), rgba(124, 108, 255, .05)); }
.gov-box strong { font: 700 64px/1 var(--f-head); color: var(--acc); letter-spacing: -.04em; }
.gov-box h3 { font: 600 20px var(--f-head); margin: 0 0 6px; }
.gov-box p { margin: 0; color: var(--muted); font-size: 15px; }
.exp-grid > div:last-child .side-title:first-of-type { margin-top: 32px; }

/* Showreel y videos */
.reel { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 60px 140px -60px rgba(0, 0, 0, 1), 0 0 140px -70px var(--acc); background: #000; max-width: 1080px; margin-inline: auto; }
.reel video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.reel-vertical { max-width: 420px; }
.reel-vertical video { aspect-ratio: 9 / 16; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact-cards { display: grid; gap: 12px; margin: 36px 0 22px; }
.ccard { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); transition: .3s var(--ease); font-weight: 600; }
.ccard .ic { color: var(--acc); }
.ccard small { display: block; font: 500 12px var(--f-mono); color: var(--muted); margin-bottom: 2px; }
.ccard:hover { border-color: var(--acc); transform: translateX(6px); }
.loc { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.dl-label { font: 500 13px var(--f-mono); color: var(--muted); margin-right: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--f-mono); padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--acc); transition: .2s; }
.pill:hover { background: var(--acc); color: #00180c; }
.cform-body { padding: 24px; display: grid; gap: 16px; }
.fld { display: grid; gap: 6px; }
.fld span { font: 500 12.5px var(--f-mono); color: var(--acc); }
.fld input, .fld textarea { width: 100%; font: 15px var(--f-body); color: var(--text); background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s; resize: vertical; }
.fld input:focus, .fld textarea:focus { outline: 0; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(77, 255, 181, .15); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cform .btn { justify-self: start; }
.cform-status { margin: 0; font: 500 14px var(--f-mono); min-height: 1.4em; }
.cform-status.ok { color: var(--acc); }
.cform-status.err { color: var(--danger); }
.cform-note { margin: 0; font-size: 12.5px; color: var(--dim); }

/* Pie */
.site-footer { border-top: 1px solid var(--line-2); padding: 48px 0 40px; margin-top: 40px; }
.ftr { display: grid; gap: 14px; justify-items: center; text-align: center; }
.ftr-status { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; align-items: center; font-size: 12.5px; color: var(--muted); }
.ftr-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); animation: pulse 2s infinite; }
.ftr-made { color: var(--muted); margin: 0; font-size: 14px; }
.ftr-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; font-size: 14px; }
.ftr-links a { display: inline-flex; gap: 8px; align-items: center; color: #c8d3df; }
.ftr-links a:hover { color: var(--acc); }
.ftr-copy { color: var(--dim); font: 12px var(--f-mono); margin: 0; }

/* ─── Página de proyecto ─── */
.case-hero { padding: 72px 0 48px; }
.crumb { display: inline-flex; align-items: center; gap: 8px; font: 500 13px var(--f-mono); color: var(--muted); margin-bottom: 36px; }
.crumb:hover { color: var(--acc); }
.case-title { font: 700 clamp(56px, 10vw, 140px)/.9 var(--f-head); letter-spacing: -.05em; margin: 0 0 22px; }
.case-tagline { font-size: clamp(20px, 2.4vw, 28px); max-width: 820px; margin: 0 0 16px; line-height: 1.35; }
.case-client code { color: var(--acc); font-size: 14px; }
.case-trailer { margin-bottom: 40px; }
.case-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 64px; }
.lead-xl { font-size: 22px; line-height: 1.55; color: #d7e0ea; margin-top: 0; }
.case-body p { color: #c3cdd8; }
.callout { display: flex; gap: 12px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: rgba(77, 255, 181, .04); color: var(--text) !important; margin-top: 28px; }
.callout .ic { color: var(--acc); margin-top: 4px; }
.case-aside .side-title:first-child { margin-top: 6px; }
.dl-list { display: grid; gap: 10px; }
.dl-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); transition: .25s; }
.dl-list a:hover { border-color: var(--acc); color: var(--acc); }
.dl-list small { color: var(--muted); font-family: var(--f-mono); margin-left: 6px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat-n { color: var(--acc); font-size: 13px; display: block; margin-bottom: 14px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.browser.mini img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; transition: transform .6s var(--ease); }
.browser.mini { transition: transform .4s var(--ease), border-color .3s; }
.browser.mini:hover { transform: translateY(-6px); border-color: var(--acc); }
.phones-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; }
.phones-row .phone { transition: transform .4s var(--ease); }
.phones-row .phone:hover { transform: translateY(-8px) rotate(-1.5deg); }
.note { color: var(--dim); font-size: 13.5px; margin-top: 26px; font-family: var(--f-mono); }
.next-card { position: relative; display: grid; gap: 6px; padding: 48px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(255, 255, 255, .03), transparent); overflow: hidden; transition: .4s var(--ease); }
.next-card small { font: 500 13px var(--f-mono); color: var(--muted); }
.next-card strong { font: 700 clamp(40px, 6vw, 80px)/1 var(--f-head); letter-spacing: -.04em; color: var(--acc); }
.next-card span { color: var(--muted); max-width: 640px; }
.next-card .ic { position: absolute; right: 48px; top: 50%; translate: 0 -50%; color: var(--acc); transition: transform .4s var(--ease); }
.next-card:hover { border-color: var(--acc); }
.next-card:hover .ic { transform: translateX(10px); }

/* 404 y páginas genéricas */
.notfound { min-height: 60vh; display: grid; place-content: center; gap: 24px; justify-items: start; }
.nf-code { font-size: 15px; color: var(--acc); background: var(--panel); border: 1px solid var(--line); padding: 24px; border-radius: 14px; white-space: pre-wrap; }
.page-default { padding: 80px 0; }
.prose { max-width: 760px; }

/* ─── Modales ─── */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(2, 4, 8, .88); backdrop-filter: blur(8px); padding: 24px; animation: fade .3s; }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.modal-box { position: relative; width: min(100%, 1100px); }
.modal-box video { width: 100%; max-height: 86vh; border-radius: 14px; background: #000; border: 1px solid var(--line); }
.modal-close { position: absolute; top: -48px; right: 0; padding: 8px; border-radius: 10px; color: var(--text); }
.lightbox .modal-close { top: 18px; right: 18px; }
.modal-close:hover { color: var(--acc); }
.lightbox figure { margin: 0; max-width: min(1400px, 92vw); text-align: center; }
.lightbox img { max-height: 84vh; margin: auto; border-radius: 12px; border: 1px solid var(--line); }
.lightbox figcaption { color: var(--muted); font: 13px var(--f-mono); margin-top: 10px; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; padding: 14px; border-radius: 50%; border: 1px solid var(--line); background: rgba(0, 0, 0, .5); }
.lb-prev { left: 18px; } .lb-next { right: 18px; }
.lb-nav:hover { color: var(--acc); border-color: var(--acc); }

/* ─── Revelado al hacer scroll ─── */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease) var(--d, 0ms), transform .9s var(--ease) var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ─── Responsive ─── */

/* Servicios y conocimientos: tarjetas con texto + etiquetas */
.svc p { margin-bottom: 18px; }
.svc .chips { margin-top: auto; }
.svc { display: flex; flex-direction: column; }

/* Demos */
.demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.demo { display: flex; flex-direction: column; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel); overflow: hidden; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.demo:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--dc) 55%, var(--line-2)); box-shadow: 0 30px 80px -40px var(--dc); }
.demo-shot { position: relative; display: block; background: var(--panel-solid); border-bottom: 1px solid var(--line-2); }
.demo-shot > img:not(.demo-mob) { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.demo:hover .demo-shot > img:not(.demo-mob) { transform: scale(1.03); }
.demo-shot { overflow: hidden; }
.demo-shot .browser-bar span { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-mob { position: absolute; right: 12px; bottom: -40px; width: 22%; height: auto; border-radius: 10px; border: 3px solid #0b0f16; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .9); transition: transform .5s var(--ease); }
.demo:hover .demo-mob { transform: translateY(-16px); }
.demo-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.demo-body h3 { font: 600 21px/1.25 var(--f-head); margin: 0 0 8px; letter-spacing: -.01em; }
.demo-body p:not(.proj-tag) { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.demo-body .proj-tag { margin-bottom: 8px; }
.demo-body .proj-tag::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dc); margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.demo-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; align-items: center; }
.demo-more { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 44px; text-align: center; }
.demo-more p { margin: 0; font-size: 14px; }


/* Promoción */
.grow-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 30px; }
.grow { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.grow .card-ic { width: 44px; height: 44px; margin: 0; }
.grow h3 { font: 600 18px/1.3 var(--f-head); margin: 2px 0 6px; }
.grow p { color: var(--muted); margin: 0; font-size: 15px; }

/* Integraciones */
.int-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.int h3 { display: flex; align-items: center; gap: 10px; }
.int-flag { font-size: 26px; line-height: 1; }
.int dl { margin: 0; display: grid; gap: 14px; }
.int dt { font: 500 12px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--acc); margin-bottom: 8px; }
.int dd { margin: 0; }
.int-note { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 34px auto 0; color: var(--muted); text-align: center; max-width: 760px; }
.int-note .ic { color: var(--acc); flex: none; }


/* Seguridad */
.myth { display: grid; grid-template-columns: 1fr 1.6fr; gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.myth > div { padding: 26px 30px; }
.myth small { display: block; font: 500 12px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
.myth p { margin: 0; font-size: 17px; line-height: 1.5; }
.myth-x { background: rgba(255, 95, 87, .07); }
.myth-x small { color: #ff7a72; }
.myth-x p { font: 600 22px/1.35 var(--f-head); color: var(--text); text-decoration: line-through; text-decoration-color: rgba(255, 95, 87, .7); text-decoration-thickness: 2px; }
.myth-ok { background: rgba(77, 255, 181, .05); border-left: 1px solid var(--line-2); }
.myth-ok small { color: var(--acc); }
.myth-ok p { color: #c8d3df; }
.sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

@media (max-width: 1080px) {
	.nav { position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0; padding: 12px 16px 20px; background: rgba(5, 7, 11, .97); border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .4s var(--ease); margin: 0; }
	.nav.open { transform: none; }
	.nav a { padding: 14px 8px; font-size: 16px; border-bottom: 1px solid var(--line-2); }
	.menu-btn { display: grid; }
	.hdr-right { margin-left: auto; }
	.hero-grid, .about-grid, .proj, .exp-grid, .contact-grid, .case-grid { grid-template-columns: 1fr; gap: 44px; }
	.proj.flip .proj-visual { order: 0; }
	.stack-grid, .feat-grid, .demo-grid, .grow-grid { grid-template-columns: 1fr 1fr; }
	.int-grid { grid-template-columns: 1fr; }
	.myth { grid-template-columns: 1fr; }
	.myth-ok { border-left: 0; border-top: 1px solid var(--line-2); }
	.pipeline { grid-template-columns: 1fr; gap: 26px; }
	.pipeline::before, .pipeline::after { top: 20px; bottom: 20px; left: 19px; right: auto; width: 2px; height: auto; }
	.pipeline::after { height: 0; width: 2px; transition: height 2.2s var(--ease); }
	.pipeline.in::after { height: calc(100% - 40px); width: 2px; }
	.stage { padding: 0 0 0 64px; }
	.about-photo { max-width: 420px; }
	.scroll-hint { display: none; }
}
@media (max-width: 680px) {
	body { font-size: 16px; }
	.sec { padding: 84px 0; }
	.brand-name, .hdr-cv span { display: none; }
	.hdr-cv { padding: 9px; }
	.stack-grid, .feat-grid, .gallery, .clients, .demo-grid, .grow-grid, .sec-grid { grid-template-columns: 1fr; }
	.stats { grid-template-columns: 1fr 1fr; }
	.term-body { min-height: 0; font-size: 12.5px; padding: 18px; }
	.hero { padding-top: 36px; }
	.hero-cta .btn, .proj-actions .btn-primary { flex: 1 1 auto; justify-content: center; }
	.phone-float { width: 32%; right: -2%; }
	.next-card { padding: 30px; }
	.next-card .ic { display: none; }
	.edu li { grid-template-columns: 1fr; gap: 2px; }
	.phones-row { grid-template-columns: 1fr 1fr; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.js .reveal { opacity: 1; transform: none; }
	#matrix { display: none; }
}

/* ─── Página de agradecimiento ─── */
.thanks { min-height: calc(100svh - 68px - 180px); display: grid; place-items: center; padding: 80px 0; }
.thanks-wrap { max-width: 860px; text-align: left; }
.thanks-check { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; color: var(--acc); border: 2px solid var(--acc); box-shadow: 0 0 60px -10px rgba(77, 255, 181, .6); margin-bottom: 34px; animation: pulse 2.4s infinite; }
.thanks-term { margin: 36px 0; }
.thanks-term .ok { color: var(--acc); }
.thanks .hero-cta { align-items: center; }
.cf-turnstile { min-height: 65px; }
