.sec { padding: clamp(5rem, 12vh, 9rem) 0; position: relative; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* Hero */
.hero { min-height: 100svh; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 6rem 1rem clamp(2rem, 7vh, 4rem); text-align: center; }
.hero-hud { position: absolute; left: 50%; top: 34%; width: min(54vh, 88vw); aspect-ratio: 1; transform: translate(-50%, -50%); color: var(--p2); opacity: .55; pointer-events: none; }
.hero-hud svg { width: 100%; height: 100%; }
.hero-hud .r1 { transform-origin: 200px 200px; animation: spin 80s linear infinite; }
.hero-hud .r2 { transform-origin: 200px 200px; animation: spin 50s linear infinite reverse; opacity: .6; }
.hero-hud .r3 { transform-origin: 200px 200px; animation: spin 120s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hud-corner { position: absolute; top: 6.5rem; font-size: .72rem; color: var(--muted); line-height: 1.8; }
.hud-corner b { color: var(--glow); font-weight: 500; }
[data-theme="light"] .hud-corner b { color: var(--p2); }
.hud-corner.tl { left: clamp(1rem, 4vw, 3rem); } .hud-corner.tr { right: clamp(1rem, 4vw, 3rem); text-align: right; }
.hero-copy { position: relative; z-index: 2; max-width: 900px; }
.hero-copy .cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }
.hero-copy .lead { margin-inline: auto; }
.scroll-hint { position: absolute; left: 50%; bottom: .8rem; transform: translateX(-50%); font-size: .65rem; color: var(--muted); display: none; flex-direction: column; align-items: center; gap: .4rem; }
.scroll-hint span { width: 1px; height: 28px; background: linear-gradient(var(--glow), transparent); animation: drip 1.8s infinite; }
@keyframes drip { 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; } }
@media (min-height: 760px) and (min-width: 900px) { .scroll-hint { display: flex; } }
@media (max-width: 640px) {
  .hud-corner { display: none; }
  .hero-hud { top: 28%; }
  .hero { padding-top: 5rem; }
}

/* Texto dividido */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.wi { display: inline-block; will-change: transform; }

/* Métricas */
.metrics { padding: 3rem 0; }
.metric { padding: 1.6rem 1rem; text-align: center; }
.metric .num { font-family: var(--font-h); font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; background: linear-gradient(120deg, var(--text), var(--glow)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
[data-theme="light"] .metric .num { background-image: linear-gradient(120deg, var(--p4), var(--p2)); }
.metric p { color: var(--muted); font-size: .88rem; margin-top: .3rem; }
@media (max-width: 760px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* Servicios */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; margin-top: 3rem; perspective: 1200px; }
.service { padding: 1.8rem; min-height: 230px; display: flex; flex-direction: column; gap: .8rem; }
.service .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(139, 92, 246, .3), rgba(109, 40, 217, .1)); border: 1px solid var(--border); transform: translateZ(30px); }
.service .ico svg { width: 26px; height: 26px; fill: none; stroke: var(--glow); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="light"] .service .ico svg { stroke: var(--p); }
.service h3 { font-size: 1.25rem; letter-spacing: -.02em; transform: translateZ(20px); }
.service p { color: var(--muted); font-size: .94rem; }
.service .n { position: absolute; top: 1rem; right: 1.2rem; font-size: .75rem; color: var(--muted); }

/* Proyectos */
.projects { position: relative; }
.pin-wrap { position: relative; height: 100svh; min-height: 560px; overflow: hidden; z-index: 2; }
.proj-head { position: absolute; top: 5.2rem; left: clamp(1rem, 4vw, 3rem); right: 1rem; z-index: 3; }
.proj-head h2 { margin-bottom: 0; font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
.proj-card { position: absolute; z-index: 3; left: clamp(1rem, 4vw, 3rem); bottom: clamp(5rem, 11vh, 7rem); width: min(400px, calc(100% - 2rem)); padding: 1.4rem; display: flex; flex-direction: column; gap: .8rem; }
.proj-card .sector { font-size: .72rem; color: var(--glow); text-transform: uppercase; }
.proj-card h3 { font-size: 1.7rem; }
.proj-card p { color: var(--muted); font-size: .92rem; }
.proj-card .btns { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; }
.proj-nav { position: absolute; z-index: 3; left: 50%; bottom: clamp(1.2rem, 3vh, 2rem); transform: translateX(-50%); display: flex; align-items: center; gap: .8rem; }
.proj-count { white-space: nowrap; font-size: .85rem; color: var(--muted); } .proj-count b { color: var(--text); font-weight: 500; }
.proj-dots { display: flex; gap: 6px; }
.proj-dots button { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: .3s; padding: 0; }
.proj-dots button.on { width: 26px; border-radius: 8px; background: var(--glow); box-shadow: var(--glow-sh); }
.proj-card.swap > * { animation: fadeUp .5s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
.proj-grid { display: none; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; padding-bottom: 4rem; }
.pcard { overflow: hidden; display: flex; flex-direction: column; }
.pcard img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.pcard .body { padding: 1.2rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.pcard .btns { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: auto; }
.pcard p { color: var(--muted); font-size: .9rem; }
body.no3d .pin-wrap, body.static-projects .pin-wrap { height: auto; min-height: 0; padding: 6rem 0 1rem; }
body.no3d .proj-card, body.no3d .proj-nav, body.static-projects .proj-card, body.static-projects .proj-nav { display: none; }
body.no3d .proj-head, body.static-projects .proj-head { position: relative; top: 0; left: auto; width: min(1200px, 100% - 2rem); margin-inline: auto; }
body.no3d .proj-grid, body.static-projects .proj-grid { display: grid; }
@media (max-width: 900px) {
  .proj-head { top: 4.6rem; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-right: -1rem; padding-right: 1rem; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .proj-card { left: 1rem; right: 1rem; width: auto; bottom: 4.6rem; padding: 1rem; gap: .5rem; }
  .proj-card h3 { font-size: 1.35rem; }
  .proj-card p { font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .proj-card .tags.stack-tags { display: none; }
  .proj-nav { bottom: .9rem; }
}


/* Proceso */
.timeline { position: relative; margin-top: 3.5rem; display: grid; gap: 2.2rem; }
.tl-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--border); transform: translateX(-50%); }
.tl-line i { display: block; width: 100%; height: 100%; transform-origin: top; transform: scaleY(0); background: linear-gradient(var(--p), var(--glow)); box-shadow: var(--glow-sh); }
.step { position: relative; width: calc(50% - 2.5rem); padding: 1.3rem 1.5rem; }
.step:nth-child(odd) { justify-self: start; }
.step:nth-child(even) { justify-self: end; }
.step::before { content: attr(data-n); position: absolute; top: 50%; width: 38px; height: 38px; margin-top: -19px; display: grid; place-items: center; border-radius: 50%; background: var(--card-solid); border: 2px solid var(--p2); font-family: var(--font-m); font-size: .8rem; box-shadow: var(--glow-sh); }
.step:nth-child(odd)::before { right: -3.4rem; margin-right: -19px; } .step:nth-child(even)::before { left: -3.4rem; margin-left: -19px; }
.step h3 { font-size: 1.3rem; margin-bottom: .3rem; } .step p { color: var(--muted); font-size: .94rem; }
@media (max-width: 760px) {
  .tl-line { left: 19px; }
  .step, .step:nth-child(even) { width: auto; margin-left: 3.4rem; justify-self: stretch; }
  .step:nth-child(odd)::before, .step:nth-child(even)::before { left: -3.4rem; right: auto; margin: -19px 0 0 0; }
}

/* Fundador */
.founder { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.founder-photo { aspect-ratio: 6 / 7; position: relative; border-radius: 28px; }
.founder-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-ph { position: absolute; inset: 0; display: none; place-items: center; background: radial-gradient(circle at 40% 30%, rgba(168, 85, 247, .5), transparent 60%), linear-gradient(160deg, var(--bg2), var(--bg0)); }
.founder-photo.no-photo .photo-ph { display: grid; }
.photo-ph span { font-family: var(--font-h); font-size: clamp(4rem, 12vw, 7rem); font-weight: 700; background: linear-gradient(120deg, #fff, var(--glow)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px var(--p)); }
.founder-photo .tag { position: absolute; left: 1rem; bottom: 1rem; font-size: .7rem; padding: .3rem .7rem; border-radius: 999px; background: rgba(5, 3, 10, .6); color: #c084fc; backdrop-filter: blur(6px); }
.founder .cta { margin-top: 1.8rem; }
.note { color: var(--glow); font-size: .78rem; margin-top: 1rem; }
[data-theme="light"] .note { color: var(--p2); }
@media (max-width: 800px) { .founder { grid-template-columns: 1fr; } .founder-photo { max-width: 360px; margin-inline: auto; width: 100%; } }

/* IA */
.ai { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.checks { display: grid; gap: .9rem; margin-top: 1.6rem; }
.checks li { padding-left: 1.8rem; position: relative; color: var(--muted); }
.checks li::before { content: '✓'; position: absolute; left: 0; color: var(--glow); font-weight: 700; }
.checks b { color: var(--text); }
.terminal { overflow: hidden; background: rgba(8, 4, 16, .85); border-color: rgba(168, 85, 247, .4); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: .7rem 1rem; border-bottom: 1px solid rgba(168, 85, 247, .25); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #4c1d95; }
.term-bar i:first-child { background: #f472b6; } .term-bar i:nth-child(2) { background: #fbbf24; } .term-bar i:nth-child(3) { background: #34d399; }
.term-bar span { margin-left: auto; font-size: .72rem; color: #a79bc4; }
.terminal pre { color: #e9ddff; padding: 1.2rem; font-size: clamp(.7rem, 1.5vw, .82rem); line-height: 1.7; min-height: 25em; white-space: pre-wrap; overflow-wrap: anywhere; }
.terminal pre::after { content: '▍'; color: var(--glow); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 860px) { .ai { grid-template-columns: 1fr; } }

/* FAQ */
.faq { margin-top: 2.5rem; display: grid; gap: .8rem; }
.faq-item { overflow: hidden; }
.faq-q { width: 100%; text-align: left; padding: 1.2rem 1.4rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-weight: 600; font-size: 1.05rem; }
.faq-q::after { content: '+'; font-size: 1.5rem; color: var(--glow); transition: transform .3s var(--ease); line-height: 1; }
.faq-q[aria-expanded="true"]::after { transform: rotate(135deg); }
.faq-a { height: 0; overflow: hidden; transition: height .4s var(--ease); }
.faq-a p { padding: 0 1.4rem 1.3rem; color: var(--muted); }

/* Contacto */
.contact { padding-bottom: 6rem; }
.contact .lead { margin-bottom: 2.2rem; }
.form { max-width: 720px; margin: 0 auto; padding: clamp(1.2rem, 3vw, 2rem); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; box-shadow: var(--shadow), 0 0 80px -20px var(--p); }
.form label { display: grid; gap: .4rem; font-size: .85rem; color: var(--muted); }
.form .full { grid-column: 1 / -1; }
.form input, .form select, .form textarea { width: 100%; padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--border); background: rgba(139, 92, 246, .08); color: var(--text); transition: .25s; resize: vertical; }
.form select option { color: #1a0b2e; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--p2); box-shadow: 0 0 0 3px rgba(168, 85, 247, .25); }
.form input.err { border-color: #f43f5e; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }
.socials { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.socials a { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.2rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card); transition: .25s; font-size: .9rem; }
.socials a:hover { border-color: var(--p2); box-shadow: var(--glow-sh); transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.socials svg.fill { fill: currentColor; stroke: none; }
.socials.sm { margin: 0; } .socials.sm a { padding: .55rem; } .socials.sm span { display: none; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 2.5rem 0 5.5rem; background: linear-gradient(transparent, rgba(76, 29, 149, .12)); }
.foot-grid { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.foot-brand { display: flex; gap: .8rem; align-items: center; } .foot-brand img { border-radius: 10px; } .foot-brand p { color: var(--muted); font-size: .85rem; }
.foot-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .9rem; color: var(--muted); } .foot-nav a:hover { color: var(--text); }
.copy { padding-inline: 4rem; text-align: center; color: var(--muted); font-size: .85rem; margin-top: 2rem; }

/* ===== Móvil ===== */
@media (max-width: 900px) {
  .sec { padding: clamp(3.5rem, 9vh, 5rem) 0; }
  .proj-dots { display: none; }
  .proj-nav { gap: 1.2rem; }
  .pcard .btns .btn, .proj-card .btns .btn { flex: 1; min-height: 44px; }
  .hero-copy .cta .btn { min-height: 48px; }
  .terminal pre { min-height: 21em; }
}
@media (max-width: 640px) {
  h2 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .hero-copy .cta { flex-direction: column; align-items: stretch; width: min(320px, 100%); margin-inline: auto; }
  .hero-copy .cta .btn { width: 100%; }
  .service { min-height: 0; padding: 1.4rem; }
  .step { padding: 1.1rem 1.2rem; }
  .form { padding: 1.1rem; }
  .form input, .form select, .form textarea { font-size: 16px; min-height: 48px; } /* 16px evita el zoom automático de iOS */
  .form textarea { min-height: 110px; }
  .socials a { flex: 1 1 100%; justify-content: center; min-height: 48px; }
  .socials.sm a { flex: none; min-height: 44px; min-width: 44px; justify-content: center; }
  .foot-grid { flex-direction: column; align-items: flex-start; }
  .footer { padding-bottom: 7rem; }
  .copy { padding-inline: 1rem; }
  .proj-card { bottom: 4.2rem; }
}
@media (max-width: 640px) {
  .proj-card { right: 4.7rem; }
  .proj-card .btns { gap: .4rem; }
  .proj-card .btns .btn { padding: .6rem .7rem; font-size: .8rem; white-space: normal; text-align: center; }
  .proj-nav { gap: .6rem; left: calc(50% + 26px); }
  .proj-count { font-size: .75rem; }
  .hero-hud { top: 28%; }
}
@media (max-width: 640px) and (max-height: 720px) {
  .hero-hud { top: 23%; width: min(44vh, 80vw); }
  .hero { padding-top: 4.5rem; padding-bottom: 5rem; }
  h1 { font-size: clamp(1.6rem, 7.2vw, 2.1rem); }
  .hero-copy .lead { font-size: .92rem; margin-top: .6rem; }
  .hero-copy .cta { margin-top: 1rem; gap: .5rem; }
}
@media (max-width: 900px) and (max-height: 760px) { .proj-card .tags { display: none; } .proj-head h2 { font-size: 1.4rem; } .proj-head { top: 4.2rem; } }
@media (max-width: 400px) { .metric { padding: 1.2rem .6rem; } .grid-4 { gap: .7rem; } }
@media (max-height: 560px) and (orientation: landscape) { .hero { min-height: 640px; } }
@media (max-width: 900px), (pointer: coarse) {
  .foot-nav { gap: 0 .4rem; }
  .foot-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .6rem; }
  .nav-brand { min-height: 44px; }
}
